2019-07-01 23:49:13 +02:00
|
|
|
{
|
|
|
|
"hierarchy": {
|
|
|
|
"name": "root",
|
|
|
|
"type": "root",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"name": "application",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 500,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Name",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "domain",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 500,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "domain",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "application_resolve_strategy",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 100,
|
|
|
|
"values": [
|
|
|
|
"domain",
|
|
|
|
"path"
|
|
|
|
],
|
|
|
|
"allowDeclaredValuesOnly": true
|
|
|
|
},
|
|
|
|
"label": "Resolve Application By",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
2019-07-16 23:14:57 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "defaultVersion",
|
|
|
|
"type": "reference",
|
|
|
|
"typeOptions": {
|
|
|
|
"indexNodeKey": "/applications/1-{id}/all_versions",
|
|
|
|
"reverseIndexNodeKeys": [
|
|
|
|
"/applications/1-{id}/versions/3-{id}/isdefault"
|
|
|
|
],
|
|
|
|
"displayValue": "name"
|
|
|
|
},
|
|
|
|
"label": "Default Version",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
2019-07-01 23:49:13 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"name": "user",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
2019-07-05 17:56:53 +02:00
|
|
|
"name": "name",
|
2019-07-01 23:49:13 +02:00
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 200,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Name (unique)",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "active",
|
|
|
|
"type": "bool",
|
|
|
|
"typeOptions": {
|
|
|
|
"allowNulls": false
|
|
|
|
},
|
|
|
|
"label": "Is Active",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
2019-07-09 08:29:50 +02:00
|
|
|
{
|
|
|
|
"name": "createdByMaster",
|
|
|
|
"type": "bool",
|
|
|
|
"typeOptions": {
|
|
|
|
"allowNulls": false
|
|
|
|
},
|
|
|
|
"label": "Created by Master",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
2019-07-01 23:49:13 +02:00
|
|
|
{
|
|
|
|
"name": "instance",
|
|
|
|
"type": "reference",
|
|
|
|
"typeOptions": {
|
|
|
|
"indexNodeKey": "/applications/1-{id}/allinstances",
|
|
|
|
"reverseIndexNodeKeys": [
|
|
|
|
"/applications/1-{id}/instances/2-{id}/users_on_this_instance"
|
|
|
|
],
|
|
|
|
"displayValue": "name"
|
|
|
|
},
|
|
|
|
"label": "Instance",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 8,
|
|
|
|
"indexes": [],
|
|
|
|
"allidsShardFactor": "64",
|
|
|
|
"collectionName": "users",
|
|
|
|
"isSingle": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "instance",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 1000,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Name",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "active",
|
|
|
|
"type": "bool",
|
|
|
|
"typeOptions": {
|
|
|
|
"allowNulls": false
|
|
|
|
},
|
|
|
|
"label": "Is Active",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "version",
|
|
|
|
"type": "reference",
|
|
|
|
"typeOptions": {
|
|
|
|
"indexNodeKey": "/applications/1-{id}/all_versions",
|
|
|
|
"reverseIndexNodeKeys": [
|
|
|
|
"/applications/1-{id}/versions/3-{id}/instances_on_this_version"
|
|
|
|
],
|
|
|
|
"displayValue": "name"
|
|
|
|
},
|
|
|
|
"label": "Version",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "datastoreconfig",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 1000,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Datastore Config",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 2,
|
|
|
|
"indexes": [
|
|
|
|
{
|
|
|
|
"name": "users_on_this_instance",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {...record};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "reference",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [],
|
2019-07-01 23:49:13 +02:00
|
|
|
"nodeId": 15
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"allidsShardFactor": 1,
|
|
|
|
"collectionName": "instances",
|
|
|
|
"isSingle": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "version",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 200,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Name",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
2019-07-03 00:15:15 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "defaultAccessLevel",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 200,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Default Access Level",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
2019-07-01 23:49:13 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 3,
|
|
|
|
"indexes": [
|
|
|
|
{
|
|
|
|
"name": "instances_for_this_version",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {name:record.name};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [],
|
2019-07-01 23:49:13 +02:00
|
|
|
"nodeId": 9
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "instances_on_this_version",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {...record};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "reference",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [],
|
2019-07-01 23:49:13 +02:00
|
|
|
"nodeId": 10
|
2019-07-16 23:14:57 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "isdefault",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "reference",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [],
|
2019-07-16 23:14:57 +02:00
|
|
|
"nodeId": 28
|
2019-07-01 23:49:13 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"allidsShardFactor": 1,
|
|
|
|
"collectionName": "versions",
|
|
|
|
"isSingle": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "session",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "created",
|
|
|
|
"type": "number",
|
|
|
|
"typeOptions": {
|
|
|
|
"minValue": 0,
|
|
|
|
"maxValue": 99999999999999,
|
|
|
|
"decimalPlaces": 0
|
|
|
|
},
|
|
|
|
"label": "Created",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "user_json",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "User Json",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "instanceDatastoreConfig",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Instance Datastore Config",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
2019-07-09 08:29:50 +02:00
|
|
|
{
|
|
|
|
"name": "instanceKey",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Instance Key",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
2019-07-07 10:03:37 +02:00
|
|
|
{
|
|
|
|
"name": "instanceVersion",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "Instance Version",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
2019-07-01 23:49:13 +02:00
|
|
|
{
|
|
|
|
"name": "username",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "User",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 16,
|
|
|
|
"indexes": [],
|
|
|
|
"allidsShardFactor": 1,
|
|
|
|
"collectionName": "sessions",
|
|
|
|
"isSingle": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 1,
|
|
|
|
"indexes": [
|
|
|
|
{
|
|
|
|
"name": "allinstances",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {...record};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
2
|
|
|
|
],
|
|
|
|
"nodeId": 23
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "sessions_by_user",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {username:record.username};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "return record.username.substring(0,2)",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"nodeId": 24
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "user_name_lookup",
|
|
|
|
"type": "index",
|
2019-07-05 17:56:53 +02:00
|
|
|
"map": "return ({name:record.name, instanceKey:record.instance.key ? record.instance.key : '', instanceDatastoreConfig:record.instance.datastoreconfig ? record.instance.datastoreconfig : 'nothing'});",
|
2019-07-01 23:49:13 +02:00
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "return record.name.substring(0,2)",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"nodeId": 25
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "all_versions",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {...record};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
3
|
|
|
|
],
|
|
|
|
"nodeId": 26
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"allidsShardFactor": 64,
|
|
|
|
"collectionName": "applications",
|
|
|
|
"isSingle": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "mastersession",
|
|
|
|
"type": "record",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "user_json",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": 10000,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "User Json",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "username",
|
|
|
|
"type": "string",
|
|
|
|
"typeOptions": {
|
|
|
|
"maxLength": null,
|
|
|
|
"values": null,
|
|
|
|
"allowDeclaredValuesOnly": false
|
|
|
|
},
|
|
|
|
"label": "User",
|
|
|
|
"getInitialValue": "default",
|
|
|
|
"getUndefinedValue": "default"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"children": [],
|
|
|
|
"validationRules": [],
|
|
|
|
"nodeId": 17,
|
|
|
|
"indexes": [],
|
|
|
|
"allidsShardFactor": 64,
|
|
|
|
"collectionName": "sessions",
|
|
|
|
"isSingle": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"pathMaps": [],
|
|
|
|
"indexes": [
|
|
|
|
{
|
|
|
|
"name": "all_applications",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {...record};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"nodeId": 22
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "mastersessions_by_user",
|
|
|
|
"type": "index",
|
|
|
|
"map": "return {username:record.username};",
|
|
|
|
"filter": "",
|
|
|
|
"indexType": "ancestor",
|
|
|
|
"getShardName": "return record.username.substring(0,2)",
|
|
|
|
"getSortKey": "record.id",
|
|
|
|
"aggregateGroups": [],
|
2020-04-14 11:19:14 +02:00
|
|
|
"allowedModelNodeIds": [
|
2019-07-01 23:49:13 +02:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"nodeId": 27
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nodeId": 0
|
|
|
|
},
|
|
|
|
"triggers": [
|
|
|
|
{
|
|
|
|
"actionName": "initialise_instance",
|
|
|
|
"eventName": "recordApi:save:onRecordCreated",
|
2019-07-05 17:56:53 +02:00
|
|
|
"optionsCreator": "return ({ instance:context.record, apis });",
|
|
|
|
"condition": "context.record.type === \"instance\""
|
2019-07-03 00:15:15 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"actionName": "create_user",
|
|
|
|
"eventName": "recordApi:save:onRecordCreated",
|
|
|
|
"optionsCreator": "return ({ user:context.record, apis });",
|
2019-07-09 08:29:50 +02:00
|
|
|
"condition": "context.record.type === \"user\" && context.record.createdByMaster === true"
|
2019-07-01 23:49:13 +02:00
|
|
|
}
|
2019-09-09 09:50:15 +02:00
|
|
|
],
|
2020-02-12 13:45:24 +01:00
|
|
|
"actions": [
|
|
|
|
{
|
2019-09-12 07:10:50 +02:00
|
|
|
"name": "initialise_instance",
|
|
|
|
"behaviourSource": "main",
|
|
|
|
"behaviourName": "initialiseInstance",
|
|
|
|
"initialOptions": {}
|
|
|
|
},
|
2020-02-12 13:45:24 +01:00
|
|
|
{
|
2019-09-12 07:10:50 +02:00
|
|
|
"name": "create_user",
|
|
|
|
"behaviourSource": "main",
|
|
|
|
"behaviourName": "createNewUser",
|
|
|
|
"initialOptions": {}
|
|
|
|
},
|
2020-02-12 13:45:24 +01:00
|
|
|
{
|
2019-09-12 07:10:50 +02:00
|
|
|
"name": "set_default_version",
|
|
|
|
"behaviourSource": "main",
|
|
|
|
"behaviourName": "setDefaultVersion",
|
|
|
|
"initialOptions": {}
|
|
|
|
}
|
2020-02-12 13:45:24 +01:00
|
|
|
]
|
2020-04-14 11:19:14 +02:00
|
|
|
}
|