前端Jsite Server详情页增加内网IP字段
This commit is contained in:
parent
b72a4b2031
commit
3d1319b228
@ -214,10 +214,6 @@
|
||||
</div>
|
||||
<div class="p-5">
|
||||
<div class="space-y-3">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">公网IP:</span>
|
||||
<span class="font-mono text-gray-900">{{ $jsiteServer.pg.public_ip || '未分配' }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">SSH端口:</span>
|
||||
<span class="font-mono text-gray-900">{{ $jsiteServer.pg.ssh_port || '22' }}</span>
|
||||
@ -705,7 +701,15 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '实例ID',
|
||||
value: this.$jsiteServer.pg?.instance_id || '未分配',
|
||||
value: this.$jsiteServer.pg?.instance_id || '',
|
||||
},
|
||||
{
|
||||
label: '公网IP',
|
||||
value: this.$jsiteServer.pg?.public_ip || '',
|
||||
},
|
||||
{
|
||||
label: '内网IP',
|
||||
value: this.$jsiteServer.pg?.private_ip || '',
|
||||
},
|
||||
{
|
||||
label: '区域',
|
||||
@ -713,7 +717,7 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '系统',
|
||||
value: this.$jsiteServer.pg?.system || '未知',
|
||||
value: this.$jsiteServer.pg?.system || '',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
@ -29,6 +29,7 @@ export default {
|
||||
'memory',
|
||||
'disk_size',
|
||||
'public_ip',
|
||||
'private_ip',
|
||||
'end_date',
|
||||
'bandwidth',
|
||||
'team',
|
||||
|
||||
@ -1525,6 +1525,8 @@ def update_server_record(instance_ids):
|
||||
|
||||
server.public_ip = instance_info.get('public_ip_address')
|
||||
|
||||
server.private_ip = instance_info.get('inner_ip_address') or instance_info.get('network_attributes', [{}])[0].get('private_ip_address')
|
||||
|
||||
# 更新end_date(从expired_time转换)
|
||||
expired_time = instance_info.get('expired_time')
|
||||
if expired_time:
|
||||
@ -1588,6 +1590,7 @@ def update_server_record(instance_ids):
|
||||
"message": "服务器信息更新成功",
|
||||
"updated_fields": {
|
||||
"public_ip": instance_info.get('public_ip_address'),
|
||||
"private_ip": server.private_ip,
|
||||
"end_date": server.end_date,
|
||||
"status": instance_info.get('status'),
|
||||
"system": server.system,
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"status",
|
||||
"order_id",
|
||||
"planid",
|
||||
"end_date",
|
||||
"auto_renew",
|
||||
"server_section",
|
||||
"instance_id",
|
||||
@ -22,10 +23,10 @@
|
||||
"system",
|
||||
"image_id",
|
||||
"column_break_aliyun",
|
||||
"end_date",
|
||||
"memory",
|
||||
"bandwidth",
|
||||
"public_ip",
|
||||
"private_ip",
|
||||
"os_type",
|
||||
"period",
|
||||
"ssh_section",
|
||||
@ -230,11 +231,19 @@
|
||||
"fieldtype": "Table",
|
||||
"label": "Firewall Rules",
|
||||
"options": "Firewall Rules"
|
||||
},
|
||||
{
|
||||
"fetch_from": "virtual_machine.public_ip_address",
|
||||
"fieldname": "private_ip",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "内网IP",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2025-08-09 17:37:10.451472",
|
||||
"modified": "2025-08-15 15:19:18.272352",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Jcloud",
|
||||
"name": "Jsite Server",
|
||||
|
||||
@ -12,6 +12,7 @@ class JsiteServer(Document):
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from jcloud.jcloud.pagetype.firewall_rules.firewall_rules import FirewallRules
|
||||
from jingrow.types import DF
|
||||
|
||||
auto_renew: DF.Check
|
||||
@ -19,7 +20,7 @@ class JsiteServer(Document):
|
||||
cpu: DF.Data | None
|
||||
disk_size: DF.Data | None
|
||||
end_date: DF.Datetime | None
|
||||
firewall_rules: DF.Data | None
|
||||
firewall_rules: DF.Table[FirewallRules]
|
||||
image_id: DF.Data | None
|
||||
instance_id: DF.Data | None
|
||||
key_pair_name: DF.Data | None
|
||||
@ -31,6 +32,7 @@ class JsiteServer(Document):
|
||||
plan_price: DF.Int
|
||||
plan_type: DF.Data | None
|
||||
planid: DF.Data | None
|
||||
private_ip: DF.Data | None
|
||||
private_key: DF.Text | None
|
||||
public_ip: DF.Data | None
|
||||
region: DF.Data | None
|
||||
@ -50,6 +52,7 @@ class JsiteServer(Document):
|
||||
"memory",
|
||||
"disk_size",
|
||||
"public_ip",
|
||||
"private_ip",
|
||||
"end_date",
|
||||
"bandwidth",
|
||||
"team",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user