Commit e595cdc7 by Johannes Edmeier

show all loggers by default

parent 61501eec
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,7 +42,7 @@
"autoprefixer": "^8.1.0",
"babel-core": "^6.25.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.4.1",
"babel-jest": "^22.4.3",
"babel-loader": "^7.1.4",
"babel-plugin-lodash": "^3.3.2",
"babel-polyfill": "^6.26.0",
......@@ -63,7 +63,7 @@
"html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^22.4.2",
"jest": "^22.4.3",
"lodash-webpack-plugin": "^0.11.4",
"node-sass": "^4.8.3",
"optimize-css-assets-webpack-plugin": "^3.2.0",
......
......@@ -46,7 +46,7 @@
<div class="control">
<label class="checkbox">
<input type="checkbox" v-model="showClassLoggersOnly">
class
class only
</label>
</div>
</div>
......@@ -93,10 +93,7 @@
import Instance from '@/services/instance';
import sbaLoggerControl from './logger-control';
const isPackageName = (name) => {
const i = name.lastIndexOf('.') + 1;
return name.charAt(i) !== name.charAt(i).toUpperCase();
};
const isClassName = name => /\.[A-Z]/.test(name);
const addToFilter = (oldFilter, addedFilter) =>
!oldFilter
......@@ -118,7 +115,7 @@
error: null,
loggerConfig: null,
filter: '',
showClassLoggersOnly: true,
showClassLoggersOnly: false,
showConfiguredLoggersOnly: false,
visibleLimit: 25,
loading: {},
......@@ -173,9 +170,7 @@
}
},
onScroll() {
if (this.loggerConfig
&& (this.$el.getBoundingClientRect().bottom - 400) <= window.innerHeight
&& this.visibleLimit < this.filteredLoggers.length) {
if (this.loggerConfig && this.$el.getBoundingClientRect().bottom - 400 <= window.innerHeight && this.visibleLimit < this.filteredLoggers.length) {
this.visibleLimit += 25;
}
},
......@@ -183,16 +178,16 @@
let filterFn = null;
if (this.showClassLoggersOnly) {
filterFn = addToFilter(filterFn, (logger) => !isPackageName(logger.name));
filterFn = addToFilter(filterFn, logger => isClassName(logger.name));
}
if (this.showConfiguredLoggersOnly) {
filterFn = addToFilter(filterFn, (logger) => !!logger.configuredLevel);
filterFn = addToFilter(filterFn, logger => !!logger.configuredLevel);
}
if (this.filter) {
const normalizedFilter = this.filter.toLowerCase();
filterFn = addToFilter(filterFn, (logger) => logger.name.toLowerCase().indexOf(normalizedFilter) >= 0);
filterFn = addToFilter(filterFn, logger => logger.name.toLowerCase().indexOf(normalizedFilter) >= 0);
}
return filterFn;
......
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