@@ -152,9 +152,9 @@ const valueTypes = ['int', 'float', 'date'];
const classTypes = ['boolean', 'string'];
const chartData = ref({});
const chartOptions = ref({});
-const chartComplete = ref(null); // 已出圖的 chart.js 資料
+const chartComplete = ref(null); // Rendered chart.js instance data
const selectArea = ref(null);
-const selectRange = ref(1000); // 更改 select 的切分數
+const selectRange = ref(1000); // Number of divisions for the selection range
const startTime = ref(null); // PrimeVue Calendar v-model
const endTime = ref(null); // PrimeVue Calendar v-model
const startMinDate = ref(null);
@@ -162,7 +162,7 @@ const startMaxDate = ref(null);
const endMinDate = ref(null);
const endMaxDate = ref(null);
const valueStart = ref(null); // PrimeVue InputNumber v-model
-const valueEnd = ref(null); // PrimeVue InputNumber v-model
+const valueEnd = ref(null); // PrimeVue InputNumber v-model
const valueStartMin = ref(null);
const valueStartMax = ref(null);
const valueEndMin = ref(null);
@@ -226,16 +226,16 @@ const attRangeData = computed(() => {
return data.sort((x, y) => y.freq - x.freq);
});
-// 取出選取的 Attribute radio 數值型的資料
+// Get the selected Attribute radio's numeric-type data
const valueData = computed(() => {
- // filter 回傳陣列,find 回傳遞一個找到的元素,因此使用 find 方法。
+ // filter returns an array, find returns the first matched element, so use find here.
if(valueTypes.includes(selectedAttName.value.type)){
const data = filterAttrs.value.find(item => item.type === selectedAttName.value.type && item.key === selectedAttName.value.key);
return data
}
});
-// 找出 slidrData,時間格式:毫秒時間戳
+// Compute slider data; time format: millisecond timestamps
const sliderDataComputed = computed(() => {
let xAxisMin;
let xAxisMax;
@@ -298,7 +298,7 @@ const attValueTypeStartEnd = computed(() => {
end = valueEnd.value;
break;
}
- const data = { // 傳給後端的資料
+ const data = { // Data to send to the backend
type: type,
data: {
key: selectedAttName.value.key,
@@ -385,43 +385,43 @@ function switchAttNameRadio(e) {
endTime.value = null;
valueStart.value = null;
valueEnd.value = null;
- if(valueData.value) { // 切換 Attribute Name
- // 初始化雙向綁定
+ if(valueData.value) { // Switch Attribute Name
+ // Initialize two-way bindings
selectArea.value = [0, selectRange.value];
const min = valueData.value.min;
const max = valueData.value.max;
switch (selectedAttName.value.type) {
case 'dummy': //sonar-qube
case 'date':
- // 除了 date 外雙向綁定為空
+ // Clear two-way bindings except for date
valueStart.value = null;
valueEnd.value = null;
- // 初始化: Calendar
+ // Initialize Calendar
startMinDate.value = new Date(min);
startMaxDate.value = new Date(max);
endMinDate.value = new Date(min);
endMaxDate.value = new Date(max);
- // 初始化: 讓日曆的範圍等於時間軸的範圍
+ // Initialize: set the calendar range to match the timeline range
startTime.value = new Date(min);
endTime.value = new Date(max);
break;
default:
- // date 雙向綁定為空
+ // Clear date two-way bindings
startTime.value = null;
endTime.value = null;
- // 初始化:InputNumber
+ // Initialize InputNumber
valueStartMin.value = min;
valueStartMax.value = max;
valueEndMin.value = min;
valueEndMax.value = max;
- // 初始化: 讓 InputNumber 的範圍等於時間軸的範圍
+ // Initialize: set the InputNumber range to match the timeline range
valueStart.value = min;
valueEnd.value = max;
break;
}
- // 傳給後端
- // attValueTypeStartEnd.value; 是否有要呼叫函數? sonar-qube
- // 建立圖表
+ // Send to backend
+ // attValueTypeStartEnd.value; should this function be called? sonar-qube
+ // Create chart
createChart();
}
}
@@ -545,7 +545,7 @@ function createChart() {
}
},
plugins: {
- legend: false, // 圖例
+ legend: false, // Hide legend
filler: {
propagate: false
},
@@ -562,10 +562,10 @@ function createChart() {
},
scales: {
y: {
- beginAtZero: true, // scale 包含 0
+ beginAtZero: true, // Scale includes 0
max: max,
- ticks: { // 設定間隔數值
- display: false, // 隱藏數值,只顯示格線
+ ticks: { // Set tick intervals
+ display: false, // Hide values, only show grid lines
stepSize: max / 4,
},
grid: {
@@ -573,7 +573,7 @@ function createChart() {
z: 1,
},
border: {
- display: false, // 隱藏左側多出來的線
+ display: false, // Hide the extra border line on the left
}
},
},
@@ -584,17 +584,17 @@ function createChart() {
ticks: {
min: minX,
max: maxX,
- autoSkip: true, // 依比例判斷要不要換算時間單位
- maxRotation: 0, // 不旋轉 lable 0~50
+ autoSkip: true, // Automatically determine whether to convert time units
+ maxRotation: 0, // Do not rotate labels (0~50)
color: '#334155',
display: true,
- source: 'labels', // 依比例彈性顯示 label 數量
+ source: 'labels', // Flexibly display label count proportionally
},
grid: {
- display: false, // 隱藏 x 軸網格
+ display: false, // Hide x-axis grid lines
},
time: {
- minUnit: 'day', // 顯示最小單位
+ minUnit: 'day', // Minimum display unit
// displayFormats: {
// minute: 'HH:mm MMM d',
// hour: 'HH:mm MMM d',
@@ -609,7 +609,7 @@ function createChart() {
max: maxX,
ticks: {
autoSkip: true,
- maxRotation: 0, // 不旋轉 lable 0~50
+ maxRotation: 0, // Do not rotate labels (0~50)
color: '#334155',
callback: ((value, index, values) => {
let x;
@@ -627,15 +627,15 @@ function createChart() {
default:
x = Math.round(value * 100) / 100;
}
- // 處理科學記號等格式轉換
- // Decimal 無法處理超過 16 位數
+ // Handle scientific notation and other format conversions
+ // Decimal cannot handle numbers exceeding 16 digits
x = new Intl.NumberFormat(undefined, {useGrouping: false}).format(x);
return x
}
})
},
grid: {
- display: false, // 隱藏 x 軸網格
+ display: false, // Hide x-axis grid lines
},
}
}
@@ -648,32 +648,32 @@ function createChart() {
* @param {array} e [1, 100]
*/
function changeSelectArea(e) {
- // 日曆改變時,滑塊跟著改變
+ // When the calendar changes, the slider follows
const sliderData = sliderDataComputed.value;
const start = sliderData[e[0].toFixed()];
- const end = sliderData[e[1].toFixed()]; // 取得 index,須為整數。
+ const end = sliderData[e[1].toFixed()]; // Get the index, which must be an integer.
switch (selectedAttName.value.type) {
case 'dummy':
case 'date':
startTime.value = new Date(start);
endTime.value = new Date(end);
- // 重新設定 start end 日曆選取範圍
+ // Reset the start/end calendar selection range
endMinDate.value = new Date(start);
startMaxDate.value = new Date(end);
break;
default:
valueStart.value = start;
valueEnd.value = end;
- // 重新設定 start end 日曆選取範圍
+ // Reset the start/end selection range
valueEndMin.value = start;
valueStartMax.value = end;
break;
}
- // 重新算圖
+ // Recalculate the chart mask
resizeMask(chartComplete.value);
- // 執行 timeFrameStartEnd 才會改變數據
- // attValueTypeStartEnd.value; 是否有要呼叫函數? sonar-qube
+ // Execute timeFrameStartEnd to update the data
+ // attValueTypeStartEnd.value; should this function be called? sonar-qube
}
/**
@@ -682,7 +682,7 @@ function changeSelectArea(e) {
* @param {string} direction start or end
*/
function sliderValueRange(e, direction) {
- // 找到最鄰近的 index,時間格式: 毫秒時間戳
+ // Find the closest index; time format: millisecond timestamps
const sliderData = sliderDataComputed.value;
const isDateType = selectedAttName.value.type === 'date';
let targetTime = [];
@@ -698,9 +698,9 @@ function sliderValueRange(e, direction) {
result = result > selectRange.value ? selectRange.value : result;
return result
});
- // 改變滑塊
+ // Update the slider
selectArea.value = closestIndexes;
- // 重新設定 start end 日曆選取範圍
+ // Reset the start/end calendar selection range
if(!isDateType) inputValue = Number(e.value.replace(/,/g, '')) ;
if(direction === 'start') {
if(isDateType){
@@ -716,7 +716,7 @@ function sliderValueRange(e, direction) {
valueStartMax.value = inputValue;
};
}
- // 重新算圖
+ // Recalculate the chart mask
if(!isNaN(closestIndexes[0]) && !isNaN(closestIndexes[1])) resizeMask(chartComplete.value);
else return;
}
@@ -740,7 +740,7 @@ emitter.on('map-filter-reset', value => {
onMounted(() => {
// Slider
- selectArea.value = [0, selectRange.value]; // 初始化滑塊
+ selectArea.value = [0, selectRange.value]; // Initialize the slider
});
onBeforeUnmount(() => {
diff --git a/src/components/Discover/Map/Filter/Funnel.vue b/src/components/Discover/Map/Filter/Funnel.vue
index e8b0f52..a0a15df 100644
--- a/src/components/Discover/Map/Filter/Funnel.vue
+++ b/src/components/Discover/Map/Filter/Funnel.vue
@@ -70,8 +70,8 @@ const { hasResultRule, temporaryData, postRuleData, ruleData, isRuleData, tempFi
*/
function isRule(e, index){
const rule = isRuleData.value[index];
- // 先取得 rule object
- // 為了讓 data 順序不亂掉,將值指向 0,submitAll 時再刪掉
+ // First get the rule object
+ // To preserve data order, set the value to 0 and remove it during submitAll
if(!e) temporaryData.value[index] = 0;
else temporaryData.value[index] = rule;
}
@@ -89,7 +89,7 @@ async function deleteRule(index) {
isLoading.value = true;
tempFilterId.value = await null;
await allMapDataStore.getAllMapData();
- await allMapDataStore.getAllTrace(); // SidebarTrace 要連動
+ await allMapDataStore.getAllTrace(); // SidebarTrace needs to update in sync
await emit('submit-all');
isLoading.value = false;
}
@@ -104,9 +104,9 @@ async function deleteRule(index) {
/** Submits all enabled filter rules and refreshes the map data. */
async function submitAll() {
- postRuleData.value = temporaryData.value.filter(item => item !== 0); // 取得 submit 的資料,有 toggle button 的話,找出並刪除陣列中為 0 的項目
+ postRuleData.value = temporaryData.value.filter(item => item !== 0); // Get submit data; if toggle buttons are used, find and remove items set to 0
if(!postRuleData.value?.length) return $toast.error('Not selected');
- await allMapDataStore.checkHasResult(); // 後端快速檢查有沒有結果
+ await allMapDataStore.checkHasResult(); // Quick backend check for results
if(hasResultRule.value === null) {
return;
@@ -114,7 +114,7 @@ async function submitAll() {
isLoading.value = true;
await allMapDataStore.addTempFilterId();
await allMapDataStore.getAllMapData();
- await allMapDataStore.getAllTrace(); // SidebarTrace 要連動
+ await allMapDataStore.getAllTrace(); // SidebarTrace needs to update in sync
if(temporaryData.value[0]?.type) {
allMapDataStore.traceId = await allMapDataStore.traces[0]?.id;
}
diff --git a/src/components/Discover/Map/Filter/Timeframes.vue b/src/components/Discover/Map/Filter/Timeframes.vue
index f65d07d..7fa9381 100644
--- a/src/components/Discover/Map/Filter/Timeframes.vue
+++ b/src/components/Discover/Map/Filter/Timeframes.vue
@@ -53,7 +53,7 @@ const props = defineProps(['selectValue']);
const allMapDataStore = useAllMapDataStore();
const { filterTimeframe, selectTimeFrame } = storeToRefs(allMapDataStore);
-const selectRange = ref(1000); // 更改 select 的切分數
+const selectRange = ref(1000); // Number of divisions for the selection range
const selectArea = ref(null);
const chart = ref(null);
const canvasId = ref(null);
@@ -73,12 +73,12 @@ const panelProps = ref({
const timeFrameStartEnd = computed(() => {
const start = getMoment(startTime.value).format('YYYY-MM-DDTHH:mm:00');
const end = getMoment(endTime.value).format('YYYY-MM-DDTHH:mm:00');
- selectTimeFrame.value = [start, end]; // 傳給後端的資料
+ selectTimeFrame.value = [start, end]; // Data to send to the backend
return [start, end];
});
-// 找出 slidrData,時間格式:毫秒時間戳
+// Compute slider data; time format: millisecond timestamps
const sliderData = computed(() => {
const xAxisMin = new Date(filterTimeframe.value.x_axis.min).getTime();
const xAxisMax = new Date(filterTimeframe.value.x_axis.max).getTime();
@@ -93,16 +93,16 @@ const sliderData = computed(() => {
return data;
});
-// 加入最大、最小值
+// Add the minimum and maximum values
const timeFrameData = computed(() => {
const data = filterTimeframe.value.data.map(i=>({x:i.x,y:i.y}))
- // y 軸斜率計算請參考 ./public/timeFrameSlope 的圖
- // x 值為 0 ~ 11,
- // 將三的座標(ax, ay), (bx, by), (cx, cy)命名為 (a, b), (c, d), (e, f)
- // 最小值: (f - b)(c - a) = (e - a)(d - b),求 b = (ed - ad - fa - fc) / (e - c - a)
- // 最大值: (f - b)(e - c) = (f - d)(e - a),求 f = (be - bc -de + da) / (a - c)
+ // See ./public/timeFrameSlope for the y-axis slope calculation diagram
+ // x values are 0 ~ 11,
+ // Name three coordinates (ax, ay), (bx, by), (cx, cy) as (a, b), (c, d), (e, f)
+ // Minimum: (f - b)(c - a) = (e - a)(d - b), solve for b = (ed - ad - fa - fc) / (e - c - a)
+ // Maximum: (f - b)(e - c) = (f - d)(e - a), solve for f = (be - bc - de + da) / (a - c)
- // y 軸最小值
+ // Y-axis minimum value
const a = 0;
let b;
const c = 1;
@@ -113,7 +113,7 @@ const timeFrameData = computed(() => {
if(b < 0) {
b = 0;
}
- // y 軸最大值
+ // Y-axis maximum value
const ma = 9;
const mb = filterTimeframe.value.data[8].y;
const mc = 10;
@@ -124,12 +124,12 @@ const timeFrameData = computed(() => {
mf = 0;
}
- // 添加最小值
+ // Add the minimum value
data.unshift({
x: filterTimeframe.value.x_axis.min_base,
y: b,
})
- // 添加最大值
+ // Add the maximum value
data.push({
x: filterTimeframe.value.x_axis.max_base,
y: mf,
@@ -234,13 +234,13 @@ function createChart() {
}
},
plugins: {
- legend: false, // 圖例
+ legend: false, // Hide legend
filler: {
propagate: false
},
title: false
},
- // animations: false, // 取消動畫
+ // animations: false, // Disable animations
animation: {
onComplete: e => {
resizeMask(e.chart);
@@ -256,16 +256,16 @@ function createChart() {
max: maxX,
ticks: {
autoSkip: true,
- maxRotation: 0, // 不旋轉 lable 0~50
+ maxRotation: 0, // Do not rotate labels (0~50)
color: '#334155',
display: true,
source: 'labels',
},
grid: {
- display: false, // 隱藏 x 軸網格
+ display: false, // Hide x-axis grid lines
},
time: {
- minUnit: 'day', // 顯示最小單位
+ minUnit: 'day', // Minimum display unit
// displayFormats: {
// minute: 'HH:mm MMM d',
// hour: 'HH:mm MMM d',
@@ -273,10 +273,10 @@ function createChart() {
}
},
y: {
- beginAtZero: true, // scale 包含 0
+ beginAtZero: true, // Scale includes 0
max: max,
- ticks: { // 設定間隔數值
- display: false, // 隱藏數值,只顯示格線
+ ticks: { // Set tick intervals
+ display: false, // Hide values, only show grid lines
stepSize: max / 4,
},
grid: {
@@ -284,7 +284,7 @@ function createChart() {
z: 1,
},
border: {
- display: false, // 隱藏左側多出來的線
+ display: false, // Hide the extra border line on the left
}
},
},
@@ -303,19 +303,19 @@ function createChart() {
* @param {array} e [1, 100]
*/
function changeSelectArea(e) {
- // 日曆改變時,滑塊跟著改變
+ // When the calendar changes, the slider follows
const sliderDataVal = sliderData.value;
const start = sliderDataVal[e[0].toFixed()];
- const end = sliderDataVal[e[1].toFixed()]; // 取得 index,須為整數。
+ const end = sliderDataVal[e[1].toFixed()]; // Get the index, which must be an integer.
startTime.value = new Date(start);
endTime.value = new Date(end);
- // 重新設定 start end 日曆選取範圍
+ // Reset the start/end calendar selection range
endMinDate.value = new Date(start);
startMaxDate.value = new Date(end);
- // 重新算圖
+ // Recalculate the chart mask
resizeMask(chart.value);
- // 執行 timeFrameStartEnd 才會改變數據
+ // Execute timeFrameStartEnd to update the data
timeFrameStartEnd.value;
}
@@ -325,7 +325,7 @@ function changeSelectArea(e) {
* @param {string} direction start or end
*/
function sliderTimeRange(e, direction) {
- // 找到最鄰近的 index,時間格式: 毫秒時間戳
+ // Find the closest index; time format: millisecond timestamps
const sliderDataVal = sliderData.value;
const targetTime = [new Date(timeFrameStartEnd.value[0]).getTime(), new Date(timeFrameStartEnd.value[1]).getTime()];
const closestIndexes = targetTime.map(target => {
@@ -336,12 +336,12 @@ function sliderTimeRange(e, direction) {
return result
});
- // 改變滑塊
+ // Update the slider
selectArea.value = closestIndexes;
- // 重新設定 start end 日曆選取範圍
+ // Reset the start/end calendar selection range
if(direction === 'start') endMinDate.value = e;
else if(direction === 'end') startMaxDate.value = e;
- // 重新算圖
+ // Recalculate the chart mask
if(!isNaN(closestIndexes[0]) && !isNaN(closestIndexes[1])) resizeMask(chart.value);
else return;
}
@@ -357,7 +357,7 @@ onMounted(() => {
startMaxDate.value = new Date(filterTimeframe.value.x_axis.max);
endMinDate.value = new Date(filterTimeframe.value.x_axis.min);
endMaxDate.value = new Date(filterTimeframe.value.x_axis.max);
- // 讓日曆的範圍等於時間軸的範圍
+ // Set the calendar range to match the timeline range
startTime.value = startMinDate.value;
endTime.value = startMaxDate.value;
timeFrameStartEnd.value;
diff --git a/src/components/Discover/Map/Filter/Trace.vue b/src/components/Discover/Map/Filter/Trace.vue
index eb01536..0f0d32d 100644
--- a/src/components/Discover/Map/Filter/Trace.vue
+++ b/src/components/Discover/Map/Filter/Trace.vue
@@ -99,7 +99,7 @@ const processMap = ref({
const showTraceId = ref(null);
const infinitMaxItems = ref(false);
const infiniteData = ref([]);
-const infiniteFinish = ref(true); // 無限滾動是否載入完成
+const infiniteFinish = ref(true); // Whether infinite scroll loading is complete
const chartOptions = ref(null);
const selectArea = ref([0, 1]);
const cyTraceRef = ref(null);
@@ -138,11 +138,11 @@ const chartData = computed(() => {
const data = baseTraces.value.map(trace => getPercentLabel(trace.count / traceCountTotal.value));
const selectAreaData = baseTraces.value.map((trace, index) => index >= start && index <= end ? 'rgba(0,153,255)' : 'rgba(203, 213, 225)');
- return { // 要呈現的資料
+ return { // Data to display
labels,
datasets: [
{
- label: 'Trace', // 資料的標題標籤
+ label: 'Trace', // Dataset label
data,
backgroundColor: selectAreaData,
categoryPercentage: 1.0,
@@ -153,18 +153,18 @@ const chartData = computed(() => {
});
const caseData = computed(() => {
- const data = JSON.parse(JSON.stringify(infiniteData.value)); // 深拷貝原始 cases 的內容
+ const data = JSON.parse(JSON.stringify(infiniteData.value)); // Deep copy the original cases data
data.forEach(item => {
item.attributes.forEach((attribute, index) => {
- item[`att_${index}`] = attribute.value; // 建立新的 key-value pair
+ item[`att_${index}`] = attribute.value; // Create a new key-value pair
});
- delete item.attributes; // 刪除原本的 attributes 屬性
+ delete item.attributes; // Remove the original attributes property
})
return data;
});
const columnData = computed(() => {
- const data = JSON.parse(JSON.stringify(baseCases.value)); // 深拷貝原始 cases 的內容
+ const data = JSON.parse(JSON.stringify(baseCases.value)); // Deep copy the original cases data
let result = [
{ field: 'id', header: 'Case Id' },
{ field: 'started_at', header: 'Start time' },
@@ -184,7 +184,7 @@ const columnData = computed(() => {
watch(selectArea, (newValue, oldValue) => {
const roundValue = Math.round(newValue[1].toFixed());
if(newValue[1] !== roundValue) selectArea.value[1] = roundValue;
- if(newValue != oldValue) emit('filter-trace-selectArea', newValue); // 判斷 Apply 是否 disable
+ if(newValue != oldValue) emit('filter-trace-selectArea', newValue); // Determine whether Apply should be disabled
});
watch(infinit404, (newValue) => {
@@ -211,7 +211,7 @@ function barOptions(){
}
},
plugins: {
- legend: { // 圖例
+ legend: { // Legend
display: false,
},
tooltip: {
@@ -228,8 +228,8 @@ function barOptions(){
display:false
},
y: {
- ticks: { // 設定間隔數值
- display: false, // 隱藏數值,只顯示格線
+ ticks: { // Set tick intervals
+ display: false, // Hide values, only show grid lines
min: 0,
max: traceList.value[0]?.ratio,
stepSize: (traceList.value[0]?.ratio)/4,
@@ -239,7 +239,7 @@ function barOptions(){
z: 1,
},
border: {
- display: false, // 隱藏左側多出來的線
+ display: false, // Hide the extra border line on the left
}
}
}
@@ -271,15 +271,15 @@ function progressWidth(value){
* @param {number} count - The total number of cases.
*/
async function switchCaseData(id, count) {
- // 點同一筆 id 不要有動作
+ // Do nothing if clicking the same id
if(id == showTraceId.value) return;
- isLoading.value = true; // 都要 loading 畫面
+ isLoading.value = true; // Always show loading screen
infinit404.value = null;
infinitMaxItems.value = false;
baseInfiniteStart.value = 0;
allMapDataStore.baseTraceId = id;
infiniteData.value = await allMapDataStore.getBaseTraceDetail();
- showTraceId.value = id; // 放 getDetail 為了 case table 載入完再切換 showTraceId
+ showTraceId.value = id; // Set after getDetail so the case table finishes loading before switching showTraceId
createCy();
isLoading.value = false;
}
@@ -288,9 +288,9 @@ async function switchCaseData(id, count) {
* Assembles the trace element nodes data for Cytoscape rendering.
*/
function setNodesData(){
- // 避免每次渲染都重複累加
+ // Clear nodes to prevent accumulation on each render
processMap.value.nodes = [];
- // 將 api call 回來的資料帶進 node
+ // Populate nodes with data returned from the API call
baseTraceTaskSeq.value.forEach((node, index) => {
processMap.value.nodes.push({
data: {
@@ -321,7 +321,7 @@ function setEdgesData(){
}
});
});
- // 關係線數量筆節點少一個
+ // The number of edges is one less than the number of nodes
processMap.value.edges.pop();
}
@@ -367,7 +367,7 @@ async function fetchData() {
}
onMounted(() => {
- isLoading.value = true; // createCy 執行完關閉
+ isLoading.value = true; // Will be closed after createCy finishes
setNodesData();
setEdgesData();
createCy();
diff --git a/src/components/Discover/Map/SidebarFilter.vue b/src/components/Discover/Map/SidebarFilter.vue
index 4b7c468..341b5f5 100644
--- a/src/components/Discover/Map/SidebarFilter.vue
+++ b/src/components/Discover/Map/SidebarFilter.vue
@@ -134,7 +134,7 @@ const { hasResultRule, temporaryData, postRuleData, ruleData, isRuleData, select
const selectFilter = {
'Filter Type': ['Sequence', 'Attributes', 'Trace', 'Timeframes'],
- // 'Filter Type': ['Sequence', 'Trace', 'Timeframes'],
+ // 'Filter Type': ['Sequence', 'Trace', 'Timeframes'], // without Attributes
'Activity Sequence':['Have activity(s)', 'Start & End', 'Sequence'],
'Start & End': ['Start', 'End', 'Start & End'],
'Mode': ['Directly follows', 'Eventually follows'],
@@ -160,12 +160,12 @@ const selectFilterEnd = ref(null);
const selectFilterStartToEnd = ref(null);
const selectFilterEndToStart = ref(null);
const listSeq = ref([]);
-//若第一次選擇 start, 則 end 連動改變,若第一次選擇 end, 則 start 連動改變
+// If start is selected first, end updates accordingly; if end is selected first, start updates accordingly
const isStartSelected = ref(null);
const isEndSelected = ref(null);
const isActAllTask = ref(true);
const rowData = ref([]);
-const selectTraceArea = ref([]); // Trace 滑快
+const selectTraceArea = ref([]); // Trace slider
const isDisabled = ref(true); // Apply Button disabled setting
const filterTraceViewRef = ref(null);
const tooltip = {
@@ -285,7 +285,7 @@ function progressWidth(value){
return `width:${value}%;`
}
-//設定 Have activity(s) 內容
+// Set up the Have activity(s) content
/**
* @param {array} data filterTaskData
*/
@@ -305,7 +305,7 @@ function setHaveAct(data){
}).sort((x, y) => y.occurrences_base - x.occurrences_base);
}
-// 調整 filterStartData / filterEndData / filterStartToEndData / filterEndToStartData 的內容
+// Adjust the content of filterStartData / filterEndData / filterStartToEndData / filterEndToStartData
/**
* @param {Array} array - filterStartToEnd or filterEndToStart data array.
*/
@@ -362,7 +362,7 @@ function onUpdateListSeq(newListSeq) {
isActAllTask.value = false;
}
-// 在 Start & End 若第一次選擇 start, 則 end 連動改變,若第一次選擇 end, 則 start 連動改變
+// In Start & End mode, if start is selected first, end updates accordingly; if end is selected first, start updates accordingly
/**
* @param {object} e object contains selected row's data
*/
@@ -387,7 +387,7 @@ function endRow(e) {
}
}
-// 重新設定連動的 filterStartToEndData / filterEndToStartData 內容
+// Reset the linked filterStartToEndData / filterEndToStartData content
/**
* @param {array} eventData Start or End List
* @param {object} rowDataVal - The selected row's data.
@@ -492,7 +492,7 @@ function reset(message) {
filterTraceViewRef.value.showTraceId = null;
filterTraceViewRef.value.selectArea = [0, filterTraceViewRef.value.traceTotal];
};
- // 成功訊息
+ // Success message
if(message) {
$toast.success('Filter cleared.')
}
diff --git a/src/components/Discover/Map/SidebarState.vue b/src/components/Discover/Map/SidebarState.vue
index b7dbd0c..346a094 100644
--- a/src/components/Discover/Map/SidebarState.vue
+++ b/src/components/Discover/Map/SidebarState.vue
@@ -191,7 +191,7 @@
-
+
No data
@@ -202,7 +202,7 @@
-
+
View
-
+
-
Process Map
@@ -17,7 +17,7 @@
BPMN Model
-
+
-
Curved
@@ -26,7 +26,7 @@
Elbow
-
+
-
Horizontal
@@ -124,7 +124,7 @@ const dataLayerType = ref(null); // freq | duration
const dataLayerOption = ref(null);
const selectedFreq = ref('');
const selectedDuration = ref('');
-const rank = ref('LR'); // 直向 TB | 橫向 LR
+const rank = ref('LR'); // Vertical TB | Horizontal LR
/**
* Switches the map type and emits the change event.
diff --git a/src/components/Discover/StatusBar.vue b/src/components/Discover/StatusBar.vue
index b96cb22..04eb48b 100644
--- a/src/components/Discover/StatusBar.vue
+++ b/src/components/Discover/StatusBar.vue
@@ -163,7 +163,7 @@ onMounted(async () => {
}
await allMapDataStore.getAllMapData();
await getStatData();
- isPanel.value = false; // 預設不打開
+ isPanel.value = false; // Collapsed by default
});
diff --git a/src/views/Compare/Dashboard/Compare.vue b/src/views/Compare/Dashboard/Compare.vue
index 258dfc9..82e900f 100644
--- a/src/views/Compare/Dashboard/Compare.vue
+++ b/src/views/Compare/Dashboard/Compare.vue
@@ -273,7 +273,7 @@ function handleClick(tagId) {
if (isSafeTagId(tagId)) {
window.location.href = tagId;
} else {
- console.warn("不安全的 tagId: ", tagId);
+ console.warn("Unsafe tagId: ", tagId);
}
}
@@ -1258,7 +1258,7 @@ function getAvgProcessTimeHorizontalBarChart(chartData, content, isSingle, xUnit
{ [secondaryTypeParam]: secondaryId }
];
- // 取得 Compare Data
+ // Fetch Compare Data
await compareStore.getCompare(queryParams);
avgProcessTimeByTaskHeight.value = getHorizontalBarHeight(compareDashboardData.value.time.avg_process_time_by_task);
if(compareDashboardData.value.time.avg_waiting_time_by_edge !== null) {
diff --git a/src/views/Discover/Performance/FreqChart.vue b/src/views/Discover/Performance/FreqChart.vue
index 8f1b8c4..68764b9 100644
--- a/src/views/Discover/Performance/FreqChart.vue
+++ b/src/views/Discover/Performance/FreqChart.vue
@@ -42,19 +42,19 @@ x: {
},
ticks: {
display: true,
- maxRotation: 0, // 不旋轉 lable 0~50
+ maxRotation: 0, // Do not rotate labels (range: 0~50)
color: '#64748b',
- source: 'labels', // 依比例彈性顯示 label 數量
+ source: 'labels', // Dynamically display label count proportionally
},
border: {
color: '#64748b',
},
grid: {
- tickLength: 0, // 網格是否超過邊線
+ tickLength: 0, // Prevent grid lines from extending beyond the axis
}
},
y: {
- beginAtZero: true, // scale 包含 0
+ beginAtZero: true, // Scale includes 0
title: {
display: true,
color: '#334155',
@@ -71,7 +71,7 @@ y: {
color: '#64748b',
},
border: {
- display: false, // 隱藏左側多出來的線
+ display: false, // Hide the extra border line on the left side
},
},
};
@@ -128,7 +128,7 @@ const customizeScaleChartOptionTicks = (scaleObjectToAlter, ticksOfXAxis) => {
ticks: {
...scaleObjectToAlter.x.ticks,
callback: function(value, index) {
- // 根據不同的級距客製化 x 軸的時間刻度
+ // Customize x-axis time ticks based on different intervals
return ticksOfXAxis[index];
},
},
@@ -188,8 +188,8 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
let primeVueSetData = {};
let primeVueSetOption = {};
- // 考慮 chartData.data 的dimension
- // 當我們遇到了 Compare 頁面的案例
+ // Consider the dimension of chartData.data
+ // When handling the Compare page case
if(pageName === "Compare"){
datasetsPrimary = chartData.data[0].data;
datasetsSecondary = chartData.data[1].data;
@@ -199,7 +199,7 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
label: chartData.data[0].label,
data: datasetsPrimary,
fill: false,
- tension: 0, // 貝茲曲線張力
+ tension: 0, // Bezier curve tension
borderColor: colorPrimary,
pointBackgroundColor: colorPrimary,
},
@@ -207,7 +207,7 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
label: chartData.data[1].label,
data: datasetsSecondary,
fill: false,
- tension: 0, // 貝茲曲線張力
+ tension: 0, // Bezier curve tension
borderColor: colorSecondary,
pointBackgroundColor: colorSecondary,
}
@@ -220,7 +220,7 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
label: content.title,
data: datasets,
fill: false,
- tension: 0, // 貝茲曲線張力
+ tension: 0, // Bezier curve tension
borderColor: '#0099FF',
}
];
@@ -254,17 +254,17 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
}
},
plugins: {
- legend: false, // 圖例
+ legend: false, // Legend
tooltip: {
displayColors: true,
titleFont: {weight: 'normal'},
callbacks: {
label: function(tooltipItem) {
- // 取得數據
+ // Get the data
const label = tooltipItem.dataset.label || '';
- // 建立一個小方塊顯示顏色
- return `${label}: ${tooltipItem.parsed.y}`; // 使用 Unicode 方塊表示顏色
+ // Build the tooltip label with dataset color indicator
+ return `${label}: ${tooltipItem.parsed.y}`; // Use Unicode block to represent color
},
},
},
@@ -275,9 +275,9 @@ const getLineChartPrimeVueSetting = (chartData, content, pageName) => {
scales: customizedScaleOption,
};
- primeVueSetOption.scales.y.ticks.precision = 0; // y 軸顯示小數點後 0 位
+ primeVueSetOption.scales.y.ticks.precision = 0; // Show 0 decimal places on y-axis
primeVueSetOption.scales.y.ticks.callback = function (value, index, ticks) {
- return value; //這裡的Y軸刻度沒有後綴代表時間的英文字母
+ return value; // Y-axis ticks here have no time unit suffix
};
primeVueSetDataState.value = primeVueSetData;
primeVueSetOptionsState.value = primeVueSetOption;
diff --git a/src/views/Discover/Performance/index.vue b/src/views/Discover/Performance/index.vue
index 2ee8b0f..b12a6ec 100644
--- a/src/views/Discover/Performance/index.vue
+++ b/src/views/Discover/Performance/index.vue
@@ -269,7 +269,7 @@ function handleClick(tagId) {
if (isSafeTagId(tagId)) {
window.location.href = tagId;
} else {
- console.warn("不安全的 tagId: ", tagId);
+ console.warn("Unsafe tagId: ", tagId);
}
}
@@ -918,7 +918,7 @@ function getAvgWaitingTimeLineChart(chartData, content, yUnit) {
id = file.parent.id;
}
- // 取得 Performance Data
+ // Fetch Performance Data
await performanceStore.getPerformance(type, id);
if(!performanceData.value?.time) {
return;
diff --git a/src/views/Files/Files.vue b/src/views/Files/Files.vue
index ec98b77..1dd4c1a 100644
--- a/src/views/Files/Files.vue
+++ b/src/views/Files/Files.vue
@@ -77,7 +77,7 @@