Navigation Menu

Skip to content

Commit

Permalink
Remove logs from the default dashboard so it doesn't throw errors if …
Browse files Browse the repository at this point in the history
…insight-log isn't installed, also ensure child scopes are cleaned up when leaving the dashboard page.
  • Loading branch information
gashcrumb committed Oct 30, 2013
1 parent 9661f61 commit 219b05e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
13 changes: 0 additions & 13 deletions hawtio-web/src/main/webapp/app/dashboard/js/dashboardRepository.ts
Expand Up @@ -20,19 +20,6 @@ module Dashboard {
},
"hash": ""
},
{
"id": "w3",
"title": "Logs",
"row": 5,
"col": 1,
"size_x": 8,
"size_y": 1,
"path": "logs",
"include": "app/log/html/logs.html",
"search": {},
"hash": "",
"routeParams": "{}"
},
{
"id": "w3",
"title": "Java Heap Memory",
Expand Down
Expand Up @@ -22,6 +22,15 @@ module Dashboard {

$scope.widgetMap = {};

$scope.$on('$destroy', () => {
angular.forEach($scope.widgetMap, (value, key) => {
if ('scope' in value) {
var scope = value['scope'];
scope.$destroy();
}
});
});

updateWidgets();

$scope.removeWidget = function(widget) {
Expand Down

0 comments on commit 219b05e

Please sign in to comment.