Commit 69dec9ae by Johannes Edmeier

Fix codacy issues

parent 6e6799dd
...@@ -9,14 +9,14 @@ module.exports = function (config) { ...@@ -9,14 +9,14 @@ module.exports = function (config) {
files: ['test/unit/**/*.js'], files: ['test/unit/**/*.js'],
exclude: [], exclude: [],
preprocessors: { preprocessors: {
'test/unit/**/*.js': ['webpack'], 'test/unit/**/*.js': ['webpack']
}, },
webpack: { webpack: {
module: { module: {
loaders: [{ loaders: [{
test: /\.js$/, test: /\.js$/,
exclude: [/node_modules/, /third-party/], exclude: [/node_modules/, /third-party/],
loader: "ng-annotate" loader: 'ng-annotate'
}, { }, {
test: /\.html$/, test: /\.html$/,
loader: 'raw' loader: 'raw'
......
...@@ -27,7 +27,7 @@ module.exports = function ($q, jolokia) { ...@@ -27,7 +27,7 @@ module.exports = function ($q, jolokia) {
var findLogbackMbean = function (app) { var findLogbackMbean = function (app) {
return jolokia.search('api/applications/' + app.id + '/jolokia/', return jolokia.search('api/applications/' + app.id + '/jolokia/',
'ch.qos.logback.classic:Name=*,Type=ch.qos.logback.classic.jmx.JMXConfigurator') 'ch.qos.logback.classic:Name=*,Type=ch.qos.logback.classic.jmx.JMXConfigurator')
.then(function (response) { .then(function (response) {
if (response.value.length === 1) { if (response.value.length === 1) {
return response.value[0]; return response.value[0];
...@@ -38,13 +38,13 @@ module.exports = function ($q, jolokia) { ...@@ -38,13 +38,13 @@ module.exports = function ($q, jolokia) {
if (value === undefined) { if (value === undefined) {
value = findInArray(response.value, 'default'); value = findInArray(response.value, 'default');
} }
if (value !== undefined) { if (value === undefined) {
return value; return $q.reject({
error: 'Ambigious Logback JMXConfigurator-MBeans found!',
candidates: response.value
});
} }
return $q.reject({ return value;
error: 'Ambigious Logback JMXConfigurator-MBeans found!',
candidates: response.value
});
} }
return $q.reject({ return $q.reject({
error: 'Couldn\'t find Logback JMXConfigurator-MBean' error: 'Couldn\'t find Logback JMXConfigurator-MBean'
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
font-size: 14px; font-size: 14px;
color: #888; color: #888;
margin-top: 20px; margin-top: 20px;
height: 0px; height: 0;
} }
.application--urls > li >a { .application--urls > li >a {
color: #f1f1f1; color: #f1f1f1;
......
...@@ -30,7 +30,7 @@ module.exports = function ($http) { ...@@ -30,7 +30,7 @@ module.exports = function ($http) {
this.getActiveFilters = function (filters, application) { this.getActiveFilters = function (filters, application) {
var appFilters = {}; var appFilters = {};
angular.forEach(filters, function (value, key) { angular.forEach(filters, function (value, key) {
if ((value.expired === false || value.expired === undefined) && (value.id === application.id || value.name === application.name)) { if (!value.expired && (value.id === application.id || value.name === application.name)) {
appFilters[key] = value; appFilters[key] = value;
} }
}); });
......
...@@ -76,7 +76,7 @@ module.exports = { ...@@ -76,7 +76,7 @@ module.exports = {
preLoaders: [{ preLoaders: [{
test: /\.js$/, test: /\.js$/,
loader: 'eslint', loader: 'eslint',
exclude: [/node_modules/, /third-party/], exclude: [/node_modules/, /third-party/]
}], }],
loaders: [ loaders: [
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment