mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
removed side menu from display options, kept overrides in display options, moved thresholds and time regions to its own section in visualization
This commit is contained in:
parent
fadabd997a
commit
bd589b61bd
@ -12,7 +12,12 @@ function panelEditorTab(dynamicDirectiveSrv) {
|
||||
},
|
||||
directive: scope => {
|
||||
const pluginId = scope.ctrl.pluginId;
|
||||
const tabName = scope.editorTab.title.toLowerCase().replace(' ', '-');
|
||||
const tabName = scope.editorTab.title
|
||||
.toLowerCase()
|
||||
.replace(' ', '-')
|
||||
.replace('&', '')
|
||||
.replace(' ', '')
|
||||
.replace(' ', '-');
|
||||
|
||||
if (directiveCache[pluginId]) {
|
||||
if (directiveCache[pluginId][tabName]) {
|
||||
|
@ -138,6 +138,7 @@ class GraphCtrl extends MetricsPanelCtrl {
|
||||
this.addEditorTab('Display options', 'public/app/plugins/panel/graph/tab_display.html');
|
||||
this.addEditorTab('Axes', axesEditorComponent);
|
||||
this.addEditorTab('Legend', 'public/app/plugins/panel/graph/tab_legend.html');
|
||||
this.addEditorTab('Thresholds & Time Regions', 'public/app/plugins/panel/graph/tab_thresholds_time_regions.html');
|
||||
this.subTabIndex = 0;
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,5 @@
|
||||
<div class="edit-tab-with-sidemenu">
|
||||
<aside class="edit-sidemenu-aside">
|
||||
<ul class="edit-sidemenu">
|
||||
<li ng-class="{active: ctrl.subTabIndex === 0}">
|
||||
<a ng-click="ctrl.subTabIndex = 0">Draw options</a>
|
||||
</li>
|
||||
<li ng-class="{active: ctrl.subTabIndex === 1}">
|
||||
<a ng-click="ctrl.subTabIndex = 1">
|
||||
Series overrides <span class="muted">({{ctrl.panel.seriesOverrides.length}})</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-class="{active: ctrl.subTabIndex === 2}">
|
||||
<a ng-click="ctrl.subTabIndex = 2">
|
||||
Thresholds <span class="muted">({{ctrl.panel.thresholds.length}})</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-class="{active: ctrl.subTabIndex === 3}">
|
||||
<a ng-click="ctrl.subTabIndex = 3">
|
||||
Time regions <span class="muted">({{ctrl.panel.timeRegions.length}})</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<div class="edit-tab-content" ng-if="ctrl.subTabIndex === 0">
|
||||
<div class="editor-row">
|
||||
<div class="section gf-form-group">
|
||||
<h5 class="section-heading">Draw Modes</h5>
|
||||
<gf-form-switch class="gf-form" label="Bars" label-class="width-5" checked="ctrl.panel.bars" on-change="ctrl.render()"></gf-form-switch>
|
||||
@ -89,9 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-tab-content" ng-if="ctrl.subTabIndex === 1">
|
||||
<div class="gf-form-group">
|
||||
<h5>Series specific overrides <tip>Regex match example: /server[0-3]/i </tip></h5>
|
||||
<div class="gf-form-inline" ng-repeat="override in ctrl.panel.seriesOverrides" ng-controller="SeriesOverridesCtrl">
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label">alias or regex</label>
|
||||
@ -110,35 +85,26 @@
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gf-form">
|
||||
<span class="dropdown" dropdown-typeahead="overrideMenu" dropdown-typeahead-on-select="setOverride($item, $subItem)">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gf-form gf-form--grow">
|
||||
<div class="gf-form-label gf-form-label--grow"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label">
|
||||
<i class="fa fa-trash pointer" ng-click="ctrl.removeSeriesOverride(override)"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gf-form-button-row">
|
||||
<button class="btn btn-inverse" ng-click="ctrl.addSeriesOverride()">
|
||||
<i class="fa fa-plus"></i> Add series override<tip>Regex match example: /server[0-3]/i </tip>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-inverse" ng-click="ctrl.addSeriesOverride()">
|
||||
<i class="fa fa-plus"></i> Add override
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="edit-tab-content" ng-if="ctrl.subTabIndex === 2">
|
||||
<graph-threshold-form panel-ctrl="ctrl"></graph-threshold-form>
|
||||
</div>
|
||||
|
||||
<div class="edit-tab-content" ng-if="ctrl.subTabIndex === 3">
|
||||
<graph-time-region-form panel-ctrl="ctrl"></graph-time-region-form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -0,0 +1,2 @@
|
||||
<graph-threshold-form panel-ctrl="ctrl"></graph-threshold-form>
|
||||
<graph-time-region-form panel-ctrl="ctrl"></graph-time-region-form>
|
@ -1,5 +1,4 @@
|
||||
<div class="gf-form-group">
|
||||
<h5>Thresholds</h5>
|
||||
<p class="muted" ng-show="ctrl.disabled">
|
||||
Visual thresholds options <strong>disabled.</strong>
|
||||
Visit the Alert tab update your thresholds. <br>
|
||||
|
@ -1,5 +1,4 @@
|
||||
<div class="gf-form-group">
|
||||
<h5>Time regions <tip>All configured time regions refers to UTC time</tip></h5>
|
||||
<div class="gf-form-inline" ng-repeat="timeRegion in ctrl.panel.timeRegions">
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label">T{{$index+1}}</label>
|
||||
@ -58,7 +57,7 @@
|
||||
|
||||
<div class="gf-form-button-row">
|
||||
<button class="btn btn-inverse" ng-click="ctrl.addTimeRegion()">
|
||||
<i class="fa fa-plus"></i> Add time region
|
||||
<i class="fa fa-plus"></i> Add time region<tip>All configured time regions refers to UTC time</tip>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user