mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Query editor row style update & sass cleanup
This commit is contained in:
parent
a231e57c08
commit
16d476d228
@ -177,7 +177,6 @@ export class QueryInspector extends PureComponent<Props, State> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { response, isLoading } = this.state.dsQuery;
|
const { response, isLoading } = this.state.dsQuery;
|
||||||
const { isMocking } = this.state;
|
|
||||||
const openNodes = this.getNrOfOpenNodes();
|
const openNodes = this.getNrOfOpenNodes();
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
@ -199,20 +198,7 @@ export class QueryInspector extends PureComponent<Props, State> {
|
|||||||
</CopyToClipboard>
|
</CopyToClipboard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!isMocking && <JSONFormatter json={response} open={openNodes} onDidRender={this.setFormattedJson} />}
|
<JSONFormatter json={response} open={openNodes} onDidRender={this.setFormattedJson} />
|
||||||
{isMocking && (
|
|
||||||
<div className="query-troubleshooter__body">
|
|
||||||
<div className="gf-form p-l-1 gf-form--v-stretch">
|
|
||||||
<textarea
|
|
||||||
className="gf-form-input"
|
|
||||||
style={{ width: '95%' }}
|
|
||||||
rows={10}
|
|
||||||
onInput={this.setMockedResponse}
|
|
||||||
placeholder="JSON"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -31,48 +31,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.gf-form-query-content {
|
|
||||||
flex-grow: 2;
|
|
||||||
|
|
||||||
&--collapsed {
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.gf-form-label {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
width: 100%;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.gf-form-query-letter-cell {
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.gf-form-query-letter-cell-carret {
|
|
||||||
display: inline-block;
|
|
||||||
width: 0.7rem;
|
|
||||||
position: relative;
|
|
||||||
left: -2px;
|
|
||||||
}
|
|
||||||
.gf-form-query-letter-cell-letter {
|
|
||||||
font-weight: bold;
|
|
||||||
color: $blue;
|
|
||||||
}
|
|
||||||
.gf-form-query-letter-cell-ds {
|
|
||||||
color: $text-color-weak;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.gf-query-ds-label {
|
|
||||||
text-align: center;
|
|
||||||
width: 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grafana-metric-options {
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tight-form-func {
|
.tight-form-func {
|
||||||
background: $tight-form-func-bg;
|
background: $tight-form-func-bg;
|
||||||
|
|
||||||
@ -124,28 +82,6 @@ input[type='text'].tight-form-func-param {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.query-troubleshooter {
|
|
||||||
font-size: $font-size-sm;
|
|
||||||
margin: $gf-form-margin;
|
|
||||||
border: 1px solid $btn-secondary-bg;
|
|
||||||
min-height: 100px;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query-troubleshooter__header {
|
|
||||||
float: right;
|
|
||||||
font-size: $font-size-sm;
|
|
||||||
text-align: right;
|
|
||||||
padding: $input-padding-y $input-padding-x;
|
|
||||||
a {
|
|
||||||
margin-left: $spacer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.query-troubleshooter__body {
|
|
||||||
padding: $spacer 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rst-text::before {
|
.rst-text::before {
|
||||||
content: ' ';
|
content: ' ';
|
||||||
}
|
}
|
||||||
@ -202,8 +138,8 @@ input[type='text'].tight-form-func-param {
|
|||||||
background: $page-bg;
|
background: $page-bg;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
.query-editor-row__ref-id {
|
.query-editor-row__ref-id {
|
||||||
font-weight: $font-weight-semi-bold;
|
font-weight: $font-weight-semi-bold;
|
||||||
color: $blue;
|
color: $blue;
|
||||||
@ -256,7 +192,7 @@ input[type='text'].tight-form-func-param {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.query-editor-row__body {
|
.query-editor-row__body {
|
||||||
margin: 0 0 10px 40px;
|
margin: 2px 0 10px 40px;
|
||||||
background: $page-bg;
|
background: $page-bg;
|
||||||
|
|
||||||
&--collapsed {
|
&--collapsed {
|
||||||
|
Loading…
Reference in New Issue
Block a user