Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Migrate rhq-metrics console to hawt.io console. part 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtho11 committed Jan 26, 2015
1 parent 7458f6b commit d8b5146
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 6 additions & 2 deletions ui/console/alerts/dist/hawkular-alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ var HawkularAlerts;
var HawkularAlerts;
(function (HawkularAlerts) {
HawkularAlerts.AlertsController = HawkularAlerts._module.controller("HawkularAlerts.AlertsController", ['$scope', function ($scope) {
$scope.target = "World!";
$scope.alerts = [
{ name: "Out of Memory Alert", priority: 2 },
{ name: "Out of Disk Space", priority: 1 },
{ name: "CPU High", priority: 3 }
];
}]);
})(HawkularAlerts || (HawkularAlerts = {}));

angular.module("hawkular-alerts-templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("plugins/alerts/html/alerts.html","<div class=\"row\">\n <div class=\"col-md-12\" ng-controller=\"HawkularAlerts.AlertsController\">\n <h1>Alerts</h1>\n <p>Hello {{target}}</p>\n </div>\n</div>\n");}]); hawtioPluginLoader.addModule("hawkular-alerts-templates");
angular.module("hawkular-alerts-templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("plugins/alerts/html/alerts.html","<div class=\"row\">\n <div class=\"col-md-12\" ng-controller=\"HawkularAlerts.AlertsController\">\n <h1>Alerts</h1>\n <ul class=\"list-group\" ng-repeat=\"alert in alerts | orderBy:priority:true\">\n <li class=\"list-group-item\">{{alert.name}}</li>\n </ul>\n\n </div>\n</div>\n");}]); hawtioPluginLoader.addModule("hawkular-alerts-templates");
5 changes: 4 additions & 1 deletion ui/console/alerts/plugins/alerts/html/alerts.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div class="row">
<div class="col-md-12" ng-controller="HawkularAlerts.AlertsController">
<h1>Alerts</h1>
<p>Hello {{target}}</p>
<ul class="list-group" ng-repeat="alert in alerts | orderBy:priority:true">
<li class="list-group-item">{{alert.name}}</li>
</ul>

</div>
</div>
6 changes: 5 additions & 1 deletion ui/console/alerts/plugins/alerts/ts/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
module HawkularAlerts {

export var AlertsController = _module.controller("HawkularAlerts.AlertsController", ['$scope', ($scope) => {
$scope.target = "World!";
$scope.alerts = [
{name:"Out of Memory Alert", priority: 2 },
{name:"Out of Disk Space", priority: 1},
{name:"CPU High", priority: 3}
];
}]);

}

0 comments on commit d8b5146

Please sign in to comment.