Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
b2db2b26
Commit
b2db2b26
authored
Nov 12, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added OR to alert_tab
parent
6e94ccea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletions
+11
-1
public/app/features/alerting/alert_def.ts
+6
-0
public/app/features/alerting/alert_tab_ctrl.ts
+4
-0
public/app/features/alerting/partials/alert_tab.html
+1
-1
No files found.
public/app/features/alerting/alert_def.ts
View file @
b2db2b26
...
...
@@ -28,6 +28,11 @@ var evalFunctions = [
{
text
:
'HAS NO VALUE'
,
value
:
'no_value'
}
];
var
evalOperators
=
[
{
text
:
'OR'
,
value
:
'or'
},
{
text
:
'AND'
,
value
:
'and'
},
];
var
reducerTypes
=
[
{
text
:
'avg()'
,
value
:
'avg'
},
{
text
:
'min()'
,
value
:
'min'
},
...
...
@@ -116,6 +121,7 @@ export default {
getStateDisplayModel
:
getStateDisplayModel
,
conditionTypes
:
conditionTypes
,
evalFunctions
:
evalFunctions
,
evalOperators
:
evalOperators
,
noDataModes
:
noDataModes
,
executionErrorModes
:
executionErrorModes
,
reducerTypes
:
reducerTypes
,
...
...
public/app/features/alerting/alert_tab_ctrl.ts
View file @
b2db2b26
...
...
@@ -18,6 +18,7 @@ export class AlertTabCtrl {
alert
:
any
;
conditionModels
:
any
;
evalFunctions
:
any
;
evalOperators
:
any
;
noDataModes
:
any
;
executionErrorModes
:
any
;
addNotificationSegment
;
...
...
@@ -41,6 +42,7 @@ export class AlertTabCtrl {
this
.
$scope
.
ctrl
=
this
;
this
.
subTabIndex
=
0
;
this
.
evalFunctions
=
alertDef
.
evalFunctions
;
this
.
evalOperators
=
alertDef
.
evalOperators
;
this
.
conditionTypes
=
alertDef
.
conditionTypes
;
this
.
noDataModes
=
alertDef
.
noDataModes
;
this
.
executionErrorModes
=
alertDef
.
executionErrorModes
;
...
...
@@ -194,6 +196,7 @@ export class AlertTabCtrl {
query
:
{
params
:
[
'A'
,
'5m'
,
'now'
]},
reducer
:
{
type
:
'avg'
,
params
:
[]},
evaluator
:
{
type
:
'gt'
,
params
:
[
null
]},
operator
:
{
type
:
'and'
},
};
}
...
...
@@ -250,6 +253,7 @@ export class AlertTabCtrl {
cm
.
queryPart
=
new
QueryPart
(
source
.
query
,
alertDef
.
alertQueryDef
);
cm
.
reducerPart
=
alertDef
.
createReducerPart
(
source
.
reducer
);
cm
.
evaluator
=
source
.
evaluator
;
cm
.
operator
=
source
.
operator
;
return
cm
;
}
...
...
public/app/features/alerting/partials/alert_tab.html
View file @
b2db2b26
...
...
@@ -38,7 +38,7 @@
<h5
class=
"section-heading"
>
Conditions
</h5>
<div
class=
"gf-form-inline"
ng-repeat=
"conditionModel in ctrl.conditionModels"
>
<div
class=
"gf-form"
>
<
span
class=
"gf-form-label query-keyword width-5"
ng-if=
"$index"
>
AND
</span
>
<
metric-segment-model
css-class=
"query-keyword"
ng-if=
"$index"
property=
"conditionModel.operator.type"
options=
"ctrl.evalOperators"
custom=
"false"
></metric-segment-model
>
<span
class=
"gf-form-label query-keyword width-5"
ng-if=
"$index===0"
>
WHEN
</span>
</div>
<div
class=
"gf-form"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment