Skip to content

Commit

Permalink
HAWKULAR-131 - Added support for notifications plus a couple of notif…
Browse files Browse the repository at this point in the history
…ications
  • Loading branch information
jpkrohling committed Apr 28, 2015
1 parent fc97cf4 commit 39902eb
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bower.json
Expand Up @@ -40,6 +40,7 @@
"hawtio-core": "2.0.16",
"hawtio-template-cache": "2.0.2",
"hawtio-utilities": "2.0.21",
"hawtio-ui": "2.0.39",
"hawtio-oauth": "2.0.5",
"lodash": "3.2.0",
"moment": "2.9.0",
Expand All @@ -53,6 +54,7 @@
},
"resolutions": {
"patternfly": "1.1.3",
"angular": "1.3.15"
"angular": "1.3.15",
"lodash": "3.2.0"
}
}
2 changes: 1 addition & 1 deletion plugins/accounts/index.html
Expand Up @@ -7,11 +7,11 @@
<meta charset="UTF8">

<link rel="stylesheet" href="libs/patternfly/dist/css/patternfly.css" />
<link rel="stylesheet" href="../../dist/hawkular-ui-components-accounts.css"/>

<!-- bower:css -->
<!-- endbower -->

<link rel="stylesheet" href="../../dist/hawkular-ui-components-accounts.css"/>
<!-- ES6/ES6 shim -->
<!--[if IE 8]>
<script src="libs/es5-dom-shim/__COMIPLE/a.ie8.js"></script>
Expand Down
4 changes: 4 additions & 0 deletions plugins/accounts/plugins/accounts/less/hawkular-accounts.less
Expand Up @@ -15,3 +15,7 @@
body.inactivity-modal-open #main, body.inactivity-modal-open .navbar, body.inactivity-modal-open #idle {
filter: blur(5px);
}

body {
padding-top: 0;
}
10 changes: 9 additions & 1 deletion plugins/accounts/plugins/accounts/ts/organizations.ts
Expand Up @@ -36,6 +36,7 @@ module HawkularAccounts {
},
() => {
$log.warn("List of organizations could NOT be retrieved.");
Core.notification('error', "List of organizations could NOT be retrieved.");
$scope.loading = false;
}
);
Expand All @@ -48,6 +49,11 @@ module HawkularAccounts {
() => {
$scope.$emit('OrganizationRemoved');
$scope.organizations.splice($scope.organizations.indexOf(organization), 1);
Core.notification('success', "Organization created");
},
(e) => {
var message = e.data.message ? e.data.message : "Sorry, the organization could not be removed.";
Core.notification('error', message);
}
);
};
Expand All @@ -69,10 +75,12 @@ module HawkularAccounts {
() => {
$scope.$emit('OrganizationCreated');
$location.path('/accounts/organizations');
Core.notification('success', "Organization created");
},
() => {
// error
$log.debug("Organization could NOT be added.");
$log.error("Organization could NOT be added.");
Core.notification('error', "Organization could NOT be added.");
}
);
$log.debug("Trying to persist the organization");
Expand Down
2 changes: 2 additions & 0 deletions plugins/accounts/plugins/accounts/ts/persona.ts
Expand Up @@ -33,6 +33,7 @@ module HawkularAccounts {
},
() => {
$log.warn("Failed in retrieving the current persona");
Core.notification('error', "Failed in retrieving your current persona.");
}
);
};
Expand All @@ -47,6 +48,7 @@ module HawkularAccounts {
},
() => {
$log.warn("List of personas could NOT be retrieved.");
Core.notification('error', "List of your available personas could NOT be retrieved.");
$scope.loading = false;
}
);
Expand Down
1 change: 1 addition & 0 deletions plugins/accounts/plugins/includes.ts
Expand Up @@ -14,4 +14,5 @@
/// limitations under the License.

/// <reference path="../../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../../libs/hawtio-ui/defs.d.ts"/>
/// <reference path="../../../libs/hawtio-oauth/defs.d.ts"/>

0 comments on commit 39902eb

Please sign in to comment.