Triggers Panel: allow to change font size, closes #351.

This commit is contained in:
Alexander Zobnin
2017-02-10 16:31:57 +03:00
parent 437699372c
commit 0e1069da27
30 changed files with 4678 additions and 8 deletions

View File

@@ -137,6 +137,17 @@
ng-change="editor.panelCtrl.refresh()">
</div>
</div>
<div class="gf-form-inline">
<div class="gf-form max-width-17">
<label class="gf-form-label width-6">Font size</label>
<div class="gf-form-select-wrapper max-width-15">
<select class="gf-form-input"
ng-model="editor.panel.fontSize"
ng-options="f for f in editor.fontSizes"
ng-change="editor.panelCtrl.render()"></select>
</div>
</div>
</div>
</div>
<div class="section gf-form-group">

View File

@@ -36,17 +36,16 @@ class TriggerPanelEditorCtrl {
// Update metric suggestion when template variable was changed
$rootScope.$on('template-variable-value-updated', () => this.onVariableChange());
this.fontSizes = ['80%', '90%', '100%', '110%', '120%', '130%', '150%', '160%', '180%', '200%', '220%', '250%'];
this.ackFilters = [
'all triggers',
'unacknowledged',
'acknowledged'
];
this.sortByFields = [
{ text: 'last change', value: 'lastchange' },
{ text: 'severity', value: 'priority' }
];
this.showEventsFields = [
{ text: 'All', value: [0,1] },
{ text: 'OK', value: [0] },

View File

@@ -51,7 +51,8 @@ var panelDefaults = {
okEventColor: 'rgba(0, 245, 153, 0.45)',
ackEventColor: 'rgba(0, 0, 0, 0)',
scroll: true,
pageSize: 10
pageSize: 10,
fontSize: '100%',
};
var triggerStatusMap = {