更新服务器实例信息时增加更新系统类型字段
This commit is contained in:
parent
40967ea9e9
commit
40559c299d
@ -1084,7 +1084,10 @@ def update_server_record(instance_ids):
|
||||
if image_info:
|
||||
image_name = image_info.get('image_name', '')
|
||||
image_version = image_info.get('image_version', '')
|
||||
os_type = image_info.get('os_type', '')
|
||||
|
||||
server.system = f"{image_name} {image_version}".strip()
|
||||
server.os_type = os_type
|
||||
|
||||
# 更新资源规格信息
|
||||
resource_spec = instance_info.get('resource_spec', {})
|
||||
@ -1105,7 +1108,8 @@ def update_server_record(instance_ids):
|
||||
"public_ip": public_ip,
|
||||
"end_date": server.end_date,
|
||||
"status": server.status,
|
||||
"system": server.system
|
||||
"system": server.system,
|
||||
"os_type": server.os_type
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"bandwidth",
|
||||
"public_ip",
|
||||
"image_id",
|
||||
"support_platform",
|
||||
"os_type",
|
||||
"ssh_section",
|
||||
"ssh_user",
|
||||
"ssh_port",
|
||||
@ -201,14 +201,14 @@
|
||||
"label": "套餐价格(元/月)"
|
||||
},
|
||||
{
|
||||
"fieldname": "support_platform",
|
||||
"fieldname": "os_type",
|
||||
"fieldtype": "Data",
|
||||
"label": "支持平台"
|
||||
"label": "系统类型"
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2025-07-30 22:05:00.093363",
|
||||
"modified": "2025-07-30 22:13:52.117023",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Jcloud",
|
||||
"name": "Jsite Server",
|
||||
|
||||
@ -23,6 +23,7 @@ class JsiteServer(Document):
|
||||
key_pair_name: DF.Data | None
|
||||
memory: DF.Data | None
|
||||
order_id: DF.Data | None
|
||||
os_type: DF.Data | None
|
||||
password: DF.Password | None
|
||||
period: DF.Int
|
||||
plan_price: DF.Int
|
||||
@ -33,7 +34,6 @@ class JsiteServer(Document):
|
||||
ssh_port: DF.Int
|
||||
ssh_user: DF.Data | None
|
||||
status: DF.Literal["Pending", "Starting", "Running", "Stopping", "Stopped", "Resetting", "Upgrading", "Disabled"]
|
||||
support_platform: DF.Data | None
|
||||
system: DF.Data | None
|
||||
team: DF.Link | None
|
||||
title: DF.Data | None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user