Skip to content

Commit

Permalink
adding custom attribute types
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 17, 2021
1 parent fb8c6ef commit fa801f2
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 7 deletions.
107 changes: 100 additions & 7 deletions ui/public/assets/schema/attribute/attribute.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@
"enum": [
"STRING",
"BOOLEAN",
"SELECTION_LIST"
"SELECTION_LIST",
"LONG",
"DOUBLE",
"DURATION",
"SPRING_BEAN_ID"
],
"enumNames": [
"value.string",
"value.boolean",
"value.list"
"value.list",
"value.long",
"value.double",
"value.duration",
"value.spring-bean-id"
]
},
"attributeFriendlyName": {
Expand All @@ -44,6 +52,30 @@
"minLength": 1,
"maxLength": 255
},
"persistFriendlyName": {
"type": "string",
"title": "label.entity-attribute-friendly-name",
"description": "tooltip.entity-attribute-friendly-name",
"minLength": 1,
"maxLength": 255
},
"persistType": {
"type": "string",
"title": "label.entity-attribute-attr-name",
"description": "tooltip.entity-attribute-attr-name",
"minLength": 1,
"maxLength": 255,
"enum": [
"boolean",
"string",
"number"
],
"enumNames": [
"boolean",
"string",
"number"
]
},
"displayName": {
"type": "string",
"title": "label.entity-attribute-display-name",
Expand All @@ -69,7 +101,7 @@
"STRING"
]
},
"defaultValueString": {
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "string"
Expand All @@ -83,12 +115,73 @@
"BOOLEAN"
]
},
"defaultValueBoolean": {
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "string",
"default": "true",
"enumNames": [
"True",
"False"
]
}
}
},
{
"properties": {
"attributeType": {
"enum": [
"DURATION"
]
},
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "string",
"pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$"
}
}
},
{
"properties": {
"attributeType": {
"enum": [
"LONG"
]
},
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "string"
}
}
},
{
"properties": {
"attributeType": {
"enum": [
"DOUBLE"
]
},
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "string"
}
}
},
{
"properties": {
"attributeType": {
"enum": [
"INTEGER"
]
},
"defaultValue": {
"title": "label.entity-attribute-default",
"description": "tooltip.entity-attribute-default",
"type": "boolean",
"default": true,
"enumNames": ["True", "False"]
"type": "string",
"pattern": "^\\d+$"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function App() {
const [showTimeout] = React.useState();

const httpOptions = {
cachePolicy: 'no-cache',
redirect: 'manual',
interceptors: {
request: async ({options, url, path, route}) => {
Expand Down

0 comments on commit fa801f2

Please sign in to comment.