Commit 09b8a956 by Dmitry Shmatko Committed by Johannes Edmeier

Add a referesh button to details

Instead of alway hitting F5 and do a full page reload, this adds a small button to refresh the details view.
parent 880f10f0
...@@ -23,6 +23,7 @@ module.exports = function ($scope, application) { ...@@ -23,6 +23,7 @@ module.exports = function ($scope, application) {
$scope.application = application; $scope.application = application;
$scope.metrics = {}; $scope.metrics = {};
$scope.getDetails = function () {
application.getInfo().then(function (response) { application.getInfo().then(function (response) {
$scope.info = response.data; $scope.info = response.data;
}).catch(function (response) { }).catch(function (response) {
...@@ -52,4 +53,7 @@ module.exports = function ($scope, application) { ...@@ -52,4 +53,7 @@ module.exports = function ($scope, application) {
).catch(function (response) { ).catch(function (response) {
$scope.error = response.data; $scope.error = response.data;
}); });
};
$scope.getDetails();
}; };
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
<div class="alert alert-error" ng-if="error"> <div class="alert alert-error" ng-if="error">
<b>Error:</b> {{ error }} <b>Error:</b> {{ error }}
</div> </div>
<div class="row">
<div class="text-center">
<form>
<button class="btn" ng-click="getDetails()"><i class="fa fa-repeat"></i> refresh</button>
</form>
</div>
</div>
<div style="display: flex; flex-wrap: wrap; justify-content: space-around;"> <div style="display: flex; flex-wrap: wrap; justify-content: space-around;">
<sba-info-panel class="span6" style="margin-left:0px" panel-title="Application" raw="api/applications/{{ application.id }}/info"> <sba-info-panel class="span6" style="margin-left:0px" panel-title="Application" raw="api/applications/{{ application.id }}/info">
<table class="table"> <table class="table">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment