Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Improve verdict summary
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Apr 30, 2020
1 parent e560636 commit 43b30f2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions modules/monitor/src/components/Monitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
class="column scope-item"
>
<div>
<Verdict :verdict="scope.verdictSummary"></Verdict>
<Verdict v-if="scope.connections.length > 0" :verdict="scope.verdictSummary"></Verdict>
<Verdict v-else-if="scope.dnsRequest" :verdict="scope.dnsRequest.Verdict"></Verdict>
<Verdict v-else :verdict="0"></Verdict>
<span class="scope-name">{{ scope.name | fmtScopeName }}</span>
<div class="ui label">
<i class="project diagram icon"></i>
Expand Down Expand Up @@ -381,13 +383,15 @@ export default {
scope.lastActivity = record.Started;
}
// summarize verdict
if (scope.verdictSummary == 0) {
// first encounter
scope.verdictSummary = record.Verdict;
} else if (scope.verdictSummary != record.Verdict) {
// not the same, set to failed
scope.verdictSummary = 1;
// summarize connection verdict
if (record._treeLayer == 3) {
if (scope.verdictSummary == 0) {
// first encounter
scope.verdictSummary = record.Verdict;
} else if (scope.verdictSummary != record.Verdict) {
// not the same, set to failed
scope.verdictSummary = 1;
}
}
// mark as handled
Expand Down

0 comments on commit 43b30f2

Please sign in to comment.