Commit 50e8f983 authored by MaxSol1's avatar MaxSol1
Browse files

slight fix on the alerts

parent 62a466eb
...@@ -57,15 +57,15 @@ export function CheckCard({options, slug, dashboard}) { ...@@ -57,15 +57,15 @@ export function CheckCard({options, slug, dashboard}) {
if(options.objectType === 'service') { if(options.objectType === 'service') {
switch(state){ switch(state){
case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break; case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break;
case 'warning': if (!warning) {w.play(); warning = true; resetState(0,1,1,1)} break; case 'warning': if (!warning) {w.play(); warning = true; resetState(1,0,1,1)} break;
case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break; case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break;
case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,0,1,1)} break; case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,1,1,0)} break;
} }
} else if(options.objectType === 'host') { } else if(options.objectType === 'host') {
console.log(state); console.log(state);
switch(state){ switch(state){
case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break; case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break;
case 'down': if (!warning) { w.play(); warning = true; resetState(0,1,1,1)} break; case 'down': if (!warning) { w.play(); warning = true; resetState(1,0,1,1)} break;
} }
} }
} }
......
...@@ -180,15 +180,15 @@ export function CheckImage({options, dashboard, slug}) { ...@@ -180,15 +180,15 @@ export function CheckImage({options, dashboard, slug}) {
if(options.objectType === 'service') { if(options.objectType === 'service') {
switch(state){ switch(state){
case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break; case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break;
case 'warning': if (!warning) {w.play(); warning = true; resetState(0,1,1,1)} break; case 'warning': if (!warning) {w.play(); warning = true; resetState(1,0,1,1)} break;
case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break; case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break;
case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,0,1,1)} break; case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,1,1,0)} break;
} }
} else if(options.objectType === 'host') { } else if(options.objectType === 'host') {
console.log(state); console.log(state);
switch(state){ switch(state){
case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break; case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break;
case 'down': if (!warning) { w.play(); warning = true; resetState(0,1,1,1)} break; case 'down': if (!warning) { w.play(); warning = true; resetState(1,0,1,1)} break;
} }
} }
} }
......
...@@ -165,15 +165,15 @@ export function CheckLine({options, dashboard, slug}) { ...@@ -165,15 +165,15 @@ export function CheckLine({options, dashboard, slug}) {
if(options.objectType === 'service') { if(options.objectType === 'service') {
switch(state){ switch(state){
case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break; case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break;
case 'warning': if (!warning) {w.play(); warning = true; resetState(0,1,1,1)} break; case 'warning': if (!warning) {w.play(); warning = true; resetState(1,0,1,1)} break;
case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break; case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break;
case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,0,1,1)} break; case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,1,1,0)} break;
} }
} else if(options.objectType === 'host') { } else if(options.objectType === 'host') {
console.log(state); console.log(state);
switch(state){ switch(state){
case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break; case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break;
case 'down': if (!warning) { w.play(); warning = true; resetState(0,1,1,1)} break; case 'down': if (!warning) { w.play(); warning = true; resetState(1,0,1,1)} break;
} }
} }
} }
......
...@@ -139,15 +139,15 @@ export function CheckSVG({options, dashboard, slug}) { ...@@ -139,15 +139,15 @@ export function CheckSVG({options, dashboard, slug}) {
if(options.objectType === 'service') { if(options.objectType === 'service') {
switch(state){ switch(state){
case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break; case 'ok': if (!ok) {o.play(); ok = true; resetState(0,1,1,1)} break;
case 'warning': if (!warning) {w.play(); warning = true; resetState(0,1,1,1)} break; case 'warning': if (!warning) {w.play(); warning = true; resetState(1,0,1,1)} break;
case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break; case 'critical': if (!critical) {c.play(); critical = true; resetState(1,1,0,1)} break;
case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,0,1,1)} break; case 'unknown': if (!unknown) {u.play(); unknown = true; resetState(1,1,1,0)} break;
} }
} else if(options.objectType === 'host') { } else if(options.objectType === 'host') {
console.log(state); console.log(state);
switch(state){ switch(state){
case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break; case 'up': if (!ok) { o.play(); ok = true; resetState(0,1,1,1)} break;
case 'down': if (!warning) { w.play(); warning = true; resetState(0,1,1,1)} break; case 'down': if (!warning) { w.play(); warning = true; resetState(1,0,1,1)} break;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment