Commit 35efc531 by Joshi83

Nicer views with fixed columns

parent d0ba735a
...@@ -71,7 +71,7 @@ angular.module('springBootAdmin.services', ['ngResource']) ...@@ -71,7 +71,7 @@ angular.module('springBootAdmin.services', ['ngResource'])
.service('ApplicationDetails', ['$http', function($http) { .service('ApplicationDetails', ['$http', function($http) {
this.getInfo = function(app) { this.getInfo = function(app) {
return $http.get(app.url + '/info').success(function(response) { return $http.get(app.url + '/info').success(function(response) {
app.info = angular.toJson(response, true); app.info = response;
}); });
} }
this.getMetrics = function(app) { this.getMetrics = function(app) {
...@@ -82,8 +82,6 @@ angular.module('springBootAdmin.services', ['ngResource']) ...@@ -82,8 +82,6 @@ angular.module('springBootAdmin.services', ['ngResource'])
this.getEnv = function(app) { this.getEnv = function(app) {
return $http.get(app.url + '/env').success(function(response) { return $http.get(app.url + '/env').success(function(response) {
app.env = response; app.env = response;
app.env.systemProp = angular.toJson(app.env['systemProperties'], true);
app.env.systemEnv = angular.toJson(app.env['systemEnvironment'], true);
}); });
} }
this.getProps = function(app) { this.getProps = function(app) {
...@@ -93,7 +91,7 @@ angular.module('springBootAdmin.services', ['ngResource']) ...@@ -93,7 +91,7 @@ angular.module('springBootAdmin.services', ['ngResource'])
if (attr.indexOf('[') != -1 && attr.indexOf('.properties]') != -1) { if (attr.indexOf('[') != -1 && attr.indexOf('.properties]') != -1) {
var prop = new Object(); var prop = new Object();
prop.key = attr; prop.key = attr;
prop.value = angular.toJson(response[attr], true); prop.value = response[attr];
app.props.push(prop); app.props.push(prop);
} }
} }
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
color: #f1f1f1; color: #f1f1f1;
} }
.table tr.highlight > td {
background-color: #6db33f !important;
font-weight: bold;
}
.table-filter { .table-filter {
background-color: #34302D; background-color: #34302D;
padding: 9px 12px; padding: 9px 12px;
......
<table class="table table-striped"> <table class="table table-striped">
<col style="width:30%">
<col style="width:auto">
<thead> <thead>
<tr> <tr>
<th>Profiles</th> <th>Property</th>
<th width="400">System Properties</th> <th>Value</th>
<th width="400">System Environment</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr class="highlight" ng-repeat-start="(envkey, envvalue) in application.env">
<td>{{ application.env.profiles }}</td> <td colspan="2">{{ envkey }}</td>
<td style="word-break: break-all; ">{{ application.env.systemProp }}</td> </tr>
<td style="word-break: break-all; ">{{ application.env.systemEnv }}</td> <tr ng-repeat-end ng-repeat="(key, value) in envvalue" >
<td style="text-align: right; word-break: break-all;" >{{ key }}</td>
<td style="word-break: break-all;" >{{ value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="table table-striped"> <table class="table table-striped">
<col style="width:30%">
<col style="width:auto">
<thead> <thead>
<tr> <tr>
<th>Info JSON</th> <th>Key</th>
<th>Value</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr ng-repeat="(key, value) in application.info" >
<td> <td style="text-align: right;" >{{ key }}</td>
{{ application.info }} <td>{{ value }}</td>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
\ No newline at end of file
<table class="table table-striped"> <table class="table table-striped">
<col style="width:30%">
<col style="width:auto">
<thead> <thead>
<tr> <tr>
<th>Resource</th> <th>Property</th>
<th>Properties</th> <th>Value</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="prop in application.props"> <tr class="highlight" ng-repeat-start="prop in application.props">
<td>{{ prop.key }}</td> <td colspan="2">{{ prop.key }}</td>
<td style="word-break: normal; ">{{ prop.value }}</td> </tr>
<tr ng-repeat-end ng-repeat="(key, value) in prop.value" >
<td style="text-align: right; word-break: break-all;" >{{ key }}</td>
<td style="word-break: break-all;" >{{ value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </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