Skip to content

Commit

Permalink
HCK-7370, HCK-7371: details tab of any object only declared tag at sc (
Browse files Browse the repository at this point in the history
…#132)

* HCK-7370: change level configs for level tags

* HCK-7370: add adapter config

* HCK-7370: fix creating a tag with empty value

* HCK-7852: add disable input for tag value if tag name is not selected (#141)

---------

Co-authored-by: chulanovskyi-bs <[email protected]>
  • Loading branch information
serhii-filonenko and chulanovskyi-bs authored Sep 9, 2024
1 parent 7b6add4 commit 81bd10e
Show file tree
Hide file tree
Showing 6 changed files with 1,751 additions and 23 deletions.
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
Expand Up @@ -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(', ');
};

Expand Down
90 changes: 89 additions & 1 deletion properties_pane/container_level/containerLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "^$"
}
]
}
}
]
},
Expand Down
95 changes: 94 additions & 1 deletion properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "^$"
}
]
}
}
]
},
Expand Down
Loading

0 comments on commit 81bd10e

Please sign in to comment.