Skip to content

Commit

Permalink
HAWKULAR-119 - Replaced custom KC integration with hawtio's
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkrohling committed Apr 8, 2015
1 parent 41e52a4 commit d78540b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 257 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pids
libs/
node_modules/
bower_components/
*.js.map

._*
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"hawtio-core": "2.0.11",
"hawtio-template-cache": "2.0.2",
"hawtio-utilities": "2.0.21",
"hawtio-oauth": "2.0.0",
"lodash": "3.2.0",
"moment": "2.9.0",
"toastr": "2.1.1",
"keycloak": "1.1.0",
"angular-resource": "1.3.15",
"patternfly": "1.1.3"
},
Expand Down
107 changes: 9 additions & 98 deletions dist/hawkular-ui-components-accounts.js

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions plugins/accounts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<base href='/'>
<meta charset="UTF8">

<link rel="stylesheet" href="libs/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="libs/patternfly/dist/css/patternfly.css" />

<!-- bower:css -->
Expand All @@ -21,7 +20,6 @@
<!-- bower:js -->
<!-- endbower -->

<script src="libs/bootstrap/dist/js/bootstrap.js"></script>
<script src="libs/patternfly/dist/js/patternfly.js"></script>

</head>
Expand All @@ -38,24 +36,5 @@

<!-- add any scripts under dist/ here -->
<script src="dist/hawkular-ui-components-accounts.js"></script>

<script type="text/javascript">
window.keycloakReady = false;
window.keycloak = Keycloak("/keycloak.json");

window.keycloak.onAuthLogout = function() {
location.reload();
};

window.keycloak.onReady = function(authenticated) {
window.keycloakReady = true;
};

window.keycloak.init({ onLoad: 'login-required' }).error(function () {
alert("Couldn't log you in. Sorry.");
window.location.reload();
});
</script>

</body>
</html>
10 changes: 10 additions & 0 deletions plugins/accounts/plugins/accounts/ts/accountsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,15 @@ module HawkularAccounts {
//HawtioNav.add(accountsTab);
}]);

_module.run(['$rootScope', 'userDetails', ($rootScope, userDetails) => {
$rootScope.userDetails = userDetails;
$rootScope.userDetailsStr = angular.toJson(userDetails, true);
}]);

hawtioPluginLoader.registerPreBootstrapTask((next) => {
KeycloakConfig = "/keycloak.json";
next();
}, true);

hawtioPluginLoader.addModule(HawkularAccounts.pluginName);
}
65 changes: 0 additions & 65 deletions plugins/accounts/plugins/accounts/ts/auth.ts

This file was deleted.

72 changes: 0 additions & 72 deletions plugins/accounts/plugins/accounts/ts/authInterceptor.ts

This file was deleted.

1 change: 1 addition & 0 deletions plugins/accounts/plugins/includes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/// limitations under the License.

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

0 comments on commit d78540b

Please sign in to comment.