diff --git a/src/pages/Analysis.vue b/src/pages/Analysis.vue
index 71159c6f763c9fa037c7756be3504a1fcc4e162a..2f513efd2d5268a52cc03e4e946ebad94a992774 100644
--- a/src/pages/Analysis.vue
+++ b/src/pages/Analysis.vue
@@ -31,6 +31,10 @@
+
+
+
+
diff --git a/src/pages/Login.vue b/src/pages/Login.vue
index de60b93dce16c89ce05a915ebe3dd696773a9047..d8f1346a9d96679dee7dcd33ec6921af3f229397 100644
--- a/src/pages/Login.vue
+++ b/src/pages/Login.vue
@@ -53,6 +53,8 @@
+
diff --git a/src/pages/Tuning.vue b/src/pages/Tuning.vue
index 863aed7111a101e80fce343eca3bc17beecb2b7b..a17b826c7541f971f279aac545e7ce11cadb088e 100644
--- a/src/pages/Tuning.vue
+++ b/src/pages/Tuning.vue
@@ -48,6 +48,10 @@
+
+
+
+
diff --git a/src/static/js/analysis.js b/src/static/js/analysis.js
index 7725c939c06a1dfb46456cb1212ffa87f12be127..b4ce9f4f64b7fd261c4e59382fc8d3b61fc89ead 100644
--- a/src/static/js/analysis.js
+++ b/src/static/js/analysis.js
@@ -121,6 +121,34 @@ export default {
}
});
},
+ // 从命令数据跳转到分析详情页面
+ goToAnalysisDetails(cid) {
+ const path = `http://${engineHost}:${enginePort}/v1/UI/command/getCommandDetails`;
+ var params = { cid: cid };
+ axios.get(path, { params: params }, { 'Access-Control-Allow-Origin': '*' }).then((res) => {
+ if (typeof (res.data) === 'string') {
+ res.data = JSON.parse(res.data);
+ }
+ if (res.data.status === 'success') {
+ const command = res.data.data;
+ if (command.type === 'analysis') {
+ this.$router.push({
+ path: '/analysis/details',
+ name: 'AnalysisDetails',
+ params: {
+ name: command.name,
+ status: command.status,
+ optionCompare: this.optionCompare
+ }
+ });
+ } else {
+ this.$q.notify('Command type is not analysis');
+ }
+ } else {
+ this.$q.notify('Failed to get command details');
+ }
+ });
+ }
},
created() {
if (localStorage.getItem('userId') === null && localStorage.getItem('connectDB') !== 'false') {
diff --git a/src/static/js/login.js b/src/static/js/login.js
index ac89e3f3ff72a6f3fe058e61a71629c5806add61..5797f082ea43e35809ee69c475a73a64a041dff2 100644
--- a/src/static/js/login.js
+++ b/src/static/js/login.js
@@ -102,6 +102,19 @@ export default{
}
});
},
+ fetchSevenDayData() {
+ const path = `http://${engineHost}:${enginePort}/v1/UI/user/sevenDays`;
+ axios.get(path, {'Access-Control-Allow-Origin': '*'}).then((res) => {
+ const data = res.data;
+ let output = '';
+ for (const [key, value] of Object.entries(data)) {
+ output += `${key}: ${value}\n`;
+ }
+ document.getElementById('seven-day-data').innerText = output;
+ }).catch((error) => {
+ console.error('Error fetching seven day data:', error);
+ });
+ },
checkLogin() {
this.clearAll();
const path = `http://${engineHost}:${enginePort}/v1/UI/user/login`;
@@ -123,6 +136,7 @@ export default{
document.getElementById('login-incorrect-error').style.display = 'block';
}
});
+ this.fetchSevenDayData();
},
checkSignup() {
this.clearAll();
diff --git a/src/static/js/tuning.js b/src/static/js/tuning.js
index 56517aa9ba759fa4d10dc90914e7239ce41450d9..02011c786d0731e7135436b9fdcb90b858603c25 100644
--- a/src/static/js/tuning.js
+++ b/src/static/js/tuning.js
@@ -126,6 +126,34 @@ export default {
this.getFileList('all');
}
});
+ },
+ // 从命令数据跳转到调优详情页面
+ goToTuningDetails(cid) {
+ const path = `http://${engineHost}:${enginePort}/v1/UI/command/getCommandDetails`;
+ var params = { cid: cid };
+ axios.get(path, { params: params }, { 'Access-Control-Allow-Origin': '*' }).then((res) => {
+ if (typeof (res.data) === 'string') {
+ res.data = JSON.parse(res.data);
+ }
+ if (res.data.status === 'success') {
+ const command = res.data.data;
+ if (command.type === 'tuning') {
+ this.$router.push({
+ path: '/tuning/details',
+ name: 'TuningDetails',
+ params: {
+ name: command.name,
+ status: command.status,
+ optionCompare: this.optionCompare
+ }
+ });
+ } else {
+ this.$q.notify('Command type is not tuning');
+ }
+ } else {
+ this.$q.notify('Failed to get command details');
+ }
+ });
}
},