Change in Code Indentation
This commit is contained in:
1 parent
1a52e5494e
commit
199a71a4e5
89 files changed
+22093
-22093
No files matched your search
@@ -1,46 +1,46 @@
|
||||
function newNodesAnnouncements () {
|
||||
const MODULE_NAME = 'Nodes Announcements'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesAnnouncements() {
|
||||
const MODULE_NAME = 'Nodes Announcements'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.announcements
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 20)
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.announcements
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 20)
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -1,47 +1,47 @@
|
||||
function newNodesErrors () {
|
||||
const MODULE_NAME = 'Nodes Errors'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesErrors() {
|
||||
const MODULE_NAME = 'Nodes Errors'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.errors
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === '') {
|
||||
node.payload.uiObject.resetErrorMessage()
|
||||
} else {
|
||||
node.payload.uiObject.setErrorMessage(value)
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.errors
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === '') {
|
||||
node.payload.uiObject.resetErrorMessage()
|
||||
} else {
|
||||
node.payload.uiObject.setErrorMessage(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
-38
@@ -1,42 +1,42 @@
|
||||
function newNodesHighlights () {
|
||||
const MODULE_NAME = 'Nodes Highlights'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesHighlights() {
|
||||
const MODULE_NAME = 'Nodes Highlights'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.highlights
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let nodeId = array[i]
|
||||
highlight(nodeId)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function highlight (nodeId) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
node.payload.uiObject.highlight(10)
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.highlights
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let nodeId = array[i]
|
||||
highlight(nodeId)
|
||||
}
|
||||
}
|
||||
|
||||
function highlight(nodeId) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
node.payload.uiObject.highlight(10)
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -1,47 +1,47 @@
|
||||
function newNodesProgress () {
|
||||
const MODULE_NAME = 'Nodes Progress'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesProgress() {
|
||||
const MODULE_NAME = 'Nodes Progress'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.progress
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setPercentage(value, 30)
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.progress
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setPercentage(value, 30)
|
||||
}
|
||||
}
|
||||
|
||||
+42
-42
@@ -1,47 +1,47 @@
|
||||
function newNodesRunning () {
|
||||
const MODULE_NAME = 'Nodes Running'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesRunning() {
|
||||
const MODULE_NAME = 'Nodes Running'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.running
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.runningAtBackend()
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.running
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.runningAtBackend()
|
||||
}
|
||||
}
|
||||
|
||||
+42
-42
@@ -1,47 +1,47 @@
|
||||
function newNodesStatus () {
|
||||
const MODULE_NAME = 'Nodes Status'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesStatus() {
|
||||
const MODULE_NAME = 'Nodes Status'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.status
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setStatus(value, 30)
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.status
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setStatus(value, 30)
|
||||
}
|
||||
}
|
||||
|
||||
+42
-42
@@ -1,47 +1,47 @@
|
||||
function newNodesValues () {
|
||||
const MODULE_NAME = 'Nodes Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newNodesValues() {
|
||||
const MODULE_NAME = 'Nodes Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.values
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 1)
|
||||
}
|
||||
let hiriarchyMap
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = canvas.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = getHiriarchyMap(rootNode)
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
let array = currentRecord.values
|
||||
if (array === undefined) { return }
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let arrayItem = array[i]
|
||||
let nodeId = arrayItem[0]
|
||||
let value = arrayItem[1]
|
||||
applyValue(nodeId, value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 1)
|
||||
}
|
||||
}
|
||||
|
||||
+77
-77
@@ -1,92 +1,92 @@
|
||||
function newRecordValues () {
|
||||
const MODULE_NAME = 'Record Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
function newRecordValues() {
|
||||
const MODULE_NAME = 'Record Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let tradingSystem
|
||||
let tradingEngine
|
||||
let productDefinition
|
||||
let propertyTargetNodeMap = new Map()
|
||||
return thisObject
|
||||
let tradingSystem
|
||||
let tradingEngine
|
||||
let productDefinition
|
||||
let propertyTargetNodeMap = new Map()
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
tradingSystem = undefined
|
||||
tradingEngine = undefined
|
||||
productDefinition = undefined
|
||||
propertyTargetNodeMap = undefined
|
||||
}
|
||||
function finalize() {
|
||||
tradingSystem = undefined
|
||||
tradingEngine = undefined
|
||||
productDefinition = undefined
|
||||
propertyTargetNodeMap = undefined
|
||||
}
|
||||
|
||||
function initialize (pTradingSystem, pTradingEngine, pProductDefinition) {
|
||||
tradingSystem = canvas.designSpace.workspace.getHierarchyHeadsById(pTradingSystem.id)
|
||||
tradingEngine = canvas.designSpace.workspace.getHierarchyHeadsById(pTradingEngine.id)
|
||||
productDefinition = pProductDefinition
|
||||
function initialize(pTradingSystem, pTradingEngine, pProductDefinition) {
|
||||
tradingSystem = canvas.designSpace.workspace.getHierarchyHeadsById(pTradingSystem.id)
|
||||
tradingEngine = canvas.designSpace.workspace.getHierarchyHeadsById(pTradingEngine.id)
|
||||
productDefinition = pProductDefinition
|
||||
|
||||
/*
|
||||
The product root can be a node or a node property of type array.
|
||||
*/
|
||||
let productRoot = eval(productDefinition.config.nodePath)
|
||||
|
||||
if (productDefinition.config.nodePathType === 'array') {
|
||||
/*
|
||||
This means that the configured nodePath is not pointing to a node, but to a node property that is an array.
|
||||
For that reason we will assume that each element of the array is a record to be outputed
|
||||
The product root can be a node or a node property of type array.
|
||||
*/
|
||||
for (let index = 0; index < productRoot.length; index++) {
|
||||
let productRoot = eval(productDefinition.config.nodePath)
|
||||
|
||||
if (productDefinition.config.nodePathType === 'array') {
|
||||
/*
|
||||
This means that the configured nodePath is not pointing to a node, but to a node property that is an array.
|
||||
For that reason we will assume that each element of the array is a record to be outputed
|
||||
*/
|
||||
for (let index = 0; index < productRoot.length; index++) {
|
||||
/*
|
||||
The Product Root Node is the root of the node hiriarchy from where we are going to extract the record values.
|
||||
*/
|
||||
let productRootNode = productRoot[index]
|
||||
scanProperties(productRootNode, index)
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
This means that the configured nodePath points to a single node, which is the one whose children constitutes
|
||||
the record to be saved at the output file.
|
||||
*/
|
||||
/*
|
||||
The Product Root Node is the root of the node hiriarchy from where we are going to extract the record values.
|
||||
*/
|
||||
let productRootNode = productRoot[index]
|
||||
scanProperties(productRootNode, index)
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
This means that the configured nodePath points to a single node, which is the one whose children constitutes
|
||||
the record to be saved at the output file.
|
||||
*/
|
||||
/*
|
||||
The Product Root Node is the root of the node hiriarchy from where we are going to extract the record values.
|
||||
*/
|
||||
let productRootNode = productRoot
|
||||
scanProperties(productRootNode)
|
||||
}
|
||||
|
||||
function scanProperties (productRootNode, index) {
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
if (property.config.nodePath !== undefined) {
|
||||
let propertyRoot = eval(property.config.nodePath)
|
||||
propertyTargetNodeMap.set(property.id, propertyRoot)
|
||||
} else {
|
||||
propertyTargetNodeMap.set(property.id, productRootNode)
|
||||
let productRootNode = productRoot
|
||||
scanProperties(productRootNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onRecordChange (currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
let value = currentRecord[property.config.codeName]
|
||||
let targetNode = propertyTargetNodeMap.get(property.id)
|
||||
applyValue(targetNode[property.config.codeName], value)
|
||||
function scanProperties(productRootNode, index) {
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
if (property.config.nodePath !== undefined) {
|
||||
let propertyRoot = eval(property.config.nodePath)
|
||||
propertyTargetNodeMap.set(property.id, propertyRoot)
|
||||
} else {
|
||||
propertyTargetNodeMap.set(property.id, productRootNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue (node, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
if (node === undefined) { return }
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 1)
|
||||
}
|
||||
function onRecordChange(currentRecord) {
|
||||
if (currentRecord === undefined) { return }
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
let value = currentRecord[property.config.codeName]
|
||||
let targetNode = propertyTargetNodeMap.get(property.id)
|
||||
applyValue(targetNode[property.config.codeName], value)
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(node, value) {
|
||||
if (canvas.chartingSpace.visible !== true) { return }
|
||||
if (node === undefined) { return }
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === true) { value = 'true' }
|
||||
if (value === false) { value = 'false' }
|
||||
node.payload.uiObject.setValue(value, 1)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user