Moved sidebar to its own submodule

pull/2/head
Kevan Ahlquist 10 years ago
parent 57fef1c958
commit 604fd1de3b

@ -1,6 +1,6 @@
'use strict'; '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) { .config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'}); $routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'});
$routeProvider.when('/containers/', {templateUrl: 'app/components/containers/containers.html', controller: 'ContainersController'}); $routeProvider.when('/containers/', {templateUrl: 'app/components/containers/containers.html', controller: 'ContainersController'});

@ -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); 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) { function SettingsController($scope, System, Docker, Settings, Messages) {
$scope.info = {}; $scope.info = {};
$scope.docker = {}; $scope.docker = {};

@ -45,6 +45,7 @@
<script src="app/components/startContainer/startContainerController.js"></script> <script src="app/components/startContainer/startContainerController.js"></script>
<script src="app/components/image/imageController.js"></script> <script src="app/components/image/imageController.js"></script>
<script src="app/components/images/imagesController.js"></script> <script src="app/components/images/imagesController.js"></script>
<script src="app/components/sidebar/sidebarController.js"></script>
<script src="app/viewmodel.js"></script> <script src="app/viewmodel.js"></script>
<!-- Fav and touch icons --> <!-- Fav and touch icons -->

Loading…
Cancel
Save