227 lines
5.9 KiB
JSON
227 lines
5.9 KiB
JSON
{
|
|
"name": "New Instance",
|
|
"description": "",
|
|
"url": "",
|
|
"uiFunctions": "",
|
|
"props": {
|
|
"_component": "@budibase/standard-components/container",
|
|
"_styles": {
|
|
"position": {},
|
|
"layout": {}
|
|
},
|
|
"_id": "68a36c10-4c45-47fe-a435-3e05ff5ff91a",
|
|
"_code": "const routeId = route && route.id ? route.id : \"(no route id)\"\n\nrender({\n instanceCollectionKey: `/applications/${routeId}/instances`,\n applicationUrl: `/application/${routeId}`, \n usersCollectionKey: `/applications/${routeId}/users`\n})",
|
|
"className": "",
|
|
"onLoad": [
|
|
{
|
|
"##eventHandlerType": "Get New Record",
|
|
"parameters": {
|
|
"collectionKey": "context.instanceCollectionKey",
|
|
"childRecordType": "instance",
|
|
"statePath": "instance"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Get New Record",
|
|
"parameters": {
|
|
"collectionKey": "context.usersCollectionKey",
|
|
"childRecordType": "user",
|
|
"statePath": "user"
|
|
}
|
|
}
|
|
],
|
|
"type": "div",
|
|
"backgroundColor": "",
|
|
"color": "",
|
|
"borderWidth": "",
|
|
"borderColor": "",
|
|
"borderStyle": "none",
|
|
"_children": [
|
|
{
|
|
"_component": "@budibase/materialdesign-components/H4",
|
|
"_styles": {
|
|
"position": {},
|
|
"layout": {}
|
|
},
|
|
"_id": "6f7c34e3-9f26-4710-bd92-123577bb7bf1",
|
|
"_code": "",
|
|
"text": "Create New Instance",
|
|
"_children": []
|
|
},
|
|
{
|
|
"_component": "@budibase/materialdesign-components/Textfield",
|
|
"_styles": {
|
|
"position": {},
|
|
"layout": {}
|
|
},
|
|
"_id": "f81c06f3-1dbc-47f8-ac3e-d62f24f5b421",
|
|
"_code": "",
|
|
"onChange": [],
|
|
"value": "state.instance.name",
|
|
"label": "Instance Name",
|
|
"variant": "standard",
|
|
"disabled": false,
|
|
"fullwidth": false,
|
|
"colour": "primary",
|
|
"size": "medium",
|
|
"type": "text",
|
|
"required": false,
|
|
"minLength": 0,
|
|
"maxLength": 0,
|
|
"helperText": "",
|
|
"errorText": "",
|
|
"placeholder": "",
|
|
"icon": "",
|
|
"trailingIcon": false,
|
|
"textarea": false,
|
|
"rows": 0,
|
|
"cols": 0,
|
|
"validation": false,
|
|
"persistent": false,
|
|
"_children": []
|
|
},
|
|
{
|
|
"_component": "@budibase/materialdesign-components/Textfield",
|
|
"_styles": {
|
|
"position": {},
|
|
"layout": {}
|
|
},
|
|
"_id": "02450f9e-b84b-4edb-ad3d-b241f75ee042",
|
|
"_code": "",
|
|
"onChange": [],
|
|
"value": "state.user.name",
|
|
"label": "Initial User Name",
|
|
"variant": "standard",
|
|
"disabled": false,
|
|
"fullwidth": false,
|
|
"colour": "primary",
|
|
"size": "medium",
|
|
"type": "text",
|
|
"required": false,
|
|
"minLength": 0,
|
|
"maxLength": 0,
|
|
"helperText": "",
|
|
"errorText": "",
|
|
"placeholder": "",
|
|
"icon": "",
|
|
"trailingIcon": false,
|
|
"textarea": false,
|
|
"rows": 0,
|
|
"cols": 0,
|
|
"validation": false,
|
|
"persistent": false,
|
|
"_children": []
|
|
},
|
|
{
|
|
"_component": "@budibase/standard-components/container",
|
|
"_styles": {
|
|
"position": {
|
|
"column": [
|
|
"",
|
|
""
|
|
],
|
|
"row": [
|
|
"",
|
|
""
|
|
],
|
|
"margin": [
|
|
"",
|
|
"",
|
|
"",
|
|
""
|
|
],
|
|
"padding": [
|
|
"",
|
|
"",
|
|
"",
|
|
""
|
|
],
|
|
"height": [
|
|
""
|
|
],
|
|
"width": [
|
|
""
|
|
],
|
|
"zindex": [
|
|
""
|
|
]
|
|
},
|
|
"layout": {
|
|
"templaterows": [
|
|
""
|
|
],
|
|
"templatecolumns": [
|
|
"auto auto"
|
|
]
|
|
}
|
|
},
|
|
"_id": "8269245d-45c2-40b8-bd69-a1db904a9f54",
|
|
"_code": "",
|
|
"className": "",
|
|
"onLoad": [],
|
|
"type": "div",
|
|
"backgroundColor": "",
|
|
"color": "",
|
|
"borderWidth": "",
|
|
"borderColor": "",
|
|
"borderStyle": "none",
|
|
"_children": [
|
|
{
|
|
"_component": "@budibase/materialdesign-components/Button",
|
|
"_styles": {
|
|
"position": {},
|
|
"layout": {}
|
|
},
|
|
"_id": "4978fe3d-7b44-4d5d-bb02-fe001c3a11b2",
|
|
"_code": "",
|
|
"onClick": [
|
|
{
|
|
"##eventHandlerType": "Set State",
|
|
"parameters": {
|
|
"path": "instance.active",
|
|
"value": "true"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Save Record",
|
|
"parameters": {
|
|
"statePath": "instance"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Set State",
|
|
"parameters": {
|
|
"path": "user.active",
|
|
"value": "true"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Set State",
|
|
"parameters": {
|
|
"path": "user.instance.key",
|
|
"value": "state.instance.key"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Save Record",
|
|
"parameters": {
|
|
"statePath": "user"
|
|
}
|
|
}
|
|
],
|
|
"variant": "text",
|
|
"colour": "primary",
|
|
"size": "medium",
|
|
"href": "",
|
|
"icon": "",
|
|
"trailingIcon": false,
|
|
"fullwidth": false,
|
|
"text": "Create Instance",
|
|
"disabled": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"route": "/application/:id/newinstance"
|
|
}
|