Add alert rule option to invert devices and groups "map to" list (#10954)

* Add alert rule option to invert map to

* Add alert rule option to invert map to

* Update 2019_12_17_151314_add_invert_map_to_alert_rules.php

* fix invert map to does not work if several groups are set in map to

* fix invert map to does not work if several groups are set in map to

* fix invert map to does not work if several groups are set in map to

* Clarify labels

* Clarify labels

* Clarify labels

* Clarify labels

* fix invert map to at rule creation

* clarify invert label
This commit is contained in:
louis-oui
2020-01-15 18:40:01 +01:00
committed by Kevin Krumm
parent e3156cbef6
commit 7a8d0b9e09
6 changed files with 71 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddInvertMapToAlertRules extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('alert_rules', function (Blueprint $table) {
$table->boolean('invert_map')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('alert_rules', function (Blueprint $table) {
$table->dropColumn(['invert_map']);
});
}
}