diff --git a/app/components/config/config.json b/app/components/config/config.json index 3fcb02b..02b5b91 100644 --- a/app/components/config/config.json +++ b/app/components/config/config.json @@ -28,11 +28,11 @@ "Host status" ], "name": [ - "host", - "host_address", - "duration", - "last_check", - "host_status" + "status_host", + "status_host_address", + "status_duration", + "status_last_check", + "status_host_status" ] }, "apiName": "hosts", @@ -63,10 +63,10 @@ "Last check" ], "name": [ - "host", - "service_check", - "duration", - "last_check" + "status_host", + "status_service_check", + "status_duration", + "status_last_check" ] }, "apiName": "services", @@ -103,11 +103,11 @@ "Host status" ], "name": [ - "host", - "host_address", - "duration", - "last_check", - "host_status" + "status_host", + "status_host_address", + "status_duration", + "status_last_check", + "status_host_status" ] }, "apiName": "hosts", @@ -134,10 +134,10 @@ "Last check" ], "name": [ - "host", - "service_check", - "duration", - "last_check" + "status_host", + "status_service_check", + "status_duration", + "status_last_check" ] }, "apiName": "services", @@ -172,11 +172,11 @@ "Host status" ], "name": [ - "host", - "host_address", - "duration", - "last_check", - "host_status" + "status_host", + "status_host_address", + "status_duration", + "status_last_check", + "status_host_status" ] }, "apiName": "hosts", @@ -204,10 +204,10 @@ "Last check" ], "name": [ - "host", - "service_check", - "duration", - "last_check" + "status_host", + "status_service_check", + "status_duration", + "status_last_check" ] }, "apiName": "services", diff --git a/app/components/table/cell_duration/cell_duration.css b/app/components/table/cell_duration/cell_duration.css deleted file mode 100644 index e69de29..0000000 diff --git a/app/components/table/cell_duration/cell_duration.js b/app/components/table/cell_duration/cell_duration.js deleted file mode 100644 index 22ff2be..0000000 --- a/app/components/table/cell_duration/cell_duration.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -angular.module('bansho.table.cell_duration', ['bansho.table']) - - .controller('CellDurationCtrl', [function () { - angular.noop(); - }]) - - .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.duration = ['last_state_change']; - }]); diff --git a/app/components/table/cell_host/cell_host.css b/app/components/table/cell_host/cell_host.css deleted file mode 100644 index de20a20..0000000 --- a/app/components/table/cell_host/cell_host.css +++ /dev/null @@ -1,145 +0,0 @@ -.nav-side-menu { - overflow: auto; - font-family: verdana; - font-size: 12px; - font-weight: 200; - background-color: #2e353d; - position: fixed; - top: 0px; - width: 300px; - height: 100%; - color: #e1ffff; -} -.nav-side-menu .brand { - background-color: #23282e; - line-height: 50px; - display: block; - text-align: center; - font-size: 14px; -} -.nav-side-menu .toggle-btn { - display: none; -} -.nav-side-menu ul, -.nav-side-menu li { - list-style: none; - padding: 0px; - margin: 0px; - line-height: 35px; - cursor: pointer; - /* - .collapsed{ - .arrow:before{ - font-family: FontAwesome; - content: "\f053"; - display: inline-block; - padding-left:10px; - padding-right: 10px; - vertical-align: middle; - float:right; - } - } -*/ -} -.nav-side-menu ul :not(collapsed) .arrow:before, -.nav-side-menu li :not(collapsed) .arrow:before { - font-family: FontAwesome; - content: "\f078"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; - float: right; -} -.nav-side-menu ul .active, -.nav-side-menu li .active { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; -} -.nav-side-menu ul .sub-menu li.active, -.nav-side-menu li .sub-menu li.active { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li.active a, -.nav-side-menu li .sub-menu li.active a { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li, -.nav-side-menu li .sub-menu li { - background-color: #181c20; - border: none; - line-height: 28px; - border-bottom: 1px solid #23282e; - margin-left: 0px; -} -.nav-side-menu ul .sub-menu li:hover, -.nav-side-menu li .sub-menu li:hover { - background-color: #020203; -} -.nav-side-menu ul .sub-menu li:before, -.nav-side-menu li .sub-menu li:before { - font-family: FontAwesome; - content: "\f105"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; -} -.nav-side-menu li { - padding-left: 0px; - border-left: 3px solid #2e353d; - border-bottom: 1px solid #23282e; -} -.nav-side-menu li a { - text-decoration: none; - color: #e1ffff; -} -.nav-side-menu li a i { - padding-left: 10px; - width: 20px; - padding-right: 20px; -} -.nav-side-menu li:hover { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; - -webkit-transition: all 1s ease; - -moz-transition: all 1s ease; - -o-transition: all 1s ease; - -ms-transition: all 1s ease; - transition: all 1s ease; -} -@media (max-width: 767px) { - .nav-side-menu { - position: relative; - width: 100%; - margin-bottom: 10px; - } - .nav-side-menu .toggle-btn { - display: block; - cursor: pointer; - position: absolute; - right: 10px; - top: 10px; - z-index: 10 !important; - padding: 3px; - background-color: #ffffff; - color: #000; - width: 40px; - text-align: center; - } - .brand { - text-align: left !important; - font-size: 22px; - padding-left: 20px; - line-height: 50px !important; - } -} -@media (min-width: 767px) { - .nav-side-menu .menu-list .menu-content { - display: block; - } -} -body { - margin: 0px; - padding: 0px; -} diff --git a/app/components/table/cell_host_address/cell_host_address.html b/app/components/table/cell_host_address/cell_host_address.html deleted file mode 100644 index 8cf7720..0000000 --- a/app/components/table/cell_host_address/cell_host_address.html +++ /dev/null @@ -1,3 +0,0 @@ - - {{entry.address}} - diff --git a/app/components/table/cell_host_address/cell_host_address.js b/app/components/table/cell_host_address/cell_host_address.js deleted file mode 100644 index 896d10f..0000000 --- a/app/components/table/cell_host_address/cell_host_address.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -angular.module('bansho.table.cell_host_address', ['bansho.table']) - - .controller('CellHostAddressCtrl', [function () { - angular.noop(); - }]) - - .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.host_address = ['address']; - }]); diff --git a/app/components/table/cell_host_status/cell_host_status.js b/app/components/table/cell_host_status/cell_host_status.js deleted file mode 100644 index dc6be42..0000000 --- a/app/components/table/cell_host_status/cell_host_status.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -angular.module('bansho.table.cell_host_status', ['bansho.table']) - - .controller('CellHostStatusCtrl', ['$scope', function ($scope) { - angular.noop(); - }]) - - .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.host_status = ['state', 'last_check', 'parents']; - }]); diff --git a/app/components/table/cell_last_check/cell_last_check.css b/app/components/table/cell_last_check/cell_last_check.css deleted file mode 100644 index 4f74ddf..0000000 --- a/app/components/table/cell_last_check/cell_last_check.css +++ /dev/null @@ -1,146 +0,0 @@ -.nav-side-menu { - overflow: auto; - font-family: verdana; - font-size: 12px; - font-weight: 200; - background-color: #2e353d; - position: fixed; - top: 0px; - width: 300px; - height: 100%; - color: #e1ffff; -} -.nav-side-menu .brand { - background-color: #23282e; - line-height: 50px; - display: block; - text-align: center; - font-size: 14px; -} -.nav-side-menu .toggle-btn { - display: none; -} -.nav-side-menu ul, -.nav-side-menu li { - list-style: none; - padding: 0px; - margin: 0px; - line-height: 35px; - cursor: pointer; - /* - .collapsed{ - .arrow:before{ - font-family: FontAwesome; - content: "\f053"; - display: inline-block; - padding-left:10px; - padding-right: 10px; - vertical-align: middle; - float:right; - } - } -*/ -} -.nav-side-menu ul :not(collapsed) .arrow:before, -.nav-side-menu li :not(collapsed) .arrow:before { - font-family: FontAwesome; - content: "\f078"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; - float: right; -} -.nav-side-menu ul .active, -.nav-side-menu li .active { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; -} -.nav-side-menu ul .sub-menu li.active, -.nav-side-menu li .sub-menu li.active { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li.active a, -.nav-side-menu li .sub-menu li.active a { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li, -.nav-side-menu li .sub-menu li { - background-color: #181c20; - border: none; - line-height: 28px; - border-bottom: 1px solid #23282e; - margin-left: 0px; -} -.nav-side-menu ul .sub-menu li:hover, -.nav-side-menu li .sub-menu li:hover { - background-color: #020203; -} -.nav-side-menu ul .sub-menu li:before, -.nav-side-menu li .sub-menu li:before { - font-family: FontAwesome; - content: "\f105"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; -} -.nav-side-menu li { - padding-left: 0px; - border-left: 3px solid #2e353d; - border-bottom: 1px solid #23282e; -} -.nav-side-menu li a { - text-decoration: none; - color: #e1ffff; -} -.nav-side-menu li a i { - padding-left: 10px; - width: 20px; - padding-right: 20px; -} -.nav-side-menu li:hover { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; - -webkit-transition: all 1s ease; - -moz-transition: all 1s ease; - -o-transition: all 1s ease; - -ms-transition: all 1s ease; - transition: all 1s ease; -} -@media (max-width: 767px) { - .nav-side-menu { - position: relative; - width: 100%; - margin-bottom: 10px; - } - .nav-side-menu .toggle-btn { - display: block; - cursor: pointer; - position: absolute; - right: 10px; - top: 10px; - z-index: 10 !important; - padding: 3px; - background-color: #ffffff; - color: #000; - width: 40px; - text-align: center; - } - .brand { - text-align: left !important; - font-size: 22px; - padding-left: 20px; - line-height: 50px !important; - } -} -@media (min-width: 767px) { - .nav-side-menu .menu-list .menu-content { - display: block; - } -} -body { - margin: 0px; - padding: 0px; -} - diff --git a/app/components/table/cell_last_check/cell_last_check.js b/app/components/table/cell_last_check/cell_last_check.js deleted file mode 100644 index a070193..0000000 --- a/app/components/table/cell_last_check/cell_last_check.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -angular.module('bansho.table.cell_last_check', ['bansho.table']) - - .controller('CellLastCheckCtrl', [function () { - angular.noop(); - }]) - - .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.last_check = ['last_check']; - }]); diff --git a/app/components/table/cell_service_check/cell_service_check.css b/app/components/table/cell_service_check/cell_service_check.css deleted file mode 100644 index de20a20..0000000 --- a/app/components/table/cell_service_check/cell_service_check.css +++ /dev/null @@ -1,145 +0,0 @@ -.nav-side-menu { - overflow: auto; - font-family: verdana; - font-size: 12px; - font-weight: 200; - background-color: #2e353d; - position: fixed; - top: 0px; - width: 300px; - height: 100%; - color: #e1ffff; -} -.nav-side-menu .brand { - background-color: #23282e; - line-height: 50px; - display: block; - text-align: center; - font-size: 14px; -} -.nav-side-menu .toggle-btn { - display: none; -} -.nav-side-menu ul, -.nav-side-menu li { - list-style: none; - padding: 0px; - margin: 0px; - line-height: 35px; - cursor: pointer; - /* - .collapsed{ - .arrow:before{ - font-family: FontAwesome; - content: "\f053"; - display: inline-block; - padding-left:10px; - padding-right: 10px; - vertical-align: middle; - float:right; - } - } -*/ -} -.nav-side-menu ul :not(collapsed) .arrow:before, -.nav-side-menu li :not(collapsed) .arrow:before { - font-family: FontAwesome; - content: "\f078"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; - float: right; -} -.nav-side-menu ul .active, -.nav-side-menu li .active { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; -} -.nav-side-menu ul .sub-menu li.active, -.nav-side-menu li .sub-menu li.active { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li.active a, -.nav-side-menu li .sub-menu li.active a { - color: #d19b3d; -} -.nav-side-menu ul .sub-menu li, -.nav-side-menu li .sub-menu li { - background-color: #181c20; - border: none; - line-height: 28px; - border-bottom: 1px solid #23282e; - margin-left: 0px; -} -.nav-side-menu ul .sub-menu li:hover, -.nav-side-menu li .sub-menu li:hover { - background-color: #020203; -} -.nav-side-menu ul .sub-menu li:before, -.nav-side-menu li .sub-menu li:before { - font-family: FontAwesome; - content: "\f105"; - display: inline-block; - padding-left: 10px; - padding-right: 10px; - vertical-align: middle; -} -.nav-side-menu li { - padding-left: 0px; - border-left: 3px solid #2e353d; - border-bottom: 1px solid #23282e; -} -.nav-side-menu li a { - text-decoration: none; - color: #e1ffff; -} -.nav-side-menu li a i { - padding-left: 10px; - width: 20px; - padding-right: 20px; -} -.nav-side-menu li:hover { - border-left: 3px solid #d19b3d; - background-color: #4f5b69; - -webkit-transition: all 1s ease; - -moz-transition: all 1s ease; - -o-transition: all 1s ease; - -ms-transition: all 1s ease; - transition: all 1s ease; -} -@media (max-width: 767px) { - .nav-side-menu { - position: relative; - width: 100%; - margin-bottom: 10px; - } - .nav-side-menu .toggle-btn { - display: block; - cursor: pointer; - position: absolute; - right: 10px; - top: 10px; - z-index: 10 !important; - padding: 3px; - background-color: #ffffff; - color: #000; - width: 40px; - text-align: center; - } - .brand { - text-align: left !important; - font-size: 22px; - padding-left: 20px; - line-height: 50px !important; - } -} -@media (min-width: 767px) { - .nav-side-menu .menu-list .menu-content { - display: block; - } -} -body { - margin: 0px; - padding: 0px; -} diff --git a/app/components/table/cell_duration/cell_duration.html b/app/components/table/cell_status_duration/cell_status_duration.html similarity index 100% rename from app/components/table/cell_duration/cell_duration.html rename to app/components/table/cell_status_duration/cell_status_duration.html diff --git a/app/components/table/cell_status_duration/cell_status_duration.js b/app/components/table/cell_status_duration/cell_status_duration.js new file mode 100644 index 0000000..8f4755f --- /dev/null +++ b/app/components/table/cell_status_duration/cell_status_duration.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('bansho.table.cell_status_duration', ['bansho.table']) + + .controller('CellStatusDurationCtrl', [function () { + angular.noop(); + }]) + + .run(['tableGlobalConfig', function (tableGlobalConfig) { + tableGlobalConfig.cellToFieldsMap.status_duration = ['last_state_change']; + }]); diff --git a/app/components/table/cell_host/cell_host.html b/app/components/table/cell_status_host/cell_status_host.html similarity index 76% rename from app/components/table/cell_host/cell_host.html rename to app/components/table/cell_status_host/cell_status_host.html index c459cab..c41dc0c 100644 --- a/app/components/table/cell_host/cell_host.html +++ b/app/components/table/cell_status_host/cell_status_host.html @@ -1,3 +1,3 @@ - + {{entry.host_name}} diff --git a/app/components/table/cell_host/cell_host.js b/app/components/table/cell_status_host/cell_status_host.js similarity index 62% rename from app/components/table/cell_host/cell_host.js rename to app/components/table/cell_status_host/cell_status_host.js index 6c646ef..08b8aa1 100644 --- a/app/components/table/cell_host/cell_host.js +++ b/app/components/table/cell_status_host/cell_status_host.js @@ -1,8 +1,8 @@ 'use strict'; -angular.module('bansho.table.cell_host', ['bansho.table']) +angular.module('bansho.table.cell_status_host', ['bansho.table']) - .controller('CellHostCtrl', ['$scope', function ($scope) { + .controller('CellStatusHostCtrl', ['$scope', function ($scope) { $scope.cell_name = 'host'; if ($scope.entry.host_state === 'UP') { @@ -17,6 +17,6 @@ angular.module('bansho.table.cell_host', ['bansho.table']) }]) .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.host = ['host_state', 'host_name']; - tableGlobalConfig.cellWrappableField.host = 'host_name'; + tableGlobalConfig.cellToFieldsMap.status_host = ['host_state', 'host_name']; + tableGlobalConfig.cellWrappableField.status_host = 'host_name'; }]); diff --git a/app/components/table/cell_status_host_address/cell_status_host_address.html b/app/components/table/cell_status_host_address/cell_status_host_address.html new file mode 100644 index 0000000..f40c7c2 --- /dev/null +++ b/app/components/table/cell_status_host_address/cell_status_host_address.html @@ -0,0 +1,3 @@ + + {{entry.address}} + diff --git a/app/components/table/cell_status_host_address/cell_status_host_address.js b/app/components/table/cell_status_host_address/cell_status_host_address.js new file mode 100644 index 0000000..415e93e --- /dev/null +++ b/app/components/table/cell_status_host_address/cell_status_host_address.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('bansho.table.cell_status_host_address', ['bansho.table']) + + .controller('CellStatusHostAddressCtrl', [function () { + angular.noop(); + }]) + + .run(['tableGlobalConfig', function (tableGlobalConfig) { + tableGlobalConfig.cellToFieldsMap.status_host_address = ['address']; + }]); diff --git a/app/components/table/cell_host_status/cell_host_status.html b/app/components/table/cell_status_host_status/cell_status_host_status.html similarity index 59% rename from app/components/table/cell_host_status/cell_host_status.html rename to app/components/table/cell_status_host_status/cell_status_host_status.html index d2e2e77..5cdaf16 100644 --- a/app/components/table/cell_host_status/cell_host_status.html +++ b/app/components/table/cell_status_host_status/cell_status_host_status.html @@ -1,3 +1,3 @@ - + {{entry.host_state}} diff --git a/app/components/table/cell_status_host_status/cell_status_host_status.js b/app/components/table/cell_status_host_status/cell_status_host_status.js new file mode 100644 index 0000000..f564368 --- /dev/null +++ b/app/components/table/cell_status_host_status/cell_status_host_status.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('bansho.table.cell_status_host_status', ['bansho.table']) + + .controller('CellStatusHostStatusCtrl', ['$scope', function ($scope) { + angular.noop(); + }]) + + .run(['tableGlobalConfig', function (tableGlobalConfig) { + tableGlobalConfig.cellToFieldsMap.status_host_status = ['state', 'last_check', 'parents']; + }]); diff --git a/app/components/table/cell_last_check/cell_last_check.html b/app/components/table/cell_status_last_check/cell_status_last_check.html similarity index 100% rename from app/components/table/cell_last_check/cell_last_check.html rename to app/components/table/cell_status_last_check/cell_status_last_check.html diff --git a/app/components/table/cell_status_last_check/cell_status_last_check.js b/app/components/table/cell_status_last_check/cell_status_last_check.js new file mode 100644 index 0000000..f2abe11 --- /dev/null +++ b/app/components/table/cell_status_last_check/cell_status_last_check.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('bansho.table.cell_status_last_check', ['bansho.table']) + + .controller('CellStatusLastCheckCtrl', [function () { + angular.noop(); + }]) + + .run(['tableGlobalConfig', function (tableGlobalConfig) { + tableGlobalConfig.cellToFieldsMap.status_last_check = ['last_check']; + }]); diff --git a/app/components/table/cell_service_check/cell_service_check.html b/app/components/table/cell_status_service_check/cell_status_service_check.html similarity index 78% rename from app/components/table/cell_service_check/cell_service_check.html rename to app/components/table/cell_status_service_check/cell_status_service_check.html index 5dbcaee..2a34fe3 100644 --- a/app/components/table/cell_service_check/cell_service_check.html +++ b/app/components/table/cell_status_service_check/cell_status_service_check.html @@ -1,4 +1,4 @@ - +
{{entry.service_description}} diff --git a/app/components/table/cell_service_check/cell_service_check.js b/app/components/table/cell_status_service_check/cell_status_service_check.js similarity index 56% rename from app/components/table/cell_service_check/cell_service_check.js rename to app/components/table/cell_status_service_check/cell_status_service_check.js index 48cfebe..2c047df 100644 --- a/app/components/table/cell_service_check/cell_service_check.js +++ b/app/components/table/cell_status_service_check/cell_status_service_check.js @@ -1,8 +1,8 @@ 'use strict'; -angular.module('bansho.table.cell_service_check', ['bansho.table']) +angular.module('bansho.table.cell_status_service_check', ['bansho.table']) - .controller('CellServiceCheckCtrl', ['$scope', function ($scope) { + .controller('CellStatusServiceCheckCtrl', ['$scope', function ($scope) { if ($scope.entry.state === 'OK') { $scope.state = 'state--ok'; } else if ($scope.entry.state === 'WARNING') { @@ -13,5 +13,5 @@ angular.module('bansho.table.cell_service_check', ['bansho.table']) }]) .run(['tableGlobalConfig', function (tableGlobalConfig) { - tableGlobalConfig.cellToFieldsMap.service_check = ['state', 'service_description', 'plugin_output']; + tableGlobalConfig.cellToFieldsMap.status_service_check = ['state', 'service_description', 'plugin_output']; }]); diff --git a/app/components/table/table.js b/app/components/table/table.js index 25a0ec4..edf5df5 100644 --- a/app/components/table/table.js +++ b/app/components/table/table.js @@ -4,12 +4,12 @@ angular.module('bansho.table', ['bansho.surveil', 'bansho.utils.promiseManager', 'bansho.table.actionbar', 'bansho.filters', - 'bansho.table.cell_host', - 'bansho.table.cell_duration', - 'bansho.table.cell_service_check', - 'bansho.table.cell_last_check', - 'bansho.table.cell_host_address', - 'bansho.table.cell_host_status' + 'bansho.table.cell_status_host', + 'bansho.table.cell_status_duration', + 'bansho.table.cell_status_service_check', + 'bansho.table.cell_status_last_check', + 'bansho.table.cell_status_host_address', + 'bansho.table.cell_status_host_status' ]) .value('tableGlobalConfig', {'cellToFieldsMap': {}, 'cellWrappableField': {}, 'nextTableIndex': 0}) diff --git a/app/index.html b/app/index.html index 49aa2a5..bd9f188 100644 --- a/app/index.html +++ b/app/index.html @@ -57,16 +57,19 @@ + + - - - - - - + + + + + + +