Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCK-7370, HCK-7371: details tab of any object only declared tag at sc #132

59 changes: 59 additions & 0 deletions adapter/0.2.7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Copyright © 2016-2024 by IntegrIT S.A. dba Hackolade. All rights reserved.
*
* The copyright to the computer software herein is the property of IntegrIT S.A.
* The software may be used and/or copied only with the written permission of
* IntegrIT S.A. or in accordance with the terms and conditions stipulated in
* the agreement/contract under which the software has been supplied.
*
* {
* "add": {
* "entity": [<names of new property>],
* "container": [<names of new property>],
* "model": [<names of new property>],
* "view": [<names of new property>],
* "field": {
* "<type>": [<names of new property>]
* }
* },
* "delete": {
* "entity": [<names of new property>],
* "container": [<names of new property>],
* "model": [<names of new property>],
* "view": [<names of new property>],
* "field": {
* "<type>": [<names of new property>]
* }
* },
* "modify": {
* "entity": [
* {
* "from": { <properties that identify record> },
* "to": { <properties that need to be changed> }
* }
* ],
* "container": [],
* "model": [],
* "view": [],
* "field": []
* },
* }
*/

{
"modify": {
"model": [
[
"populateByPropertySource",
{
"modify": {
"container": [["getNameFromDottedIdentifier", "tagName", "schemaTags"]],
"entity": [["getNameFromDottedIdentifier", "tagName", "tableTags"]],
"view": [["getNameFromDottedIdentifier", "tagName", "viewTags"]],
"field": [["getNameFromDottedIdentifier", "tagName", "columnTags"]]
}
}
]
]
}
}
2 changes: 1 addition & 1 deletion forward_engineering/helpers/tagHelper.js
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ module.exports = ({ getName, toString }) => {
const getTagKeyValues = ({ tags, isCaseSensitive }) => {
return tags
.filter(tag => tag.tagName)
.map(tag => `${getTagName({ tagName: tag.tagName, isCaseSensitive })} = ${toString(tag.tagValue)}`)
.map(tag => `${getTagName({ tagName: tag.tagName, isCaseSensitive })} = ${toString(tag.tagValue || '')}`)
.join(', ');
};

90 changes: 89 additions & 1 deletion properties_pane/container_level/containerLevelConfig.json
Original file line number Diff line number Diff line change
@@ -167,17 +167,105 @@ making sure that you maintain a proper JSON format.
"propertyName": "Tag name",
"propertyKeyword": "tagName",
"propertyTooltip": "",
"propertyType": "text"
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"source": "tags.*.name"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"type": "not",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
}
]
},
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "text",
"propertySource": {
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"key": "tagName",
"pattern": "^.+$"
},
{
"type": "or",
"values": [
{
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
},
{
"type": "not",
"values": [
{
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
]
}
]
},
"shouldValidate": true,
"validation": {
"regex": "^.{0,256}$"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "select",
"disabled": true,
"dependency": {
"type": "or",
"values": [
{
"key": "tagName",
"exist": false
},
{
"key": "tagName",
"pattern": "^$"
}
]
}
}
]
},
95 changes: 94 additions & 1 deletion properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
@@ -1025,17 +1025,110 @@ making sure that you maintain a proper JSON format.
"propertyName": "Tag name",
"propertyKeyword": "tagName",
"propertyTooltip": "",
"propertyType": "text"
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"level": "container",
"source": "tags.*.name"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"level": "container",
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"type": "not",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
}
]
},
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "text",
"propertySource": {
"level": "container",
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"key": "tagName",
"pattern": "^.+$"
},
{
"type": "or",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
},
{
"type": "not",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
]
}
]
},
"shouldValidate": true,
"validation": {
"regex": "^.{0,256}$"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "select",
"disabled": true,
"dependency": {
"type": "or",
"values": [
{
"key": "tagName",
"exist": false
},
{
"key": "tagName",
"pattern": "^$"
}
]
}
}
]
},
1,433 changes: 1,414 additions & 19 deletions properties_pane/field_level/fieldLevelConfig.json

Large diffs are not rendered by default.

95 changes: 94 additions & 1 deletion properties_pane/view_level/viewLevelConfig.json
Original file line number Diff line number Diff line change
@@ -96,17 +96,110 @@
"propertyName": "Tag name",
"propertyKeyword": "tagName",
"propertyTooltip": "",
"propertyType": "text"
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"level": "container",
"source": "tags.*.name"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "selecthashed",
"withEmptyOption": true,
"propertySource": {
"level": "container",
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"type": "not",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
}
]
},
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "text",
"propertySource": {
"level": "container",
"source": "tags.${tagName}.allowedValues.*.value"
},
"dependency": {
"type": "and",
"values": [
{
"key": "tagName",
"pattern": "^.+$"
},
{
"type": "or",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"isEmpty": true
},
{
"type": "not",
"values": [
{
"level": "container",
"source": "tags.${tagName}",
"key": "allowedValues",
"exist": true
}
]
}
]
}
]
},
"shouldValidate": true,
"validation": {
"regex": "^.{0,256}$"
}
},
{
"propertyName": "Value",
"propertyKeyword": "tagValue",
"propertyTooltip": "",
"propertyType": "select",
"disabled": true,
"dependency": {
"type": "or",
"values": [
{
"key": "tagName",
"exist": false
},
{
"key": "tagName",
"pattern": "^$"
}
]
}
}
]
}