Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dist/css/status_panel.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/status_panel.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 61 additions & 3 deletions dist/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ <h5 class="section-heading">Threshold Preferences</h5>
<span class="gf-form-label">
<color-picker color="ctrl.panel.colors.disable" bs-tooltip="'Disabled'" onChange="ctrl.onColorChange('disable')"></color-picker>
</span>
<span class="gf-form-label">
<color-picker color="ctrl.panel.colors.dimm" bs-tooltip="'Dimmed'" onChange="ctrl.onColorChange('dimm')"></color-picker>
</span>
</div>
</div>

Expand Down Expand Up @@ -146,6 +149,13 @@ <h5 class="section-heading">Metric: {{ measurement.refId }}</h5>
<!--Display Settings-->
<div class="section gf-form-group">
<h5 class="section-heading">Display Settings</h5>
<!--Display-->
<gf-form-switch class="gf-form"
label-class="width-12"
label="Hide on tile"
ng-init="measurement.hideCard = (measurement.hideCard ? measurement.hideCard : false)"
checked="measurement.hideCard"
on-change="ctrl.onRender()"></gf-form-switch>

<!--Alias-->
<div class="gf-form">
Expand Down Expand Up @@ -199,7 +209,7 @@ <h5 class="section-heading">Display Settings</h5>
<input type="text" name="url" ng-model="measurement.url" class="gf-form-input" style="width: 300px" ng-change="ctrl.onRender()" />
</div>
</div>

<div class="section gf-form-group">
<h5 class="section-heading">Metric display type</h5>

Expand All @@ -213,7 +223,9 @@ <h5 class="section-heading">Metric display type</h5>
<strong>Threshold</strong> - Change background color of the panel if got warning / error + show the alias of the problematic metrics.
Choose Number, String or Date versions to provide formatting options. Note: Date Threshold assumes Unix Timestamps (i.e. milliseconds since Unix Epoch)<br/>
<strong>Disable Criteria</strong> - Change background color of the panel to grey if disabled. <br/>
<strong>Text Only</strong> - Show the alias + the value on the panel without any condition.
<strong>Dimming Criteria</strong> - Overlays color over the tile.<br/>
<strong>Text Only</strong> - Show the alias + the value on the panel without any condition.<br/>
<strong>Template</strong> - Displays metrics based on the template.
</info-popover>
</span>
<div class="gf-form-select-wrapper max-width-14">
Expand All @@ -227,7 +239,7 @@ <h5 class="section-heading">Metric display type</h5>
</div>

<!--Display Position-->
<div class="gf-form" ng-if="measurement.valueHandler != 'Disable Criteria'">
<div class="gf-form" ng-if="['Disable Criteria', 'Dimming Criteria'].indexOf(measurement.valueHandler) == -1">
<span class="gf-form-label width-12">
Display Position
<info-popover mode="right-normal">
Expand Down Expand Up @@ -290,6 +302,22 @@ <h5 class="section-heading">Metric display type</h5>
ng-model-onblur>
</div>
</div>
<div ng-if="measurement.valueHandler == 'Template'">
<!--Template-->
<div class="gf-form">
<span class="gf-form-label width-12">
Template
<info-popover mode="right-normal">
Specify the template to use. %ALIAS% will be replaced with the corresponding metric value.
</info-popover>
</span>
<input class="input-medium gf-form-input max-width-14" type="text"
ng-init="measurement.template = (measurement.template ? measurement.template : '')"
ng-model="measurement.template"
ng-change="ctrl.onRender()"
ng-model-onblur>
</div>
</div>
</div>

<div class="section gf-form-group">
Expand Down Expand Up @@ -385,6 +413,36 @@ <h5 class="section-heading">Disable Criteria</h5>
<input type="text" name="disabledValue" ng-model="measurement.disabledValue" class="gf-form-input max-width-12" ng-change="ctrl.onRender()" required />
</div>
</div>

<!--Dimming Section-->
<div ng-if="measurement.valueHandler == 'Dimming Criteria'">
<h5 class="section-heading">Dimming Criteria
<info-popover mode="normal">
Value can be numerical or string. When value is string then strings will be compared alphabetically.
</info-popover>
</h5>

<!--Dimming Criteria-->
<div class="gf-form">
<span class="gf-form-label width-12">
Comparsion type
</span>
<div class="gf-form-select-wrapper max-width-14">
<select class="gf-form-input"
ng-init="measurement.dimmCompare = (measurement.dimmCompare ? measurement.dimmCompare : ctrl.compareTypes[0])"
ng-model="measurement.dimmCompare"
ng-options="t for t in ctrl.compareTypes"
ng-change="ctrl.onRender()"
required></select>
</div>
</div>
<div class="gf-form">
<span class="gf-form-label width-12">
Value
</span>
<input type="text" name="dimm" ng-model="measurement.dimmCriteria" class="gf-form-input max-width-14" ng-change="ctrl.onRender()" required/>
</div>
</div>
</div>
</div>
</div>
16 changes: 8 additions & 8 deletions dist/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,32 @@ <h1>
<div ng-class="{'marquee_container': ctrl.isAutoScrollAlerts()}">
<div class="status_alerts_row" ng-class="{'marquee_element': ctrl.isAutoScrollAlerts()}">
<div ng-style="ctrl.panel.colorMode === 'Metric' && !ctrl.panel.isIgnoreOKColors && {'color':ctrl.panel.colors.ok}" ng-repeat="display in ctrl.display">
<a ng-show="display.url" ng-href="{{ display.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ display.alias }}</a>
<a ng-if-start="!display.hideCard" ng-show="display.url" ng-href="{{ display.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ display.alias }}</a>
<span ng-hide="display.url">{{ display.alias }}</span>
<span ng-show="display.isDisplayValue"> - {{ display.display_value | numberOrTextWithRegex : display.valueDisplayRegex }}</span>
<span ng-if-end ng-show="display.isDisplayValue"> - {{ display.display_value | numberOrTextWithRegex : display.valueDisplayRegex }}</span>
</div>

<div ng-style="ctrl.panel.colorMode === 'Metric' && {'color':ctrl.panel.colors.crit}"
ng-class="{'boldAlertMetric': ctrl.panel.fontFormat === 'Bold', 'italicAlertMetric': ctrl.panel.fontFormat === 'Italic'}"
ng-repeat="crit in ctrl.crit">
<a ng-show="crit.url" ng-href="{{ crit.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ crit.alias }}</a>
<a ng-if-start="!crit.hideCard" ng-show="crit.url" ng-href="{{ crit.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ crit.alias }}</a>
<span ng-hide="crit.url">{{ crit.alias }}</span>
<span ng-show="crit.isDisplayValue"> - {{ crit.display_value | numberOrTextWithRegex : crit.valueDisplayRegex }}</span>
<span ng-if-end ng-show="crit.isDisplayValue"> - {{ crit.display_value | numberOrTextWithRegex : crit.valueDisplayRegex }}</span>
</div>

<div ng-style="ctrl.panel.colorMode === 'Metric' && {'color':ctrl.panel.colors.warn}"
ng-class="{'boldAlertMetric': ctrl.panel.fontFormat === 'Bold', 'italicAlertMetric': ctrl.panel.fontFormat === 'Italic'}"
ng-repeat="warn in ctrl.warn">
<a ng-show="warn.url" ng-href="{{ warn.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ warn.alias }}</a>
<a ng-if-start="!warn.hideCard" ng-show="warn.url" ng-href="{{ warn.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ warn.alias }}</a>
<span ng-hide="warn.url">{{ warn.alias }}</span>
<span ng-show="warn.isDisplayValue"> - {{ warn.display_value | numberOrTextWithRegex : warn.valueDisplayRegex }}</span>
<span ng-if-end ng-show="warn.isDisplayValue"> - {{ warn.display_value | numberOrTextWithRegex : warn.valueDisplayRegex }}</span>
</div>

<div ng-style="ctrl.panel.colorMode === 'Metric' && {'color':ctrl.panel.colors.disable}"
ng-class="{'boldAlertMetric': ctrl.panel.fontFormat === 'Bold', 'italicAlertMetric': ctrl.panel.fontFormat === 'Italic'}"
ng-repeat="disabled in ctrl.disabled">
<a ng-show="disabled.url" ng-href="{{ disabled.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ disabled.alias }}</a>
<span ng-hide="disabled.url">{{ disabled.alias }}</span>
<a ng-if-start="!disabled.hideCard" ng-show="disabled.url" ng-href="{{ disabled.url | interpolateTemplateVars:this }}" target="_blank" style="color:inherit">{{ disabled.alias }}</a>
<span ng-if-end ng-hide="disabled.url">{{ disabled.alias }}</span>
</div>

<div class="status_extra_alerts" ng-show="ctrl.extraMoreAlerts">{{ ctrl.extraMoreAlerts }}</div>
Expand Down
2 changes: 1 addition & 1 deletion dist/module.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 97 additions & 3 deletions dist/status_ctrl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading