diff --git a/app/app.js b/app/app.js
index 7d7608859..6462a7584 100644
--- a/app/app.js
+++ b/app/app.js
@@ -1,7 +1,6 @@
-'use strict';
-
angular.module('<%= pkg.name %>', ['<%= pkg.name %>.templates', 'ngRoute', '<%= pkg.name %>.services', '<%= pkg.name %>.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'settings', 'builder', 'containerLogs'])
.config(['$routeProvider', function ($routeProvider) {
+ 'use strict';
$routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'});
$routeProvider.when('/containers/', {templateUrl: 'app/components/containers/containers.html', controller: 'ContainersController'});
$routeProvider.when('/containers/:id/', {templateUrl: 'app/components/container/container.html', controller: 'ContainerController'});
diff --git a/app/components/container/container.html b/app/components/container/container.html
index 82edb403a..6bacb011e 100644
--- a/app/components/container/container.html
+++ b/app/components/container/container.html
@@ -70,10 +70,10 @@
Hostname: |
{{ container.Config.Hostname }} |
-
- IPAddress: |
- {{ container.NetworkSettings.IPAddress }} |
-
+
+ IPAddress: |
+ {{ container.NetworkSettings.IPAddress }} |
+
Cmd: |
{{ container.Config.Cmd }} |
diff --git a/app/components/containerLogs/containerLogsController.js b/app/components/containerLogs/containerLogsController.js
index 2b1bd3c87..ddd614d79 100644
--- a/app/components/containerLogs/containerLogsController.js
+++ b/app/components/containerLogs/containerLogsController.js
@@ -1,7 +1,7 @@
angular.module('containerLogs', [])
.controller('ContainerLogsController', ['$scope', '$routeParams', '$location', '$anchorScroll', 'ContainerLogs', 'Container', 'ViewSpinner',
function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Container, ViewSpinner) {
- $scope.stdout = '';
+ $scope.stdout = '';
$scope.stderr = '';
$scope.showTimestamps = false;
@@ -20,7 +20,7 @@ function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Containe
function getLogs() {
ContainerLogs.get($routeParams.id, {stdout: 1, stderr: 0, timestamps: $scope.showTimestamps}, function(data, status, headers, config) {
- // Replace carriage returns twith newlines to clean up output
+ // Replace carriage returns twith newlines to clean up output
$scope.stdout = data.replace(/[\r]/g, '\n');
});
ContainerLogs.get($routeParams.id, {stdout: 0, stderr: 1}, function(data, status, headers, config) {
@@ -40,9 +40,9 @@ function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Containe
$scope.scrollTo = function(id) {
$location.hash(id);
$anchorScroll();
- }
+ };
$scope.toggleTimestamps = function() {
- getLogs();
- }
+ getLogs();
+ };
}]);
diff --git a/app/components/containers/containers.html b/app/components/containers/containers.html
index e5c36257c..a4f159f61 100644
--- a/app/components/containers/containers.html
+++ b/app/components/containers/containers.html
@@ -18,7 +18,7 @@
Display All
+ ng-change="toggleGetAll()"/> Display All
diff --git a/app/components/dashboard/dashboardController.js b/app/components/dashboard/dashboardController.js
index 26b0ebeb2..2adad07cd 100644
--- a/app/components/dashboard/dashboardController.js
+++ b/app/components/dashboard/dashboardController.js
@@ -27,7 +27,7 @@ angular.module('dashboard', [])
}
Container.query({all: 1}, function(d) {
- var running = 0
+ var running = 0;
var ghost = 0;
var stopped = 0;
diff --git a/app/components/image/imageController.js b/app/components/image/imageController.js
index 6fc7a11b0..4e411dab9 100644
--- a/app/components/image/imageController.js
+++ b/app/components/image/imageController.js
@@ -36,7 +36,7 @@ function($scope, $q, $routeParams, $location, Image, Container, Messages, LineCh
var containers = [];
for (var i = 0; i < d.length; i++) {
var c = d[i];
- if (c.Image == tag) {
+ if (c.Image === tag) {
containers.push(new ContainerViewModel(c));
}
}
diff --git a/app/shared/filters.js b/app/shared/filters.js
index 6c013a431..2efe3b784 100644
--- a/app/shared/filters.js
+++ b/app/shared/filters.js
@@ -1,13 +1,14 @@
-'use strict';
-
angular.module('dockerui.filters', [])
.filter('truncate', function() {
+ 'use strict';
return function(text, length, end) {
- if (isNaN(length))
+ if (isNaN(length)) {
length = 10;
+ }
- if (end === undefined)
+ if (end === undefined){
end = "...";
+ }
if (text.length <= length || text.length - end.length <= length) {
return text;
@@ -18,19 +19,22 @@ angular.module('dockerui.filters', [])
};
})
.filter('statusbadge', function() {
+ 'use strict';
return function(text) {
if (text === 'Ghost') {
return 'important';
- } else if (text.indexOf('Exit') != -1 && text !== 'Exit 0') {
+ } else if (text.indexOf('Exit') !== -1 && text !== 'Exit 0') {
return 'warning';
}
return 'success';
};
})
.filter('getstatetext', function() {
+ 'use strict';
return function(state) {
- if (state == undefined) return '';
-
+ if (state === undefined) {
+ return '';
+ }
if (state.Ghost && state.Running) {
return 'Ghost';
}
@@ -44,8 +48,11 @@ angular.module('dockerui.filters', [])
};
})
.filter('getstatelabel', function() {
+ 'use strict';
return function(state) {
- if (state == undefined) return '';
+ if (state === undefined) {
+ return '';
+ }
if (state.Ghost && state.Running) {
return 'label-important';
@@ -57,32 +64,36 @@ angular.module('dockerui.filters', [])
};
})
.filter('humansize', function() {
+ 'use strict';
return function(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
- if (bytes == 0) {
+ if (bytes === 0) {
return 'n/a';
}
- var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
+ var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]];
};
})
.filter('containername', function() {
+ 'use strict';
return function(container) {
var name = container.Names[0];
return name.substring(1, name.length);
};
})
.filter('repotag', function() {
+ 'use strict';
return function(image) {
if (image.RepoTags && image.RepoTags.length > 0) {
var tag = image.RepoTags[0];
- if (tag == ':') { tag = ''; }
+ if (tag === ':') { tag = ''; }
return tag;
}
return '';
};
})
.filter('getdate', function() {
+ 'use strict';
return function(data) {
//Multiply by 1000 for the unix format
var date = new Date(data * 1000);
diff --git a/app/shared/services.js b/app/shared/services.js
index 57fd14e83..5a06bc5db 100644
--- a/app/shared/services.js
+++ b/app/shared/services.js
@@ -1,7 +1,6 @@
-'use strict';
-
angular.module('dockerui.services', ['ngResource'])
.factory('Container', function($resource, Settings) {
+ 'use strict';
// Resource for interacting with the docker containers
// http://docs.docker.io/en/latest/api/docker_remote_api.html#containers
return $resource(Settings.url + '/containers/:id/:action', {
@@ -21,6 +20,7 @@ angular.module('dockerui.services', ['ngResource'])
});
})
.factory('ContainerLogs', function($resource, $http, Settings) {
+ 'use strict';
return {
get: function(id, params, callback) {
$http({
@@ -31,9 +31,10 @@ angular.module('dockerui.services', ['ngResource'])
console.log(error, data);
});
}
- }
+ };
})
.factory('Image', function($resource, Settings) {
+ 'use strict';
// Resource for docker images
// http://docs.docker.io/en/latest/api/docker_remote_api.html#images
return $resource(Settings.url + '/images/:id/:action', {}, {
@@ -49,6 +50,7 @@ angular.module('dockerui.services', ['ngResource'])
});
})
.factory('Docker', function($resource, Settings) {
+ 'use strict';
// Information for docker
// http://docs.docker.io/en/latest/api/docker_remote_api.html#display-system-wide-information
return $resource(Settings.url + '/version', {}, {
@@ -56,6 +58,7 @@ angular.module('dockerui.services', ['ngResource'])
});
})
.factory('Auth', function($resource, Settings) {
+ 'use strict';
// Auto Information for docker
// http://docs.docker.io/en/latest/api/docker_remote_api.html#set-auth-configuration
return $resource(Settings.url + '/auth', {}, {
@@ -64,6 +67,7 @@ angular.module('dockerui.services', ['ngResource'])
});
})
.factory('System', function($resource, Settings) {
+ 'use strict';
// System for docker
// http://docs.docker.io/en/latest/api/docker_remote_api.html#display-system-wide-information
return $resource(Settings.url + '/info', {}, {
@@ -71,6 +75,7 @@ angular.module('dockerui.services', ['ngResource'])
});
})
.factory('Settings', function(DOCKER_ENDPOINT, DOCKER_PORT, DOCKER_API_VERSION, UI_VERSION) {
+ 'use strict';
var url = DOCKER_ENDPOINT;
if (DOCKER_PORT) {
url = url + DOCKER_PORT + '\\' + DOCKER_PORT;
@@ -82,10 +87,11 @@ angular.module('dockerui.services', ['ngResource'])
rawUrl: DOCKER_ENDPOINT + DOCKER_PORT + '/' + DOCKER_API_VERSION,
uiVersion: UI_VERSION,
url: url,
- firstLoad: true,
+ firstLoad: true
};
})
.factory('ViewSpinner', function() {
+ 'use strict';
var spinner = new Spinner();
var target = document.getElementById('view');
@@ -95,6 +101,7 @@ angular.module('dockerui.services', ['ngResource'])
};
})
.factory('Messages', function($rootScope) {
+ 'use strict';
return {
send: function(title, text) {
$.gritter.add({
@@ -102,7 +109,7 @@ angular.module('dockerui.services', ['ngResource'])
text: text,
time: 2000,
before_open: function() {
- if($('.gritter-item-wrapper').length == 3) {
+ if($('.gritter-item-wrapper').length === 3) {
return false;
}
}
@@ -114,7 +121,7 @@ angular.module('dockerui.services', ['ngResource'])
text: text,
time: 6000,
before_open: function() {
- if($('.gritter-item-wrapper').length == 4) {
+ if($('.gritter-item-wrapper').length === 4) {
return false;
}
}
@@ -123,6 +130,7 @@ angular.module('dockerui.services', ['ngResource'])
};
})
.factory('Dockerfile', function(Settings) {
+ 'use strict';
var url = Settings.rawUrl + '/build';
return {
build: function(file, callback) {
@@ -138,6 +146,7 @@ angular.module('dockerui.services', ['ngResource'])
};
})
.factory('LineChart', function(Settings) {
+ 'use strict';
var url = Settings.rawUrl + '/build';
return {
build: function(id, data, getkey){
@@ -157,10 +166,10 @@ angular.module('dockerui.services', ['ngResource'])
}
var labels = [];
- var data = [];
+ data = [];
var keys = Object.keys(map);
- for (var i = keys.length - 1; i > -1; i--) {
+ for (i = keys.length - 1; i > -1; i--) {
var k = keys[i];
labels.push(k);
data.push(map[k]);
diff --git a/assets/css/app.css b/assets/css/app.css
index 5fe8e24a8..6087c9c28 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -22,8 +22,8 @@ body {
}
.jumbotron .btn {
- font-size: 21px;
padding: 14px 24px;
+ font-size: 21px;
}
.marketing {
@@ -46,15 +46,15 @@ body {
.masthead .nav li {
display: table-cell;
- width: 1%;
float: none;
+ width: 1%;
}
.masthead .nav li a {
font-weight: bold;
text-align: center;
- border-left: 1px solid rgba(255,255,255,.75);
border-right: 1px solid rgba(0,0,0,.1);
+ border-left: 1px solid rgba(255,255,255,.75);
}
.masthead .nav li:first-child a {
@@ -81,8 +81,8 @@ body {
}
.btn-remove {
- margin: 0 auto;
max-width: 70%;
+ margin: 0 auto;
}
.actions {
@@ -97,33 +97,15 @@ body {
padding: 10px 15px 0 15px;
}
-#response {
- width: 80%;
- margin: 0 auto;
-}
-
-#editor {
- height: 300px;
- width: 100%;
- border: 1px solid #DDD;
- margin-top: 5px;
-}
-
.messages {
max-height: 50px;
- overflow-y: scroll;
overflow-x: hidden;
+ overflow-y: scroll;
}
.legend .title {
+ padding: 0 0.3em;
margin: 0.5em;
border-style: solid;
border-width: 0 0 0 1em;
- padding: 0 0.3em;
-}
-
-pre.pre-x-scrollable {
- max-height: 700px;
- word-wrap: normal;
- white-space: pre;
}
diff --git a/gruntFile.js b/gruntFile.js
index 398794ec8..2f20ccb5a 100644
--- a/gruntFile.js
+++ b/gruntFile.js
@@ -144,7 +144,10 @@ module.exports = function (grunt) {
sub:true,
boss:true,
eqnull:true,
- globals:{}
+ globals:{
+ angular: false,
+ '$': false
+ }
}
}
});
diff --git a/partials/.gitkeep b/partials/.gitkeep
deleted file mode 100644
index e69de29bb..000000000