Add disable alarms as an alarm command
parent
29e91f48e6
commit
007dce45fb
|
@ -228,7 +228,7 @@ class MonitorsController extends AppController {
|
|||
// arm/disarm alarms
|
||||
// expected format: http(s):/portal-api-url/monitors/alarm/id:M/command:C.json
|
||||
// where M=monitorId
|
||||
// where C=on|off|status
|
||||
// where C=on|off|status|disable
|
||||
public function alarm() {
|
||||
$id = $this->request->params['named']['id'];
|
||||
if ( !$this->Monitor->exists($id) ) {
|
||||
|
@ -245,6 +245,10 @@ class MonitorsController extends AppController {
|
|||
$q = '-c';
|
||||
$verbose = '-v';
|
||||
break;
|
||||
case 'disable':
|
||||
$q = '-n';
|
||||
$verbose = '-v';
|
||||
break;
|
||||
case 'status':
|
||||
$verbose = ''; // zmu has a bug - gives incorrect verbose output in this case
|
||||
$q = '-s';
|
||||
|
|
Loading…
Reference in New Issue