Merge pull request #1169 from Luis-Fernando-Molina/develop
Contribution: Governance: Install Claims upgraded to Install Missing Claims
This commit is contained in:
6 files changed
+169
-36
No files matched your search
@@ -1514,19 +1514,161 @@
|
||||
"name": "New Claims Program",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"assetContributionsFolder": [
|
||||
"assetContributionsFolder": [],
|
||||
"featureContributionsFolder": [
|
||||
{
|
||||
"type": "Asset Contributions Folder",
|
||||
"name": "New Asset Contributions Folder",
|
||||
"type": "Feature Contributions Folder",
|
||||
"name": "Superalgos Feature Class",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"assetContributionsFolder": [],
|
||||
"assetContributionClaims": [],
|
||||
"id": "182c7646-a839-4a71-84b7-3bf154b93371",
|
||||
"featureContributionsFolder": [
|
||||
{
|
||||
"type": "Feature Contributions Folder",
|
||||
"name": "Visual Debugger Feature Class",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"featureContributionsFolder": [],
|
||||
"featureContributionClaims": [],
|
||||
"id": "842754e5-a050-40dd-b9dc-e799df666dfe",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 34699.91303591268,
|
||||
"y": 38376.04719845434
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 34546.043252690906,
|
||||
"y": 38118.51256037378
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Feature Class",
|
||||
"name": "Visual Debugger",
|
||||
"id": "0e329071-a542-405f-ae8c-2933098759c1"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature Contributions Folder",
|
||||
"name": "Charting System Feature Class",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"featureContributionsFolder": [],
|
||||
"featureContributionClaims": [],
|
||||
"id": "d9c25551-bcfd-459a-a773-e073f414438c",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 34348.66163490899,
|
||||
"y": 38344.434000174864
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 34546.043252690906,
|
||||
"y": 38118.51256037378
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Feature Class",
|
||||
"name": "Charting System",
|
||||
"id": "7edc83c0-74fc-4427-816d-4db5d840577f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature Contributions Folder",
|
||||
"name": "Data Mining Feature Class",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"featureContributionsFolder": [],
|
||||
"featureContributionClaims": [],
|
||||
"id": "ebad23ed-1a02-4edf-a9d7-fc4b2fd0dacb",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 34270.18492092547,
|
||||
"y": 38000.60505087761
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 34546.043252690906,
|
||||
"y": 38118.51256037378
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Feature Class",
|
||||
"name": "Data Mining",
|
||||
"id": "025c0e15-ad8d-49ae-b501-577bb82c207d"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature Contributions Folder",
|
||||
"name": "Visual Designer Feature Class",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"featureContributionsFolder": [],
|
||||
"featureContributionClaims": [],
|
||||
"id": "942d8eea-3303-4d6f-af60-374e59cf715d",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 34572.93504536193,
|
||||
"y": 37819.72027217521
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 34546.043252690906,
|
||||
"y": 38118.51256037378
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Feature Class",
|
||||
"name": "Visual Designer",
|
||||
"id": "18584f3f-6e48-4a68-89f1-0268185156e9"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"featureContributionClaims": [],
|
||||
"id": "f8a482c4-dee0-475a-831b-7514fd255ba6",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 34902.043252690906,
|
||||
"y": 38030.51256037378
|
||||
"x": 34546.043252690906,
|
||||
"y": 38118.51256037378
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 30023.521626345453,
|
||||
@@ -1551,7 +1693,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"featureContributionsFolder": [],
|
||||
"positionContributionsFolder": [],
|
||||
"id": "796dd30f-c90d-4b8d-a63d-89867347407b",
|
||||
"savedPayload": {
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
"iconPathOff": "configuration"
|
||||
},
|
||||
{
|
||||
"action": "Install Claims",
|
||||
"action": "Install Missing Claims",
|
||||
"actionProject": "Governance",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Install Claims",
|
||||
"label": "Install Missing Claims",
|
||||
"relatedUiObject": "Asset Contribution Claim",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Install"
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
"iconPathOff": "configuration"
|
||||
},
|
||||
{
|
||||
"action": "Install Claims",
|
||||
"action": "Install Missing Claims",
|
||||
"actionProject": "Governance",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Install Claims",
|
||||
"label": "Install Missing Claims",
|
||||
"relatedUiObject": "Feature Contribution Claim",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Install"
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
"iconPathOff": "configuration"
|
||||
},
|
||||
{
|
||||
"action": "Install Claims",
|
||||
"action": "Install Missing Claims",
|
||||
"actionProject": "Governance",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Install Claims",
|
||||
"label": "Install Missing Claims",
|
||||
"relatedUiObject": "Position Contribution Claim",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Install"
|
||||
|
||||
@@ -28,9 +28,9 @@ function newGovernanceActionSwitch() {
|
||||
UI.projects.governance.functionLibraries.votes.installVotes(action.node, action.rootNodes)
|
||||
break
|
||||
}
|
||||
case 'Install Claims':
|
||||
case 'Install Missing Claims':
|
||||
{
|
||||
UI.projects.governance.functionLibraries.claims.installClaims(action.node, action.rootNodes)
|
||||
UI.projects.governance.functionLibraries.claims.installMissingClaims(action.node, action.rootNodes)
|
||||
break
|
||||
}
|
||||
case 'Build Profile':
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newGovernanceFunctionLibraryClaims() {
|
||||
let thisObject = {
|
||||
calculate: calculate,
|
||||
installClaims: installClaims
|
||||
installMissingClaims: installMissingClaims
|
||||
}
|
||||
|
||||
return thisObject
|
||||
@@ -257,10 +257,10 @@ function newGovernanceFunctionLibraryClaims() {
|
||||
}
|
||||
}
|
||||
|
||||
function installClaims(node, rootNodes) {
|
||||
function installMissingClaims(node, rootNodes) {
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.referenceParent === undefined) {
|
||||
node.payload.uiObject.setErrorMessage('To install claims you need a Reference Parent')
|
||||
node.payload.uiObject.setErrorMessage('To Install Missing Claims you need a Reference Parent')
|
||||
return
|
||||
}
|
||||
scanNodeBranch(node, node.payload.referenceParent)
|
||||
@@ -289,16 +289,12 @@ function newGovernanceFunctionLibraryClaims() {
|
||||
let destinationNodeChild = destinationNode[property.name]
|
||||
|
||||
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||
let originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||
|
||||
if (
|
||||
destinationNodeChild.type === 'Asset' ||
|
||||
destinationNodeChild.type === 'Feature' ||
|
||||
destinationNodeChild.type === 'Position'
|
||||
) {
|
||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||
if (originNodeChild === undefined) {
|
||||
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||
}
|
||||
|
||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||
}
|
||||
break
|
||||
@@ -310,16 +306,12 @@ function newGovernanceFunctionLibraryClaims() {
|
||||
let destinationNodeChild = propertyArray[m]
|
||||
|
||||
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||
let originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||
|
||||
if (
|
||||
destinationNodeChild.type === 'Asset' ||
|
||||
destinationNodeChild.type === 'Feature' ||
|
||||
destinationNodeChild.type === 'Position'
|
||||
) {
|
||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||
if (originNodeChild === undefined) {
|
||||
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||
}
|
||||
|
||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user