diff --git a/src/api/index.js b/src/api/index.js
index bcddbfd..13326df 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -67,32 +67,33 @@ export const instanceApi = {
runUser,
additionalProperties
}),
- deleteInstance: (instanceName) =>
- api.post('/frpcAct/instanceMgr/delete', { instanceName }),
- modifyInstance: (instanceName, instanceID, type, modifiedData) =>
+ deleteInstance: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/delete', { instanceID }),
+ modifyInstance: (instanceID, type, modifiedData) =>
api.post('/frpcAct/instanceMgr/modify', {
- instanceName,
instanceID,
type,
modifiedData
}),
listInstances: () => api.get('/frpcAct/instanceMgr/list'),
- startInstance: (instanceName) =>
- api.post('/frpcAct/instanceMgr/start', { instanceName }),
- stopInstance: (instanceName) =>
- api.post('/frpcAct/instanceMgr/stop', { instanceName }),
- restartInstance: (instanceName) =>
- api.post('/frpcAct/instanceMgr/restart', { instanceName }),
- getInstanceLogs: (instanceName) =>
- api.get('/frpcAct/instanceMgr/logs', { params: { instanceName } }),
+ startInstance: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/start', { instanceID }),
+ stopInstance: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/stop', { instanceID }),
+ restartInstance: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/restart', { instanceID }),
+ getInstanceStatus: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/status', { instanceID }),
+ getInstanceLogs: (instanceID) =>
+ api.post('/frpcAct/instanceMgr/logs', { instanceID }),
getInstanceProxies: (instanceID) =>
- api.get('/frpcAct/proxyMgr/list', { params: { instanceID } }),
+ api.get(`/frpcAct/proxyMgr/list?instanceID=${instanceID}`),
createProxy: (instanceID, proxyInfo) =>
api.post('/frpcAct/proxyMgr/create', { instanceID, proxyInfo })
};
export const logApi = {
- getLogs: (level) => api.get('/logMgr/list', { params: { level } })
+ getLogs: (level) => api.post('/logMgr/list', { level })
};
export const monitorApi = {
@@ -106,9 +107,6 @@ export const systemInfoApi = {
export default api;
export const TODO_API_NOTES = {
- instanceStart: 'TODO: /frpcAct/instanceMgr/start - 启动实例 API 未在 api-backend.md 中定义',
- instanceStop: 'TODO: /frpcAct/instanceMgr/stop - 停止实例 API 未在 api-backend.md 中定义',
- instanceRestart: 'TODO: /frpcAct/instanceMgr/restart - 重启实例 API 未在 api-backend.md 中定义',
instanceLogs: 'TODO: /frpcAct/instanceMgr/logs - 获取实例日志 API 未在 api-backend.md 中定义',
instanceProxies: 'TODO: /frpcAct/instanceMgr/proxies - 获取实例代理列表 API 未在 api-backend.md 中定义',
logList: 'TODO: /logMgr/list - 获取系统日志 API 未在 api-backend.md 中定义',
diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue
index 3edce4b..feec830 100644
--- a/src/components/TopBar.vue
+++ b/src/components/TopBar.vue
@@ -114,7 +114,7 @@ export default {
onMounted(() => {
checkStatus();
getSoftwareInfo();
- setInterval(checkStatus, 5000);
+ setInterval(checkStatus, 60000);
document.addEventListener('click', closeMenu);
});
diff --git a/src/router/index.js b/src/router/index.js
index 6bb2150..dc78f28 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -21,7 +21,7 @@ const routes = [
component: () => import('../views/Instances.vue')
},
{
- path: 'instances/:name',
+ path: 'instances/:id',
name: 'InstanceDetail',
component: () => import('../views/InstanceDetail.vue')
},
diff --git a/src/views/InstanceDetail.vue b/src/views/InstanceDetail.vue
index 4b28257..13d4861 100644
--- a/src/views/InstanceDetail.vue
+++ b/src/views/InstanceDetail.vue
@@ -4,10 +4,53 @@
-
{{ instanceName }} - Details
+ {{ instanceID }} - Details
+
+
Instance Status
+
+
+
+
+
+
+
+ Status:
+
+ {{ instanceStatus === 'running' ? 'Running' : 'Stopped' }}
+
+
+
+ PID:
+ {{ statusInfo.pid }}
+
+
+ Init System:
+ {{ statusInfo.initSystem }}
+
+
+ Service Name:
+ {{ statusInfo.serviceName }}
+
+
+
+
Configuration