Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #459 and deserialize a stored routeParams object for #146, also a…
…dd an inDashboard property to the child scope so a controller can adjust their display to suit the dashboard
  • Loading branch information
gashcrumb committed Sep 17, 2013
1 parent aaeadf9 commit 4d43244
Show file tree
Hide file tree
Showing 9 changed files with 17,230 additions and 310 deletions.
Expand Up @@ -47,7 +47,7 @@ module Branding {
Branding.enabled = Core.parseBooleanValue(response.enable);

// Branding.enabled = false;
Branding.enabled = true;
// Branding.enabled = true;

if (Branding.enabled) {
Branding.profile = response.profile;
Expand Down
@@ -1,4 +1,4 @@
<div ng-controller="Dashboard.EditDashboardsController">
<div class="controller-section" ng-controller="Dashboard.EditDashboardsController">
<div class="row-fluid">
<div class="span6">
<div class="control-group">
Expand Down Expand Up @@ -26,4 +26,4 @@
<div class="row-fluid">
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>
</div>
</div>
10 changes: 10 additions & 0 deletions hawtio-web/src/main/webapp/app/dashboard/html/dashboard.html
Expand Up @@ -16,7 +16,17 @@
</div>
</script>

<!--
<div class="gridster" ng-controller="Dashboard.DashboardController">
<ul id="widgets">
</ul>
</div>
-->

<div class="row-fluid">
<div class="span12 gridster">
<ul id="widgets" hawtio-dashboard></ul>
</div>
</div>


@@ -1,4 +1,4 @@
<div ng-controller="Dashboard.EditDashboardsController">
<div class="controller-section" ng-controller="Dashboard.EditDashboardsController">
<div class="row-fluid">
<div class="span4">
<div class="control-group">
Expand Down Expand Up @@ -37,6 +37,8 @@
</div>

<div class="row-fluid">
<div class="gridStyle" ng-grid="gridOptions"></div>
<div class="span12">
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>
</div>
</div>
</div>
295 changes: 0 additions & 295 deletions hawtio-web/src/main/webapp/app/dashboard/js/dashboard.ts

This file was deleted.

20 changes: 13 additions & 7 deletions hawtio-web/src/main/webapp/app/dashboard/js/dashboardPlugin.ts
@@ -1,15 +1,18 @@
module Dashboard {
var pluginName = 'dashboard';

export var templatePath = 'app/dashboard/html/';
export var pluginName = 'dashboard';

angular.module(pluginName, ['bootstrap', 'ngResource', 'hawtioCore', 'hawtio-ui']).
config(($routeProvider) => {

$routeProvider.
when('/dashboard/add', {templateUrl: 'app/dashboard/html/addToDashboard.html'}).
when('/dashboard/edit', {templateUrl: 'app/dashboard/html/editDashboards.html'}).
when('/dashboard/idx/:dashboardIndex', {templateUrl: 'app/dashboard/html/dashboard.html'}).
when('/dashboard/id/:dashboardId', {templateUrl: 'app/dashboard/html/dashboard.html'}).
when('/dashboard/id/:dashboardId/share', {templateUrl: 'app/dashboard/html/share.html'}).
when('/dashboard/import', {templateUrl: 'app/dashboard/html/import.html'});
when('/dashboard/add', {templateUrl: Dashboard.templatePath + 'addToDashboard.html'}).
when('/dashboard/edit', {templateUrl: Dashboard.templatePath + 'editDashboards.html'}).
when('/dashboard/idx/:dashboardIndex', {templateUrl: Dashboard.templatePath + 'dashboard.html'}).
when('/dashboard/id/:dashboardId', {templateUrl: Dashboard.templatePath + 'dashboard.html'}).
when('/dashboard/id/:dashboardId/share', {templateUrl: Dashboard.templatePath + 'share.html'}).
when('/dashboard/import', {templateUrl: Dashboard.templatePath + 'import.html'});

}).
value('ui.config', {
Expand All @@ -24,6 +27,9 @@ module Dashboard {
factory('dashboardRepository', function (workspace:Workspace, jolokia, localStorage) {
return new DefaultDashboardRepository(workspace, jolokia, localStorage);
}).
directive('hawtioDashboard', function() {
return new Dashboard.GridsterDirective();
}).
run(($location:ng.ILocationService, workspace:Workspace, viewRegistry) => {

viewRegistry['dashboard'] = 'app/dashboard/html/layoutDashboard.html';
Expand Down

0 comments on commit 4d43244

Please sign in to comment.