Commit b539ae5a by Thomas Bosch

about

parent 60f9b29f
......@@ -11,7 +11,7 @@
<link rel="stylesheet" type="text/css" href="/webjars/bootstrap/${bootstrap.version}/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/styles/main.css" />
</head>
<body ng-app="registry">
<body ng-app="springBootAdmin">
<script type="text/javascript">
// Work around Google font rendering issues in webkit browsers on Windows 7
if (navigator.userAgent.indexOf("NT 6.1") != -1) {
......@@ -25,9 +25,9 @@
<div class="spring-logo--container">
<a class="spring-logo" href="/"><span></span></a>
</div>
<ul class="nav pull-right">
<li class="navbar-link" ng-class="{ active: $state.includes('home.apps') }"><a ui-sref="home.apps.tabs.definitions">Applications</a></li>
<li class="navbar-link" ng-class="{ active: $state.includes('home.about') }"><a ui-sref="home.about">About</a></li>
<ul class="nav pull-right" ng-controller='navCtrl'>
<li class="navbar-link" ng-class="navClass('main')"><a href="/#/main">Applications</a></li>
<li class="navbar-link" ng-class="navClass('about')"><a href="/#/about">About</a></li>
<li class="navbar-link" ng-if="authenticationEnabled" class="dropdown"><a data-target="#" class="dropdown-toggle"
data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span><b class="caret"></b></a>
<ul class="dropdown-menu">
......
'use strict';
angular.module('registry', [
angular.module('springBootAdmin', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute',
'registry.services'
'springBootAdmin.services'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
.when('/main', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
controller: 'mainCtrl'
})
.when('/about', {
templateUrl: 'views/about.html'
})
.when('/', {
redirectTo: '/main'
})
.otherwise({
redirectTo: '/'
......
'use strict';
angular.module('registry')
.controller('MainCtrl', function ($scope, Application, ApplicationInfo, $location, $http) {
angular.module('springBootAdmin')
.controller('mainCtrl', function ($scope, Application, ApplicationInfo, $location, $http) {
// Gets the service from /api/services
$scope.applications = Application.query({}, function(applications) {
......@@ -14,4 +13,10 @@ angular.module('registry')
}
});
})
.controller('navCtrl', function ($scope, $location) {
$scope.navClass = function(page) {
var currentRoute = $location.path().substring(1) || 'main';
return page == currentRoute ? 'active' : '';
};
});
\ No newline at end of file
'use strict';
angular.module('registry.services', ['ngResource'])
angular.module('springBootAdmin.services', ['ngResource'])
.factory('Application', ['$resource',
function($resource){
return $resource(
......
<div class="container">
<div class="main-template">
This is an administration GUI for Spring-Boot applications. All applications has to register itself at this application.
This is done by including <a href="#" target="_blank">spring-boot-starters-admin-client</a> as dependency. This will
auto-configure a registrator that registers the application.
</div>
</div><!-- /.container -->
\ No newline at end of file
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