Skip to content

Commit

Permalink
Style refactoring to elininate jshint warnings. (#62)
Browse files Browse the repository at this point in the history
Fixing up files to honor .jshintrc.  Removing .jscsrc as it's not
used by anything.
  • Loading branch information
Chad Roberts authored Apr 25, 2017
1 parent bc6e5fa commit 2d90259
Show file tree
Hide file tree
Showing 9 changed files with 530 additions and 498 deletions.
6 changes: 0 additions & 6 deletions .jscsrc

This file was deleted.

16 changes: 12 additions & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"bitwise": true,
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"esnext": true,
"latedef": true,
"expr" : true,
"immed": true,
"indent": 2,
"latedef": false,
"newcap": false,
"noarg": true,
"node": true,
"quotmark": false,
"smarttabs": true,
"strict": true,
"sub" : true,
"undef": true,
"unused": true,
"globals": {
Expand Down
48 changes: 25 additions & 23 deletions app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,40 @@


var app = angular.module('Oshinko', [
'ngRoute',
'Oshinko.controllers',
'Oshinko.factories'
'ngRoute',
'Oshinko.controllers',
'Oshinko.factories'
]);

app.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/clusters/:Id?',
{
templateUrl: function(params) {
if(!params['Id'])
return 'partials/clusters.html';
else
return 'partials/cluster-detail.html';
},
controller: 'ClusterCtrl',
activetab: 'clusters'
});
$routeProvider.when('/login',
{
templateUrl: 'partials/login.html',
controller: 'LoginController',
activetab: ''
});
$routeProvider.otherwise({redirectTo: '/clusters'});
$routeProvider.when('/clusters/:Id?',
{
templateUrl: function (params) {
if (!params.Id) {
return 'partials/clusters.html';
}
else {
return 'partials/cluster-detail.html';
}
},
controller: 'ClusterCtrl',
activetab: 'clusters'
});
$routeProvider.when('/login',
{
templateUrl: 'partials/login.html',
controller: 'LoginController',
activetab: ''
});
$routeProvider.otherwise({redirectTo: '/clusters'});
}]);

app.run(function ($http) {
window.__env = {};
$http.get('/config/refresh').success(function (result) {
window.__env.refresh_interval = result;
}).error(function(error) {
console.log("Unable to fetch refresh interval, using default of 5");
}).error(function (error) {
console.log("Unable to fetch refresh interval, using default of 5. " + error);
window.__env.refresh_interval = 5;
});
});
Loading

0 comments on commit 2d90259

Please sign in to comment.