fix(build): Use ngmin. Fix all introduced erros in previous commits.
@ -174,7 +174,7 @@ module.exports = function (grunt) {
|
||||
options: {
|
||||
dest: '<%= yeoman.dist %>'
|
||||
},
|
||||
html: ['<%= yeoman.app %>/**/*.html']
|
||||
html: ['<%= yeoman.app %>/index.html']
|
||||
},
|
||||
usemin: {
|
||||
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
|
||||
copy: {
|
||||
dist: {
|
||||
@ -251,10 +259,10 @@ module.exports = function (grunt) {
|
||||
src: [
|
||||
'*.{ico,png,txt}',
|
||||
'.htaccess',
|
||||
'images/{,*/}*.{webp,gif}',
|
||||
'images/{,*/}*.{webp,gif,svg}',
|
||||
'styles/fonts/{,*/}*.*',
|
||||
'views/*.*',
|
||||
'index.html',
|
||||
//'index.html',
|
||||
'bower_components/sass-bootstrap/fonts/*.*'
|
||||
]
|
||||
}]
|
||||
@ -286,7 +294,7 @@ module.exports = function (grunt) {
|
||||
'copy:styles'
|
||||
],
|
||||
dist: [
|
||||
'compass',
|
||||
//'compass',
|
||||
'copy:styles',
|
||||
'imagemin',
|
||||
'svgmin',
|
||||
@ -327,13 +335,15 @@ module.exports = function (grunt) {
|
||||
|
||||
grunt.registerTask('build', [
|
||||
'clean:dist',
|
||||
'jshint',
|
||||
'useminPrepare',
|
||||
'concurrent:dist',
|
||||
'autoprefixer',
|
||||
'concat',
|
||||
'cssmin',
|
||||
'uglify',
|
||||
'ngmin',
|
||||
'usemin',
|
||||
'uglify',
|
||||
'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">
|
||||
<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">
|
||||
<!-- build:css styles/styles.css -->
|
||||
<link rel="stylesheet" href="styles/bootstrap.css">
|
||||
<link rel="stylesheet" href="styles/main.css">
|
||||
<link rel="stylesheet" href="styles/browser.css">
|
||||
<link rel="stylesheet" href="styles/stats.css">
|
||||
<link rel="stylesheet" href="styles/etcd-widgets.css">
|
||||
<!-- endbuild -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -24,7 +26,7 @@
|
||||
<div id="footer">
|
||||
<div id="powered-by" class="text-center">Powered by <a href="https://github.com/coreos/etcd">etcd</a></div>
|
||||
<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>
|
||||
|
||||
@ -39,21 +41,21 @@
|
||||
<script src="bower_components/underscore/underscore.js"></script>
|
||||
<script src="bower_components/underscore.string/lib/underscore.string.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 -->
|
||||
|
||||
<!-- build:js({.tmp,app}) scripts/app.js -->
|
||||
<!-- build:js scripts/app.js -->
|
||||
<script src="scripts/app.js"></script>
|
||||
<script src="scripts/controllers/root.js"></script>
|
||||
<script src="scripts/directives.js"></script>
|
||||
<script src="scripts/shims.js"></script>
|
||||
<script src="scripts/controllers/home.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/prefix-url.js"></script>
|
||||
<script src="scripts/common/directives/highlight.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/controllers/stats.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
@ -8,7 +8,8 @@ var app = angular.module('etcdControlPanel', [
|
||||
'timeRelative',
|
||||
'underscore',
|
||||
'jquery',
|
||||
'moment'
|
||||
'moment',
|
||||
'vg'
|
||||
]);
|
||||
|
||||
app.constant('urlPrefix', '/mod/dashboard');
|
||||
|
@ -104,7 +104,7 @@ angular.module('etcdControlPanel')
|
||||
$scope.back();
|
||||
$scope.writingNew = false;
|
||||
}, function (response) {
|
||||
$scope.showSaveError(data.message);
|
||||
$scope.showSaveError(response.message);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('etcdControlPanel')
|
||||
.controller('RootCtrl', function($rootScope, prefixUrl) {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
angular.module('etcdControlPanel')
|
||||
.controller('StatsCtrl', function ($scope, $rootScope, $interval, EtcdV2, statsVega) {
|
||||
.controller('StatsCtrl', function ($scope, $rootScope, $interval, EtcdV2, statsVega, vg) {
|
||||
$scope.graphContainer = '#latency';
|
||||
$scope.graphVisibility = 'etcd-graph-show';
|
||||
$scope.tableVisibility = 'etcd-table-hide';
|
||||
@ -30,10 +30,14 @@ angular.module('etcdControlPanel')
|
||||
});
|
||||
//sort array so peers don't jump when output
|
||||
$scope.peers.sort(function(a, b){
|
||||
if(a.name < b.name) return -1;
|
||||
if(a.name > b.name) return 1;
|
||||
if(a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
if(a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
});
|
||||
drawGraph();
|
||||
});
|
||||
}
|
||||
|
@ -8,6 +8,10 @@ angular.module('jquery', []).factory('$', function($window) {
|
||||
return $window.$;
|
||||
});
|
||||
|
||||
angular.module('vg', []).factory('vg', function($window) {
|
||||
return $window.vg;
|
||||
});
|
||||
|
||||
angular.module('moment', []).factory('moment', function($window) {
|
||||
|
||||
$window.moment.lang('en', {
|
||||
|
@ -12,9 +12,9 @@
|
||||
|
||||
<div class="etcd-header solid">
|
||||
<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 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">
|
||||
<input type="text" ng-model="inputPath" ng-enter="onEnter()" tabindex="888" />
|
||||
</div>
|
||||
@ -43,7 +43,7 @@
|
||||
<td>
|
||||
<div class="etcd-actions">
|
||||
<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>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
"grunt-contrib-imagemin": "~0.2.0",
|
||||
"grunt-contrib-watch": "~0.5.2",
|
||||
"grunt-autoprefixer": "~0.2.0",
|
||||
"grunt-usemin": "~0.1.11",
|
||||
"grunt-usemin": "~2.0.2",
|
||||
"grunt-svgmin": "~0.2.0",
|
||||
"grunt-rev": "~0.1.0",
|
||||
"grunt-open": "~0.2.0",
|
||||
|