Commit 09a52594 by Thomas Bosch

logfile optional

parent 651f2a5f
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin</artifactId>
<version>1.0.0-RC1</version>
<version>1.0.0.RC1</version>
<properties>
<spring-boot.version>1.1.0.RELEASE</spring-boot.version>
<bootstrap.version>2.3.2</bootstrap.version>
......@@ -15,7 +15,7 @@
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-starter-admin-client</artifactId>
<version>1.0.0.RC3</version>
<version>1.0.0.RC4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
......
......@@ -7,6 +7,7 @@ angular.module('springBootAdmin')
var app = applications[i];
ApplicationOverview.getVersion(app);
ApplicationOverview.getHealth(app);
ApplicationOverview.getLogfile(app);
}
});
// callback for ng-click 'showDetails':
......@@ -19,10 +20,6 @@ angular.module('springBootAdmin')
ApplicationOverview.refresh(application);
});
};
// url for ng-href 'logfile':
$scope.logfile = function(url) {
return url + '/logfile';
};
})
.controller('navCtrl', function ($scope, $location) {
$scope.navClass = function(page) {
......
......@@ -36,9 +36,18 @@ angular.module('springBootAdmin.services', ['ngResource'])
app.online = false;
});
}
this.getLogfile = function(app) {
return $http.get(app.url + '/logfile').success(function(response) {
app.providesLogfile = true;
app.urlLogfile = app.url + '/logfile';
}).error(function() {
app.providesLogfile = false;
app.urlLogfile = null;
});
}
this.refresh = function(app) {
return $http.post(app.url + '/refresh');
};
}
}])
.service('ApplicationDetails', ['$http', function($http) {
this.getInfo = function(app) {
......
......@@ -26,8 +26,8 @@
</td>
<td>
<span ng-show="application.online" style="float:right">
<a ng-show="application.providesLogfile" target="_self" ng-href="application.urlLogfile"><button class="btn btn-success">Logfile</button></a>
<button ng-click="showDetails(application.id)" class="btn btn-success">Details</button>
<a target="_self" ng-href="{{logfile(application.url)}}"><button class="btn btn-success">Logfile</button></a>
<!-- <button ng-click="refresh(application.id)" class="btn btn-success">Refresh</button> -->
</span>
</td>
......
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