增加Local Agent 和Local Node
This commit is contained in:
parent
b804787f40
commit
860764fa74
0
jcloud/jcloud/pagetype/local_agent/__init__.py
Normal file
0
jcloud/jcloud/pagetype/local_agent/__init__.py
Normal file
8
jcloud/jcloud/pagetype/local_agent/local_agent.js
Normal file
8
jcloud/jcloud/pagetype/local_agent/local_agent.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2025, Jingrow and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
// jingrow.ui.form.on("Local Agent", {
|
||||||
|
// refresh(frm) {
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
136
jcloud/jcloud/pagetype/local_agent/local_agent.json
Normal file
136
jcloud/jcloud/pagetype/local_agent/local_agent.json
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"allow_rename": 1,
|
||||||
|
"creation": "2025-10-22 15:50:31.087391",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"agent_name",
|
||||||
|
"title",
|
||||||
|
"subtitle",
|
||||||
|
"public",
|
||||||
|
"enabled",
|
||||||
|
"column_break_5",
|
||||||
|
"status",
|
||||||
|
"file_url",
|
||||||
|
"repository_url",
|
||||||
|
"team",
|
||||||
|
"agent_image",
|
||||||
|
"section_break_otbv",
|
||||||
|
"description"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "team",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Team",
|
||||||
|
"options": "Team",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "public",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Public"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_5",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "enabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_otbv",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Jeditor",
|
||||||
|
"label": "Description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "repository_url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Repository URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "file_url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "File URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Published\nUnpublished\nDraft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Subtitle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "agent_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Agent Name",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "agent_image",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Agent Image"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [],
|
||||||
|
"modified": "2025-11-02 04:51:31.964965",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Jcloud",
|
||||||
|
"name": "Local Agent",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"read": 1,
|
||||||
|
"role": "Jcloud Member"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"row_format": "Dynamic",
|
||||||
|
"show_title_field_in_link": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"states": [],
|
||||||
|
"title_field": "title",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
28
jcloud/jcloud/pagetype/local_agent/local_agent.py
Normal file
28
jcloud/jcloud/pagetype/local_agent/local_agent.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Copyright (c) 2025, Jingrow and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import jingrow
|
||||||
|
from jingrow.model.page import Page
|
||||||
|
|
||||||
|
|
||||||
|
class LocalAgent(Page):
|
||||||
|
# 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
|
||||||
|
|
||||||
|
agent_image: DF.AttachImage | None
|
||||||
|
agent_name: DF.Data
|
||||||
|
enabled: DF.Check
|
||||||
|
file_url: DF.Data | None
|
||||||
|
public: DF.Check
|
||||||
|
repository_url: DF.Data | None
|
||||||
|
status: DF.Literal["Published", "Unpublished", "Draft"]
|
||||||
|
subtitle: DF.SmallText | None
|
||||||
|
team: DF.Link | None
|
||||||
|
title: DF.Data
|
||||||
|
# end: auto-generated types
|
||||||
|
pass
|
||||||
9
jcloud/jcloud/pagetype/local_agent/test_local_agent.py
Normal file
9
jcloud/jcloud/pagetype/local_agent/test_local_agent.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 TestLocalAgent(JingrowTestCase):
|
||||||
|
pass
|
||||||
0
jcloud/jcloud/pagetype/local_node/__init__.py
Normal file
0
jcloud/jcloud/pagetype/local_node/__init__.py
Normal file
8
jcloud/jcloud/pagetype/local_node/local_node.js
Normal file
8
jcloud/jcloud/pagetype/local_node/local_node.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2025, Jingrow and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
// jingrow.ui.form.on("Local Node", {
|
||||||
|
// refresh(frm) {
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
136
jcloud/jcloud/pagetype/local_node/local_node.json
Normal file
136
jcloud/jcloud/pagetype/local_node/local_node.json
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"allow_rename": 1,
|
||||||
|
"creation": "2025-10-22 15:50:31.087391",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"node_type",
|
||||||
|
"title",
|
||||||
|
"subtitle",
|
||||||
|
"public",
|
||||||
|
"enabled",
|
||||||
|
"column_break_5",
|
||||||
|
"status",
|
||||||
|
"file_url",
|
||||||
|
"repository_url",
|
||||||
|
"team",
|
||||||
|
"node_image",
|
||||||
|
"section_break_otbv",
|
||||||
|
"description"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "team",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Team",
|
||||||
|
"options": "Team",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "public",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Public"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_5",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "enabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_otbv",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Jeditor",
|
||||||
|
"label": "Description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "repository_url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Repository URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "file_url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "File URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Published\nUnpublished\nDraft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Subtitle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "node_type",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Node Type",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "node_image",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Node Image"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [],
|
||||||
|
"modified": "2025-11-02 04:50:27.312179",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Jcloud",
|
||||||
|
"name": "Local Node",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"read": 1,
|
||||||
|
"role": "Jcloud Member"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"row_format": "Dynamic",
|
||||||
|
"show_title_field_in_link": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"states": [],
|
||||||
|
"title_field": "title",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
28
jcloud/jcloud/pagetype/local_node/local_node.py
Normal file
28
jcloud/jcloud/pagetype/local_node/local_node.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Copyright (c) 2025, Jingrow and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import jingrow
|
||||||
|
from jingrow.model.page import Page
|
||||||
|
|
||||||
|
|
||||||
|
class LocalNode(Page):
|
||||||
|
# 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
|
||||||
|
|
||||||
|
enabled: DF.Check
|
||||||
|
file_url: DF.Data | None
|
||||||
|
node_image: DF.AttachImage | None
|
||||||
|
node_type: DF.Data
|
||||||
|
public: DF.Check
|
||||||
|
repository_url: DF.Data | None
|
||||||
|
status: DF.Literal["Published", "Unpublished", "Draft"]
|
||||||
|
subtitle: DF.SmallText | None
|
||||||
|
team: DF.Link | None
|
||||||
|
title: DF.Data
|
||||||
|
# end: auto-generated types
|
||||||
|
pass
|
||||||
9
jcloud/jcloud/pagetype/local_node/test_local_node.py
Normal file
9
jcloud/jcloud/pagetype/local_node/test_local_node.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 TestLocalNode(JingrowTestCase):
|
||||||
|
pass
|
||||||
Loading…
x
Reference in New Issue
Block a user