allow to disable event rules

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-01-19 18:33:04 +01:00
parent 496c8bc785
commit 53f17b5715
24 changed files with 342 additions and 62 deletions

View File

@@ -41,6 +41,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</div>
</div>
<div class="form-group row">
<label for="idStatus" class="col-sm-2 col-form-label">Status</label>
<div class="col-sm-10">
<select class="form-control selectpicker" id="idStatus" name="status">
<option value="1" {{if eq .Admin.Status 1 }}selected{{end}}>Active</option>
<option value="0" {{if eq .Admin.Status 0 }}selected{{end}}>Inactive</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="idEmail" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
@@ -60,16 +70,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</div>
</div>
<div class="form-group row">
<label for="idStatus" class="col-sm-2 col-form-label">Status</label>
<div class="col-sm-10">
<select class="form-control selectpicker" id="idStatus" name="status">
<option value="1" {{if eq .Admin.Status 1 }}selected{{end}}>Active</option>
<option value="0" {{if eq .Admin.Status 0 }}selected{{end}}>Inactive</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="idPassword" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10">

View File

@@ -41,6 +41,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</div>
</div>
<div class="form-group row">
<label for="idStatus" class="col-sm-2 col-form-label">Status</label>
<div class="col-sm-10">
<select class="form-control selectpicker" id="idStatus" name="status">
<option value="1" {{if eq .Rule.Status 1 }}selected{{end}}>Active</option>
<option value="0" {{if eq .Rule.Status 0 }}selected{{end}}>Inactive</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="idDescription" class="col-sm-2 col-form-label">Description</label>
<div class="col-sm-10">

View File

@@ -39,6 +39,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Description</th>
<th>Trigger</th>
<th>Actions</th>
@@ -48,6 +49,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
{{range .Rules}}
<tr>
<td>{{.Name}}</td>
<td>{{if eq .Status 1 }}Active{{else}}Inactive{{end}}</td>
<td>{{.Description}}</td>
<td>{{.GetTriggerAsString}}</td>
<td>{{.GetActionsAsString}}</td>
@@ -184,11 +186,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
],
"columnDefs": [
{
"targets": [0],
"targets": [0,1],
"className": "noVis"
},
{
"targets": [3],
"targets": [2],
"visible": false
},
{
"targets": [4],
"render": $.fn.dataTable.render.ellipsis(100, true)
},
],