fix(build): Use ngmin. Fix all introduced erros in previous commits.
@ -174,7 +174,7 @@ module.exports = function (grunt) {
|
|||||||
options: {
|
options: {
|
||||||
dest: '<%= yeoman.dist %>'
|
dest: '<%= yeoman.dist %>'
|
||||||
},
|
},
|
||||||
html: ['<%= yeoman.app %>/**/*.html']
|
html: ['<%= yeoman.app %>/index.html']
|
||||||
},
|
},
|
||||||
usemin: {
|
usemin: {
|
||||||
options: {
|
options: {
|
||||||
@ -240,6 +240,14 @@ module.exports = function (grunt) {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ngmin: {
|
||||||
|
dist: {
|
||||||
|
src: '.tmp/concat/scripts/app.js',
|
||||||
|
dest: '.tmp/concat/scripts/app.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Put files not handled in other tasks here
|
// Put files not handled in other tasks here
|
||||||
copy: {
|
copy: {
|
||||||
dist: {
|
dist: {
|
||||||
@ -251,10 +259,10 @@ module.exports = function (grunt) {
|
|||||||
src: [
|
src: [
|
||||||
'*.{ico,png,txt}',
|
'*.{ico,png,txt}',
|
||||||
'.htaccess',
|
'.htaccess',
|
||||||
'images/{,*/}*.{webp,gif}',
|
'images/{,*/}*.{webp,gif,svg}',
|
||||||
'styles/fonts/{,*/}*.*',
|
'styles/fonts/{,*/}*.*',
|
||||||
'views/*.*',
|
'views/*.*',
|
||||||
'index.html',
|
//'index.html',
|
||||||
'bower_components/sass-bootstrap/fonts/*.*'
|
'bower_components/sass-bootstrap/fonts/*.*'
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
@ -286,7 +294,7 @@ module.exports = function (grunt) {
|
|||||||
'copy:styles'
|
'copy:styles'
|
||||||
],
|
],
|
||||||
dist: [
|
dist: [
|
||||||
'compass',
|
//'compass',
|
||||||
'copy:styles',
|
'copy:styles',
|
||||||
'imagemin',
|
'imagemin',
|
||||||
'svgmin',
|
'svgmin',
|
||||||
@ -327,13 +335,15 @@ module.exports = function (grunt) {
|
|||||||
|
|
||||||
grunt.registerTask('build', [
|
grunt.registerTask('build', [
|
||||||
'clean:dist',
|
'clean:dist',
|
||||||
|
'jshint',
|
||||||
'useminPrepare',
|
'useminPrepare',
|
||||||
'concurrent:dist',
|
'concurrent:dist',
|
||||||
'autoprefixer',
|
'autoprefixer',
|
||||||
'concat',
|
'concat',
|
||||||
'cssmin',
|
'cssmin',
|
||||||
'uglify',
|
'ngmin',
|
||||||
'usemin',
|
'usemin',
|
||||||
|
'uglify',
|
||||||
'copy:dist'
|
'copy:dist'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
@ -9,11 +9,13 @@
|
|||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,400italic,600,700,900" rel="stylesheet" type="text/css">
|
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,400italic,600,700,900" rel="stylesheet" type="text/css">
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600,700" rel="stylesheet" type="text/css">
|
<link href="http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600,700" rel="stylesheet" type="text/css">
|
||||||
|
<!-- build:css styles/styles.css -->
|
||||||
<link rel="stylesheet" href="styles/bootstrap.css">
|
<link rel="stylesheet" href="styles/bootstrap.css">
|
||||||
<link rel="stylesheet" href="styles/main.css">
|
<link rel="stylesheet" href="styles/main.css">
|
||||||
<link rel="stylesheet" href="styles/browser.css">
|
<link rel="stylesheet" href="styles/browser.css">
|
||||||
<link rel="stylesheet" href="styles/stats.css">
|
<link rel="stylesheet" href="styles/stats.css">
|
||||||
<link rel="stylesheet" href="styles/etcd-widgets.css">
|
<link rel="stylesheet" href="styles/etcd-widgets.css">
|
||||||
|
<!-- endbuild -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -24,7 +26,7 @@
|
|||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="powered-by" class="text-center">Powered by <a href="https://github.com/coreos/etcd">etcd</a></div>
|
<div id="powered-by" class="text-center">Powered by <a href="https://github.com/coreos/etcd">etcd</a></div>
|
||||||
<div id="coreos-logo">
|
<div id="coreos-logo">
|
||||||
<a href="http://coreos.com"><img src="img/logo.svg"/></a>
|
<a href="http://coreos.com"><img src="images/logo.svg"/></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -39,21 +41,21 @@
|
|||||||
<script src="bower_components/underscore/underscore.js"></script>
|
<script src="bower_components/underscore/underscore.js"></script>
|
||||||
<script src="bower_components/underscore.string/lib/underscore.string.js"></script>
|
<script src="bower_components/underscore.string/lib/underscore.string.js"></script>
|
||||||
<script src="bower_components/moment/moment.js"></script>
|
<script src="bower_components/moment/moment.js"></script>
|
||||||
|
<script src="scripts/vega.js"></script>
|
||||||
|
<script src="scripts/ng-time-relative.min.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
||||||
<!-- build:js({.tmp,app}) scripts/app.js -->
|
<!-- build:js scripts/app.js -->
|
||||||
<script src="scripts/app.js"></script>
|
<script src="scripts/app.js"></script>
|
||||||
<script src="scripts/controllers/root.js"></script>
|
<script src="scripts/controllers/root.js"></script>
|
||||||
<script src="scripts/directives.js"></script>
|
<script src="scripts/directives.js"></script>
|
||||||
<script src="scripts/shims.js"></script>
|
<script src="scripts/shims.js"></script>
|
||||||
<script src="scripts/controllers/home.js"></script>
|
<script src="scripts/controllers/home.js"></script>
|
||||||
<script src="scripts/controllers/browser.js"></script>
|
<script src="scripts/controllers/browser.js"></script>
|
||||||
<script src="scripts/ng-time-relative.min.js"></script>
|
|
||||||
<script src="scripts/common/services/etcd.js"></script>
|
<script src="scripts/common/services/etcd.js"></script>
|
||||||
<script src="scripts/common/services/prefix-url.js"></script>
|
<script src="scripts/common/services/prefix-url.js"></script>
|
||||||
<script src="scripts/common/directives/highlight.js"></script>
|
<script src="scripts/common/directives/highlight.js"></script>
|
||||||
<script src="scripts/common/directives/enter.js"></script>
|
<script src="scripts/common/directives/enter.js"></script>
|
||||||
<script src="scripts/vega.js"></script>
|
|
||||||
<script src="scripts/common/services/etcd.js"></script>
|
<script src="scripts/common/services/etcd.js"></script>
|
||||||
<script src="scripts/controllers/stats.js"></script>
|
<script src="scripts/controllers/stats.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
@ -8,7 +8,8 @@ var app = angular.module('etcdControlPanel', [
|
|||||||
'timeRelative',
|
'timeRelative',
|
||||||
'underscore',
|
'underscore',
|
||||||
'jquery',
|
'jquery',
|
||||||
'moment'
|
'moment',
|
||||||
|
'vg'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
app.constant('urlPrefix', '/mod/dashboard');
|
app.constant('urlPrefix', '/mod/dashboard');
|
||||||
|
@ -104,7 +104,7 @@ angular.module('etcdControlPanel')
|
|||||||
$scope.back();
|
$scope.back();
|
||||||
$scope.writingNew = false;
|
$scope.writingNew = false;
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
$scope.showSaveError(data.message);
|
$scope.showSaveError(response.message);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
angular.module('etcdControlPanel')
|
angular.module('etcdControlPanel')
|
||||||
.controller('RootCtrl', function($rootScope, prefixUrl) {
|
.controller('RootCtrl', function($rootScope, prefixUrl) {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
angular.module('etcdControlPanel')
|
angular.module('etcdControlPanel')
|
||||||
.controller('StatsCtrl', function ($scope, $rootScope, $interval, EtcdV2, statsVega) {
|
.controller('StatsCtrl', function ($scope, $rootScope, $interval, EtcdV2, statsVega, vg) {
|
||||||
$scope.graphContainer = '#latency';
|
$scope.graphContainer = '#latency';
|
||||||
$scope.graphVisibility = 'etcd-graph-show';
|
$scope.graphVisibility = 'etcd-graph-show';
|
||||||
$scope.tableVisibility = 'etcd-table-hide';
|
$scope.tableVisibility = 'etcd-table-hide';
|
||||||
@ -30,8 +30,12 @@ angular.module('etcdControlPanel')
|
|||||||
});
|
});
|
||||||
//sort array so peers don't jump when output
|
//sort array so peers don't jump when output
|
||||||
$scope.peers.sort(function(a, b){
|
$scope.peers.sort(function(a, b){
|
||||||
if(a.name < b.name) return -1;
|
if(a.name < b.name) {
|
||||||
if(a.name > b.name) return 1;
|
return -1;
|
||||||
|
}
|
||||||
|
if(a.name > b.name) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
drawGraph();
|
drawGraph();
|
||||||
|
@ -8,6 +8,10 @@ angular.module('jquery', []).factory('$', function($window) {
|
|||||||
return $window.$;
|
return $window.$;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
angular.module('vg', []).factory('vg', function($window) {
|
||||||
|
return $window.vg;
|
||||||
|
});
|
||||||
|
|
||||||
angular.module('moment', []).factory('moment', function($window) {
|
angular.module('moment', []).factory('moment', function($window) {
|
||||||
|
|
||||||
$window.moment.lang('en', {
|
$window.moment.lang('en', {
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
<div class="etcd-header solid">
|
<div class="etcd-header solid">
|
||||||
<a class="etcd-back" ng-click="back()" ng-class="{false:'etcd-disabled'}[enableBack]">
|
<a class="etcd-back" ng-click="back()" ng-class="{false:'etcd-disabled'}[enableBack]">
|
||||||
<img src="img/back.svg"/>
|
<img src="images/back.svg"/>
|
||||||
</a>
|
</a>
|
||||||
<a class="etcd-add" ng-click="add()"><img src="img/add.svg"/></a>
|
<a class="etcd-add" ng-click="add()"><img src="images/add.svg"/></a>
|
||||||
<div class="etcd-browser-path">
|
<div class="etcd-browser-path">
|
||||||
<input type="text" ng-model="inputPath" ng-enter="onEnter()" tabindex="888" />
|
<input type="text" ng-model="inputPath" ng-enter="onEnter()" tabindex="888" />
|
||||||
</div>
|
</div>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="etcd-actions">
|
<div class="etcd-actions">
|
||||||
<div ng-switch on="!!key.dir">
|
<div ng-switch on="!!key.dir">
|
||||||
<img class="etcd-delete" src="img/delete.svg" ng-switch-when="false" ng-click="deleteKey(key.key)" />
|
<img class="etcd-delete" src="images/delete.svg" ng-switch-when="false" ng-click="deleteKey(key.key)" />
|
||||||
<div ng-switch-when="true"></div>
|
<div ng-switch-when="true"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"grunt-contrib-imagemin": "~0.2.0",
|
"grunt-contrib-imagemin": "~0.2.0",
|
||||||
"grunt-contrib-watch": "~0.5.2",
|
"grunt-contrib-watch": "~0.5.2",
|
||||||
"grunt-autoprefixer": "~0.2.0",
|
"grunt-autoprefixer": "~0.2.0",
|
||||||
"grunt-usemin": "~0.1.11",
|
"grunt-usemin": "~2.0.2",
|
||||||
"grunt-svgmin": "~0.2.0",
|
"grunt-svgmin": "~0.2.0",
|
||||||
"grunt-rev": "~0.1.0",
|
"grunt-rev": "~0.1.0",
|
||||||
"grunt-open": "~0.2.0",
|
"grunt-open": "~0.2.0",
|
||||||
|