+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% raw %}{{ scope.row.group_name || scope.row.group_id }}{% endraw %}
+
+
+
+
+
+
+
+
+
+
+
+
+ {% raw %}{{ scope.row.group_name || scope.row.group_id }}{% endraw %}
+
+
+
+
+
+
+
+
+
{% endblock %}
@@ -165,7 +237,10 @@
isEditingConfig: false,
editedConfig: '',
configError: '',
- configFormat: 'toml'
+ configFormat: 'toml',
+ pluginGroupStatusVisible: false,
+ groupStatusLoading: false,
+ pluginGroupStatusData: null
}
},
computed: {
@@ -344,6 +419,43 @@
console.error('获取插件详情出错:', error);
this.$message.error('获取插件详情出错');
});
+ },
+ showPluginGroupStatus(plugin) {
+ // 打开弹窗前先进入加载态,避免用户在慢接口场景下看到旧数据。
+ this.pluginGroupStatusVisible = true;
+ this.groupStatusLoading = true;
+ this.pluginGroupStatusData = null;
+
+ // 统一使用插件模块名查询,和启用/禁用/重载接口参数保持一致。
+ axios.get('/api/plugins/group_status', {
+ params: {
+ plugin_name: plugin.module_name
+ }
+ })
+ .then(response => {
+ if (response.data.success) {
+ // 接口返回已按“已开启/未开启”拆分好,前端仅做展示。
+ this.pluginGroupStatusData = response.data.data || {
+ enabled_groups: [],
+ disabled_groups: [],
+ enabled_count: 0,
+ disabled_count: 0,
+ total_group_count: 0,
+ supports_group_switch: false
+ };
+ } else {
+ this.$message.error(response.data.message || '获取插件群状态失败');
+ this.pluginGroupStatusVisible = false;
+ }
+ })
+ .catch(error => {
+ console.error('获取插件群状态出错:', error);
+ this.$message.error('获取插件群状态出错');
+ this.pluginGroupStatusVisible = false;
+ })
+ .finally(() => {
+ this.groupStatusLoading = false;
+ });
}
}
});
@@ -421,5 +533,26 @@
.config-actions { margin-bottom: 10px; display: flex; gap: 10px; }
.config-editor { font-family: monospace; font-size: 12px; }
.config-error { color: #ef4444; font-size: 12px; margin-top: 5px; }
+ .plugin-group-status-dialog { min-height: 240px; }
+ .group-status-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 14px;
+ gap: 10px;
+ flex-wrap: wrap;
+ }
+ .group-status-title { font-size: 16px; font-weight: 600; color: #0f172a; }
+ .group-status-subtitle { margin-left: 8px; font-size: 12px; color: #64748b; font-weight: 500; }
+ .group-status-summary { display: flex; align-items: center; gap: 8px; }
+ .group-status-alert { margin-bottom: 12px; }
+ .group-status-card { border-radius: 12px; }
+ .group-status-card-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 600;
+ color: #334155;
+ }
{% endblock %}