Skip to content

Commit

Permalink
HWKINVENT-38 second chunk of work
Browse files Browse the repository at this point in the history
  • Loading branch information
jkremser committed May 14, 2015
1 parent 05fb051 commit 55fed6c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 24 deletions.
8 changes: 4 additions & 4 deletions dist/hawkular-ui-components-accounts.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/hawkular-ui-components-alerts.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/hawkular-ui-components-directives.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/hawkular-ui-components-inventory.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions dist/hawkular-ui-components-metrics.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions plugins/accounts/plugins/accounts/ts/accountsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/// <reference path="accountsGlobals.ts"/>
module HawkularAccounts {
export var _module = angular.module(HawkularAccounts.pluginName, ['ui.bootstrap']);
export var userDetails:any = undefined;
var accountsTab:any = undefined;
var currentPersona:any = undefined;

Expand All @@ -39,7 +38,6 @@ module HawkularAccounts {
_module.run(['$rootScope', '$log', '$modal', '$document', 'userDetails', 'HawtioNav', 'HawkularInventory', ($rootScope, $log, $modal, $document, userDetails, HawtioNav:HawtioMainNav.Registry, hawkularInventory) => {
//HawtioNav.add(accountsTab);
$rootScope.userDetails = userDetails;
HawkularAccounts.userDetails = userDetails;

$rootScope.$on('IdleStart', () => {
$('#idle').slideDown();
Expand Down Expand Up @@ -107,11 +105,13 @@ module HawkularAccounts {

$rootScope.$on('CurrentPersonaLoaded', (e, persona) => {
currentPersona = persona;
$rootScope.currentPersona = currentPersona;
initializeInventory(currentPersona.id);
});

$rootScope.$on('SwitchedPersona', (e, persona) => {
currentPersona = persona;
$rootScope.currentPersona = currentPersona;
initializeInventory(currentPersona.id);
});
}]);
Expand Down
9 changes: 4 additions & 5 deletions plugins/metrics/plugins/metrics/ts/addUrlPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module HawkularMetrics {

export class AddUrlController {
/// this is for minification purposes
public static $inject = ['$location', '$scope', '$rootScope', '$interval', '$log', '$filter', '$modal', 'HawkularInventory', 'HawkularMetric', 'HawkularAlert', 'HawkularAlertsManager','HawkularErrorManager', 'HawkularAccounts', '$q', 'md5'];
public static $inject = ['$location', '$scope', '$rootScope', '$interval', '$log', '$filter', '$modal', 'HawkularInventory', 'HawkularMetric', 'HawkularAlert', 'HawkularAlertsManager','HawkularErrorManager', '$q', 'md5'];

private httpUriPart = 'http://';
public addProgress: boolean = false;
Expand All @@ -33,7 +33,7 @@ module HawkularMetrics {

constructor(private $location:ng.ILocationService,
private $scope:any,
private $rootScope:ng.IRootScopeService,
private $rootScope:any,
private $interval:ng.IIntervalService,
private $log:ng.ILogService,
private $filter:ng.IFilterService,
Expand All @@ -43,7 +43,6 @@ module HawkularMetrics {
private HawkularAlert:any,
private HawkularAlertsManager: HawkularMetrics.IHawkularAlertsManager,
private HawkularErrorManager: HawkularMetrics.IHawkularErrorManager,
private HawkularAccounts: any,
private $q: ng.IQService,
private md5: any,
public resourceUrl:string) {
Expand All @@ -53,7 +52,7 @@ module HawkularMetrics {
this.autoRefresh(20);
}

private currentTenantId = this.HawkularAccounts.currentPersona.id;
private currentTenantId = this.$rootScope.currentPersona.id;

private autoRefreshPromise:ng.IPromise<number>;

Expand Down Expand Up @@ -87,7 +86,7 @@ module HawkularMetrics {
this.$log.info('Adding new Resource Url to Hawkular-inventory: ' + url);

var metricId: string;
var defaultEmail = this.HawkularAccounts.userDetails.email || 'myemail@company.com';
var defaultEmail = this.$rootScope.userDetails.email || 'myemail@company.com';
var err = (error: any, msg: string): void => this.HawkularErrorManager.errorHandler(error, msg);

/// Add the Resource and its metrics
Expand Down

0 comments on commit 55fed6c

Please sign in to comment.