123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- {{!
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- }}
- <div id="alert-definition-details">
- <div class="row-fluid">
- <div class="span9">
- <div class="definition-name">
- {{#if controller.editing.label.isEditing}}
- <div {{bindAttr class="controller.editing.label.isError:error :control-group"}}>
- {{view Em.TextField valueBinding="controller.editing.label.value"}}
- </div>
- <div class="edit-buttons">
- <button {{action cancelEdit controller.editing.label target="controller"}} class="btn">{{t common.cancel}}</button>
- <button {{bindAttr disabled="controller.editing.label.isError"}} {{action saveEdit controller.editing.label target="controller"}}
- class="btn btn-primary">{{t common.save}}
- </button>
- </div>
- {{else}}
- {{{controller.content.status}}} {{controller.content.label}}
- {{/if}}
- {{#unless controller.editing.label.isEditing}}
- <a {{action edit controller.editing.label target="controller"}} class="edit-description-button"><i
- class="icon-pencil"></i></a>
- {{/unless}}
- </div>
- <div><a href="javascript:void(null)" data-toggle="modal" {{action back}}><i
- class="icon-arrow-left"></i> {{t common.back}}</a></div>
- <div class="definition-details-block">
- <strong>{{t common.description}}</strong>
- {{#unless controller.editing.description.isEditing}}
- <a {{action edit controller.editing.description target="controller"}} class="pull-right edit-link">
- <strong>{{t common.edit}}</strong>
- </a>
- {{/unless}}
- <hr>
- {{#if controller.editing.description.isEditing}}
- <div {{bindAttr class="controller.editing.description.isError:error :control-group :text-area-edit"}}>
- {{view Em.TextArea valueBinding="controller.editing.description.value"}}
- </div>
- <div class="edit-buttons">
- <button {{action cancelEdit controller.editing.description target="controller"}}
- class="btn">{{t common.cancel}}</button>
- <button {{bindAttr disabled="controller.editing.description.isError"}} {{action saveEdit controller.editing.description target="controller"}}
- class="btn btn-primary">{{t common.save}}
- </button>
- </div>
- {{else}}
- <div class="multiline-text">
- {{controller.content.description}}
- </div>
- {{/if}}
- </div>
- <div class="definition-details-block">
- <strong>{{t alerts.thresholds}}</strong>
- {{#unless App.router.mainAlertDefinitionConfigsController.canEdit}}
- <a {{action editConfigs target="App.router.mainAlertDefinitionConfigsController"}} class="pull-right edit-link">
- <strong>{{t common.edit}}</strong>
- </a>
- {{/unless}}
- <hr>
- {{view App.AlertDefinitionConfigsView contentBinding="view.controller.content" canEdit=false}}
- {{#if App.router.mainAlertDefinitionConfigsController.canEdit}}
- <div class="edit-buttons">
- <button {{action cancelEditConfigs target="App.router.mainAlertDefinitionConfigsController"}} class="btn">{{t common.cancel}}</button>
- <button {{bindAttr disabled="controller.editing.thresholds.isError"}} {{action saveConfigs target="App.router.mainAlertDefinitionConfigsController"}}
- class="btn btn-primary">{{t common.save}}
- </button>
- </div>
- {{/if}}
- </div>
- </div>
- <div class="span3 right-column">
- <div class="service-name">
- {{t common.service}}: <span class="label label-info">{{controller.content.service.displayName}}</span>
- </div>
- <div>
- {{#if controller.content.enabled}}
- <button {{action toggleState target="controller"}} class="btn btn-danger"><i
- class="icon-power-off"></i> {{t alerts.definition.details.disable}}</button>
- {{else}}
- <button {{action toggleState target="controller"}} class="btn btn-success"><i
- class="icon-power-off"></i> {{t alerts.definition.details.enable}}</button>
- {{/if}}
- <button {{action deleteAlertDefinition target="controller"}} class="btn btn-primary"><i
- class="icon-trash"></i> {{t common.delete}}</button>
- </div>
- <div class="properties-list">
- <span>{{t common.type}}: {{controller.content.type}}</span>
- <table>
- <tbody>
- <tr>
- <td>{{t alerts.definition.details.groups}}:</td>
- <td>HDFS Default (Admins)</td>
- </tr>
- <tr>
- <td></td>
- <td><strong>Group2 (Infra)</strong></td>
- </tr>
- </tbody>
- </table>
- <span>{{t alerts.table.header.lastTriggered}} : {{controller.content.lastTriggered}}</span>
- </div>
- </div>
- </div>
- <div class="definition-details-block">
- <span class="instances-label">
- <strong>{{t alerts.definition.details.instances}}</strong>
- </span>
- <hr>
- <div>
- {{#if App.router.mainAlertInstancesController.isLoaded}}
- <table class="table table-bordered table-striped alerts-table" id="alert-instances-table">
- <thead>
- <tr>
- <th class="first">{{t common.status}}</th>
- <th>{{t common.host}}</th>
- <th>{{t alerts.table.header.lastTriggered}}</th>
- <th>{{t alerts.definition.details.24-hour}}</th>
- <th>{{t alerts.definition.details.notification}}</th>
- </tr>
- </thead>
- <tbody>
- {{#if view.pageContent}}
- {{#each instance in view.pageContent}}
- <tr>
- <td class="first">{{instance.state}}</td>
- <td><a {{action goToHostAlerts instance.host target="controller"}} href="#">{{instance.host.hostName}}</a></td>
- <td>{{instance.lastTriggered}}</td>
- <td>10</td>
- <td class="last">Admins</td>
- </tr>
- {{/each}}
- {{else}}
- <tr>
- <td colspan="5">
- {{t alerts.definition.details.noAlerts}}
- </td>
- </tr>
- {{/if}}
- </tbody>
- </table>
- {{else}}
- <div class="spinner"></div>
- {{/if}}
- </div>
- </div>
- </div>
|