diff --git a/Projects/Foundations/Schemas/App-Schema/plugin-project.json b/Projects/Foundations/Schemas/App-Schema/plugin-project.json index 1e17f8239..e4aa17c5b 100644 --- a/Projects/Foundations/Schemas/App-Schema/plugin-project.json +++ b/Projects/Foundations/Schemas/App-Schema/plugin-project.json @@ -90,6 +90,36 @@ "type": "node", "childType": "Plugin API Maps", "autoAdd": false + }, + { + "name": "pluginUserProfiles", + "type": "node", + "childType": "Plugin User Profiles", + "autoAdd": false + }, + { + "name": "pluginPools", + "type": "node", + "childType": "Plugin Pools", + "autoAdd": false + }, + { + "name": "pluginAssets", + "type": "node", + "childType": "Plugin Assets", + "autoAdd": false + }, + { + "name": "pluginFeatures", + "type": "node", + "childType": "Plugin Features", + "autoAdd": false + }, + { + "name": "pluginPositions", + "type": "node", + "childType": "Plugin Positions", + "autoAdd": false } ], "alternativeIcons": [ diff --git a/Projects/Foundations/UI/Function-Libraries/PluginsFunctions.js b/Projects/Foundations/UI/Function-Libraries/PluginsFunctions.js index dabbe14b7..f4696c081 100644 --- a/Projects/Foundations/UI/Function-Libraries/PluginsFunctions.js +++ b/Projects/Foundations/UI/Function-Libraries/PluginsFunctions.js @@ -14,31 +14,6 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } return thisObject - function getPluginFileNames(projectName, pluginType, callBack) { - httpRequest(undefined, 'PluginFileNames/' + projectName + '/' + pluginType, onResponse) - - function onResponse(err, data) { - if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { - console.log('Failed to Fetch Plugin ' + pluginType + ' from the Client') - return - } - - let pluginFileNames = JSON.parse(data) - callBack(pluginFileNames) - } - } - - function addPluginFileIfNeeded(node, fileNames) { - for (let i = 0; i < fileNames.length; i++) { - let fileName = fileNames[i] - fileName = fileName.replace('.json', '') - if (UI.projects.foundations.utilities.children.isMissingChildrenByName(node, fileName) === true) { - let child = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin File') - child.name = fileName - } - } - } - function addMissingPluginProjects(node, rootNodes) { for (let k = 0; k < PROJECTS_SCHEMA.length; k++) { let projectDefinition = PROJECTS_SCHEMA[k] @@ -68,27 +43,8 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - function getProjectName(node) { - /* Validations to see if we can do this or not. */ - if (node.payload === undefined) { return } - if (node.payload.uiObject === undefined) { return } - - if (node.payload.parentNode === undefined) { - node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') - return - } - if (node.payload.parentNode.payload === undefined) { - node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') - return - } - let pluginProject = node.payload.parentNode - let config = JSON.parse(pluginProject.config) - - return config.codeName - } - function addMissingPluginDataMines(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -96,15 +52,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Data-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Data-Mines', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginTradingMines(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -112,15 +68,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Trading-Mines', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginTradingSystems(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -128,15 +84,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Systems', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Trading-Systems', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginTradingEngines(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -144,15 +100,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Engines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Trading-Engines', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginLearningMines(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -160,15 +116,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Learning-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Learning-Mines', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginLearningSystems(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -176,15 +132,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Learning-Systems', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Learning-Systems', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginLearningEngines(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -192,15 +148,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Learning-Engines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Learning-Engines', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginTutorials(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -208,15 +164,15 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Tutorials', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Tutorials', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } function addMissingPluginApiMaps(node, rootNodes) { - let projectName = getProjectName(node) + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -224,10 +180,10 @@ function newFoundationsFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'API-Maps', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'API-Maps', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } } diff --git a/Projects/Foundations/UI/Utilities/Plugins.js b/Projects/Foundations/UI/Utilities/Plugins.js new file mode 100644 index 000000000..73a096aff --- /dev/null +++ b/Projects/Foundations/UI/Utilities/Plugins.js @@ -0,0 +1,53 @@ +function newFoundationsUtilitiesPlugins() { + let thisObject = { + getPluginFileNames: getPluginFileNames, + addPluginFileIfNeeded: addPluginFileIfNeeded, + getProjectName: getProjectName + } + + return thisObject + + function getPluginFileNames(projectName, pluginType, callBack) { + httpRequest(undefined, 'PluginFileNames/' + projectName + '/' + pluginType, onResponse) + + function onResponse(err, data) { + if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + console.log('Failed to Fetch Plugin ' + pluginType + ' from the Client') + return + } + + let pluginFileNames = JSON.parse(data) + callBack(pluginFileNames) + } + } + + function addPluginFileIfNeeded(node, fileNames) { + for (let i = 0; i < fileNames.length; i++) { + let fileName = fileNames[i] + fileName = fileName.replace('.json', '') + if (UI.projects.foundations.utilities.children.isMissingChildrenByName(node, fileName) === true) { + let child = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin File') + child.name = fileName + } + } + } + + function getProjectName(node) { + /* Validations to see if we can do this or not. */ + if (node.payload === undefined) { return } + if (node.payload.uiObject === undefined) { return } + + if (node.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') + return + } + if (node.payload.parentNode.payload === undefined) { + node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') + return + } + let pluginProject = node.payload.parentNode + let config = JSON.parse(pluginProject.config) + + return config.codeName + } +} \ No newline at end of file diff --git a/Projects/Governance/Icons/Plugins/plugin-assets.png b/Projects/Governance/Icons/Plugins/plugin-assets.png new file mode 100644 index 000000000..2c3a28848 Binary files /dev/null and b/Projects/Governance/Icons/Plugins/plugin-assets.png differ diff --git a/Projects/Governance/Icons/Plugins/plugin-features.png b/Projects/Governance/Icons/Plugins/plugin-features.png new file mode 100644 index 000000000..8fcb79a35 Binary files /dev/null and b/Projects/Governance/Icons/Plugins/plugin-features.png differ diff --git a/Projects/Governance/Icons/Plugins/plugin-pools.png b/Projects/Governance/Icons/Plugins/plugin-pools.png new file mode 100644 index 000000000..9b3b41696 Binary files /dev/null and b/Projects/Governance/Icons/Plugins/plugin-pools.png differ diff --git a/Projects/Governance/Icons/Plugins/plugin-positions.png b/Projects/Governance/Icons/Plugins/plugin-positions.png new file mode 100644 index 000000000..2a8158670 Binary files /dev/null and b/Projects/Governance/Icons/Plugins/plugin-positions.png differ diff --git a/Projects/Governance/Icons/Plugins/plugin-user-profiles.png b/Projects/Governance/Icons/Plugins/plugin-user-profiles.png new file mode 100644 index 000000000..7ad931273 Binary files /dev/null and b/Projects/Governance/Icons/Plugins/plugin-user-profiles.png differ diff --git a/Projects/Governance/Schemas/App-Schema/plugin-assets.json b/Projects/Governance/Schemas/App-Schema/plugin-assets.json new file mode 100644 index 000000000..53e6e4eac --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/plugin-assets.json @@ -0,0 +1,37 @@ +{ + "type": "Plugin Assets", + "menuItems": [ + { + "action": "Add Missing Plugin Assets", + "label": "Add Missing Assets", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Data Mine", + "actionFunction": "payload.executeAction" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "pluginAssets", + "attachingRules": { + "compatibleTypes": "->Plugin Project->" + }, + "childrenNodesProperties": [ + { + "name": "pluginFiles", + "type": "array", + "childType": "Plugin File", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/plugin-features.json b/Projects/Governance/Schemas/App-Schema/plugin-features.json new file mode 100644 index 000000000..03d0e99bd --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/plugin-features.json @@ -0,0 +1,37 @@ +{ + "type": "Plugin Features", + "menuItems": [ + { + "action": "Add Missing Plugin Features", + "label": "Add Missing Features", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Data Mine", + "actionFunction": "payload.executeAction" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "pluginFeatures", + "attachingRules": { + "compatibleTypes": "->Plugin Project->" + }, + "childrenNodesProperties": [ + { + "name": "pluginFiles", + "type": "array", + "childType": "Plugin File", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/plugin-pools.json b/Projects/Governance/Schemas/App-Schema/plugin-pools.json new file mode 100644 index 000000000..cfcab0c95 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/plugin-pools.json @@ -0,0 +1,37 @@ +{ + "type": "Plugin Pools", + "menuItems": [ + { + "action": "Add Missing Plugin Pools", + "label": "Add Missing Pools", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Data Mine", + "actionFunction": "payload.executeAction" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "pluginPools", + "attachingRules": { + "compatibleTypes": "->Plugin Project->" + }, + "childrenNodesProperties": [ + { + "name": "pluginFiles", + "type": "array", + "childType": "Plugin File", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/plugin-positions.json b/Projects/Governance/Schemas/App-Schema/plugin-positions.json new file mode 100644 index 000000000..bfdeffd23 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/plugin-positions.json @@ -0,0 +1,37 @@ +{ + "type": "Plugin Positions", + "menuItems": [ + { + "action": "Add Missing Plugin Positions", + "label": "Add Missing Positions", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Data Mine", + "actionFunction": "payload.executeAction" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "pluginPositions", + "attachingRules": { + "compatibleTypes": "->Plugin Project->" + }, + "childrenNodesProperties": [ + { + "name": "pluginFiles", + "type": "array", + "childType": "Plugin File", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/plugin-user-profiles.json b/Projects/Governance/Schemas/App-Schema/plugin-user-profiles.json index 8599d57c8..c68c1dc16 100644 --- a/Projects/Governance/Schemas/App-Schema/plugin-user-profiles.json +++ b/Projects/Governance/Schemas/App-Schema/plugin-user-profiles.json @@ -1,9 +1,9 @@ { - "type": "Plugin Data Mines", + "type": "Plugin User Profiles", "menuItems": [ { - "action": "Add Missing Plugin Data Mines", - "label": "Add Missing Data Mines", + "action": "Add Missing Plugin User Profiles", + "label": "Add Missing User Profiles", "askConfirmation": true, "confirmationLabel": "Confirm to Proceed", "workDoneLabel": "Done", @@ -22,7 +22,7 @@ ], "addLeftIcons": true, "level": 1, - "propertyNameAtParent": "pluginDataMines", + "propertyNameAtParent": "pluginUserProfiles", "attachingRules": { "compatibleTypes": "->Plugin Project->" }, diff --git a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js index 183067e05..01b355415 100644 --- a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js +++ b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js @@ -24,6 +24,31 @@ function newGovernanceActionSwitch() { break } } + case 'Add Missing Plugin User Profiles': + { + UI.projects.foundations.functionLibraries.pluginsFunctions.addMissingPluginUserProfiles(action.node, action.rootNodes) + } + break + case 'Add Missing Plugin Pools': + { + UI.projects.foundations.functionLibraries.pluginsFunctions.addMissingPluginPools(action.node, action.rootNodes) + } + break + case 'Add Missing Plugin Features': + { + UI.projects.foundations.functionLibraries.pluginsFunctions.addMissingPluginFeatures(action.node, action.rootNodes) + } + break + case 'Add Missing Plugin Assets': + { + UI.projects.foundations.functionLibraries.pluginsFunctions.addMissingPluginAssets(action.node, action.rootNodes) + } + break + case 'Add Missing Plugin Positions': + { + UI.projects.foundations.functionLibraries.pluginsFunctions.addMissingPluginPositions(action.node, action.rootNodes) + } + break } } } diff --git a/Projects/Governance/UI/Function-Libraries/PluginsFunctions.js b/Projects/Governance/UI/Function-Libraries/PluginsFunctions.js index 03112b13f..edba7d9b0 100644 --- a/Projects/Governance/UI/Function-Libraries/PluginsFunctions.js +++ b/Projects/Governance/UI/Function-Libraries/PluginsFunctions.js @@ -1,63 +1,15 @@ function newGovernanceFunctionLibraryPluginsFunctions() { let thisObject = { - addMissingPluginDataMines: addMissingPluginDataMines, - addMissingPluginTradingMines: addMissingPluginTradingMines, - addMissingPluginTradingSystems: addMissingPluginTradingSystems, - addMissingPluginTradingEngines: addMissingPluginTradingEngines, - addMissingPluginLearningMines: addMissingPluginLearningMines, - addMissingPluginLearningSystems: addMissingPluginLearningSystems, - addMissingPluginLearningEngines: addMissingPluginLearningEngines, - addMissingPluginTutorials: addMissingPluginTutorials, - addMissingPluginApiMaps: addMissingPluginApiMaps + addMissingPluginUserProfiles: addMissingPluginUserProfiles, + addMissingPluginPools: addMissingPluginPools, + addMissingPluginAssets: addMissingPluginAssets, + addMissingPluginFeatures: addMissingPluginFeatures, + addMissingPluginPositions: addMissingPluginPositionss } return thisObject - function getPluginFileNames(projectName, pluginType, callBack) { - httpRequest(undefined, 'PluginFileNames/' + projectName + '/' + pluginType, onResponse) - - function onResponse(err, data) { - if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { - console.log('Failed to Fetch Plugin ' + pluginType + ' from the Client') - return - } - - let pluginFileNames = JSON.parse(data) - callBack(pluginFileNames) - } - } - - function addPluginFileIfNeeded(node, fileNames) { - for (let i = 0; i < fileNames.length; i++) { - let fileName = fileNames[i] - fileName = fileName.replace('.json', '') - if (UI.projects.foundations.utilities.children.isMissingChildrenByName(node, fileName) === true) { - let child = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin File') - child.name = fileName - } - } - } - - function getProjectName(node) { - /* Validations to see if we can do this or not. */ - if (node.payload === undefined) { return } - if (node.payload.uiObject === undefined) { return } - - if (node.payload.parentNode === undefined) { - node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') - return - } - if (node.payload.parentNode.payload === undefined) { - node.payload.uiObject.setErrorMessage('You need to have a Plugin Project node as a parent to execute this action.') - return - } - let pluginProject = node.payload.parentNode - let config = JSON.parse(pluginProject.config) - - return config.codeName - } - - function addMissingPluginDataMines(node, rootNodes) { - let projectName = getProjectName(node) + function addMissingPluginUserProfiles(node, rootNodes) { + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -65,15 +17,15 @@ function newGovernanceFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Data-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'User-Profiles', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } - function addMissingPluginTradingMines(node, rootNodes) { - let projectName = getProjectName(node) + function addMissingPluginPools(node, rootNodes) { + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -81,15 +33,15 @@ function newGovernanceFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Pools', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } - function addMissingPluginTradingSystems(node, rootNodes) { - let projectName = getProjectName(node) + function addMissingPluginAssets(node, rootNodes) { + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -97,15 +49,15 @@ function newGovernanceFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Systems', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Assets', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } - function addMissingPluginTradingEngines(node, rootNodes) { - let projectName = getProjectName(node) + function addMissingPluginFeatures(node, rootNodes) { + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -113,15 +65,15 @@ function newGovernanceFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Trading-Engines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Features', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } - function addMissingPluginLearningMines(node, rootNodes) { - let projectName = getProjectName(node) + function addMissingPluginPositionss(node, rootNodes) { + let projectName = UI.projects.foundations.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { if (node.payload.parentNode !== undefined) { node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") @@ -129,74 +81,10 @@ function newGovernanceFunctionLibraryPluginsFunctions() { } } - getPluginFileNames(projectName, 'Learning-Mines', onNamesArrived) + UI.projects.foundations.utilities.plugins.getPluginFileNames(projectName, 'Positions', onNamesArrived) function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) - } - } - - function addMissingPluginLearningSystems(node, rootNodes) { - let projectName = getProjectName(node) - if (projectName === "" || projectName === undefined) { - if (node.payload.parentNode !== undefined) { - node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") - return - } - } - - getPluginFileNames(projectName, 'Learning-Systems', onNamesArrived) - - function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) - } - } - - function addMissingPluginLearningEngines(node, rootNodes) { - let projectName = getProjectName(node) - if (projectName === "" || projectName === undefined) { - if (node.payload.parentNode !== undefined) { - node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") - return - } - } - - getPluginFileNames(projectName, 'Learning-Engines', onNamesArrived) - - function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) - } - } - - function addMissingPluginTutorials(node, rootNodes) { - let projectName = getProjectName(node) - if (projectName === "" || projectName === undefined) { - if (node.payload.parentNode !== undefined) { - node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") - return - } - } - - getPluginFileNames(projectName, 'Tutorials', onNamesArrived) - - function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) - } - } - - function addMissingPluginApiMaps(node, rootNodes) { - let projectName = getProjectName(node) - if (projectName === "" || projectName === undefined) { - if (node.payload.parentNode !== undefined) { - node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") - return - } - } - - getPluginFileNames(projectName, 'API-Maps', onNamesArrived) - - function onNamesArrived(fileNames) { - addPluginFileIfNeeded(node, fileNames) + UI.projects.foundations.utilities.plugins.addPluginFileIfNeeded(node, fileNames) } } } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 16c2073c1..3eab1e04f 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -212,6 +212,11 @@ "name": "Status Bar", "propertyName": "statusBar", "functionName": "newFoundationsUtilitiesStatusBar" + }, + { + "name": "Plugins", + "propertyName": "plugins", + "functionName": "newFoundationsUtilitiesPlugins" } ], "spaces": [