mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
Moved sidebar to its own submodule
This commit is contained in:
parent
57fef1c958
commit
604fd1de3b
5 changed files with 13 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('dockerui', ['ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer'])
|
||||
angular.module('dockerui', ['ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar'])
|
||||
.config(['$routeProvider', function ($routeProvider) {
|
||||
$routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'});
|
||||
$routeProvider.when('/containers/', {templateUrl: 'app/components/containers/containers.html', controller: 'ContainersController'});
|
||||
|
|
11
app/components/sidebar/sidebar.html
Normal file
11
app/components/sidebar/sidebar.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="well">
|
||||
<strong>Running containers:</strong>
|
||||
<br />
|
||||
<strong>Endpoint: </strong>{{ endpoint }}
|
||||
<ul>
|
||||
<li ng-repeat="container in containers">
|
||||
<a href="#/containers/{{ container.Id }}/">{{ container.Id|truncate:20 }}</a>
|
||||
<span class="pull-right label label-{{ container.Status|statusbadge }}">{{ container.Status }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
11
app/components/sidebar/sidebarController.js
Normal file
11
app/components/sidebar/sidebarController.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
angular.module('sidebar', [])
|
||||
.controller('SideBarController', ['$scope', 'Container', 'Settings',
|
||||
function($scope, Container, Settings) {
|
||||
$scope.template = 'partials/sidebar.html';
|
||||
$scope.containers = [];
|
||||
$scope.endpoint = Settings.endpoint;
|
||||
|
||||
Container.query({all: 0}, function(d) {
|
||||
$scope.containers = d;
|
||||
});
|
||||
}]);
|
|
@ -47,16 +47,6 @@ function getChart(id) {
|
|||
return new Chart(ctx);
|
||||
}
|
||||
|
||||
function SideBarController($scope, Container, Settings) {
|
||||
$scope.template = 'partials/sidebar.html';
|
||||
$scope.containers = [];
|
||||
$scope.endpoint = Settings.endpoint;
|
||||
|
||||
Container.query({all: 0}, function(d) {
|
||||
$scope.containers = d;
|
||||
});
|
||||
}
|
||||
|
||||
function SettingsController($scope, System, Docker, Settings, Messages) {
|
||||
$scope.info = {};
|
||||
$scope.docker = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue