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 #726 from ammendonca/HWK-M8-FIXES
Browse files Browse the repository at this point in the history
UI fixes for M8
  • Loading branch information
mtho11 committed Dec 16, 2015
2 parents b6821a4 + 0472051 commit b6998ea
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</div>
</div>
<div class="hk-heading">
<h1 ng-init="isAppServerPage() ? getAppServerFromId(hkParams.resourceId) : getUrlFromId(hkParams.resourceId)">{{resourceName}}</h1>
<h1 ng-init="isAppServerPage() ? getAppServerFromId(hkParams.resourceId) : (!isAlertsPage() && getUrlFromId(hkParams.resourceId))">{{resourceName}}</h1>
<h1 ng-show="isAlertsPage()">Alert Center</h1>
</div>
<div ng-transclude></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<!-- Server alerts -->
<div class="col-lg-3 col-md-4">
<hk-alert-info list="vm.alertList" limit="(vm.showAllAlerts ? 100000 : 3)"
resource-id="vm.$routeParams.resourceId" title="Server">
resource-id="vm.$routeParams.feedId + '/' + vm.$routeParams.resourceId" title="Server">
</hk-alert-info>
</div>
<!-- //Server alerts -->
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
<div class="card-pf card-pf-utilization">
<div class="card-pf-heading">
<p class="card-pf-heading-details hk-definitions-link">
<a href="#" ng-show="resourceId" ng-href="/hawkular-ui/alerts-center-triggers/{{resourceId}}">
<i class="fa fa-cog"></i>Definitions
</a>
</p>
<h2 class="card-pf-title">{{title}} Alerts <span class="label label-default" ng-show="list.length">{{list.length}}</span></h2>
</div>
<p class="card-pf-heading-details hk-definitions-link">
<a href="#" ng-show="resourceId" ng-href="/hawkular-ui/alerts-center-triggers/{{resourceId}}">
<i class="fa fa-cog"></i>Definitions
</a>
</p>
<h2 class="card-pf-title">{{title}} Alerts
<span class="label label-default" ng-show="list.length">{{list.length}}</span>
</h2>
</div>

<!-- No Alerts -->
<div class="card-pf-body" ng-hide="list.length">
<div class="hk-box-v-item">
<div class="hk-display-table">
<div class="hk-icon-container">
<i class="fa fa-flag gray"></i>
</div>
<div class="hk-info-container">
<p class="hk-info-info">No Alerts.</p>
<!-- No Alerts -->
<div class="card-pf-body" ng-hide="list.length">
<div class="hk-box-v-item">
<div class="hk-display-table">
<div class="hk-icon-container">
<i class="fa fa-flag gray"></i>
</div>
<div class="hk-info-container">
<p class="hk-info-info">No Alerts.</p>
</div>
</div>
</div>
</div>
</div>

<!-- Alerts exist -->
<hk-alert-panel-list class="card-pf-body" hk-alert-list="list" ng-show="list.length"
hk-limit="hkLimit"></hk-alert-panel-list>
<!-- Alerts exist -->
<hk-alert-panel-list class="card-pf-body" hk-alert-list="list" ng-show="list.length"
hk-limit="hkLimit"></hk-alert-panel-list>
</div>
4 changes: 3 additions & 1 deletion console/src/main/scripts/plugins/metrics/ts/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ module HawkularMetrics {

export class MetricsAlertController {
public static $inject = ['$scope', 'HawkularAlertsManager', 'ErrorsManager', 'NotificationsService', '$log', '$q',
'$rootScope', '$routeParams', '$modal', '$interval', 'HkHeaderParser'];
'$rootScope', '$routeParams', '$modal', '$interval', '$location', 'HkHeaderParser'];

public alertList:any = [];
public openSetup:any;
Expand All @@ -275,6 +275,7 @@ module HawkularMetrics {
private $routeParams:any,
private $modal:any,
private $interval:ng.IIntervalService,
private $location:ng.ILocationService,
private HkHeaderParser:any) {

this.$log.debug('querying data');
Expand All @@ -285,6 +286,7 @@ module HawkularMetrics {
this.alertsTimeEnd = $routeParams.endTime ? $routeParams.endTime : (new Date()).getTime();
this.alertsTimeStart = this.alertsTimeEnd - this.alertsTimeOffset;
this.getAlerts();
$scope.$on('SwitchedPersona', () => $location.path('/hawkular-ui/url/url-list'));
this.autoRefresh(20);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ module HawkularMetrics {
}

public save(): void {
console.log('this.status: ' + this.status);
console.log('this.detailAlert.status: ' + this.detailAlert.status);
if (this.status === this.detailAlert.status) {
if (this.comments && this.comments.length > 0) {
this.notes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ module HawkularMetrics {
let latestData = _.last(resource);
resourceData['activeWebSessions']['graph'] =
MetricsService.formatBucketedChartOutput(resource, AppServerJvmDetailsController.BYTES2MB);
console.log(latestData['avg'], 'shdfsdkf');
resourceData['activeWebSessions']['last'] = +latestData['avg'].toFixed(2);
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module HawkularMetrics {
console.error('Error occurred in fileread directive: '+error);
};

console.log(`Reading file: ${theFile.name} to deploy. Size: ${theFile.size}`);
reader.readAsArrayBuffer(theFile);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module HawkularMetrics {

export class MetricsAvailabilityController {
/// for minification only
public static $inject = ['$scope', '$rootScope', '$interval', '$window', '$log', 'HawkularMetric',
public static $inject = ['$scope', '$rootScope', '$interval', '$window', '$log', '$location', 'HawkularMetric',
'MetricsService', '$routeParams', '$filter', '$moment', 'HawkularAlertsManager',
'ErrorsManager', '$q', 'NotificationsService'];

Expand All @@ -60,6 +60,7 @@ module HawkularMetrics {
private $interval:ng.IIntervalService,
private $window:any,
private $log:ng.ILogService,
private $location:ng.ILocationService,
private HawkularMetric:any,
private MetricsService:any,
private $routeParams:any,
Expand Down Expand Up @@ -93,6 +94,7 @@ module HawkularMetrics {
}
});
}
$scope.$on('SwitchedPersona', () => $location.path('/hawkular-ui/url/url-list'));
this.autoRefreshAvailability(20);

$scope.$on(EventNames.REFRESH_AVAIL_CHART, (/*event*/) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module HawkularMetrics {

export class MetricsViewController {
/// for minification only
public static $inject = ['$scope', '$rootScope', '$interval', '$log',
public static $inject = ['$scope', '$rootScope', '$interval', '$log', '$location',
'$routeParams', 'HawkularAlertsManager', 'ErrorsManager', '$q', 'NotificationsService', 'MetricsService'];

private bucketedDataPoints:IChartDataPoint[] = [];
Expand All @@ -45,6 +45,7 @@ module HawkularMetrics {
private $rootScope:IHawkularRootScope,
private $interval:ng.IIntervalService,
private $log:ng.ILogService,
private $location:ng.ILocationService,
private $routeParams:any,
private HawkularAlertsManager:IHawkularAlertsManager,
private ErrorsManager:IErrorsManager,
Expand Down Expand Up @@ -80,6 +81,7 @@ module HawkularMetrics {
}
});
}
$scope.$on('SwitchedPersona', () => $location.path('/hawkular-ui/url/url-list'));
this.autoRefresh(20);
}

Expand Down

0 comments on commit b6998ea

Please sign in to comment.