-
-
-
-
-
-
-
-
-
-
- scan
-
- flush
-
-
- keys: {{ state.dbsize }}
-
-
-
-
-
-
-
- {{ scope.row.type }}
-
-
-
-
- {{ ttlConveter(scope.row.ttl) }}
-
-
-
-
- 查看
- 删除
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 加载更多
+
+ 新增key
+
+ flush
+
+
+ keys: {{ state.dbsize }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ node.label }}
+
+
+ {{ node.label }}
+
+
+ ({{ data.keyCount }})
+
+
+
+
+
+ 新tab打开
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
+
@@ -109,7 +169,7 @@
@@ -118,11 +178,12 @@
diff --git a/mayfly_go_web/src/views/ops/redis/FormatViewer.vue b/mayfly_go_web/src/views/ops/redis/FormatViewer.vue
index 3b4ffd13..edb2dc9d 100644
--- a/mayfly_go_web/src/views/ops/redis/FormatViewer.vue
+++ b/mayfly_go_web/src/views/ops/redis/FormatViewer.vue
@@ -21,6 +21,10 @@ const props = defineProps({
content: {
type: String,
},
+ height: {
+ type: String,
+ default: '0px',
+ },
});
const components = shallowReactive({
@@ -53,14 +57,24 @@ const viewerComponent = computed(() => {
watch(
() => props.content,
(val: any) => {
- state.content = val;
+ setContent(val);
}
);
onMounted(() => {
- state.content = props.content as any;
+ setContent(props.content as any);
});
+const setContent = (content: string) => {
+ state.content = content;
+ try {
+ JSON.parse(content);
+ state.selectedView = 'Json';
+ } catch (e) {
+ state.selectedView = 'Text';
+ }
+};
+
const getContent = () => {
return viewerRef.value.getContent();
};
@@ -90,12 +104,13 @@ defineExpose({ getContent });
}
// 默认文本框样式
+
.format-viewer-container .el-textarea textarea {
font-size: 14px;
- height: calc(100vh - 536px);
+ height: calc(100vh - 536px + v-bind(height));
}
.format-viewer-container .monaco-editor-content {
- height: calc(100vh - 550px) !important;
+ height: calc(100vh - 550px + v-bind(height)) !important;
}
diff --git a/mayfly_go_web/src/views/ops/redis/KeyDetail.vue b/mayfly_go_web/src/views/ops/redis/KeyDetail.vue
index b6c62933..d1af0ac8 100644
--- a/mayfly_go_web/src/views/ops/redis/KeyDetail.vue
+++ b/mayfly_go_web/src/views/ops/redis/KeyDetail.vue
@@ -6,8 +6,9 @@
ref="keyHeader"
:redis-id="redisId"
:db="db"
- :key-info="keyInfo"
+ :key-info="state.keyInfo"
@refresh-content="refreshContent"
+ @del-key="delKey"
@change-key="changeKey"
class="key-header-info"
>
@@ -19,7 +20,7 @@
diff --git a/mayfly_go_web/src/views/ops/redis/ViewerJson.vue b/mayfly_go_web/src/views/ops/redis/ViewerJson.vue
index 506d8da5..ee86a84e 100644
--- a/mayfly_go_web/src/views/ops/redis/ViewerJson.vue
+++ b/mayfly_go_web/src/views/ops/redis/ViewerJson.vue
@@ -4,7 +4,7 @@