修改模版内容

This commit is contained in:
2025-08-12 16:27:00 +08:00
parent fbca92ba77
commit cdf7e36ba3
7 changed files with 51 additions and 51 deletions

View File

@@ -3356,14 +3356,14 @@ function showImportDialog(env) {
<p class="text-muted mb-3">请粘贴配置数据,支持以下格式:</p>
<div class="mb-3">
<small class="text-muted">示例格式:</small>
<pre class="bg-light p-2 rounded small">clusterName: "Hot Cluster"
clusterNodes: "10.20.2.22,10.20.2.23"
<pre class="bg-light p-2 rounded small">clusterName: "Example Cluster"
clusterNodes: "127.0.0.1,127.0.0.2"
port: 9042
datacenter: "cs01"
username: "cbase"
password: "antducbaseadmin@2022"
keyspace: "yuqing_skinny"
table: "status_test"</pre>
datacenter: "dc1"
username: "cassandra"
password: "example_password"
keyspace: "example_keyspace"
table: "example_table"</pre>
</div>
<div class="mb-3">
<label class="form-label">配置数据:</label>

View File

@@ -1665,30 +1665,30 @@ function updateConfigTemplate() {
if (format === 'yaml') {
templateElement.textContent = `# Redis集群配置示例 (YAML格式)
cluster1:
clusterName: "redis-production"
clusterAddress: "10.20.2.109:6470"
clusterName: "redis-example1"
clusterAddress: "127.0.0.1:6379"
clusterPassword: ""
cachePrefix: "message.status.Reader."
cacheTtl: 2000
async: true
nodes:
- host: "10.20.2.109"
port: 6470
- host: "10.20.2.110"
port: 6470
- host: "127.0.0.1"
port: 6379
- host: "127.0.0.2"
port: 6379
cluster2:
clusterName: "redis-test"
clusterAddress: "10.20.2.109:6471"
clusterName: "redis-example2"
clusterAddress: "127.0.0.1:6380"
clusterPassword: ""
cachePrefix: "message.status.Reader."
cacheTtl: 2000
async: true
nodes:
- host: "10.20.2.109"
port: 6471
- host: "10.20.2.110"
port: 6471
- host: "127.0.0.1"
port: 6380
- host: "127.0.0.2"
port: 6380
queryOptions:
mode: "random" # random 或 specified
@@ -1697,32 +1697,32 @@ queryOptions:
sourceCluster: "cluster2"
# 指定Key模式下的键值列表
keys:
- "user:1001"
- "user:1002"`;
- "user:example1"
- "user:example2"`;
} else {
templateElement.textContent = `{
"cluster1": {
"clusterName": "redis-production",
"clusterAddress": "10.20.2.109:6470",
"clusterName": "redis-example1",
"clusterAddress": "127.0.0.1:6379",
"clusterPassword": "",
"cachePrefix": "message.status.Reader.",
"cacheTtl": 2000,
"async": true,
"nodes": [
{"host": "10.20.2.109", "port": 6470},
{"host": "10.20.2.110", "port": 6470}
{"host": "127.0.0.1", "port": 6379},
{"host": "127.0.0.2", "port": 6379}
]
},
"cluster2": {
"clusterName": "redis-test",
"clusterAddress": "10.20.2.109:6471",
"clusterName": "redis-example2",
"clusterAddress": "127.0.0.1:6380",
"clusterPassword": "",
"cachePrefix": "message.status.Reader.",
"cacheTtl": 2000,
"async": true,
"nodes": [
{"host": "10.20.2.109", "port": 6471},
{"host": "10.20.2.110", "port": 6471}
{"host": "127.0.0.1", "port": 6380},
{"host": "127.0.0.2", "port": 6380}
]
},
"queryOptions": {
@@ -1730,7 +1730,7 @@ queryOptions:
"count": 100,
"pattern": "*",
"sourceCluster": "cluster2",
"keys": ["user:1001", "user:1002"]
"keys": ["user:example1", "user:example2"]
}
}`;
}