Commit 69dec9ae by Johannes Edmeier

Fix codacy issues

parent 6e6799dd
......@@ -9,14 +9,14 @@ module.exports = function (config) {
files: ['test/unit/**/*.js'],
exclude: [],
preprocessors: {
'test/unit/**/*.js': ['webpack'],
'test/unit/**/*.js': ['webpack']
},
webpack: {
module: {
loaders: [{
test: /\.js$/,
exclude: [/node_modules/, /third-party/],
loader: "ng-annotate"
loader: 'ng-annotate'
}, {
test: /\.html$/,
loader: 'raw'
......
......@@ -27,7 +27,7 @@ module.exports = function ($q, jolokia) {
var findLogbackMbean = function (app) {
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) {
if (response.value.length === 1) {
return response.value[0];
......@@ -38,13 +38,13 @@ module.exports = function ($q, jolokia) {
if (value === undefined) {
value = findInArray(response.value, 'default');
}
if (value !== undefined) {
return value;
if (value === undefined) {
return $q.reject({
error: 'Ambigious Logback JMXConfigurator-MBeans found!',
candidates: response.value
});
}
return $q.reject({
error: 'Ambigious Logback JMXConfigurator-MBeans found!',
candidates: response.value
});
return value;
}
return $q.reject({
error: 'Couldn\'t find Logback JMXConfigurator-MBean'
......
......@@ -63,7 +63,7 @@
font-size: 14px;
color: #888;
margin-top: 20px;
height: 0px;
height: 0;
}
.application--urls > li >a {
color: #f1f1f1;
......
......@@ -30,7 +30,7 @@ module.exports = function ($http) {
this.getActiveFilters = function (filters, application) {
var appFilters = {};
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;
}
});
......
......@@ -76,7 +76,7 @@ module.exports = {
preLoaders: [{
test: /\.js$/,
loader: 'eslint',
exclude: [/node_modules/, /third-party/],
exclude: [/node_modules/, /third-party/]
}],
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