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 #132 from hawkular/HAWKULAR-256
Browse files Browse the repository at this point in the history
HAWKULAR-256 Move last updated timestamp to header
  • Loading branch information
mtho11 committed May 26, 2015
2 parents 970a0a6 + b56e2a9 commit a0820e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ <h2 ng-show="vm.resourceList.length > 0" class="text-center hk-fade-in">Current
</div>
<div class="col-sm-6 text-right">
Last update
<span class="hk-update pull-right" data-toggle="tooltip" data-placement="top" title="Last update"><i class="fa fa-clock-o"></i>{{vm.lastUpdateTimestamp| date:"HH:mm" }}</span>
</div>
</div>

<div class="hk-fade-in">
<div class="hk-url-item" ng-repeat="res in vm.resourceList | orderBy:'properties.url':vm.reverse">
<div class="hk-url-heading">
<a href="/hawkular-ui/url/availability/{{res.id}}">{{res.properties.url}}</a>
<span class="hk-update pull-right" data-toggle="tooltip" data-placement="top" title="Last update"><i class="fa fa-clock-o"></i>{{res.updateTime| date:"HH:mm" }}</span>
</div>
<div class="panel panel-default hk-summary">
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ h3 {
font-weight: bold;
margin-bottom:@grid-gutter-width/8*3;
margin-top: @grid-gutter-width/4;
}

+ .hk-update {
margin-top: @grid-gutter-width/4;
}
.hk-update {
margin-left: 8px;
}

.input-group-lg {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module HawkularMetrics {
public addProgress: boolean = false;
private resourceList;
public alertList;
public lastUpdateTimestamp:Date = new Date();
private resPerPage = 5;
public resCurPage = 0;

Expand Down Expand Up @@ -203,7 +204,7 @@ module HawkularMetrics {
res['availability'] = resource[0].uptimeRatio * 100;
res['downTime'] = Math.round(resource[0].downtimeDuration / 1000 / 60);
}).$promise);
res['updateTime'] = new Date();
this.lastUpdateTimestamp = new Date();
}, this);
this.$q.all(promises).then((result) => {
this.resourceList = aResourceList;
Expand Down Expand Up @@ -238,8 +239,6 @@ module HawkularMetrics {
}
}

_module.controller('HawkularMetrics.AddUrlController', AddUrlController);

class DeleteResourceModalController {

static $inject = ['$scope', '$rootScope', '$modalInstance', 'HawkularInventory', 'resource'];
Expand All @@ -264,5 +263,6 @@ module HawkularMetrics {
}

}
_module.controller('HawkularMetrics.AddUrlController', AddUrlController);

}

0 comments on commit a0820e4

Please sign in to comment.