sonar low

This commit is contained in:
Cindy Chang
2024-07-26 10:40:45 +08:00
parent 71b58af96d
commit 2ca4fdd0c6
7 changed files with 15 additions and 1 deletions

View File

@@ -153,6 +153,7 @@
<div v-else class="border rounded border-neutral-300 p-2 bg-neutral-10 " :class="data.timeTrend.chart !== null ? 'w-1/2' : 'w-full'"> <div v-else class="border rounded border-neutral-300 p-2 bg-neutral-10 " :class="data.timeTrend.chart !== null ? 'w-1/2' : 'w-full'">
<p class="h2 pl-2 mb-2">Issue List<span class="material-symbols-outlined !text-sm align-middle ml-2 cursor-pointer" v-tooltip.bottom="tooltip.issueList">info</span></p> <p class="h2 pl-2 mb-2">Issue List<span class="material-symbols-outlined !text-sm align-middle ml-2 cursor-pointer" v-tooltip.bottom="tooltip.issueList">info</span></p>
<table class="text-sm min-w-full table-fixed"> <table class="text-sm min-w-full table-fixed">
<caption class="hidden">Issues List</caption>
<tbody> <tbody>
<tr v-for="(trace, key) in data.issues" :key="key"> <tr v-for="(trace, key) in data.issues" :key="key">
<td class="p-2 pl-6 truncate max-w-0 w-1/3"> <td class="p-2 pl-6 truncate max-w-0 w-1/3">

View File

@@ -14,6 +14,7 @@
</p> </p>
<div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" > <div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" >
<table class="border-separate border-spacing-x-2 text-sm"> <table class="border-separate border-spacing-x-2 text-sm">
<caption class="hidden">Trace List</caption>
<thead class="sticky top-0 z-10 bg-neutral-100"> <thead class="sticky top-0 z-10 bg-neutral-100">
<tr> <tr>
<th class="h2 px-2 border-b border-neutral-500">Trace</th> <th class="h2 px-2 border-b border-neutral-500">Trace</th>

View File

@@ -7,6 +7,7 @@
<!-- Table --> <!-- Table -->
<div class="overflow-y-auto overflow-x-auto scrollbar -mx-2 h-[calc(100%_-_64px)]"> <div class="overflow-y-auto overflow-x-auto scrollbar -mx-2 h-[calc(100%_-_64px)]">
<table class="border-separate border-spacing-x-2 table-auto min-w-full text-sm" :class="data.length === 0? 'h-full': null"> <table class="border-separate border-spacing-x-2 table-auto min-w-full text-sm" :class="data.length === 0? 'h-full': null">
<caption class="hidden">Activity List</caption>
<thead class="sticky top-0 left-0 z-10 bg-neutral-10"> <thead class="sticky top-0 left-0 z-10 bg-neutral-10">
<tr> <tr>
<th class="text-start font-semibold leading-10 px-2 border-b border-neutral-500">Activity</th> <th class="text-start font-semibold leading-10 px-2 border-b border-neutral-500">Activity</th>

View File

@@ -134,6 +134,9 @@ export default {
return { filterAttrs } return { filterAttrs }
}, },
components: {
InputNumber,
},
data() { data() {
return { return {
selectedAttName: {}, selectedAttName: {},
@@ -224,6 +227,7 @@ export default {
let max = this.valueData.max; let max = this.valueData.max;
const type = this.valueData.type; const type = this.valueData.type;
switch (type) { switch (type) {
case 'dummy':
case 'date': case 'date':
xAxisMin = new Date(min).getTime(); xAxisMin = new Date(min).getTime();
xAxisMax = new Date(max).getTime(); xAxisMax = new Date(max).getTime();
@@ -268,6 +272,7 @@ export default {
const type = this.selectedAttName.type; const type = this.selectedAttName.type;
switch (type) { switch (type) {
case 'dummy': //sonar-qube
case 'date': case 'date':
start = getMoment(this.startTime).format('YYYY-MM-DDTHH:mm:00'); start = getMoment(this.startTime).format('YYYY-MM-DDTHH:mm:00');
end = getMoment(this.endTime).format('YYYY-MM-DDTHH:mm:00'); end = getMoment(this.endTime).format('YYYY-MM-DDTHH:mm:00');
@@ -366,6 +371,7 @@ export default {
const min = this.valueData.min; const min = this.valueData.min;
const max = this.valueData.max; const max = this.valueData.max;
switch (this.selectedAttName.type) { switch (this.selectedAttName.type) {
case 'dummy': //sonar-qube
case 'date': case 'date':
// 除了 date 外雙向綁定為空 // 除了 date 外雙向綁定為空
this.valueStart = null; this.valueStart = null;
@@ -607,6 +613,7 @@ export default {
let end = sliderData[e[1].toFixed()]; // 取得 index須為整數。 let end = sliderData[e[1].toFixed()]; // 取得 index須為整數。
switch (this.selectedAttName.type) { switch (this.selectedAttName.type) {
case 'dummy':
case 'date': case 'date':
this.startTime = new Date(start); this.startTime = new Date(start);
this.endTime = new Date(end); this.endTime = new Date(end);

View File

@@ -21,6 +21,7 @@
</p> </p>
<div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" > <div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" >
<table class="border-separate border-spacing-x-2 text-sm w-full"> <table class="border-separate border-spacing-x-2 text-sm w-full">
<caption class="hidden">Trace list</caption>
<thead class="sticky top-0 z-10 bg-neutral-10"> <thead class="sticky top-0 z-10 bg-neutral-10">
<tr> <tr>
<th class="h2 px-2 border-b border-neutral-500">Trace</th> <th class="h2 px-2 border-b border-neutral-500">Trace</th>

View File

@@ -189,7 +189,9 @@
</ul> </ul>
</TabPanel> </TabPanel>
<TabPanel header="Most Frequent Trace" contentClass="text-sm"> <TabPanel header="Most Frequent Trace" contentClass="text-sm">
<li v-if="insights.most_freq_traces.length === 0">No data</li> <ul v-if="insights.most_freq_traces.length === 0">
<li >No data</li>
</ul>
<ul v-else class="list-disc ml-6 space-y-1"> <ul v-else class="list-disc ml-6 space-y-1">
<li class="break-words" v-for="(item, key) in insights.most_freq_traces" :key="key"> <li class="break-words" v-for="(item, key) in insights.most_freq_traces" :key="key">
<span v-for="(value, index) in item" :key="index">{{ value }}<span v-if="index !== item.length - 1">&nbsp;<span class="material-symbols-outlined !text-lg align-sub">arrow_forward</span>&nbsp;</span> <span v-for="(value, index) in item" :key="index">{{ value }}<span v-if="index !== item.length - 1">&nbsp;<span class="material-symbols-outlined !text-lg align-sub">arrow_forward</span>&nbsp;</span>

View File

@@ -12,6 +12,7 @@
</p> </p>
<div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" > <div class="overflow-y-scroll overflow-x-hidden scrollbar mx-[-8px] max-h-[calc(100%_-_96px)]" >
<table class="border-separate border-spacing-x-2 text-sm"> <table class="border-separate border-spacing-x-2 text-sm">
<caption class="hidden">Trace List</caption>
<thead class="sticky top-0 z-10 bg-neutral-10"> <thead class="sticky top-0 z-10 bg-neutral-10">
<tr> <tr>
<th class="h2 px-2 border-b border-neutral-500">Trace</th> <th class="h2 px-2 border-b border-neutral-500">Trace</th>