Translate remaining Chinese JSDoc and CSS comments to English
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -296,7 +296,7 @@ function handleScroll(event) {
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@reference "../../../assets/tailwind.css";
|
@reference "../../../assets/tailwind.css";
|
||||||
/* 進度條顏色 */
|
/* Progress bar color */
|
||||||
:deep(.p-progressbar .p-progressbar-value) {
|
:deep(.p-progressbar .p-progressbar-value) {
|
||||||
@apply bg-primary
|
@apply bg-primary
|
||||||
}
|
}
|
||||||
@@ -311,7 +311,7 @@ function handleScroll(event) {
|
|||||||
:deep(.p-datatable .p-datatable-tbody > tr > td) {
|
:deep(.p-datatable .p-datatable-tbody > tr > td) {
|
||||||
@apply border-neutral-500 !border-t-0 text-center
|
@apply border-neutral-500 !border-t-0 text-center
|
||||||
}
|
}
|
||||||
/* 標題置中 */
|
/* Center header title */
|
||||||
:deep(.p-column-header-content) {
|
:deep(.p-column-header-content) {
|
||||||
@apply justify-center
|
@apply justify-center
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ onMounted(() => {
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
/* datatable head 置中 */
|
/* Center datatable header */
|
||||||
:deep(.p-column-header-content) {
|
:deep(.p-column-header-content) {
|
||||||
@apply justify-center
|
@apply justify-center
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ async function fetchData() {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@reference "../../../assets/tailwind.css";
|
@reference "../../../assets/tailwind.css";
|
||||||
/* 進度條顏色 */
|
/* Progress bar color */
|
||||||
:deep(.p-progressbar .p-progressbar-value) {
|
:deep(.p-progressbar .p-progressbar-value) {
|
||||||
@apply bg-primary
|
@apply bg-primary
|
||||||
}
|
}
|
||||||
@@ -313,7 +313,7 @@ async function fetchData() {
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
/* datatable head 置中 */
|
/* Center datatable header */
|
||||||
:deep(.p-column-header-content) {
|
:deep(.p-column-header-content) {
|
||||||
@apply justify-center
|
@apply justify-center
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const useCompareStore = defineStore('compareStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* fetch discover api, get stats.
|
* fetch discover api, get stats.
|
||||||
* @param {string} type 'log' | 'filter',可傳入 'log' 或 'filter'
|
* @param {string} type - The file type ('log' or 'filter').
|
||||||
* @param {number} id log or filter ID
|
* @param {number} id log or filter ID
|
||||||
*/
|
*/
|
||||||
async getStateData(type, id) {
|
async getStateData(type, id) {
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Creates a new temporary check for a log.
|
* Creates a new temporary check for a log.
|
||||||
* @param {object} data 送給後端的 data
|
* @param {object} data - The request payload for the backend.
|
||||||
*/
|
*/
|
||||||
async addConformanceCheckId(data) {
|
async addConformanceCheckId(data) {
|
||||||
const logId = this.conformanceLogId;
|
const logId = this.conformanceLogId;
|
||||||
@@ -256,7 +256,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the Temporary Log Conformance Report
|
* Get the Temporary Log Conformance Report
|
||||||
* @param {boolean} getRouteFile 是否為了取得 route file 而呼叫?使用在非 Conformance page
|
* @param {boolean} getRouteFile - Whether called to get the route file (used outside the Conformance page).
|
||||||
*/
|
*/
|
||||||
async getConformanceReport(getRouteFile = false) {
|
async getConformanceReport(getRouteFile = false) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
const logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
@@ -291,7 +291,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the detail of a temporary log conformance issue.
|
* Get the detail of a temporary log conformance issue.
|
||||||
* @param {number} issueNo Issues 編號
|
* @param {number} issueNo - The issue number.
|
||||||
*/
|
*/
|
||||||
async getConformanceIssue(issueNo) {
|
async getConformanceIssue(issueNo) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
const logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
@@ -323,9 +323,9 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the Trace Details of a Temporary Log Conformance lssue.
|
* Get the Trace Details of a Temporary Log Conformance lssue.
|
||||||
* @param {number} issueNo Issues 編號
|
* @param {number} issueNo - The issue number.
|
||||||
* @param {number} traceId, Trace 編號
|
* @param {number} traceId - The trace ID.
|
||||||
* @param {number} start Trace 要從哪個編號開始載入
|
* @param {number} start - The starting index for loading traces.
|
||||||
*/
|
*/
|
||||||
async getConformanceTraceDetail(issueNo, traceId, start) {
|
async getConformanceTraceDetail(issueNo, traceId, start) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
const logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
@@ -363,7 +363,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the Details of a Temporary Log Conformance Loop.
|
* Get the Details of a Temporary Log Conformance Loop.
|
||||||
* @param {number} loopNo loop 編號
|
* @param {number} loopNo - The loop number.
|
||||||
*/
|
*/
|
||||||
async getConformanceLoop(loopNo) {
|
async getConformanceLoop(loopNo) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
const logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
@@ -387,9 +387,9 @@ export const useConformanceStore = defineStore('conformanceStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the Trace Details of a Temporary Log Conformance Loops.
|
* Get the Trace Details of a Temporary Log Conformance Loops.
|
||||||
* @param {number} loopNo loop 編號
|
* @param {number} loopNo - The loop number.
|
||||||
* @param {number} traceId, Trace 編號
|
* @param {number} traceId - The trace ID.
|
||||||
* @param {number} start Trace 要從哪個編號開始載入
|
* @param {number} start - The starting index for loading traces.
|
||||||
*/
|
*/
|
||||||
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
|
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
|
||||||
const logTempCheckId = this.conformanceLogTempCheckId;
|
const logTempCheckId = this.conformanceLogTempCheckId;
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
|
|||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
/**
|
/**
|
||||||
* 儲存或更新單個節點的位置資訊。
|
* Saves or updates the position of a single node.
|
||||||
* @param {string} id
|
* @param {string} id - The node ID.
|
||||||
* @param {object} position {x, y} position有兩個值,x與y
|
* @param {{x: number, y: number}} position - The node position.
|
||||||
* @param {string} direction 'TB' 'LR'
|
* @param {string} direction - Layout direction ('TB' or 'LR').
|
||||||
*/
|
*/
|
||||||
saveNodePosition(nodeId: string, position: Position, direction: string) {
|
saveNodePosition(nodeId: string, position: Position, direction: string) {
|
||||||
// 若是資訊曾經存在這張圖於localStorage中
|
// 若是資訊曾經存在這張圖於localStorage中
|
||||||
@@ -64,8 +64,8 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
|
|||||||
this.savePositionsToStorage();
|
this.savePositionsToStorage();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 從本地存儲中加載節點位置資訊。
|
* Loads node positions from local storage.
|
||||||
* @param {string} direction 'TB' TopBotom; 'LR' LeftRight
|
* @param {string} direction - Layout direction ('TB' or 'LR').
|
||||||
*/
|
*/
|
||||||
loadPositionsFromStorage(direction: string) {
|
loadPositionsFromStorage(direction: string) {
|
||||||
if (localStorage.getItem(SAVE_KEY_NAME) &&
|
if (localStorage.getItem(SAVE_KEY_NAME) &&
|
||||||
@@ -76,7 +76,7 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 將節點位置資訊儲存到本地存儲中。
|
* Saves node positions to local storage.
|
||||||
*/
|
*/
|
||||||
savePositionsToStorage() {
|
savePositionsToStorage() {
|
||||||
localStorage.setItem(SAVE_KEY_NAME, JSON.stringify(this.nodePositions));
|
localStorage.setItem(SAVE_KEY_NAME, JSON.stringify(this.nodePositions));
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Uploads a CSV log file. 第一階段上傳
|
* Uploads a CSV log file (first stage).
|
||||||
* @param {Object} fromData 傳給後端的 Data
|
* @param {Object} fromData - The form data to send to the backend.
|
||||||
*/
|
*/
|
||||||
async upload(fromData) {
|
async upload(fromData) {
|
||||||
const api = '/api/logs/csv-uploads';
|
const api = '/api/logs/csv-uploads';
|
||||||
@@ -164,8 +164,8 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Add a Log from an Uploaded CSV Log File. 第二階段上傳
|
* Adds a log from an uploaded CSV log file (second stage).
|
||||||
* @param {Object} data 傳給後端的 Data
|
* @param {Object} data - The request payload for the backend.
|
||||||
*/
|
*/
|
||||||
async uploadLog(data) {
|
async uploadLog(data) {
|
||||||
const uploadId = this.uploadId;
|
const uploadId = this.uploadId;
|
||||||
@@ -193,9 +193,9 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Rename a Log
|
* Rename a Log
|
||||||
* @param { string } type log | filter | log-check | filter-check,傳入以上任一個。
|
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
|
||||||
* @param { number } id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
* @param { string } name file's name
|
* @param {string} name - The file name.
|
||||||
*/
|
*/
|
||||||
async rename(type, id, fileName) {
|
async rename(type, id, fileName) {
|
||||||
// 先判斷有沒有 uploadLogId,有就設定 id 和 type;再判斷檔案型別。
|
// 先判斷有沒有 uploadLogId,有就設定 id 和 type;再判斷檔案型別。
|
||||||
@@ -232,8 +232,8 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the Dependents of the files
|
* Get the Dependents of the files
|
||||||
* @param { string } type log | filter | log-check | filter-check
|
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
|
||||||
* @param { number } id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
*/
|
*/
|
||||||
async getDependents(type, id) {
|
async getDependents(type, id) {
|
||||||
let api;
|
let api;
|
||||||
@@ -261,8 +261,8 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Delete file
|
* Delete file
|
||||||
* @param { string } type log | filter | log-check | filter-check
|
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
|
||||||
* @param { number } id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
*/
|
*/
|
||||||
async deleteFile(type, id) {
|
async deleteFile(type, id) {
|
||||||
let api;
|
let api;
|
||||||
@@ -298,8 +298,8 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Remove a Deletion Record,真刪除被 Admin 或被其他帳號刪除的檔案
|
* Removes a deletion record permanently.
|
||||||
* @param {number} id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
*/
|
*/
|
||||||
async deletionRecord(id) {
|
async deletionRecord(id) {
|
||||||
let api = '';
|
let api = '';
|
||||||
@@ -317,9 +317,9 @@ export const useFilesStore = defineStore('filesStore', {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Download file as CSV
|
* Download file as CSV
|
||||||
* @param { string } type log | filter | log-check | filter-check
|
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
|
||||||
* @param { number } id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
* @param { string } fileName file's name
|
* @param {string} fileName - The file name.
|
||||||
*/
|
*/
|
||||||
async downloadFileCSV(type, id, fileName) {
|
async downloadFileCSV(type, id, fileName) {
|
||||||
let api;
|
let api;
|
||||||
|
|||||||
@@ -133,8 +133,11 @@ export const useMapPathStore = defineStore('mapPathStore', {
|
|||||||
this.insights = { ...insights };
|
this.insights = { ...insights };
|
||||||
await this.matchGraphPathWithInsightsPath();
|
await this.matchGraphPathWithInsightsPath();
|
||||||
},
|
},
|
||||||
/** 從start節點開始建立所有的path
|
/**
|
||||||
* 於第二個參數逐漸推入節點,於第三個參數逐漸推入線段
|
* Builds all paths from the start node using depth-first search.
|
||||||
|
* @param node - The current node.
|
||||||
|
* @param currentPathByNode - Accumulated nodes along the path.
|
||||||
|
* @param curPathByEdge - Accumulated edges along the path.
|
||||||
*/
|
*/
|
||||||
depthFirstSearchCreatePath(node, currentPathByNode, curPathByEdge) {
|
depthFirstSearchCreatePath(node, currentPathByNode, curPathByEdge) {
|
||||||
const outgoingEdges = node.outgoers('edge');
|
const outgoingEdges = node.outgoers('edge');
|
||||||
@@ -155,14 +158,8 @@ export const useMapPathStore = defineStore('mapPathStore', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 比對兩條Paths是否相等。
|
* Matches graph paths with insights paths by comparing
|
||||||
* 第一條path是透過depthFirstSearchCreatePath所建立,
|
* node labels along each path to the insights data arrays.
|
||||||
* 而第二條path是從後端給的insights物件而來,其資料結構是簡單的array而已。
|
|
||||||
* 在每條path沿路據節點上的label之
|
|
||||||
* 字串來匹配這個path是屬於insights物件的哪一條path,
|
|
||||||
* 其中用curButton去記憶住insights[INSIGHTS_FIELDS_AND_LABELS[i][0]]內文
|
|
||||||
* 而curButton[listIndex][nodeIndex]是用來確認是否跟depthFirstSearchCreatePath內的
|
|
||||||
* node.data('label')字串完全相等,也就是 activity 節點的文字
|
|
||||||
*/
|
*/
|
||||||
matchGraphPathWithInsightsPath() {
|
matchGraphPathWithInsightsPath() {
|
||||||
for (let whichPath = 0; whichPath < this.allPaths.length; whichPath++) {
|
for (let whichPath = 0; whichPath < this.allPaths.length; whichPath++) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export const usePerformanceStore = defineStore('performanceStore', {
|
|||||||
actions: {
|
actions: {
|
||||||
/**
|
/**
|
||||||
* Get Performance
|
* Get Performance
|
||||||
* @param {string} type 'log' | 'filter',可傳入以上任一。
|
* @param {string} type - The file type ('log' or 'filter').
|
||||||
* @param {*} id 檔案 ID
|
* @param {number} id - The file ID.
|
||||||
*/
|
*/
|
||||||
async getPerformance(type, id) {
|
async getPerformance(type, id) {
|
||||||
let api = '';
|
let api = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user