mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Minor cleanup now that angular panel edit is no longer
This commit is contained in:
parent
7653d8a197
commit
705cbb4095
@ -94,22 +94,6 @@ export class PanelCtrl {
|
|||||||
|
|
||||||
this.editModeInitiated = true;
|
this.editModeInitiated = true;
|
||||||
this.events.emit('init-edit-mode', null);
|
this.events.emit('init-edit-mode', null);
|
||||||
|
|
||||||
const urlTab = (this.$injector.get('$routeParams').tab || '').toLowerCase();
|
|
||||||
if (urlTab) {
|
|
||||||
this.editorTabs.forEach((tab, i) => {
|
|
||||||
if (tab.title.toLowerCase() === urlTab) {
|
|
||||||
this.editorTabIndex = i;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
changeTab(newIndex) {
|
|
||||||
this.editorTabIndex = newIndex;
|
|
||||||
const route = this.$injector.get('$route');
|
|
||||||
route.current.params.tab = this.editorTabs[newIndex].title.toLowerCase();
|
|
||||||
route.updateParams();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addEditorTab(title, directiveFn, index?, icon?) {
|
addEditorTab(title, directiveFn, index?, icon?) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="gf-form-inline">
|
<div class="gf-form-inline">
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<label class="gf-form-label width-8">Legend format</label>
|
<label class="gf-form-label">Legend</label>
|
||||||
<input type="text" class="gf-form-input" ng-model="ctrl.target.legendFormat" spellcheck='false' placeholder="legend format"
|
<input type="text" class="gf-form-input" ng-model="ctrl.target.legendFormat" spellcheck='false' placeholder="legend format"
|
||||||
data-min-length=0 data-items=1000 ng-model-onblur ng-change="ctrl.refreshMetricData()">
|
data-min-length=0 data-items=1000 ng-model-onblur ng-change="ctrl.refreshMetricData()">
|
||||||
</input>
|
</input>
|
||||||
@ -39,23 +39,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gf-form">
|
<div class="gf-form gf-form--grow">
|
||||||
<label class="gf-form-label width-6">Format as</label>
|
<label class="gf-form-label width-5">Format</label>
|
||||||
<div class="gf-form-select-wrapper width-8">
|
<div class="gf-form-select-wrapper width-8">
|
||||||
<select class="gf-form-input gf-size-auto" ng-model="ctrl.target.format" ng-options="f.value as f.text for f in ctrl.formats"
|
<select class="gf-form-input gf-size-auto" ng-model="ctrl.target.format" ng-options="f.value as f.text for f in ctrl.formats"
|
||||||
ng-change="ctrl.refresh()"></select>
|
ng-change="ctrl.refresh()"></select>
|
||||||
</div>
|
</div>
|
||||||
<gf-form-switch class="gf-form" label="Instant" label-class="width-5" checked="ctrl.target.instant" on-change="ctrl.refresh()">
|
<gf-form-switch class="gf-form" label="Instant" label-class="width-5" checked="ctrl.target.instant" on-change="ctrl.refresh()">
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
<label class="gf-form-label">
|
<label class="gf-form-label gf-form-label--grow">
|
||||||
<a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
|
<a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
|
||||||
<i class="fa fa-share-square-o"></i>
|
<i class="fa fa-share-square-o"></i>
|
||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gf-form gf-form--grow">
|
|
||||||
<div class="gf-form-label gf-form-label--grow"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</query-editor-row>
|
</query-editor-row>
|
||||||
|
Loading…
Reference in New Issue
Block a user