This commit is contained in:
Cindy Chang
2024-08-01 15:13:05 +08:00
parent 1eda4dfb80
commit 405dd7f992
2 changed files with 49 additions and 40 deletions

View File

@@ -396,57 +396,36 @@ export default {
'occurred-around' : 'active in' 'occurred-around' : 'active in'
}; };
switch(e.type){ switch(e.type) { //sonar-qube
case "contains-task": case "contains-task":
label = `${includeStr}, ${e.task}`;
type = "Sequence";
break;
case "starts-with": case "starts-with":
label = `${includeStr}, start with ${e.task}`;
type = "Sequence";
break;
case "ends-with": case "ends-with":
label = `${includeStr}, end with ${e.task}`; case "directly-follows":
case "eventually-follows":
label = `${includeStr}, ${getTaskLabel(e)}`;
type = "Sequence"; type = "Sequence";
break; break;
case "start-end": case "start-end":
label = `${includeStr}, start with ${e.starts_with}, end with ${e.ends_with}`; label = `${includeStr}, start with ${e.starts_with}, end with ${e.ends_with}`;
type = "Sequence"; type = "Sequence";
break; break;
case "directly-follows":
label = `${includeStr}, directly follows, ${e.task_seq.join(' -> ')}`;
type = "Sequence";
break;
case "eventually-follows":
label = `${includeStr}, eventually follows, ${e.task_seq.join(' -> ')}`;
type = "Sequence";
break;
case "trace-freq": case "trace-freq":
label = `${includeStr}, from #${e.lower} to #${e.upper}`; label = `${includeStr}, from #${e.lower} to #${e.upper}`;
type = "Trace"; type = "Trace";
break; break;
case 'string-attr': case 'string-attr':
label = `${includeStr}, ${e.key}, ${e.value}`;
type = "Attributes";
break;
case 'boolean-attr': case 'boolean-attr':
label = `${includeStr}, ${e.key}, ${this.selectAttribute?.label}`;
type = "Attributes";
break;
case 'int-attr': case 'int-attr':
case 'float-attr': case 'float-attr':
label = `${includeStr}, ${e.key}, from ${e.min} to ${e.max}`;
type = "Attributes";
break;
case 'date-attr': case 'date-attr':
label = `${includeStr}, ${e.key}, from ${getMoment(e.min).format('YYYY-MM-DD HH:mm')} to ${getMoment(e.max).format('YYYY-MM-DD HH:mm')}`; label = `${includeStr}, ${getAttributeLabel(e)}`;
type = "Attributes"; type = "Attributes";
break; break;
case "occurred-in": case "occurred-in":
case "started-in": case "started-in":
case "completed-in": case "completed-in":
case "occurred-around": case "occurred-around":
label = `${containmentMap[e.type]}, ${includeStr}, from ${getMoment(e.start).format("YYYY-MM-DD HH:mm")} to ${getMoment(e.end).format("YYYY-MM-DD HH:mm")} ` label = `${containmentMap[e.type]}, ${includeStr}, from ${getMoment(e.start).format("YYYY-MM-DD HH:mm")} to ${getMoment(e.end).format("YYYY-MM-DD HH:mm")} `;
type = "Timeframe" type = "Timeframe"
break; break;
}; };
@@ -701,6 +680,32 @@ export default {
handleTimeframesSelection() { handleTimeframesSelection() {
return this.selectTimeFrame.length === 0; return this.selectTimeFrame.length === 0;
}, },
getTaskLabel(e) {
switch (e.type) {
case "contains-task":
return `${e.task}`;
case "starts-with":
return `start with ${e.task}`;
case "ends-with":
return `end with ${e.task}`;
case "directly-follows":
case "eventually-follows":
return `${e.type.replace('-', ' ')}, ${e.task_seq.join(' -> ')}`;
}
},
getAttributeLabel(e) {
switch (e.type) {
case 'string-attr':
return `${e.key}, ${e.value}`;
case 'boolean-attr':
return `${e.key}, ${this.selectAttribute?.label}`;
case 'int-attr':
case 'float-attr':
return `${e.key}, from ${e.min} to ${e.max}`;
case 'date-attr':
return `${e.key}, from ${getMoment(e.min).format('YYYY-MM-DD HH:mm')} to ${getMoment(e.max).format('YYYY-MM-DD HH:mm')}`;
}
},
}, },
} }
</script> </script>

View File

@@ -75,7 +75,11 @@ export default {
}, },
}, },
mounted() { mounted() {
this.$route.name === 'Login' || this.$route.name === 'NotFound404' ? this.showMember = false : this.showMember = true; if (this.$route.name === 'Login' || this.$route.name === 'NotFound404') {
this.showMember = false
} else {
this.showMember = true;
}
} }
} }