Conformance Filter: done.
This commit is contained in:
@@ -19,7 +19,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
timeResultData: {
|
timeResultData: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
// console.log(newValue);
|
|
||||||
this.data = newValue;
|
this.data = newValue;
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ import getMoment from 'moment';
|
|||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const allMapDataStore = AllMapDataStore();
|
const allMapDataStore = AllMapDataStore();
|
||||||
const { logId, stats } = storeToRefs(allMapDataStore);
|
const { logId, stats, createFilterId } = storeToRefs(allMapDataStore);
|
||||||
|
|
||||||
return { logId, stats, allMapDataStore };
|
return { logId, stats, createFilterId, allMapDataStore };
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -149,6 +149,16 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if(this.$route.params.type === 'log') this.logId = this.$route.params.fileId;
|
if(this.$route.params.type === 'log') this.logId = this.$route.params.fileId;
|
||||||
|
switch (this.$route.params.type) {
|
||||||
|
case 'log':
|
||||||
|
this.logId = this.$route.params.fileId;
|
||||||
|
break;
|
||||||
|
case 'filter':
|
||||||
|
this.createFilterId = this.$route.params.fileId;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
await this.allMapDataStore.getAllMapData();
|
await this.allMapDataStore.getAllMapData();
|
||||||
await this.getStatData();
|
await this.getStatData();
|
||||||
this.isPanel = false; // 預設不打開
|
this.isPanel = false; // 預設不打開
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export default defineStore('allMapDataStore', {
|
|||||||
});
|
});
|
||||||
return this.allCase;
|
return this.allCase;
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
if(error.response.status === 404) this.infinite404 = 404;
|
if(error.response.status === 404) return this.infinite404 = 404;
|
||||||
apiError(error, 'Failed to load the Trace Detail.');
|
apiError(error, 'Failed to load the Trace Detail.');
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -179,14 +179,13 @@ export default defineStore('conformanceStore', {
|
|||||||
* fetch Log Conformance Parameters api for Rule Settings.
|
* fetch Log Conformance Parameters api for Rule Settings.
|
||||||
*/
|
*/
|
||||||
async getConformanceParams() {
|
async getConformanceParams() {
|
||||||
const logId = this.conformanceLogId;
|
let logId = this.conformanceLogId;
|
||||||
const filterId = this.conformanceFilterId;
|
let filterId = this.conformanceFilterId;
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
if(filterId !== null) api = `/api/filter-checks/params?filter_id=${filterId}`;
|
if(filterId !== null) api = `/api/filter-checks/params?filter_id=${filterId}`;
|
||||||
else api = `/api/log-checks/params?log_id=${logId}`;
|
else api = `/api/log-checks/params?log_id=${logId}`;
|
||||||
console.log('getConformanceParams', api);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await this.$axios.get(api);
|
const response = await this.$axios.get(api);
|
||||||
@@ -204,8 +203,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Creates a new temporary check for a log.
|
* Creates a new temporary check for a log.
|
||||||
*/
|
*/
|
||||||
async addConformanceCheckId(data) {
|
async addConformanceCheckId(data) {
|
||||||
const logId = this.conformanceLogId;
|
let logId = this.conformanceLogId;
|
||||||
const filterId = this.conformanceFilterId;
|
let filterId = this.conformanceFilterId;
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -224,8 +223,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Get the Temporary Log Conformance Report
|
* Get the Temporary Log Conformance Report
|
||||||
*/
|
*/
|
||||||
async getConformanceReport() {
|
async getConformanceReport() {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
const filterTempCheckId = this.conformanceFilterTempCheckId;
|
let filterTempCheckId = this.conformanceFilterTempCheckId;
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -243,8 +242,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Get the detail of a temporary log conformance issue.
|
* Get the detail of a temporary log conformance issue.
|
||||||
*/
|
*/
|
||||||
async getConformanceIssue(issueNo) {
|
async getConformanceIssue(issueNo) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
const filterTempCheckId = this.conformanceFilterTempCheckId
|
let filterTempCheckId = this.conformanceFilterTempCheckId
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -262,8 +261,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Get the Trace Details of a Temporary Log Conformance lssue.
|
* Get the Trace Details of a Temporary Log Conformance lssue.
|
||||||
*/
|
*/
|
||||||
async getConformanceTraceDetail(issueNo, traceId, start) {
|
async getConformanceTraceDetail(issueNo, traceId, start) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
const filterTempCheckId = this.conformanceFilterTempCheckId
|
let filterTempCheckId = this.conformanceFilterTempCheckId
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -276,7 +275,7 @@ export default defineStore('conformanceStore', {
|
|||||||
this.allCases = response.data.cases;
|
this.allCases = response.data.cases;
|
||||||
return response.data.cases;
|
return response.data.cases;
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
if(error.response.status === 404) this.infinite404 = 404;
|
if(error.response.status === 404) return this.infinite404 = 404;
|
||||||
apiError(error, 'Failed to Get the detail of a temporary log conformance issue.');
|
apiError(error, 'Failed to Get the detail of a temporary log conformance issue.');
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -284,8 +283,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Get the Details of a Temporary Log Conformance Loop.
|
* Get the Details of a Temporary Log Conformance Loop.
|
||||||
*/
|
*/
|
||||||
async getConformanceLoop(loopNo) {
|
async getConformanceLoop(loopNo) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
const filterTempCheckId = this.conformanceFilterTempCheckId
|
let filterTempCheckId = this.conformanceFilterTempCheckId
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -303,8 +302,8 @@ export default defineStore('conformanceStore', {
|
|||||||
* Get the Trace Details of a Temporary Log Conformance Loops.
|
* Get the Trace Details of a Temporary Log Conformance Loops.
|
||||||
*/
|
*/
|
||||||
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
|
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
const filterTempCheckId = this.conformanceFilterTempCheckId
|
let filterTempCheckId = this.conformanceFilterTempCheckId
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|
||||||
// 先判斷 filter 檔,再判斷 log 檔。
|
// 先判斷 filter 檔,再判斷 log 檔。
|
||||||
@@ -317,7 +316,7 @@ export default defineStore('conformanceStore', {
|
|||||||
this.allLoopCases = response.data.cases;
|
this.allLoopCases = response.data.cases;
|
||||||
return response.data.cases;
|
return response.data.cases;
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
if(error.response.status === 404) this.infinite404 = 404;
|
if(error.response.status === 404) return this.infinite404 = 404;
|
||||||
apiError(error, 'Failed to Get the detail of a temporary log conformance loop.');
|
apiError(error, 'Failed to Get the detail of a temporary log conformance loop.');
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user