Merge branch 'release/1.0.1'

pull/11/head 1.0.1
Anthony Lapenna 2016-06-08 18:36:42 +12:00
commit 0230c5bb59
20 changed files with 144 additions and 52 deletions

View File

@ -31,7 +31,7 @@ angular.module('uifordocker', [
$urlRouterProvider.otherwise('/');
$stateProvider
$stateProvider
.state('index', {
url: '/',
templateUrl: 'app/components/dashboard/dashboard.html',
@ -92,7 +92,8 @@ angular.module('uifordocker', [
$httpProvider.interceptors.push(function() {
return {
'response': function(response) {
if (typeof(response.data) === 'string' && response.data.startsWith('Conflict.')) {
if (typeof(response.data) === 'string' &&
(response.data.startsWith('Conflict.') || response.data.startsWith('conflict:'))) {
$.gritter.add({
title: 'Error',
text: $('<div>').text(response.data).html(),
@ -113,4 +114,4 @@ angular.module('uifordocker', [
// You need to set this to the api endpoint without the port i.e. http://192.168.1.9
.constant('DOCKER_ENDPOINT', 'dockerapi')
.constant('DOCKER_PORT', '') // Docker port, leave as an empty string if no port is requred. If you have a port, prefix it with a ':' i.e. :4243
.constant('UI_VERSION', 'v1.0.0');
.constant('UI_VERSION', 'v1.0.1');

View File

@ -1,3 +1,11 @@
<rd-header>
<rd-header-title title="Container details"></rd-header-title>
<rd-header-content>
Containers > <a ui-sref="container({id: container.Id})">{{ container.Name|trimcontainername }}</a>
</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-6 col-md-12 col-xs-12">
<rd-widget>

View File

@ -1,3 +1,10 @@
<rd-header>
<rd-header-title title="Container logs"></rd-header-title>
<rd-header-content>
Containers > <a ui-sref="container({id: container.Id})">{{ container.Name|trimcontainername }}</a> > Logs
</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>

View File

@ -1,5 +1,10 @@
<div ng-include="template" ng-controller="StartContainerController"></div>
<rd-header>
<rd-header-title title="Container list"></rd-header-title>
<rd-header-content>Containers</rd-header-content>
</rd-header>
<div class="col-lg-12">
<rd-widget>
<rd-widget-header icon="fa-tasks" title="Containers">

View File

@ -1,3 +1,8 @@
<rd-header>
<rd-header-title title="Home"></rd-header-title>
<rd-header-content>Dashboard</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-3 col-md-6 col-xs-12">
<rd-widget>

View File

@ -1,3 +1,11 @@
<rd-header>
<rd-header-title title="Image details"></rd-header-title>
<rd-header-content>
Images > <a ui-sref="image({id: id})">{{ id }}</a>
</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>

View File

@ -1,5 +1,10 @@
<div ng-include="template" ng-controller="PullImageController"></div>
<rd-header>
<rd-header-title title="Image list"></rd-header-title>
<rd-header-content>Images</rd-header-content>
</rd-header>
<div class="col-lg-12">
<rd-widget>
<rd-widget-header icon="fa-clone" title="Images">

View File

@ -1,3 +1,10 @@
<rd-header>
<rd-header-title title="Network details"></rd-header-title>
<rd-header-content>
Networks > <a ui-sref="network({id: network.Id})">{{ network.Name }}</a>
</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-9 col-md-9 col-xs-9">
<rd-widget>

View File

@ -1,5 +1,11 @@
<div ng-include="template" ng-controller="CreateNetworkController"></div>
<rd-header>
<rd-header-title title="Network list"></rd-header-title>
<rd-header-content>Networks</rd-header-content>
</rd-header>
<div class="col-lg-12">
<rd-widget>
<rd-widget-header icon="fa-sitemap" title="Networks">

View File

@ -1,3 +1,10 @@
<rd-header>
<rd-header-title title="Container stats"></rd-header-title>
<rd-header-content>
Containers > <a ui-sref="container({id: container.Id})">{{ container.Name|trimcontainername }}</a> > Stats
</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>
@ -5,7 +12,7 @@
<div class="widget-icon grey pull-left">
<i class="fa fa-tasks"></i>
</div>
<div class="title">{{ containerName }}</div>
<div class="title">{{ container.Name|trimcontainername }}</div>
<div class="comment">
Name
</div>

View File

@ -186,7 +186,7 @@ function (Settings, $scope, Messages, $timeout, Container, ContainerTop, $stateP
});
Container.get({id: $stateParams.id}, function (d) {
$scope.containerName = d.Name.substring(1);
$scope.container = d;
}, function (e) {
Messages.error("Failure", e.data);
});

View File

@ -1,3 +1,8 @@
<rd-header>
<rd-header-title title="Cluster overview"></rd-header-title>
<rd-header-content>Swarm</rd-header-content>
</rd-header>
<div class="row">
<div class="col-lg-3 col-md-6 col-xs-12">
<rd-widget>

View File

@ -1,5 +1,10 @@
<div ng-include="template" ng-controller="CreateVolumeController"></div>
<rd-header>
<rd-header-title title="Volume list"></rd-header-title>
<rd-header-content>Volumes</rd-header-content>
</rd-header>
<div class="col-lg-12">
<rd-widget>
<rd-widget-header icon="fa-cubes" title="Volumes">

View File

@ -0,0 +1,11 @@
angular
.module('uifordocker')
.directive('rdHeaderContent', function rdHeaderContent() {
var directive = {
requires: '^rdHeader',
transclude: true,
template: '<div class="breadcrumb-links" ng-transclude></div>',
restrict: 'E'
};
return directive;
});

View File

@ -0,0 +1,14 @@
angular
.module('uifordocker')
.directive('rdHeaderTitle', function rdHeaderTitle() {
var directive = {
requires: '^rdHeader',
scope: {
title: '@',
},
transclude: true,
template: '<div class="page">{{title}}</div>',
restrict: 'E'
};
return directive;
});

13
app/directives/header.js Normal file
View File

@ -0,0 +1,13 @@
angular
.module('uifordocker')
.directive('rdHeader', function rdHeader() {
var directive = {
scope: {
"ngModel": "="
},
transclude: true,
template: '<div class="row header"><div class="col-xs-12"><div class="meta" ng-transclude></div></div></div>',
restrict: 'EA'
};
return directive;
});

View File

@ -1,6 +1,6 @@
{
"name": "uifordocker",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/kevana/ui-for-docker",
"authors": [
"Michael Crosby <crosbymichael@gmail.com>",

View File

@ -65,12 +65,12 @@ module.exports = function (grunt) {
js: ['app/**/*.js', '!app/**/*.spec.js'],
jsTpl: ['<%= distdir %>/templates/**/*.js'],
jsVendor: [
'bower_components/jquery/dist/jquery.js',
'bower_components/jquery/dist/jquery.min.js',
'assets/js/jquery.gritter.js', // Using custom version to fix error in minified build due to "use strict"
'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/bootstrap/dist/js/bootstrap.min.js',
'bower_components/spin.js/spin.js',
'bower_components/Chart.js/Chart.js',
'bower_components/lodash/dist/lodash.js',
'bower_components/Chart.js/Chart.min.js',
'bower_components/lodash/dist/lodash.min.js',
'bower_components/oboe/dist/oboe-browser.js',
'assets/js/legend.js' // Not a bower package
],
@ -83,8 +83,8 @@ module.exports = function (grunt) {
'bower_components/bootstrap/dist/css/bootstrap.css',
'bower_components/jquery.gritter/css/jquery.gritter.css',
'bower_components/font-awesome/css/font-awesome.min.css',
'bower_components/rdash-ui/dist/css/rdash.css',
'bower_components/angular-ui-select/dist/select.css'
'bower_components/rdash-ui/dist/css/rdash.min.css',
'bower_components/angular-ui-select/dist/select.min.css'
]
},
clean: {
@ -135,11 +135,11 @@ module.exports = function (grunt) {
process: true
},
src: ['<%= src.js %>', '<%= src.jsTpl %>'],
dest: '<%= distdir %>/<%= pkg.name %>.js'
dest: '<%= distdir %>/js/<%= pkg.name %>.js'
},
vendor: {
src: ['<%= src.jsVendor %>'],
dest: '<%= distdir %>/vendor.js'
dest: '<%= distdir %>/js/vendor.js'
},
index: {
src: ['index.html'],
@ -149,16 +149,16 @@ module.exports = function (grunt) {
}
},
angular: {
src: ['bower_components/angular/angular.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-ui-router/release/angular-ui-router.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
'bower_components/angular-oboe/dist/angular-oboe.js',
'bower_components/angular-ui-select/dist/select.js'],
dest: '<%= distdir %>/angular.js'
src: ['bower_components/angular/angular.min.js',
'bower_components/angular-sanitize/angular-sanitize.min.js',
'bower_components/angular-cookies/angular-cookies.min.js',
'bower_components/angular-route/angular-route.min.js',
'bower_components/angular-ui-router/release/angular-ui-router.min.js',
'bower_components/angular-resource/angular-resource.min.js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
'bower_components/angular-oboe/dist/angular-oboe.min.js',
'bower_components/angular-ui-select/dist/select.min.js'],
dest: '<%= distdir %>/js/angular.js'
}
},
uglify: {
@ -167,28 +167,28 @@ module.exports = function (grunt) {
banner: "<%= banner %>"
},
src: ['<%= src.js %>', '<%= src.jsTpl %>'],
dest: '<%= distdir %>/<%= pkg.name %>.js'
dest: '<%= distdir %>/js/<%= pkg.name %>.js'
},
vendor: {
options: {
preserveComments: 'some' // Preserve license comments
},
src: ['<%= src.jsVendor %>'],
dest: '<%= distdir %>/vendor.js'
dest: '<%= distdir %>/js/vendor.js'
},
angular: {
options: {
preserveComments: 'some' // Preserve license comments
},
src: ['<%= concat.angular.src %>'],
dest: '<%= distdir %>/angular.js'
dest: '<%= distdir %>/js/angular.js'
}
},
recess: { // TODO: not maintained, unable to preserve license comments, switch out for something better.
build: {
files: {
'<%= distdir %>/<%= pkg.name %>.css': ['<%= src.css %>'],
'<%= distdir %>/vendor.css': ['<%= src.cssVendor %>']
'<%= distdir %>/css/<%= pkg.name %>.css': ['<%= src.css %>'],
'<%= distdir %>/css/vendor.css': ['<%= src.cssVendor %>']
},
options: {
compile: true,
@ -197,8 +197,8 @@ module.exports = function (grunt) {
},
min: {
files: {
'<%= distdir %>/<%= pkg.name %>.css': ['<%= src.css %>'],
'<%= distdir %>/vendor.css': ['<%= src.cssVendor %>']
'<%= distdir %>/css/<%= pkg.name %>.css': ['<%= src.css %>'],
'<%= distdir %>/css/vendor.css': ['<%= src.cssVendor %>']
},
options: {
compile: true,

View File

@ -7,17 +7,17 @@
<meta name="description" content="">
<meta name="author" content="<%= pkg.author %>">
<link href="vendor.css" rel="stylesheet">
<link href="<%= pkg.name %>.css" rel="stylesheet">
<link href="css/vendor.css" rel="stylesheet">
<link href="css/<%= pkg.name %>.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="angular.js"></script>
<script src="vendor.js"></script>
<script src="<%= pkg.name %>.js"></script>
<script src="js/angular.js"></script>
<script src="js/vendor.js"></script>
<script src="js/<%= pkg.name %>.js"></script>
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="ico/favicon.ico">
@ -67,21 +67,6 @@
<div id="content-wrapper">
<div class="page-content">
<!-- Header Bar -->
<div class="row header">
<div class="col-xs-12">
<div class="meta">
<div class="page">
Dashboard
</div>
<div class="breadcrumb-links">
Home / Dashboard
</div>
</div>
</div>
</div>
<!-- End Header Bar -->
<!-- Main Content -->
<div id="view" ui-view></div>

View File

@ -2,7 +2,7 @@
"author": "Michael Crosby & Kevan Ahlquist",
"name": "uifordocker",
"homepage": "https://github.com/kevana/ui-for-docker",
"version": "1.0.0",
"version": "1.0.1",
"repository": {
"type": "git",
"url": "git@github.com:kevana/ui-for-docker.git"