Replace let with const where variable is never reassigned
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -125,9 +125,9 @@ export default defineStore('allMapDataStore', {
|
||||
* fetch discover api, include '/process-map, /bpmn, /stats, /insights'.
|
||||
*/
|
||||
async getAllMapData() {
|
||||
let logId = this.logId;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let createfilterId = this.createFilterId
|
||||
const logId = this.logId;
|
||||
const tempFilterId = this.tempFilterId;
|
||||
const createfilterId = this.createFilterId
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
@@ -149,11 +149,11 @@ export default defineStore('allMapDataStore', {
|
||||
* fetch trace api.
|
||||
*/
|
||||
async getAllTrace() {
|
||||
let logId = this.logId;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let createfilterId = this.createFilterId;
|
||||
let baseLogId = this.baseLogId;
|
||||
let baseApi = `/api/logs/${baseLogId}/traces`;
|
||||
const logId = this.logId;
|
||||
const tempFilterId = this.tempFilterId;
|
||||
const createfilterId = this.createFilterId;
|
||||
const baseLogId = this.baseLogId;
|
||||
const baseApi = `/api/logs/${baseLogId}/traces`;
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
@@ -177,11 +177,11 @@ export default defineStore('allMapDataStore', {
|
||||
* fetch trace detail api.
|
||||
*/
|
||||
async getTraceDetail() {
|
||||
let logId = this.logId;
|
||||
let traceId = this.traceId;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let createfilterId = this.createFilterId;
|
||||
let start = this.infiniteStart;
|
||||
const logId = this.logId;
|
||||
const traceId = this.traceId;
|
||||
const tempFilterId = this.tempFilterId;
|
||||
const createfilterId = this.createFilterId;
|
||||
const start = this.infiniteStart;
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
@@ -223,10 +223,10 @@ export default defineStore('allMapDataStore', {
|
||||
* fetch base log trace detail api.
|
||||
*/
|
||||
async getBaseTraceDetail() {
|
||||
let logId = this.baseLogId;
|
||||
let traceId = this.baseTraceId;
|
||||
let start = this.baseInfiniteStart;
|
||||
let api = `/api/logs/${logId}/traces/${traceId}?start=${start}&page_size=20`;
|
||||
const logId = this.baseLogId;
|
||||
const traceId = this.baseTraceId;
|
||||
const start = this.baseInfiniteStart;
|
||||
const api = `/api/logs/${logId}/traces/${traceId}?start=${start}&page_size=20`;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
@@ -262,7 +262,7 @@ export default defineStore('allMapDataStore', {
|
||||
* fetch Filter Parameters api.
|
||||
*/
|
||||
async getFilterParams() {
|
||||
let logId = this.logId;
|
||||
const logId = this.logId;
|
||||
const api = `/api/filters/params?log_id=${logId}`;
|
||||
|
||||
try {
|
||||
@@ -274,8 +274,8 @@ export default defineStore('allMapDataStore', {
|
||||
this.allFilterTrace = response.data.trace;
|
||||
this.allFilterAttrs = response.data.attrs;
|
||||
|
||||
let min = this.allFilterTimeframe.x_axis.min;
|
||||
let max = this.allFilterTimeframe.x_axis.max;
|
||||
const min = this.allFilterTimeframe.x_axis.min;
|
||||
const max = this.allFilterTimeframe.x_axis.max;
|
||||
// 給 Chart.js 原始資料,格式不同的畫會錯誤輸出
|
||||
this.allFilterTimeframe.x_axis.min_base = min;
|
||||
this.allFilterTimeframe.x_axis.max_base = max;
|
||||
@@ -290,7 +290,7 @@ export default defineStore('allMapDataStore', {
|
||||
* Test if the Filter Rules Result in Any Data
|
||||
*/
|
||||
async checkHasResult() {
|
||||
let logId = this.logId;
|
||||
const logId = this.logId;
|
||||
const api = `/api/filters/has-result?log_id=${logId}`;
|
||||
|
||||
try {
|
||||
@@ -304,7 +304,7 @@ export default defineStore('allMapDataStore', {
|
||||
* Add a New Temporary Filter
|
||||
*/
|
||||
async addTempFilterId() {
|
||||
let logId = this.logId;
|
||||
const logId = this.logId;
|
||||
const api = `/api/temp-filters?log_id=${logId}`;
|
||||
|
||||
try {
|
||||
@@ -319,9 +319,9 @@ export default defineStore('allMapDataStore', {
|
||||
* @param {string} value file's name
|
||||
*/
|
||||
async addFilterId(value) {
|
||||
let logId = this.logId;
|
||||
const logId = this.logId;
|
||||
const api = `/api/filters?log_id=${logId}`;
|
||||
let createFilterObj = {
|
||||
const createFilterObj = {
|
||||
name: value,
|
||||
rules: this.postRuleData
|
||||
};
|
||||
@@ -357,7 +357,7 @@ export default defineStore('allMapDataStore', {
|
||||
* Update an Existing Filter
|
||||
*/
|
||||
async updateFilter() {
|
||||
let createFilterId = this.createFilterId
|
||||
const createFilterId = this.createFilterId
|
||||
const api = `/api/filters/${createFilterId}`;
|
||||
const data = this.postRuleData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user