Commit 09a52594 by Thomas Bosch

logfile optional

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