Support hiding errors
This commit is contained in:
parent
b0b9a4d0d0
commit
464ed3d7ef
File diff suppressed because one or more lines are too long
2
src/overseer/static/js/app.e5e6eeee.js
Normal file
2
src/overseer/static/js/app.e5e6eeee.js
Normal file
File diff suppressed because one or more lines are too long
1
src/overseer/static/js/app.e5e6eeee.js.map
Normal file
1
src/overseer/static/js/app.e5e6eeee.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/favicon.ico"><title>Overseer</title><link href="/static/css/app.107f39c9.css" rel="preload" as="style"><link href="/static/js/app.fbd98594.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.1f751c93.js" rel="preload" as="script"><link href="/static/css/app.107f39c9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Overseer doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.1f751c93.js"></script><script src="/static/js/app.fbd98594.js"></script></body></html>
|
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/favicon.ico"><title>Overseer</title><link href="/static/css/app.4fe206b0.css" rel="preload" as="style"><link href="/static/js/app.e5e6eeee.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.1f751c93.js" rel="preload" as="script"><link href="/static/css/app.4fe206b0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Overseer doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.1f751c93.js"></script><script src="/static/js/app.e5e6eeee.js"></script></body></html>
|
@ -4,6 +4,12 @@
|
|||||||
<h1 style="font-size: 2.5em; margin: 0px; float: left; color: #EAECE9">{{ $route.params.target }}</h1>
|
<h1 style="font-size: 2.5em; margin: 0px; float: left; color: #EAECE9">{{ $route.params.target }}</h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
<span v-if="getRequestedScans[0].status == 'COMPLETE'" v-on:click="performScan()" id="scan-button">Scan Again</span>
|
<span v-if="getRequestedScans[0].status == 'COMPLETE'" v-on:click="performScan()" id="scan-button">Scan Again</span>
|
||||||
|
|
||||||
|
<div v-if="!$route.params.scan_id" style="float: right;padding: 13px;">
|
||||||
|
<input id="hide-errors" v-model="hideErrors" type="checkbox" style="height: 19px; width: 19px;">
|
||||||
|
<label for="hide-errors" style="font-size: 1.3em;"> Hide Errors</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="results">
|
<div id="results">
|
||||||
<div v-for="(scan, index) in getRequestedScans" :key= "scan.id">
|
<div v-for="(scan, index) in getRequestedScans" :key= "scan.id">
|
||||||
<ScanResult
|
<ScanResult
|
||||||
@ -38,9 +44,31 @@ export default {
|
|||||||
return {
|
return {
|
||||||
error: null,
|
error: null,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
hideErrors: true,
|
||||||
openCompare: []
|
openCompare: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
getRequestedScans() {
|
||||||
|
let scanCache = this.$store.state.scan_cache;
|
||||||
|
let target = this.$route.params.target;
|
||||||
|
let scanID = this.$route.params.scan_id;
|
||||||
|
|
||||||
|
if (!scanCache[target])
|
||||||
|
return [{ "status": "LOADING" }]
|
||||||
|
|
||||||
|
let filteredItems;
|
||||||
|
if (scanID) {
|
||||||
|
filteredItems = scanCache[target]
|
||||||
|
.filter(item => item.id == scanID);
|
||||||
|
} else {
|
||||||
|
filteredItems = scanCache[target]
|
||||||
|
.filter(item => this.hideErrors ? item.status != 'FAILED' : true)
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredItems.length ? filteredItems : [{ "status": "NO_RESULTS" }];
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
deriveCompareStyle(scan) {
|
deriveCompareStyle(scan) {
|
||||||
if (!this.openCompare.includes(scan))
|
if (!this.openCompare.includes(scan))
|
||||||
@ -75,22 +103,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
getRequestedScans() {
|
|
||||||
let scanCache = this.$store.state.scan_cache;
|
|
||||||
let target = this.$route.params.target;
|
|
||||||
let scanID = this.$route.params.scan_id;
|
|
||||||
|
|
||||||
if (!scanCache[target])
|
|
||||||
return [{ "status": "LOADING" }]
|
|
||||||
|
|
||||||
if (scanID)
|
|
||||||
return scanCache[target]
|
|
||||||
.filter(item => item.id == scanID) || [{ "status": "NO_RESULTS" }];
|
|
||||||
else
|
|
||||||
return scanCache[target] || [{ "status": "NO_RESULTS" }];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted(){
|
mounted(){
|
||||||
this.$store.dispatch("getScansByTarget", this.$route.params.target);
|
this.$store.dispatch("getScansByTarget", this.$route.params.target);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user