Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #712 from ammendonca/HWK-PLATFORM-ENABLE-FIX-II
Browse files Browse the repository at this point in the history
Better fix to Experimental Mode tabs enable/disable
  • Loading branch information
mtho11 committed Dec 14, 2015
2 parents de2833f + dc3478f commit 9085582
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,20 @@ module HawkularMetrics {

$scope.tabs = this;

let experimentalTabs = ['overview', 'platform'];
$rootScope.$watch('isExperimental', (isExperimental) => {
this.$timeout(() => {
this.availableTabs[1].enabled = isExperimental;
_.forEach(this.availableTabs, (tab: any) => {
if (experimentalTabs.indexOf(tab.id) !== -1) {
tab.enabled = isExperimental;
}
});
});
});

this.availableTabs = [
{
id: 'overview', name: 'Overview', enabled: this.$rootScope.isExperimental === true,
id: 'overview', name: 'Overview', enabled: this.$rootScope.isExperimental,
src: 'plugins/metrics/html/app-details/detail-overview.html',
controller: HawkularMetrics.AppServerOverviewDetailsController
},
Expand Down

0 comments on commit 9085582

Please sign in to comment.