增加Jsite Server
This commit is contained in:
parent
8957fd3dcb
commit
76d7a5e621
0
jcloud/jcloud/pagetype/jsite_server/__init__.py
Normal file
0
jcloud/jcloud/pagetype/jsite_server/__init__.py
Normal file
8
jcloud/jcloud/pagetype/jsite_server/jsite_server.js
Normal file
8
jcloud/jcloud/pagetype/jsite_server/jsite_server.js
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2025, Jingrow and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
// jingrow.ui.form.on("Jsite Server", {
|
||||
// refresh(frm) {
|
||||
|
||||
// },
|
||||
// });
|
||||
191
jcloud/jcloud/pagetype/jsite_server/jsite_server.json
Normal file
191
jcloud/jcloud/pagetype/jsite_server/jsite_server.json
Normal file
@ -0,0 +1,191 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"creation": "2025-01-27 10:00:00",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"title",
|
||||
"team",
|
||||
"column_break_4",
|
||||
"status",
|
||||
"plan",
|
||||
"server_section",
|
||||
"instance_id",
|
||||
"cpu",
|
||||
"disk_size",
|
||||
"region",
|
||||
"column_break_aliyun",
|
||||
"end_date",
|
||||
"memory",
|
||||
"bandwidth",
|
||||
"ip",
|
||||
"ssh_section",
|
||||
"ssh_user",
|
||||
"ssh_port",
|
||||
"column_break_20",
|
||||
"root_public_key"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"default": "Pending",
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 1,
|
||||
"label": "状态",
|
||||
"options": "Pending\nInstalling\nActive\nBroken\nArchived",
|
||||
"read_only": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"label": "标题",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_4",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "team",
|
||||
"fieldtype": "Link",
|
||||
"label": "团队",
|
||||
"options": "Team"
|
||||
},
|
||||
{
|
||||
"fieldname": "plan",
|
||||
"fieldtype": "Link",
|
||||
"label": "计划",
|
||||
"options": "Server Plan"
|
||||
},
|
||||
{
|
||||
"fetch_from": "virtual_machine.public_ip_address",
|
||||
"fieldname": "ip",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "公网IP",
|
||||
"set_only_once": 1
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "ssh_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "SSH"
|
||||
},
|
||||
{
|
||||
"default": "root",
|
||||
"fieldname": "ssh_user",
|
||||
"fieldtype": "Data",
|
||||
"label": "SSH用户"
|
||||
},
|
||||
{
|
||||
"default": "22",
|
||||
"fieldname": "ssh_port",
|
||||
"fieldtype": "Int",
|
||||
"label": "SSH端口"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_20",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "root_public_key",
|
||||
"fieldtype": "Code",
|
||||
"label": "Root公钥"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_aliyun",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "instance_id",
|
||||
"fieldtype": "Data",
|
||||
"label": "实例ID",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "end_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "到期时间"
|
||||
},
|
||||
{
|
||||
"fieldname": "region",
|
||||
"fieldtype": "Data",
|
||||
"label": "地域",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "server_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "服务器信息"
|
||||
},
|
||||
{
|
||||
"fieldname": "bandwidth",
|
||||
"fieldtype": "Data",
|
||||
"label": "带宽(Mbps)",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "cpu",
|
||||
"fieldtype": "Data",
|
||||
"label": "CPU",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "memory",
|
||||
"fieldtype": "Data",
|
||||
"label": "内存",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "disk_size",
|
||||
"fieldtype": "Data",
|
||||
"label": "硬盘容量",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2025-07-25 22:37:43.914945",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Jcloud",
|
||||
"name": "Jsite Server",
|
||||
"naming_rule": "Set by user",
|
||||
"owner": "Administrator",
|
||||
"pagetype": "PageType",
|
||||
"permissions": [
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"read": 1,
|
||||
"role": "Jcloud Admin",
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"read": 1,
|
||||
"role": "Jcloud Member",
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"row_format": "Dynamic",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "title"
|
||||
}
|
||||
33
jcloud/jcloud/pagetype/jsite_server/jsite_server.py
Normal file
33
jcloud/jcloud/pagetype/jsite_server/jsite_server.py
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (c) 2025, Jingrow and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
# import jingrow
|
||||
from jingrow.model.document import Document
|
||||
|
||||
|
||||
class JsiteServer(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from jingrow.types import DF
|
||||
|
||||
bandwidth: DF.Data | None
|
||||
cpu: DF.Data | None
|
||||
disk_size: DF.Data | None
|
||||
end_date: DF.Date | None
|
||||
instance_id: DF.Data | None
|
||||
ip: DF.Data | None
|
||||
memory: DF.Data | None
|
||||
plan: DF.Link | None
|
||||
region: DF.Data | None
|
||||
root_public_key: DF.Code | None
|
||||
ssh_port: DF.Int
|
||||
ssh_user: DF.Data | None
|
||||
status: DF.Literal["Pending", "Installing", "Active", "Broken", "Archived"]
|
||||
team: DF.Link | None
|
||||
title: DF.Data
|
||||
# end: auto-generated types
|
||||
pass
|
||||
9
jcloud/jcloud/pagetype/jsite_server/test_jsite_server.py
Normal file
9
jcloud/jcloud/pagetype/jsite_server/test_jsite_server.py
Normal file
@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2025, Jingrow and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import jingrow
|
||||
from jingrow.tests.utils import JingrowTestCase
|
||||
|
||||
|
||||
class TestJsiteServer(JingrowTestCase):
|
||||
pass
|
||||
Loading…
x
Reference in New Issue
Block a user