This commit is contained in:
Frédéric Vachon 2015-02-26 17:06:10 -05:00
parent 2f4c1e04c4
commit fb1d3099ba
4 changed files with 75 additions and 68 deletions

View File

@ -62,6 +62,7 @@ module.exports = function (grunt) {
directives: {
node: true,
nomen: true,
unparam: true,
predef: [ // Global variables
'document', '$', '$get',
'angular', 'inject', 'JustGage',
@ -111,17 +112,18 @@ module.exports = function (grunt) {
'<%= project.app %>/dashboard/dashboard.js',
'<%= project.app %>/hosts/hosts.js',
'<%= project.app %>/services/services.js',
'<%= project.app %>/custom_views/custom_views.js',
],
'<%= project.app %>/custom_views/custom_views.js'
]
}],
options: {
mangle: true
}
},
dev: {
files: [{
files: [
{
'<%= project.build %>/app.js': '<%= project.app %>/app.js',
'<%= project.build %>/components/config/config.js':'<%= project.app %>/components/config/config.js',
'<%= project.build %>/components/config/config.js': '<%= project.app %>/components/config/config.js',
'<%= project.build %>/components/live/live.js': '<%= project.app %>/components/live/live.js',
'<%= project.build %>/components/live/notifications.js': '<%= project.app %>/components/live/notifications.js',
'<%= project.build %>/components/live/get_services.js': '<%= project.app %>/components/live/get_services.js',
@ -176,7 +178,8 @@ module.exports = function (grunt) {
'<%= project.build %>/services/services.js',
'<%= project.build %>/custom_views/custom_views.js'
]
}],
}
],
options: {
mangle: false,
beautify: true
@ -190,5 +193,5 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jslint');
grunt.registerTask('default', [ 'watch', 'jslint', 'uglify']);
grunt.registerTask('default', ['watch', 'jslint', 'uglify']);
};

View File

@ -3,13 +3,15 @@
angular.module('adagios.sidebar', [])
.controller('SideBarCtrl', ['$scope', '$location', function ($scope, $location) {
$scope.getClass = function(path) {
if ($location.path().substr(0, path.length) == path) {
return "state--current"
} else {
return ""
}
$scope.getClass = function (path) {
var class_name = "";
if ($location.path().substr(0, path.length) === path) {
class_name = "state--current";
}
return class_name;
};
}])
.directive('adgSidebar', function () {

View File

@ -1,3 +1,5 @@
'use strict';
angular.module('adagios.table.actionbar', [])
.controller('TableActionbarCtrl', [function () {

View File

@ -7,7 +7,7 @@ angular.module('adagios.table.cell_hosts_host', ['adagios.table'])
$scope.state = 'state--ok';
} else if ($scope.entry.state === 1) {
$scope.state = 'state--warning';
} else if ($scope.entry.state == "") {
} else if ($scope.entry.state === "") {
$scope.state = '';
} else {
$scope.state = 'state--error';