Browse Source

Prometheus: Minor style fix (#17773)

* Prometheus: Minor style fix

* Updated snapshot
Torkel Ödegaard 6 years ago
parent
commit
40e5c4f8ba

+ 10 - 12
public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx

@@ -98,18 +98,16 @@ export class PromQueryEditor extends PureComponent<Props, State> {
 
     return (
       <div>
-        <div className="gf-form-input" style={{ height: 'initial' }}>
-          <PromQueryField
-            datasource={datasource}
-            query={query}
-            onRunQuery={this.onRunQuery}
-            onChange={this.onFieldChange}
-            history={[]}
-            panelData={panelData}
-            queryResponse={queryResponse}
-            datasourceStatus={DataSourceStatus.Connected} // TODO: replace with real DataSourceStatus
-          />
-        </div>
+        <PromQueryField
+          datasource={datasource}
+          query={query}
+          onRunQuery={this.onRunQuery}
+          onChange={this.onFieldChange}
+          history={[]}
+          panelData={panelData}
+          queryResponse={queryResponse}
+          datasourceStatus={DataSourceStatus.Connected} // TODO: replace with real DataSourceStatus
+        />
 
         <div className="gf-form-inline">
           <div className="gf-form">

+ 14 - 23
public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap

@@ -2,33 +2,24 @@
 
 exports[`Render PromQueryEditor with basic options should render 1`] = `
 <div>
-  <div
-    className="gf-form-input"
-    style={
+  <PromQueryField
+    datasource={
       Object {
-        "height": "initial",
+        "createQuery": [MockFunction],
+        "getPrometheusTime": [MockFunction],
       }
     }
-  >
-    <PromQueryField
-      datasource={
-        Object {
-          "createQuery": [MockFunction],
-          "getPrometheusTime": [MockFunction],
-        }
-      }
-      datasourceStatus={0}
-      history={Array []}
-      onChange={[Function]}
-      onRunQuery={[Function]}
-      query={
-        Object {
-          "expr": "",
-          "refId": "A",
-        }
+    datasourceStatus={0}
+    history={Array []}
+    onChange={[Function]}
+    onRunQuery={[Function]}
+    query={
+      Object {
+        "expr": "",
+        "refId": "A",
       }
-    />
-  </div>
+    }
+  />
   <div
     className="gf-form-inline"
   >