修改模版内容

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

@@ -275,24 +275,24 @@ BigDataTool采用模块化分层架构设计
### Cassandra配置
```json
{
"cluster_name": "生产集群",
"hosts": ["192.168.1.100", "192.168.1.101"],
"cluster_name": "示例集群",
"hosts": ["127.0.0.1", "127.0.0.2"],
"port": 9042,
"datacenter": "dc1",
"username": "cassandra",
"password": "password",
"keyspace": "my_keyspace",
"table": "my_table"
"keyspace": "example_keyspace",
"table": "example_table"
}
```
### Redis配置
```json
{
"name": "生产Redis",
"name": "示例Redis",
"nodes": [
{"host": "192.168.1.200", "port": 7000},
{"host": "192.168.1.201", "port": 7001}
{"host": "127.0.0.1", "port": 6379},
{"host": "127.0.0.2", "port": 6379}
],
"password": "redis_password",
"socket_timeout": 3,

View File

@@ -83,16 +83,16 @@ def create_connection(config):
使用示例:
config = {
'hosts': ['192.168.1.100', '192.168.1.101'],
'hosts': ['127.0.0.1'],
'port': 9042,
'username': 'cassandra',
'password': 'password',
'keyspace': 'my_keyspace',
'keyspace': 'example_keyspace',
'datacenter': 'dc1'
}
cluster, session = create_connection(config)
if session:
result = session.execute("SELECT * FROM my_table LIMIT 10")
result = session.execute("SELECT * FROM example_table LIMIT 10")
cluster.shutdown()
"""
start_time = time.time()

View File

@@ -65,7 +65,7 @@ def get_redis_value_with_type(redis_client, key):
- 数据异常:记录警告并提供基本信息
示例:
>>> result = get_redis_value_with_type(client, "user:1001")
>>> result = get_redis_value_with_type(client, "user:example")
>>> print(result['type']) # 'string'
>>> print(result['value']) # 'John Doe'
>>> print(result['exists']) # True

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"]
}
}`;
}

View File

@@ -475,7 +475,7 @@
<div class="row mt-2">
<div class="col-8">
<label class="form-label">集群节点 (逗号分隔)</label>
<input type="text" class="form-control form-control-sm" id="pro_hosts" placeholder="10.20.2.22,10.20.2.23">
<input type="text" class="form-control form-control-sm" id="pro_hosts" placeholder="127.0.0.1,127.0.0.2">
</div>
<div class="col-4">
<label class="form-label">端口</label>
@@ -485,7 +485,7 @@
<div class="row mt-2">
<div class="col-6">
<label class="form-label">用户名</label>
<input type="text" class="form-control form-control-sm" id="pro_username" placeholder="cbase">
<input type="text" class="form-control form-control-sm" id="pro_username" placeholder="username">
</div>
<div class="col-6">
<label class="form-label">密码</label>
@@ -495,11 +495,11 @@
<div class="row mt-2">
<div class="col-6">
<label class="form-label">Keyspace</label>
<input type="text" class="form-control form-control-sm" id="pro_keyspace" placeholder="yuqing_skinny">
<input type="text" class="form-control form-control-sm" id="pro_keyspace" placeholder="keyspace">
</div>
<div class="col-6">
<label class="form-label">表名</label>
<input type="text" class="form-control form-control-sm" id="pro_table" placeholder="document">
<input type="text" class="form-control form-control-sm" id="pro_table" placeholder="tablename">
<small class="form-text text-muted" id="pro_table_hint">完整表名或基础表名(分表时)</small>
</div>
</div>
@@ -528,7 +528,7 @@
<div class="row mt-2">
<div class="col-8">
<label class="form-label">集群节点 (逗号分隔)</label>
<input type="text" class="form-control form-control-sm" id="test_hosts" placeholder="10.20.2.22,10.20.2.23">
<input type="text" class="form-control form-control-sm" id="test_hosts" placeholder="127.0.0.1,127.0.0.2">
</div>
<div class="col-4">
<label class="form-label">端口</label>
@@ -538,7 +538,7 @@
<div class="row mt-2">
<div class="col-6">
<label class="form-label">用户名</label>
<input type="text" class="form-control form-control-sm" id="test_username" placeholder="cbase">
<input type="text" class="form-control form-control-sm" id="test_username" placeholder="username">
</div>
<div class="col-6">
<label class="form-label">密码</label>
@@ -548,11 +548,11 @@
<div class="row mt-2">
<div class="col-6">
<label class="form-label">Keyspace</label>
<input type="text" class="form-control form-control-sm" id="test_keyspace" placeholder="yuqing_skinny">
<input type="text" class="form-control form-control-sm" id="test_keyspace" placeholder="keyspace">
</div>
<div class="col-6">
<label class="form-label">表名</label>
<input type="text" class="form-control form-control-sm" id="test_table" placeholder="document_test">
<input type="text" class="form-control form-control-sm" id="test_table" placeholder="tablename">
<small class="form-text text-muted" id="test_table_hint">完整表名或基础表名(分表时)</small>
</div>
</div>

View File

@@ -495,7 +495,7 @@
</div>
<div id="specifiedOptions" class="mt-2" style="display: none;">
<label class="form-label">Key列表 (每行一个)</label>
<textarea class="form-control query-keys" id="specifiedKeys" rows="6" placeholder="输入要查询的Key每行一个&#10;例如:&#10;user:1001&#10;user:1002&#10;session:abc123"></textarea>
<textarea class="form-control query-keys" id="specifiedKeys" rows="6" placeholder="输入要查询的Key每行一个&#10;例如:&#10;user:example1&#10;user:example2&#10;session:abc123"></textarea>
<small class="form-text text-muted">支持大批量Key查询建议单次不超过1000个</small>
</div>
</div>
@@ -720,7 +720,7 @@
<div id="textImportSection">
<div class="mb-3">
<label for="configYamlText" class="form-label">YAML配置内容</label>
<textarea class="form-control" id="configYamlText" rows="8" placeholder="请粘贴YAML格式的配置内容例如&#10;clusterName: &quot;redis-test&quot;&#10;clusterAddress: &quot;10.20.2.109:6470,10.20.2.109:6570&quot;&#10;clusterPassword: &quot;&quot;"></textarea>
<textarea class="form-control" id="configYamlText" rows="8" placeholder="请粘贴YAML格式的配置内容例如&#10;clusterName: &quot;redis-example&quot;&#10;clusterAddress: &quot;127.0.0.1:6379&quot;&#10;clusterPassword: &quot;&quot;"></textarea>
</div>
</div>