alerts.hbs 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {{!
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. }}
  18. <div class="pull-left advanced-header-table groups-filter">
  19. {{view view.alertGroupFilterView}}
  20. </div>
  21. <div class="pull-right">
  22. {{view App.MainAlertDefinitionActionsView controllerBinding="App.router.mainAlertDefinitionActionsController"}}
  23. </div>
  24. <div id="alerts">
  25. <div class="box-header row">
  26. </div>
  27. <table class="table advanced-header-table table-bordered table-striped alerts-table" id="alert-definitions-table">
  28. <thead>
  29. {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
  30. {{view view.parentView.nameSort class="first"}}
  31. {{view view.parentView.statusSort}}
  32. {{view view.parentView.serviceSort}}
  33. {{view view.parentView.lastTriggeredSort}}
  34. <th><span class="icon-off"></span></th>
  35. {{/view}}
  36. <tr class="filter-row">
  37. <th class="first">{{view view.nameFilterView}}</th>
  38. <th>{{view view.stateFilterView}}</th>
  39. <th>{{view view.serviceFilterView}}</th>
  40. <th>{{view view.triggeredFilterView}}</th>
  41. <th></th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. {{#if view.pageContent}}
  46. {{#each alertDefinition in view.pageContent}}
  47. <tr>
  48. <td class="first">
  49. <a href="#" {{action "gotoAlertDetails" alertDefinition}}>{{alertDefinition.label}}</a>
  50. </td>
  51. <td>{{{alertDefinition.status}}}</td>
  52. <td>{{alertDefinition.service.serviceName}}</td>
  53. <td>{{alertDefinition.lastTriggeredFormatted}}</td>
  54. <td class="last">
  55. <a href="#" {{action "toggleState" alertDefinition target="controller"}} {{bindAttr class="alertDefinition.enabled:enabled:disabled"}}>
  56. <span class="icon-off"></span>
  57. </a>
  58. </td>
  59. </tr>
  60. {{/each}}
  61. {{else}}
  62. <tr>
  63. <td class="first"></td>
  64. <td colspan="4">
  65. {{t alerts.table.noAlerts}}
  66. </td>
  67. </tr>
  68. {{/if}}
  69. </tbody>
  70. </table>
  71. <div class="page-bar">
  72. <div class="filtered-info span4">
  73. <label>{{view.filteredContentInfo}} - <a {{action clearFilters target="view"}}
  74. href="#">{{t tableView.filters.clearAllFilters}}</a></label>
  75. </div>
  76. <div class="selected-hosts-info span4">
  77. </div>
  78. <div class="items-on-page">
  79. <label>{{t common.show}}: {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
  80. </div>
  81. <div class="info">{{view.paginationInfo}}</div>
  82. <div class="paging_two_button">
  83. <a {{bindAttr class="view.paginationLeftClass"}}{{action previousPage target="view"}}><i class="icon-arrow-left"></i></a>
  84. <a {{bindAttr class="view.paginationRightClass"}}{{action nextPage target="view"}}><i class="icon-arrow-right"></i></a>
  85. </div>
  86. </div>
  87. </div>