Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop

This commit is contained in:
Luis Fernando Molina committed 2021-10-21 21:45:55 +02:00
commit c13f02a74c
1196 files changed
+464056 -384538

No files matched your search

-33
View File
@@ -1,33 +0,0 @@
# name of your github action
name: CI
# this will help you specify where to run
on:
push:
branches:
# this will run on the electron branch
- develop
# this is where the magic happens, each job happens in parallel btw
jobs:
build_on_mac:
runs-on: macOS-latest
steps:
- uses: actions/checkout@master
with:
ref: develop
- uses: actions/setup-node@master
with:
node-version: 16
- name: see directory
run: ls
build_on_win:
runs-on: windows-2016
steps:
- uses: actions/checkout@master
with:
ref: develop
- uses: actions/setup-node@master
with:
node-version: 16
- name: see directory
run: ls
+40
View File
@@ -0,0 +1,40 @@
name: Build/release Binaries
on:
push:
branches: [master]
tags:
- '*'
release:
types: [published, created, edited]
workflow_dispatch:
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-c.extraMetadata.main=electron-wrapper.js -c build/electron-builder.json"
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/') }}
+80
View File
@@ -0,0 +1,80 @@
name: Nightly develop Binaries
on:
schedule:
- cron: '20 3 * * *'
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Download a file
run: curl "https://raw.githubusercontent.com/${{ github.repository }}/develop/package.json" -o package.json
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: get-version
id: version
uses: nyaa8/package-version@v1
with:
path: './package.json'
- name: Create nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.PACKAGE_VERSION }}.${{ steps.date.outputs.date }}
release_name: Superalgos ${{ env.PACKAGE_VERSION }} Snapshot ${{ steps.date.outputs.date }}
keep_num: 5
keep_tags: false
build-release:
runs-on: ${{ matrix.os }}
needs: create-release
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Check out Git repository
uses: actions/checkout@v2
with:
ref: develop
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: get-version
id: version
uses: nyaa8/package-version@v1
with:
path: './package.json'
- name: Build/release Electron app
#env:
# DATE: ${{ steps.date.outputs.date }}
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-c.extraMetadata.main=electron-wrapper.js -c.extraMetadata.version=${{ env.PACKAGE_VERSION }}.${{ steps.date.outputs.date }} -c build/electron-builder.json -p onTagOrDraft"
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
release: true
+1 -1
View File
@@ -19,4 +19,4 @@ node_modules
launch.json
package-lock.json
.idea
build
dist
+11 -5
View File
@@ -1,19 +1,25 @@
{
"files.exclude": {
"**/Data-Storage": true,
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true,
"**/My-Social-Trading-Data": true,
"**/My-Network-Nodes-Data": true,
"**/My-Workspaces": true,
"**/My-Secrets": true,
"**/My-Data-Storage": true,
"**/My-Log-Files": true,
},
"search.exclude": {
"**/Data-Storage": true,
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true,
"**/My-Social-Trading-Data": true
"**/My-Social-Trading-Data": true,
"**/My-Network-Nodes-Data": true,
"**/My-Workspaces": true,
"**/My-Secrets": true,
"**/My-Data-Storage": true,
"**/My-Log-Files": true,
},
"search.maintainFileSearchCache": true
}
+4 -6
View File
@@ -8,16 +8,14 @@ exports.newDesktopApp = function newDesktopApp() {
async function run() {
/*
Heree we will store our running objects:
Here we will store our running objects:
*/
DK.running = {}
/*
This is the Web Sockets client that interacts with the Superalgos Network.
This is the Personal Social Graph for the user running this App.
*/
DK.running.socialGraph = DK.projects.socialTrading.modules.socialGraph.newSocialTradingModulesSocialGraph()
await DK.running.socialGraph.initialize()
/*
This is the Web Sockets client that interacts with the Superalgos Network.
*/
@@ -25,11 +23,11 @@ exports.newDesktopApp = function newDesktopApp() {
await DK.running.webSocketsClient.initialize()
console.log('Desktop Client Connected to Network Node via Web Sockets ................... Connected to port ' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT)
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
/* These are the Network Interfaces by which the Web App interacts with this Desktop Client.*/
DK.running.webSocketsInterface = DK.projects.socialTrading.modules.webSocketsInterface.newDesktopModulesWebSocketsInterface()
DK.running.webSocketsInterface.initialize()
console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT)
DK.running.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
+4 -1
View File
@@ -1,5 +1,9 @@
function newWebApp() {
/*
In it's current state of development, the Web App only has one module.
Everything is being coded here until some structure emerges.
*/
let thisObject = {
initialize: initialize,
finalize: finalize
@@ -123,7 +127,6 @@ function newWebApp() {
function addToContentDiv(events) {
try {
let contentDiv = document.getElementById('content-div')
/*
Delete al current content.
*/
+1 -1
View File
@@ -22,7 +22,7 @@ exports.newDesktopRoot = function newDesktopRoot() {
*/
global.SA = {}
/* Load Environment Variables */
let ENVIRONMENT = require('./EnvironmentForDebug.js');
let ENVIRONMENT = require('./Environment.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
/*
+28 -11
View File
@@ -1,20 +1,37 @@
const path = require("path")
if (process.env.PACKAGED_PATH) {
basePath = process.env.PACKAGED_PATH
} else {
basePath = __dirname
}
exports.newEnvironment = function () {
let thisObject = {
BASE_PATH: basePath,
WEB_SERVER_URL: 'localhost',
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
CLIENT_HTTP_INTERFACE_PORT: 34248,
PATH_TO_DATA_STORAGE: path.join(__dirname, './Platform/My-Data-Storage'),
PATH_TO_PROJECTS: path.join(__dirname, './Projects'),
PATH_TO_LOG_FILES: path.join(__dirname, './Platform/My-Log-Files'),
PATH_TO_PROJECTS_REQUIRED: path.join(__dirname, './Projects'),
PATH_TO_PROJECT_SCHEMA: path.join(__dirname, './Projects/ProjectsSchema.json'),
PATH_TO_CLIENT: path.join(__dirname, './Platform'),
PATH_TO_DEFAULT_WORKSPACE: path.join(__dirname, './Projects/Foundations/Plugins/Workspaces'),
PATH_TO_MY_WORKSPACES: path.join(__dirname, './Platform/My-Workspaces'),
PATH_TO_FONTS: path.join(__dirname, './Platform/WebServer/Fonts')
PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 18041,
NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042,
DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 18043,
DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost',
PLATFORM_HTTP_INTERFACE_PORT: 34248,
DESKTOP_HTTP_INTERFACE_PORT: 34249,
PATH_TO_DATA_STORAGE: path.join(basePath, './Platform/My-Data-Storage'),
PATH_TO_PROJECTS: path.join(basePath, './Projects'),
PATH_TO_LOG_FILES: path.join(basePath, './Platform/My-Log-Files'),
PATH_TO_PROJECTS_REQUIRED: path.join(basePath, './Projects'),
PATH_TO_PROJECT_SCHEMA: path.join(basePath, './Projects/ProjectsSchema.json'),
PATH_TO_PLATFORM: path.join(basePath, './Platform'),
PATH_TO_DESKTOP: './Desktop',
PATH_TO_DEFAULT_WORKSPACE: path.join(basePath, './Projects/Foundations/Plugins/Workspaces'),
PATH_TO_MY_WORKSPACES: path.join(basePath, './Platform/My-Workspaces'),
PATH_TO_FONTS: path.join(basePath, './Platform/WebServer/Fonts')
}
if (process.env.PORTABLE_EXECUTABLE_DIR) {
thisObject.PATH_TO_DATA_STORAGE = path.join(process.env.PORTABLE_USER_DOCUMENTS, '/Superalgos/Platform/My-Data-Storage')
thisObject.PATH_TO_LOG_FILES = path.join(process.env.PORTABLE_USER_DOCUMENTS, '/Superalgos/Platform/My-Log-Files')
thisObject.PATH_TO_MY_WORKSPACES = path.join(process.env.PORTABLE_USER_DOCUMENTS, '/Superalgos/Platform/My-Workspaces')
}
return thisObject
-24
View File
@@ -1,24 +0,0 @@
exports.newEnvironment = function () {
let thisObject = {
WEB_SERVER_URL: 'localhost',
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042,
DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 18043,
DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost',
CLIENT_HTTP_INTERFACE_PORT: 34248,
DESKTOP_HTTP_INTERFACE_PORT: 34249,
PATH_TO_DATA_STORAGE: './Platform/My-Data-Storage',
PATH_TO_LOG_FILES: './Platform/My-Log-Files',
PATH_TO_PROJECTS: './Projects',
PATH_TO_PROJECTS_REQUIRED: './Projects',
PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json',
PATH_TO_CLIENT: './Platform',
PATH_TO_DESKTOP: './Desktop',
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
PATH_TO_MY_WORKSPACES: './Platform/My-Workspaces',
PATH_TO_FONTS: './Platform/WebServer/Fonts'
}
return thisObject
}
-14
View File
@@ -1,14 +0,0 @@
{
"folders": [
{
"path": "C:\\Superalgos\\Network"
},
{
"path": "C:\\Superalgos\\Projects\\Network"
},
{
"path": "C:\\Superalgos\\Projects\\Social-Trading"
}
],
"settings": {}
}
-17
View File
@@ -1,17 +0,0 @@
{
"files.exclude": {
"**/Data-Storage": true,
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true
},
"search.exclude": {
"**/Data-Storage": true,
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true
},
"search.maintainFileSearchCache": true
}
+7 -3
View File
@@ -10,14 +10,18 @@ exports.newNetworkNode = function newNetworkNode() {
async function run() {
/*
Let's start the Network Interfaces
Other Network Nodes and Client Apps will communicate with this Network Node via it's Websocket Interface.
*/
NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface()
NT.webSocketsInterface.initialize()
/*
The Social Graph Service is the first and for now, the only service this Network Node provides.
*/
thisObject.socialGraphService = NT.projects.socialTrading.modules.socialGraph.newNetworkModulesSocialGraph()
await thisObject.socialGraphService.initialize()
/*
The Sotrage deals with persisting the Social Graph.
*/
thisObject.storage = NT.projects.socialTrading.modules.storage.newSocialTradingModulesStorage()
thisObject.storage.initialize()
}
+1 -1
View File
@@ -22,7 +22,7 @@ exports.newNetworkRoot = function newNetworkRoot() {
*/
global.SA = {}
/* Load Environment Variables */
let ENVIRONMENT = require('./EnvironmentForDebug.js');
let ENVIRONMENT = require('./Environment.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
/*
+209 -38
View File
@@ -20,16 +20,20 @@ exports.newHttpInterface = function newHttpInterface() {
webhook = undefined
}
function initialize() {
function initialize(initialWorkspace) {
/*
We will create an HTTP Server and leave it running forever.
*/
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.PLATFORM_HTTP_INTERFACE_PORT)
/* Starting the browser now is optional */
if (process.argv.includes("noBrowser")) {
//Running Client only with no UI.
} else {
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
let queryString = ''
if (initialWorkspace.name !== undefined) {
queryString = '/?initialWorkspaceName=' + initialWorkspace.name + '&initialWorkspaceProject=' + initialWorkspace.project + '&initialWorkspaceType=' + initialWorkspace.type
}
SA.nodeModules.open('http://localhost:' + global.env.PLATFORM_HTTP_INTERFACE_PORT + queryString)
}
}
@@ -631,7 +635,13 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'App':
{
// If running the electron app do not try to get git tool. I don't allow it.
if (process.env.SA_MODE === 'gitDisable') {
console.log('[WARNING] No contributions on binary distributions. Do manual installation')
break
}
switch (requestPath[2]) { // switch by command
case 'Contribute': {
try {
let commitMessage = unescape(requestPath[3])
@@ -641,7 +651,7 @@ exports.newHttpInterface = function newHttpInterface() {
const contributionsBranch = unescape(requestPath[7])
let error
/* Unsavping # */
/* Unsaving # */
for (let i = 0; i < 10; i++) {
commitMessage = commitMessage.replace('_SLASH_', '/')
commitMessage = commitMessage.replace('_HASHTAG_', '#')
@@ -892,6 +902,27 @@ exports.newHttpInterface = function newHttpInterface() {
const git = simpleGit(options)
try {
await git.checkout(currentBranch)
// Check to see it main repo has been set as upstream
let remotes = await git.getRemotes();
let isUpstreamSet
for (let remote in remotes) {
if (remotes[remote].name === 'upstream') {
isUpstreamSet = true
} else {
isUpstreamSet = false
}
}
// If upstream has not been set. Set it now
if (isUpstreamSet === false) {
await git.addRemote('upstream', 'https://github.com/Superalgos/Superalgos');
}
// Pull branch from main repo
await git.pull('upstream', currentBranch);
// Reset branch to match main repo
let upstreamLocation = `upstream/${currentBranch}`
await git.reset('hard', [upstreamLocation])
} catch (err) {
console.log('[ERROR] Error changing current branch to ' + currentBranch)
console.log(err.stack)
@@ -899,20 +930,19 @@ exports.newHttpInterface = function newHttpInterface() {
}
}
async function runNodeSetup () {
console.log( "Running Node setup to adjust for new Branch" )
const process = require("process");
const { execSync } = require("child_process");
async function runNodeSetup() {
console.log("Running Node setup to adjust for new Branch")
const process = SA.nodeModules.process
const childProcess = SA.nodeModules.childProcess
let dir = process.cwd()
let command = "node setup";
let stdout = execSync( command,
{
cwd: dir
}).toString();
let command = "node setup noShortcuts";
let stdout = childProcess.execSync(command,
{
cwd: dir
}).toString();
console.log("Node Setup has completed with the following result:", stdout)
}
} catch (err) {
@@ -990,6 +1020,148 @@ exports.newHttpInterface = function newHttpInterface() {
}
break
}
case 'FixAppSchema': {
/*
We will use this process when we have moved APP SCHEMA files from one project to another, and we need to fixt the
actions where this node was referenced, so that it points to the new project where the node has moved to.
*/
let customResponse = {
result: global.CUSTOM_OK_RESPONSE.result,
message: ''
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(customResponse), httpResponse)
console.log('Fixing App Schemas...')
let projects = SA.projects.foundations.utilities.filesAndDirectories.getDirectories(global.env.PATH_TO_PROJECTS)
let PROJECTS_MAP = new Map()
let directoryCount = 0
let allAppSchemas = []
let allAppSchemasFilePaths = []
let allAppSchemasFileProjects = []
for (let i = 0; i < projects.length; i++) {
let project = projects[i]
const fs = SA.nodeModules.fs
let folder = 'App-Schema'
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/'
SA.projects.foundations.utilities.filesAndDirectories.getAllFilesInDirectoryAndSubdirectories(filePath + folder, onFilesReady)
function onFilesReady(files) {
try {
let SCHEMA_MAP = new Map()
console.log('files.length... ' + files.length)
for (let k = 0; k < files.length; k++) {
let name = files[k]
let nameSplitted = name.split(folder)
let fileName = nameSplitted[1]
for (let i = 0; i < 10; i++) {
fileName = fileName.replace('\\', '/')
}
let fileToRead = filePath + folder + fileName
console.log('Reading file... ' + fileToRead)
let fileContent = fs.readFileSync(fileToRead)
let schemaDocument
try {
schemaDocument = JSON.parse(fileContent)
SCHEMA_MAP.set(schemaDocument.type, schemaDocument)
allAppSchemas.push(schemaDocument)
allAppSchemasFilePaths.push(fileToRead)
allAppSchemasFileProjects.push(project)
} catch (err) {
console.log('[ERROR] sendSchema -> Error Parsing JSON File: ' + fileToRead + ' .Error = ' + err.stack)
return
}
}
PROJECTS_MAP.set(project, SCHEMA_MAP)
directoryCount++
console.log('directoryCount = ' + directoryCount, 'projects.length = ' + projects.length)
//console.log(Array.from(PROJECTS_MAP.get(project).keys()))
if (directoryCount === projects.length) {
fixSchemas()
}
} catch (err) {
console.log(err.stack)
}
}
}
function fixSchemas() {
try {
console.log('fixSchemas...' + allAppSchemas.length)
let projects = SA.projects.foundations.utilities.filesAndDirectories.getDirectories(global.env.PATH_TO_PROJECTS)
const fs = SA.nodeModules.fs
let needFixing = 0
for (let i = 0; i < allAppSchemas.length; i++) {
let schemaDocument = allAppSchemas[i]
let wasUpdated = false
for (let j = 0; j < schemaDocument.menuItems.length; j++) {
let menuItem = schemaDocument.menuItems[j]
if (menuItem.relatedUiObject !== undefined && menuItem.relatedUiObjectProject === undefined) {
needFixing++
let hits = 0
let foundProject
let multiProject = ''
for (let k = 0; k < projects.length; k++) {
let project = projects[k]
let testDocument = PROJECTS_MAP.get(project).get(menuItem.relatedUiObject)
if (testDocument !== undefined) {
hits++
foundProject = project
multiProject = multiProject + ' -> ' + project
let fileProject = allAppSchemasFileProjects[i]
//console.log(fileProject, project)
if (fileProject === project) {
/* If the projec of the file is the same as the project found, then we consider this a match*/
hits = 1
continue
}
}
}
if (hits === 0) {
console.log('Problem With No Solution #' + needFixing, ' Type: ' + schemaDocument.type, ' Action: ' + menuItem.action, ' Related UI Object: ' + menuItem.relatedUiObject)
console.log('This Node Type was NOT FOUND at any project. ' + menuItem.relatedUiObject)
continue
}
if (hits === 1) {
console.log('Problem With One Solution #' + needFixing, ' Type: ' + schemaDocument.type, ' Action: ' + menuItem.action, ' Related UI Object: ' + menuItem.relatedUiObject, ' Found Project:' + foundProject)
menuItem.relatedUiObjectProject = foundProject
wasUpdated = true
continue
}
console.log('Problem With MULTIPLE Solutions #' + needFixing, ' Type: ' + schemaDocument.type, ' Action: ' + menuItem.action, ' Related UI Object: ' + menuItem.relatedUiObject, ' Found at these Projects:' + multiProject)
}
}
if (wasUpdated === true) {
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
let filePath = allAppSchemasFilePaths[i]
//console.log('Saving File at ' + filePath)
//console.log(fileContent)
//fs.writeFileSync(filePath, fileContent)
}
}
} catch (err) {
console.log(err.stack)
}
}
break
}
}
function respondWithDocsObject(docs, error) {
@@ -1139,17 +1311,17 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'LegacyPlotter.js':
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/LegacyPlotter.js', httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/LegacyPlotter.js', httpResponse)
}
break
case 'PlotterPanel.js':
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/PlotterPanel.js', httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/PlotterPanel.js', httpResponse)
}
break
case 'Images': // This means the Images folder.
{
let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2]
let path = global.env.PATH_TO_PLATFORM + '/WebServer/Images/' + requestPath[2]
if (requestPath[3] !== undefined) {
path = path + '/' + requestPath[3]
@@ -1231,12 +1403,12 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'WebServer': // This means the WebServer folder.
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/' + requestPath[2], httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/' + requestPath[2], httpResponse)
}
break
case 'externalScripts': // This means the WebServer folder.
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/externalScripts/' + requestPath[2], httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + requestPath[2], httpResponse)
}
break
case 'Plotters': // This means the plotter folder, not to be confused with the Plotters script!
@@ -1251,12 +1423,12 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'ChartLayers':
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse)
}
break
case 'Files':
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/Data-Files/' + requestPath[2], httpResponse)
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/UI/Data-Files/' + requestPath[2], httpResponse)
}
break
case 'Fonts':
@@ -1406,13 +1578,13 @@ exports.newHttpInterface = function newHttpInterface() {
try {
let project = unescape(requestPath[2])
let folder = unescape(requestPath[3])
let response = await SA.projects.communityPlugins.utilities.plugins.getPluginFileNames(
project,
folder
).catch(err => {
).catch(err => {
console.log('[ERROR] httpInterface -> PluginFileNames -> err.stack = ' + err.stack)
})
})
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(response), httpResponse)
@@ -1445,25 +1617,24 @@ exports.newHttpInterface = function newHttpInterface() {
if (fileName === 'Superalgos-CL.json') {
fileName = 'Superalgos-PL.json'
}
await SA.projects.communityPlugins.utilities.plugins.getPluginFileContent(
project,
folder,
fileName
)
.then( response =>
{
.then(response => {
SA.projects.foundations.utilities.httpResponses.respondWithContent(response, httpResponse)
}
)
.catch(err => {
let error = {
result: 'Fail Because',
message: err
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
return
})
)
.catch(err => {
let error = {
result: 'Fail Because',
message: err
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
return
})
} catch (err) {
console.log('[ERROR] httpInterface -> LoadPlugin -> Method call produced an error.')
@@ -1772,7 +1943,7 @@ exports.newHttpInterface = function newHttpInterface() {
break
default:
{
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_PLATFORM)
}
}
} catch (err) {
+1 -1
View File
@@ -63,7 +63,7 @@
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Name = ' + message.event.taskName)
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Id = ' + message.event.taskId)
let path = './TaskServerRoot.js'
let path = global.env.BASE_PATH + '/TaskServerRoot.js'
/* Workarround to avoid having the same debug port at the forked process which makes it crash. */
for (let i = 0; i < process.execArgv.length; i++) {
+1 -1
View File
@@ -9,7 +9,7 @@
const WEB_SOCKET = SA.nodeModules.ws
let socketServer
let port = global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT
let port = global.env.PLATFORM_WEB_SOCKETS_INTERFACE_PORT
return thisObject
+4 -5
View File
@@ -6,7 +6,7 @@ exports.newPlatformApp = function newPlatformApp() {
return thisObject
async function run() {
async function run(initialWorkspace) {
process.on('uncaughtException', function (err) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
@@ -133,14 +133,13 @@ exports.newPlatformApp = function newPlatformApp() {
console.log('')
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
console.log('')
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
WEB_SOCKETS_INTERFACE.initialize()
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.PLATFORM_WEB_SOCKETS_INTERFACE_PORT)
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
HTTP_INTERFACE.initialize()
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
HTTP_INTERFACE.initialize(initialWorkspace)
console.log('Http Interface .............................................. Listening at port ' + global.env.PLATFORM_HTTP_INTERFACE_PORT)
console.log('')
console.log("You are running Superalgos Beta 12")
+2 -2
View File
@@ -45,7 +45,7 @@ function newDailyFiles() {
}
}
function initialize(pMine, pBot, pSession, pProduct, pDataset, pExchange, pMarket, pDatetime, pTimeFrame, pHost, pPort, pEventsServerClient, callBackFunction) {
function initialize(pMine, pBot, pSession, pProduct, pDataset, pExchange, pMarket, pDatetime, pTimeFrame, pHost, pPort, pEventsServerClient, callBackFunction, scheme='http') {
try {
callBackWhenFileReceived = callBackFunction
@@ -55,7 +55,7 @@ function newDailyFiles() {
let timeFrames
fileCloud = newFileCloud()
fileCloud.initialize(pBot, pHost, pPort)
fileCloud.initialize(pBot, pHost, pPort, scheme)
/* Config Validations */
if (pDataset.config.validTimeFrames === undefined) {
+2 -2
View File
@@ -17,8 +17,8 @@ function newFileCloud () {
let fileStorage
return thisObject
function initialize (pBot, pHost, pPort) {
fileStorage = newFileStorage(pHost, pPort)
function initialize (pBot, pHost, pPort, scheme='http') {
fileStorage = newFileStorage(pHost, pPort, scheme)
}
function getFile (pMine, pBot, pSession, pProduct, pDataset, pExchange, pMarket, ptimeFrameLabel, pDatetime, pSequence, pDataRange, pTimeFrames, callBackFunction) {
+2 -2
View File
@@ -1,4 +1,4 @@
function newFileStorage(host, port) {
function newFileStorage(host, port, scheme='http') {
const MODULE_NAME = 'File Storage'
const INFO_LOG = false
const logger = newWebDebugLog()
@@ -40,7 +40,7 @@ function newFileStorage(host, port) {
let url
if (host !== undefined && port !== undefined) {
url = 'http://' + host + ':' + port + '/' + folder + filePath
url = scheme + '://' + host + ':' + port + '/' + folder + filePath
} else {
url = folder + filePath
}
+3 -2
View File
@@ -80,7 +80,8 @@ function newMarketFiles() {
pHost,
pPort,
pEventsServerClient,
callBackFunction) {
callBackFunction,
scheme='http') {
try {
let timeFrames
@@ -94,7 +95,7 @@ function newMarketFiles() {
eventsServerClient = pEventsServerClient
fileCloud = newFileCloud()
fileCloud.initialize(pBot, pHost, pPort)
fileCloud.initialize(pBot, pHost, pPort, scheme)
/* Some Validations */
if (dataset.config.validTimeFrames === undefined) {
+7 -2
View File
@@ -218,11 +218,12 @@ function newEventsServerClient(lanNetworkNode) {
try {
let host
let port
/* At this point the node does not have the payload property yet, that is why we have to do this manually */
let extwsurl
try {
let config = JSON.parse(lanNetworkNode.config)
host = config.host
port = config.webSocketsPort
extwsurl = config.webSocketsExternalURL
/* Check if we really have to stablish the connection. */
if (config.autoConnect === false) { return }
@@ -268,8 +269,12 @@ function newEventsServerClient(lanNetworkNode) {
return
}
const WEB_SOCKETS_URL = 'ws://' + host + ':' + port + ''
let wsurl = 'ws://' + host + ':' + port + ''
if (extwsurl !== undefined) {
wsurl = extwsurl
}
const WEB_SOCKETS_URL = wsurl
WEB_SOCKETS_CONNECTION = new WebSocket(WEB_SOCKETS_URL)
WEB_SOCKETS_CONNECTION.onerror = error => {
console.log('WebSocket error:' + JSON.stringify(error))
+5 -5
View File
@@ -74,7 +74,7 @@ function newProductStorage(name) {
}
}
function initialize(mine, bot, session, product, exchange, market, pDatetime, pTimeFrame, host, port, eventsServerClient, callBackFunction) {
function initialize(mine, bot, session, product, exchange, market, pDatetime, pTimeFrame, host, port, eventsServerClient, callBackFunction, scheme='http') {
try {
datetime = pDatetime
timeFrame = pTimeFrame
@@ -90,7 +90,7 @@ function newProductStorage(name) {
dataSetsToLoad++
let marketFiles = newMarketFiles()
marketFiles.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onMarketFileReady)
marketFiles.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onMarketFileReady, scheme)
thisObject.marketFiles.push(marketFiles)
}
break
@@ -99,7 +99,7 @@ function newProductStorage(name) {
dataSetsToLoad++
let dailyFiles = newDailyFiles()
dailyFiles.initialize(mine, bot, session, product, dataset, exchange, market, pDatetime, pTimeFrame, host, port, eventsServerClient, onDailyFileReady)
dailyFiles.initialize(mine, bot, session, product, dataset, exchange, market, pDatetime, pTimeFrame, host, port, eventsServerClient, onDailyFileReady, scheme)
thisObject.dailyFiles.push(dailyFiles)
}
break
@@ -108,7 +108,7 @@ function newProductStorage(name) {
dataSetsToLoad++
let singleFile = newSingleFile()
singleFile.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onSingleFileReady)
singleFile.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onSingleFileReady, scheme)
thisObject.singleFile.push(singleFile)
}
break
@@ -117,7 +117,7 @@ function newProductStorage(name) {
dataSetsToLoad++
let fileSequences = newFileSequence()
fileSequences.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onFileSequenceReady)
fileSequences.initialize(mine, bot, session, product, dataset, exchange, market, host, port, eventsServerClient, onFileSequenceReady, scheme)
thisObject.fileSequences.push(fileSequences)
}
break
+34 -12
View File
@@ -1,4 +1,4 @@
function getSchemaDocument (node, project) {
function getSchemaDocument(node, project) {
if (node === null || node === undefined) {
console.log('[ERROR] Can not get the schema document of a null or undefined node ')
return
@@ -7,13 +7,35 @@ function getSchemaDocument (node, project) {
let APP_SCHEMA = SCHEMAS_BY_PROJECT.get(project)
if (APP_SCHEMA !== undefined) {
return SCHEMAS_BY_PROJECT.get(project).map.appSchema.get(node.type)
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.appSchema.get(node.type)
/*
As of today, we are still splitting the codebase into multiple projects and there are Menu Actions which do not
have a well defined relatedUIObjectProject. There are a few techniques in place to try to guess it, but
even those can fail. For that reason, we will temporally see if we can find the schema document at any of the
available projects.
TODO: We need to explictly declare the project of a relatedUIObject in order to avoid potential name collision
between nodes belonging to more than one project.
*/
if (schemaDocument === undefined) {
for (let j = 0; j < PROJECTS_SCHEMA.length; j++) {
let project = PROJECTS_SCHEMA[j].name
schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.appSchema.get(node.type)
if (schemaDocument !== undefined) {
break
}
}
}
return schemaDocument
} else {
console.log('[ERROR] Could not get APP Schema for project ' + node.project)
}
}
function dynamicDecimals (value, minDecimals) {
function dynamicDecimals(value, minDecimals) {
if (minDecimals === undefined) {
minDecimals = 0
}
@@ -26,7 +48,7 @@ function dynamicDecimals (value, minDecimals) {
return returnValue
}
function convertTimeFrameToName (pTimeFrame) {
function convertTimeFrameToName(pTimeFrame) {
for (let i = 0; i < dailyTimeFramesArray.length; i++) {
let period = dailyTimeFramesArray[i]
if (period[0] === pTimeFrame) {
@@ -42,7 +64,7 @@ function convertTimeFrameToName (pTimeFrame) {
}
}
function nextPorwerOf10 (number) {
function nextPorwerOf10(number) {
for (let i = -10; i <= 10; i++) {
if (number < Math.pow(10, i)) {
return Math.pow(10, i)
@@ -50,18 +72,18 @@ function nextPorwerOf10 (number) {
}
}
function pad (str, max) {
function pad(str, max) {
str = str.toString()
return str.length < max ? pad('0' + str, max) : str
}
function moveToUserPosition (container, currentDate, currentRate, coordinateSystem, ignoreX, ignoreY, mousePosition, fitFunction) {
function moveToUserPosition(container, currentDate, currentRate, coordinateSystem, ignoreX, ignoreY, mousePosition, fitFunction) {
let targetPoint = {
x: currentDate.valueOf(),
y: currentRate
}
/* Put this point in the coordinate system of the UI.projects.foundations.spaces.chartingSpace.viewport */
/* Put this point in the coordinate system of the UI.projects.foundations.spaces.chartingSpace.viewport */
targetPoint = coordinateSystem.transformThisPoint(targetPoint)
targetPoint = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(targetPoint, container)
@@ -81,7 +103,7 @@ function moveToUserPosition (container, currentDate, currentRate, coordinateSyst
container.displace(displaceVector)
}
function removeTime (datetime) {
function removeTime(datetime) {
if (datetime === undefined) { return }
let dateOnly = new Date(Math.trunc(datetime.valueOf() / ONE_DAY_IN_MILISECONDS) * ONE_DAY_IN_MILISECONDS)
@@ -89,14 +111,14 @@ function removeTime (datetime) {
return dateOnly
}
function newUniqueId () {
function newUniqueId() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8)
return v.toString(16)
})
}
function splitTextIntoPhrases (text, wordsPerLine) {
function splitTextIntoPhrases(text, wordsPerLine) {
try {
if (text.split === undefined) {
return []
@@ -128,7 +150,7 @@ function splitTextIntoPhrases (text, wordsPerLine) {
}
}
function getTextWidth (text) {
function getTextWidth(text) {
var metrics = browserCanvasContext.measureText(text)
return metrics.width
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

+21
View File
@@ -25,6 +25,27 @@ content: "Summary: ";
font-weight: bold;
}
.tutorial-content-div {
overflow-y: auto;
overflow-x: clip;
}
::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
.tutorial-definitionTable {
background-color: #f3f3f3;
border-top-color: #a6e1ec;
+31 -4
View File
@@ -48,13 +48,40 @@ SA.nodeModules = {
ccxt: require('ccxt'),
octokit: require("@octokit/rest"),
simpleGit: require('simple-git'),
lookpath: require('lookpath')
lookpath: require('lookpath'),
process: require('process'),
childProcess: require('child_process')
}
/*
Check if we are starting from a particular workspace.
*/
let initialWorkspace = {}
for (let i = 0; i < process.argv.length; i++) {
let arg = process.argv[i]
if (arg === 'noBrowser') { continue }
if (arg === 'minMemo') { continue }
if (arg.indexOf(':') >= 0) { continue }
if (arg.indexOf('/') >= 0) { continue }
if (initialWorkspace.project === undefined) {
if (arg !== 'My-Workspaces') {
initialWorkspace.type = 'Plugin'
initialWorkspace.project = arg
} else {
initialWorkspace.type = 'My-Workspaces'
initialWorkspace.project = ''
}
} else {
initialWorkspace.name = arg
}
}
run()
run(initialWorkspace)
async function run() {
async function run(initialWorkspace) {
PL.app = require('./Platform/PlatformApp.js').newPlatformApp()
await PL.app.run()
await PL.app.run(initialWorkspace)
console.log('Superalgos Platform App is Running!')
}
File diff suppressed because it is too large. Load diff
@@ -8,7 +8,7 @@
"iconPathOff": "algorithmic-trading-project",
"iconProject": "Algorithmic-Trading",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -16,7 +16,7 @@
"relatedUiObject": "Trading Mine",
"relatedUiObjectProject": "Algorithmic-Trading",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -24,7 +24,7 @@
"relatedUiObject": "Trading Engine",
"relatedUiObjectProject": "Algorithmic-Trading",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -32,17 +32,17 @@
"relatedUiObject": "Trading System",
"relatedUiObjectProject": "Algorithmic-Trading",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionProject": "Foundations"
"iconPathOff": "delete-entity"
}
],
"isProjectHead": true,
@@ -15,31 +15,34 @@
"label": "Add Process Definition",
"relatedUiObject": "Process Definition",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"label": "Add Product Definition",
"relatedUiObject": "Product Definition",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"label": "Add Product Definition Folder",
"relatedUiObject": "Product Definition Folder",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -6,17 +6,18 @@
"label": "Add Missing Children",
"relatedUiObject": "Trading Engine",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Algorithmic-Trading"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isHierarchyHead": true,
@@ -17,7 +17,7 @@
"relatedUiObject": "Trading Bot",
"relatedUiObjectProject": "Algorithmic-Trading",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -25,17 +25,17 @@
"relatedUiObject": "Plotter",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -6,7 +6,8 @@
"label": "Add Trading Strategy",
"relatedUiObject": "Trading Strategy",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
@@ -15,17 +16,18 @@
"label": "Add Dynamic Indicators",
"relatedUiObject": "Dynamic Indicators",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isHierarchyHead": true,
@@ -17,7 +17,7 @@ exports.newAlgorithmicTradingBotModulesTradingOrders = function (processIndex) {
let sessionParameters
let exchangeAPIModuleObject = TS.projects.algorithmicTrading.botModules.exchangeAPI.newAlgorithmicTradingBotModulesExchangeAPI(processIndex)
let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex)
let announcementsModuleObject = TS.projects.socialBots.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex)
return thisObject
@@ -1262,7 +1262,7 @@ exports.newAlgorithmicTradingBotModulesTradingOrders = function (processIndex) {
tradingSystem.highlights.push(executionAlgorithm.id)
tradingSystem.highlights.push(executionNode.id)
announcementsModuleObject.makeAnnoucements(event)
announcementsModuleObject.makeAnnouncements(event)
return situation.name // if the event is triggered, we return the name of the situation that passed
}
}
@@ -31,7 +31,7 @@ exports.newAlgorithmicTradingBotModulesTradingOutput = function (processIndex) {
/* Preparing everything for the Simulation */
let tradingSimulationModuleObject = TS.projects.algorithmicTrading.botModules.tradingSimulation.newAlgorithmicTradingBotModulesTradingSimulation(processIndex)
let outputDatasets = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
let outputDatasetsMap = new Map()
await TS.projects.foundations.functionLibraries.outputManagementFunctions.readFiles(
@@ -37,7 +37,7 @@ exports.newAlgorithmicTradingBotModulesTradingRecords = function (processIndex)
we have a pointer to the node that have the information we need to extract.
Later, based on the product record definition we will extract each individual value.
*/
let outputDatasets = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
for (let i = 0; i < outputDatasets.length; i++) {
let outputDatasetNode = outputDatasets[i]
@@ -372,8 +372,8 @@ exports.newAlgorithmicTradingBotModulesTradingSimulation = function (processInde
}
function positionChart(chart) {
let dataDependencies = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency')
dataDependencies = TS.projects.foundations.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies)
let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency')
dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies)
/* Finding the Current Element on Daily Files */
if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_PROCESSING_DAILY_FILES) {
@@ -24,7 +24,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
let tradingStrategyModuleObject = TS.projects.algorithmicTrading.botModules.tradingStrategy.newAlgorithmicTradingBotModulesTradingStrategy(processIndex)
let tradingPositionModuleObject = TS.projects.algorithmicTrading.botModules.tradingPosition.newAlgorithmicTradingBotModulesTradingPosition(processIndex)
let tradingExecutionModuleObject = TS.projects.algorithmicTrading.botModules.tradingExecution.newAlgorithmicTradingBotModulesTradingExecution(processIndex)
let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex)
let announcementsModuleObject = TS.projects.socialBots.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex)
let snapshotsModuleObject = TS.projects.algorithmicTrading.botModules.snapshots.newAlgorithmicTradingBotModulesSnapshots(processIndex)
let tradingEpisodeModuleObject = TS.projects.algorithmicTrading.botModules.tradingEpisode.newAlgorithmicTradingBotModulesTradingEpisode(processIndex)
@@ -147,8 +147,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
/* Initialize this */
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.triggerOn.value = 1
announcementsModuleObject.makeAnnoucements(triggerStage.triggerOn)
announcementsModuleObject.makeAnnoucements(triggerStage)
announcementsModuleObject.makeAnnouncements(triggerStage.triggerOn)
if (TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_NODE.type === 'Backtesting Session') {
if (sessionParameters.snapshots !== undefined) {
@@ -159,6 +158,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
}
changeStageStatus('Trigger Stage', 'Open')
}
}
}
@@ -194,7 +194,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingSystem.highlights.push(triggerStage.id)
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.triggerOff.value = 1
announcementsModuleObject.makeAnnoucements(triggerStage.triggerOff)
announcementsModuleObject.makeAnnouncements(triggerStage.triggerOff)
changeStageStatus('Trigger Stage', 'Closed', 'Trigger Off Event')
tradingStrategyModuleObject.closeStrategy('Trigger Off')
}
@@ -233,8 +233,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingPositionModuleObject.openPosition(situation.name)
announcementsModuleObject.makeAnnoucements(triggerStage.takePosition)
announcementsModuleObject.makeAnnoucements(strategy.openStage)
announcementsModuleObject.makeAnnouncements(triggerStage.takePosition)
if (TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_NODE.type === 'Backtesting Session') {
if (sessionParameters.snapshots !== undefined) {
@@ -436,7 +435,6 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
/* Now we switch to the Open status. */
changeStageStatus('Manage Stage', 'Open')
announcementsModuleObject.makeAnnoucements(manageStage)
}
}
@@ -487,7 +485,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingPositionModuleObject.applyStopLossFormula(tradingSystem.formulas, phase.formula.id)
if (tradingEngine.tradingCurrent.position.stopLoss.value !== previousValue) {
announcementsModuleObject.makeAnnoucements(phase)
announcementsModuleObject.makeAnnouncements(phase)
}
}
}
@@ -510,7 +508,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingPositionModuleObject.applyTakeProfitFormula(tradingSystem.formulas, phase.formula.id)
if (tradingEngine.tradingCurrent.position.takeProfit.value !== previousValue) {
announcementsModuleObject.makeAnnoucements(phase)
announcementsModuleObject.makeAnnouncements(phase)
}
}
}
@@ -591,7 +589,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingPositionModuleObject.updateStopLoss(tradingEngine.tradingCurrent.position.stopLoss.stopLossPhase.value + 1)
announcementsModuleObject.makeAnnoucements(nextPhaseEvent)
announcementsModuleObject.makeAnnouncements(nextPhaseEvent)
/* Reset this counter */
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.nextPhase.value = 1
@@ -642,7 +640,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
continue
}
announcementsModuleObject.makeAnnoucements(moveToPhaseEvent)
announcementsModuleObject.makeAnnouncements(moveToPhaseEvent)
/* Reset this counter */
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.moveToPhase.value = 1
@@ -698,7 +696,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingPositionModuleObject.updateTakeProfit(tradingEngine.tradingCurrent.position.takeProfit.takeProfitPhase.value + 1)
announcementsModuleObject.makeAnnoucements(nextPhaseEvent)
announcementsModuleObject.makeAnnouncements(nextPhaseEvent)
/* Reset this counter */
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.nextPhase.value = 1
@@ -749,7 +747,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
continue
}
announcementsModuleObject.makeAnnoucements(moveToPhaseEvent)
announcementsModuleObject.makeAnnouncements(moveToPhaseEvent)
/* Reset this counter */
tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.moveToPhase.value = 1
@@ -762,54 +760,50 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
}
function checkStopLossOrTakeProfitWasHit() {
{
let strategy = tradingSystem.tradingStrategies[tradingEngine.tradingCurrent.strategy.index.value]
/*
Checking what happened since the last execution. We need to know if the Stop Loss
or our Take Profit were hit.
*/
let strategy = tradingSystem.tradingStrategies[tradingEngine.tradingCurrent.strategy.index.value]
/*
Checking what happened since the last execution. We need to know if the Stop Loss
or our Take Profit were hit.
*/
/* Stop Loss condition: Here we verify if the Stop Loss was hit or not. */
if (
(
tradingEngine.tradingCurrent.position.stopLoss.stopLossPosition.value === 'Above' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.max.value >= tradingEngine.tradingCurrent.position.stopLoss.value
) ||
(
tradingEngine.tradingCurrent.position.stopLoss.stopLossPosition.value === 'Below' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.min.value <= tradingEngine.tradingCurrent.position.stopLoss.value
)
) {
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] checkStopLossOrTakeProfitWasHit -> Stop Loss was hit.')
/* Stop Loss condition: Here we verify if the Stop Loss was hit or not. */
if (
(
tradingEngine.tradingCurrent.position.stopLoss.stopLossPosition.value === 'Above' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.max.value >= tradingEngine.tradingCurrent.position.stopLoss.value
) ||
(
tradingEngine.tradingCurrent.position.stopLoss.stopLossPosition.value === 'Below' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.min.value <= tradingEngine.tradingCurrent.position.stopLoss.value
)
) {
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] checkStopLossOrTakeProfitWasHit -> Stop Loss was hit.')
tradingPositionModuleObject.closingPosition('Stop Loss')
changeStageStatus('Close Stage', 'Opening')
changeStageStatus('Manage Stage', 'Closed', 'Stop Loss Hit')
announcementsModuleObject.makeAnnoucements(strategy.closeStage)
return
}
/* Take Profit condition: Here we verify if the Take Profit was hit or not. */
if (
(
tradingEngine.tradingCurrent.position.takeProfit.takeProfitPosition.value === 'Below' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.min.value <= tradingEngine.tradingCurrent.position.takeProfit.value
) ||
(
tradingEngine.tradingCurrent.position.takeProfit.takeProfitPosition.value === 'Above' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.max.value >= tradingEngine.tradingCurrent.position.takeProfit.value
)
) {
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] checkStopLossOrTakeProfitWasHit -> Take Profit was hit.')
tradingPositionModuleObject.closingPosition('Take Profit')
changeStageStatus('Close Stage', 'Opening')
changeStageStatus('Manage Stage', 'Closed', 'Take Profit Hit')
announcementsModuleObject.makeAnnoucements(strategy.closeStage)
return
}
tradingPositionModuleObject.closingPosition('Stop Loss')
changeStageStatus('Close Stage', 'Opening')
changeStageStatus('Manage Stage', 'Closed', 'Stop Loss Hit')
return
}
/* Take Profit condition: Here we verify if the Take Profit was hit or not. */
if (
(
tradingEngine.tradingCurrent.position.takeProfit.takeProfitPosition.value === 'Below' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.min.value <= tradingEngine.tradingCurrent.position.takeProfit.value
) ||
(
tradingEngine.tradingCurrent.position.takeProfit.takeProfitPosition.value === 'Above' &&
tradingEngine.tradingCurrent.tradingEpisode.candle.max.value >= tradingEngine.tradingCurrent.position.takeProfit.value
)
) {
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] checkStopLossOrTakeProfitWasHit -> Take Profit was hit.')
tradingPositionModuleObject.closingPosition('Take Profit')
changeStageStatus('Close Stage', 'Opening')
changeStageStatus('Manage Stage', 'Closed', 'Take Profit Hit')
return
}
return
}
}
}
@@ -1114,7 +1108,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
tradingSystem.highlights.push(closeStageEvent.id)
tradingSystem.highlights.push(stage.id)
announcementsModuleObject.makeAnnoucements(closeStageEvent)
announcementsModuleObject.makeAnnouncements(closeStageEvent)
return true
}
}
@@ -1148,9 +1142,11 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
if (stage.status.value === 'Open') {
openStage(stage)
checkUserDefinedCode(stageName, 'Open')
checkAnnounce(stageName, 'Open')
}
if (stage.status.value === 'Closed') {
checkUserDefinedCode(stageName, 'Closed')
checkAnnounce(stageName, 'Closed')
closeStage(stage, stageName)
}
@@ -1186,7 +1182,6 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
if (stageName === 'Close Stage') {
if (tradingEngine.tradingCurrent.position.status.value === 'Open') {
tradingPositionModuleObject.closingPosition('Close Stage Closed')
/* NOTE:TODO: Announcement May need added Here */
}
}
}
@@ -1271,33 +1266,41 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
/* checkUserDefinedCode(): Checks if User Defined Code exists and processes if applicable. */
function checkUserDefinedCode(stage, status, when) {
let tradingSystemStage = getTradingSystemStage(stage);
let tradingSystemStage = getTradingSystemStage(stage);
if (tradingSystemStage !== undefined &&
tradingSystemStage.userDefinedCode !== undefined) {
if (status === 'Running' && when !== tradingSystemStage.userDefinedCode.config.whileAtStageWhenToRun) { return; }
if (tradingSystemStage !== undefined &&
tradingSystemStage.userDefinedCode !== undefined) {
if (status === 'Running' && when !== tradingSystemStage.userDefinedCode.config.whileAtStageWhenToRun) { return; }
switch(status) {
case 'Open' : {
if (tradingSystemStage.userDefinedCode.config.runWhenEnteringStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
switch(status) {
case 'Open' : {
if (tradingSystemStage.userDefinedCode.config.runWhenEnteringStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;
}
case 'Running' : {
if (tradingSystemStage.userDefinedCode.config.runWhileAtStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;
}
case 'Closed' : {
if (tradingSystemStage.userDefinedCode.config.runWhenExitingStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;
}
}
break;
}
case 'Running' : {
if (tradingSystemStage.userDefinedCode.config.runWhileAtStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;
}
case 'Closed' : {
if (tradingSystemStage.userDefinedCode.config.runWhenExitingStage) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;
}
}
}
}
// checkAnnounce(): Check if stage announcement should be made
function checkAnnounce(stage, status) {
let tradingSystemStage = getTradingSystemStage(stage);
if (status === 'Open' || status === 'Closed') {
announcementsModuleObject.makeAnnouncements(tradingSystemStage, status)
}
}
/* getTradingSystemStage(): takes stage name returns stage object. */
@@ -1321,4 +1324,4 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
}
}
}
}
}
@@ -348,13 +348,13 @@ exports.newAlgorithmicTradingBotModulesTradingSystem = function (processIndex) {
}
if (errorMessage !== undefined) {
tradingSystem.addError([node.id, errorMessage, docs])
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[ERROR] evalCondition -> errorMessage = ' + errorMessage)
}
if (value !== undefined) {
tradingSystem.values.push([node.id, value])
}
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] evalCondition -> value = ' + value)
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[INFO] evalCondition -> errorMessage = ' + errorMessage)
}
function evalFormula(node) {
@@ -7,7 +7,7 @@
}
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE =
TS.projects.foundations.botModules.socialBots.newFoundationsBotModulesSocialBots(processIndex)
TS.projects.socialBots.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex)
return thisObject;
@@ -33,6 +33,10 @@ function newAlgorithmicTradingActionSwitch() {
UI.projects.algorithmicTrading.functionLibraries.tradingSessionFunctions.stopSession(action.node, action.callBackFunction)
}
break
default: {
console.log("[WARN] Action sent to Algorithmic-Trading Action Switch does not belong here. Verify at the App Schema file of the node that triggered this action that the actionProject is pointing to the right project. -> Action = " + action.name + " -> Action Node Name = " + action.node.name)
}
}
}
}
@@ -110,7 +110,7 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
'Simulated Exchange Events->Simulated Partial Fill->Simulated Actual Rate->Simulated Fees Paid->Formula->' +
'User Defined Code->Javascript Code->'
let tradingSystem = UI.projects.foundations.functionLibraries.protocolNode.getProtocolNode(node.tradingSystemReference.payload.referenceParent, false, true, true, false, false, lightingPath)
let tradingSystem = UI.projects.visualScripting.functionLibraries.protocolNode.getProtocolNode(node.tradingSystemReference.payload.referenceParent, false, true, true, false, false, lightingPath)
lightingPath = '' +
'Trading Engine->' +
@@ -149,7 +149,7 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
'Index->Situation Name->Formula->Periods->' +
'User Defined Variables->User Defined Variable->'
let tradingEngine = UI.projects.foundations.functionLibraries.protocolNode.getProtocolNode(node.tradingEngineReference.payload.referenceParent, false, true, true, false, false, lightingPath)
let tradingEngine = UI.projects.visualScripting.functionLibraries.protocolNode.getProtocolNode(node.tradingEngineReference.payload.referenceParent, false, true, true, false, false, lightingPath)
lightingPath = '' +
'Backtesting Session->Paper Trading Session->Forward Testing Session->Live Trading Session->' +
@@ -159,13 +159,13 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
'Social Bot Command->Formula->' +
'Exchange Account Asset->Asset->'
let session = UI.projects.foundations.functionLibraries.protocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath)
let session = UI.projects.visualScripting.functionLibraries.protocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath)
let defaultExchange = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(validationsResult.exchange.payload, 'codeName')
let defaultExchange = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.exchange.payload, 'codeName')
let defaultMarket =
UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(validationsResult.market.baseAsset.payload.referenceParent.payload, 'codeName')
UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.market.baseAsset.payload.referenceParent.payload, 'codeName')
+ '-' +
UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(validationsResult.market.quotedAsset.payload.referenceParent.payload, 'codeName')
UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.market.quotedAsset.payload.referenceParent.payload, 'codeName')
let dependencyFilter = UI.projects.foundations.functionLibraries.dependenciesFilter.createDependencyFilter(
defaultExchange,
@@ -266,7 +266,7 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
return
}
result.lanNetworkNode = UI.projects.foundations.utilities.meshes.findNodeInNodeMesh(result.taskManager, 'LAN Network Node', undefined, true, false, true, false)
result.lanNetworkNode = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(result.taskManager, 'LAN Network Node', undefined, true, false, true, false)
if (node.tradingSystemReference === undefined) {
node.payload.uiObject.setErrorMessage('Session needs a child Trading System Reference.')
@@ -9,17 +9,18 @@
"workDoneLabel": "Done",
"relatedUiObject": "API Map",
"actionFunction": "payload.executeAction",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -3,13 +3,13 @@
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"title": [
@@ -16,38 +16,42 @@
"actionFunction": "payload.executeAction",
"label": "Add Plugin File Position",
"relatedUiObject": "Plugin File Position",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Enable Saving With Workspace",
"actionFunction": "payload.executeAction",
"label": "Enable Saving With Workspace",
"relatedUiObject": "Plugin File",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Disable Saving With Workspace",
"actionFunction": "payload.executeAction",
"label": "Disable Saving With Workspace",
"relatedUiObject": "Plugin File",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Save Plugin",
"actionFunction": "payload.executeAction",
"label": "Save Plugin",
"relatedUiObject": "Plugin File",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"editors": {
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -14,17 +14,18 @@
"label": "Add Missing Plugin Types",
"relatedUiObject": "Plugins",
"actionFunction": "payload.executeAction",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"initialValues": {
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -15,13 +15,13 @@
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -10,17 +10,18 @@
"workDoneLabel": "Done",
"relatedUiObject": "Tutorial",
"actionFunction": "payload.executeAction",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Education"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
@@ -6,7 +6,8 @@
"label": "Add Missing Children",
"relatedUiObject": "Foundations Project",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
@@ -14,17 +15,17 @@
"relatedUiObject": "Plugins",
"relatedUiObjectProject": "Community-Plugins",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionProject": "Foundations"
"iconPathOff": "delete-entity"
}
],
"isProjectHead": true,
@@ -9,17 +9,18 @@
"workDoneLabel": "Done",
"relatedUiObject": "Plugin Project",
"actionFunction": "payload.executeAction",
"actionProject": "Community-Plugins"
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionProject": "Foundations"
"iconPathOff": "delete-entity"
}
],
"isHierarchyHead": true,
@@ -93,6 +93,10 @@ function newCommunityPluginsActionSwitch() {
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePlugin(action.node, action.rootNodes)
}
break
default: {
console.log("[WARN] Action sent to Community-Plugins Action Switch does not belong here. Verify at the App Schema file of the node that triggered this action that the actionProject is pointing to the right project. -> Action = " + action.name + " -> Action Node Name = " + action.node.name)
}
}
}
}
@@ -22,8 +22,8 @@ function newPluginsFunctionLibraryPluginsFunctions() {
for (let k = 0; k < PROJECTS_SCHEMA.length; k++) {
let projectDefinition = PROJECTS_SCHEMA[k]
let project = projectDefinition.name
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenByName(node, project) === true) {
let child = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin Project')
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenByName(node, project) === true) {
let child = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin Project')
child.name = project
let config = JSON.parse(child.config)
config.codeName = project
@@ -33,7 +33,7 @@ function newPluginsFunctionLibraryPluginsFunctions() {
}
function addMissingPluginTypes(node, rootNodes) {
let project = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'codeName')
let project = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'codeName')
if (project === undefined || project === "") { return }
for (let k = 0; k < PROJECTS_SCHEMA.length; k++) {
let projectDefinition = PROJECTS_SCHEMA[k]
@@ -42,8 +42,8 @@ function newPluginsFunctionLibraryPluginsFunctions() {
for (let i = 0; i < projectDefinition.plugins.length; i++) {
let pluginType = "Plugin" + " " + projectDefinition.plugins[i]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenByType(node, pluginType) === true) {
UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, pluginType, undefined, 'Community-Plugins')
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenByType(node, pluginType) === true) {
UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, pluginType, undefined, 'Community-Plugins')
}
}
}
@@ -194,12 +194,12 @@ function newPluginsFunctionLibraryPluginsFunctions() {
}
function enableSavingWithWorkspace(node, rootNodes) {
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', true)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', true)
node.payload.uiObject.setInfoMessage('Saving with Workspace Enabled')
}
function disableSavingWithWorkspace(node, rootNodes) {
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', false)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', false)
node.payload.uiObject.setInfoMessage('Saving with Workspace Disabled')
}
@@ -209,10 +209,10 @@ function newPluginsFunctionLibraryPluginsFunctions() {
function installAsPlugin(node, rootNodes) {
let plugins = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Plugins')
let pluginProject = UI.projects.foundations.utilities.nodeChildren.findChildByCodeName(plugins, node.project)
let pluginProject = UI.projects.visualScripting.utilities.nodeChildren.findChildByCodeName(plugins, node.project)
let pluginFolderName = UI.projects.communityPlugins.utilities.plugins.getPluginFolderNamesByNodeType(node.type)
let pluginForlderNodeType = 'Plugin ' + pluginFolderName.replaceAll('-', ' ')
let pluginFolderNode = UI.projects.foundations.utilities.nodeChildren.findChildByType(pluginProject, pluginForlderNodeType)
let pluginFolderNode = UI.projects.visualScripting.utilities.nodeChildren.findChildByType(pluginProject, pluginForlderNodeType)
let pluginFile = UI.projects.communityPlugins.utilities.plugins.addMissingPluginFile(pluginFolderNode, node.name, pluginFolderName, node.type, node.project, true)
node.isPlugin = true
@@ -33,8 +33,8 @@ function newPluginsUtilitiesPlugins() {
}
function addMissingPluginFile(node, fileName, pluginFolder, nodeType, project, saveWithWorkspace) {
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenByName(node, fileName) === true) {
let child = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin File', undefined, 'Community-Plugins')
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenByName(node, fileName) === true) {
let child = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Plugin File', undefined, 'Community-Plugins')
child.name = fileName
child.config = JSON.stringify({
project: project,
@@ -111,10 +111,10 @@ function newPluginsUtilitiesPlugins() {
}
function savePluginFile(pluginFile) {
let project = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'project')
let fileName = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'fileName')
let folderName = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'folderName')
let nodeType = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'nodeType')
let project = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'project')
let fileName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'fileName')
let folderName = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'folderName')
let nodeType = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(pluginFile.payload, 'nodeType')
if (
project === undefined ||
@@ -136,7 +136,7 @@ function newPluginsUtilitiesPlugins() {
return
}
let fileContent = JSON.stringify(
UI.projects.foundations.functionLibraries.protocolNode.getProtocolNode(pluginToSave, false, false, true, true, true),
UI.projects.visualScripting.functionLibraries.protocolNode.getProtocolNode(pluginToSave, false, false, true, true, true),
undefined,
4)
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -16,7 +16,7 @@
"relatedUiObject": "Process Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -24,17 +24,17 @@
"relatedUiObject": "Product Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -16,21 +16,24 @@
"label": "Add Sensor Bot",
"relatedUiObject": "Sensor Bot",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Data-Mining"
},
{
"action": "Add UI Object",
"label": "Add API Data Fetcher Bot",
"relatedUiObject": "API Data Fetcher Bot",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Data-Mining"
},
{
"action": "Add UI Object",
"label": "Add Indicator Bot",
"relatedUiObject": "Indicator Bot",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Data-Mining"
},
{
"action": "Add UI Object",
@@ -38,17 +41,17 @@
"relatedUiObject": "Plotter",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -8,7 +8,7 @@
"iconPathOff": "data-mining-project",
"iconProject": "Data-Mining",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -16,17 +16,17 @@
"relatedUiObject": "Data Mine",
"relatedUiObjectProject": "Data-Mining",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionProject": "Foundations"
"iconPathOff": "delete-entity"
}
],
"isProjectHead": true,
@@ -16,7 +16,7 @@
"relatedUiObject": "Process Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -24,17 +24,17 @@
"relatedUiObject": "Product Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -16,7 +16,7 @@
"relatedUiObject": "Process Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Add UI Object",
@@ -24,17 +24,17 @@
"relatedUiObject": "Product Definition",
"relatedUiObjectProject": "Foundations",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionProject": "Visual-Scripting"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction",
"actionProject": "Foundations"
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
@@ -201,7 +201,7 @@ exports.newDataMiningBotModulesFetchingProcess = function (processIndex) {
if (recordProperty.apiResponseFieldReference !== undefined) {
if (recordProperty.apiResponseFieldReference.referenceParent !== undefined) {
let apiResponseField = recordProperty.apiResponseFieldReference.referenceParent
let endpointNodeFound = TS.projects.foundations.utilities.nodeFunctions.findNodeInNodeMesh(apiResponseField, 'API Endpoint')
let endpointNodeFound = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(apiResponseField, 'API Endpoint')
/*
Every Record Property with an apiResponseFieldReference must be on the path
to a certain enpoint.
@@ -52,13 +52,13 @@
}
/* The first phase here is about checking that we have everything we need at the definition level. */
let dataDependencies = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(
let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency'
)
if (TS.projects.foundations.functionLibraries.singleMarketFunctions.validateDataDependencies(processIndex, dataDependencies, callBackFunction) !== true) { return }
let outputDatasets = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(
let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset'
)
if (TS.projects.foundations.functionLibraries.singleMarketFunctions.validateOutputDatasets(processIndex, outputDatasets, callBackFunction) !== true) { return }
@@ -138,9 +138,9 @@
contextSummary.dataset = outputDatasetNode.referenceParent.config.codeName
contextSummary.product = outputDatasetNode.referenceParent.parentNode.config.codeName
let botNode = TS.projects.foundations.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot')
let botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot')
contextSummary.bot = botNode.config.codeName
let dataMineNode = TS.projects.foundations.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine')
let dataMineNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine')
contextSummary.dataMine = dataMineNode.config.codeName
contextSummary.mineType = dataMineNode.type.replace(' ', '-')
contextSummary.project = dataMineNode.project
@@ -513,7 +513,7 @@
}
function writeDataRanges(callBack) {
let outputDatasets = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(
let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
let outputDatasetIndex = -1;
controlLoop()
@@ -151,7 +151,7 @@
function writeTimeFramesFiles(callBack) {
let outputDatasets =
TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
let outputDatasetIndex = -1;
controlLoop()
@@ -90,7 +90,7 @@ exports.newDataMiningBotModulesCheckWebhook = function (processIndex) {
try {
let http = SA.nodeModules.http
let url = 'http://' + global.env.WEB_SERVER_URL +
':' + global.env.CLIENT_HTTP_INTERFACE_PORT +
':' + global.env.PLATFORM_HTTP_INTERFACE_PORT +
'/Webhook/Fetch-Messages/' +
TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.codeName + "/" +
TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.config.codeName + "-" +
@@ -33,6 +33,10 @@ function newDataMiningActionSwitch() {
UI.projects.dataMining.functionLibraries.mineFunctions.addAllDataMineDataDependencies(action.node, action.rootNodes)
}
break
default: {
console.log("[WARN] Action sent to Data-Mining Action Switch does not belong here. Verify at the App Schema file of the node that triggered this action that the actionProject is pointing to the right project. -> Action = " + action.name + " -> Action Node Name = " + action.node.name)
}
}
}
}
@@ -73,7 +73,7 @@ function newDataMiningFunctionLibraryMineFunctions() {
function scanBotArray(botArray) {
for (let i = 0; i < botArray.length; i++) {
let bot = botArray[i]
let botProducts = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Bot Data Dependencies')
let botProducts = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Bot Data Dependencies')
botProducts.name = bot.name
UI.projects.foundations.utilities.folders.asymetricalFolderStructureCloning(
@@ -95,8 +95,8 @@ function newDataMiningFunctionLibraryMineFunctions() {
let rootNode = rootNodes[i]
if (rootNode.type === 'Data Mine') {
let dataMineDataDependencies = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Data Mine Data Dependencies')
UI.projects.foundations.functionLibraries.attachDetach.referenceAttachNode(dataMineDataDependencies, rootNode)
let dataMineDataDependencies = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Data Mine Data Dependencies')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dataMineDataDependencies, rootNode)
}
}
}
@@ -21,7 +21,7 @@
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
@@ -21,7 +21,7 @@
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
@@ -3,25 +3,27 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "docsSpaceStyle",
"label": "Add Docs Space Style",
"relatedUiObject": "Docs Space Style",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "docsSpaceSettings",
"label": "Add Docs Space Settings",
"relatedUiObject": "Docs Space Settings",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
@@ -3,22 +3,24 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Tutorial",
"iconProject": "Education",
"relatedUiObject": "Tutorial",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Docs Space",
"relatedUiObject": "Docs Space",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
@@ -26,7 +26,7 @@
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -26,21 +26,23 @@
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Tutorial Step",
"relatedUiObject": "Tutorial Step",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Tutorial Topic",
"relatedUiObject": "Tutorial Topic",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -26,17 +26,19 @@
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Tutorial Step",
"relatedUiObject": "Tutorial Step",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Tutorial Topic",
"relatedUiObject": "Tutorial Topic",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Education"
},
{
"action": "Reset Tutorial Progress",
@@ -50,7 +52,7 @@
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -9,6 +9,11 @@
"text": "La jerarquía del tutorial presenta una disposición libre de los nodos Tutorial Topic y Tutorial Step que componen un tutorial. Cada nodo de la jerarquía, incluido el nodo del tutorial principal, representa una página HTML que puede superponerse en la parte superior de ambos Design Space y el Charting Space.",
"updated": 1627245866146,
"style": "Definition"
},
{
"language": "DE",
"text": "Die Tutorial-Hierarchie besteht aus einer freien Anordnung von Tutorial Topic (Themen) und Tutorial Step nodes (Schritten), die ein Tutorial ausmachen. Jede node in der Hierarchie, einschließlich des übergeordneten Tutorial-nodes, stellt eine HTML-Seite dar, die sowohl über dem Design Space als auch dem Charting Space eingeblendet werden kann. Übersetzt ins deutsche von gitforkgit.",
"updated": 1633975790458
}
]
},
@@ -20,22 +25,50 @@
{
"style": "Text",
"text": "Nodes in the hierarchy may be arranged freely, meaning that there may be as many tutorial topics and tutorial steps as desired. Tutorial topics may contain tutorial steps but also other tutorial topics. This allows nesting topics to be used as subtopics.",
"updated": 1617649482153
"updated": 1617649482153,
"translations": [
{
"language": "DE",
"text": "Die Nodes in der Hierarchie können frei angeordnet werden, das heißt es können beliebig viele Tutorial-Themen (topic) und Tutorial-Steps vorhanden sein. Tutorial Themen können Tutorial Schritte aber auch andere Tutorial Themen enthalten. Dies erlaubt es verschachtelte Themen als Unterthemen verwendet werden.",
"updated": 1633975991952
}
]
},
{
"style": "Text",
"text": "The system – as usual – evaluates the hierarchy in a clockwise direction starting from the node to the right of the parent Tutorial node, and goes to the deepest node of each branch before moving to the next one.",
"updated": 1617649522223
"updated": 1617649522223,
"translations": [
{
"language": "DE",
"text": "Das System wertet die Hierarchie - wie üblich - im Uhrzeigersinn aus, beginnend mit dem Knoten rechts vom übergeordneten Tutorial-Knoten, zum tiefsten Knoten jedes Zweigs geht, bevor es zum nächsten geht.",
"updated": 1633976627129
}
]
},
{
"style": "Callout",
"text": "In general terms, all types of nodes behave similarly in the sense that each node, independently of the precise type, represents a tutorial step in and of itself. That is, all nodes including the top-level Tutorial node, the Tutorial Topic node, and the Tutorial Step node may display a content page as a step in the tutorial. Subtle differences shall be pointed where appropriate.",
"updated": 1617622995279
"updated": 1617622995279,
"translations": [
{
"language": "DE",
"text": "Im Allgemeinen verhalten sich alle nodes ähnlich in dem Sinne, dass jede node, unabhängig vom genauen Typ, für sich genommen einen Lernschritt darstellt. Das heißt, alle nodes, einschließlich der obersten Tutorial-node, der Tutorial Topic node und der Tutorial Step node können eine Inhaltsseite als Schritt im Tutorial anzeigen. Feinere Unterschiede sind gegebenenfalls hervorzuheben.",
"updated": 1633976586338
}
]
},
{
"style": "Note",
"text": "The key similarity among all types of nodes in the hierarchy is that all of them may draw content from the tutorial's collection of pages in the Docs. That is, each node in the hierarchy points to a Docs Page, and it is that page in the Docs that features the content displayed for the given step. The pointer is specified in the configuration of each node (see the docs property).",
"updated": 1617623101039
"updated": 1617623101039,
"translations": [
{
"language": "DE",
"text": "Die wichtigste Gemeinsamkeit aller Knotentypen in der Hierarchie ist, dass sie alle Inhalte aus der Sammlung der Dokumentseiten des Tutorials beziehen können. Das heißt, jeder Knoten in der Hierarchie zeigt auf eine Docs Page (Dokumentationsseite), und es ist diese Seite in den Dokumenten, die den Inhalt für den gegebenen Schritt anzeigt. Der Zeiger wird in der Konfiguration jedes Knotens angegeben (siehe die Eigenschaft docs).",
"updated": 1633976778899
}
]
},
{
"style": "Block",
@@ -44,37 +77,86 @@
{
"style": "Title",
"text": "Tutorial Configuration",
"updated": 1609704877058
"updated": 1609704877058,
"translations": [
{
"language": "DE",
"text": "Tutorial Konfiguration",
"updated": 1633976794872
}
]
},
{
"style": "Text",
"text": "The configuration of each node in the tutorial hierarchy determines the content and behavior of each step. All types of nodes share the same basic configuration. However, Tutorial Step nodes have extra properties, described on the Tutorial Step node page.",
"updated": 1617623609988
"updated": 1617623609988,
"translations": [
{
"language": "DE",
"text": "Die Konfiguration jedes Knotens in der Tutorial-Hierarchie bestimmt den Inhalt und das Verhalten der einzelnen Schritte. Alle node-typen haben die gleiche Grundkonfiguration. Tutorial Step nodes haben jedoch zusätzliche Eigenschaften, die auf der Seite \" Tutorial Step nodes \" beschrieben werden.",
"updated": 1633977045116
}
]
},
{
"style": "Success",
"text": "The configuration properties discussed on this page apply to all types of nodes in the hierarchy.",
"updated": 1617623631110
"updated": 1617623631110,
"translations": [
{
"language": "DE",
"text": "Die auf dieser Seite beschriebenen Konfigurationseigenschaften gelten für alle Arten von Nodes in der Hierarchie.",
"updated": 1633977077545
}
]
},
{
"style": "Text",
"text": "The layout of the HTML page follows the layout of the associated page in the Docs, although displayed within the confines of the tutorial window.",
"updated": 1617610416865
"updated": 1617610416865,
"translations": [
{
"language": "DE",
"text": "Das Layout der HTML-Seite folgt dem Layout der zugehörigen Seite in den Docs, wird aber innerhalb der Grenzen des Tutorial-Fensters angezeigt.",
"updated": 1633977110132
}
]
},
{
"style": "Callout",
"text": "In other words, you affect the layout of the particular step by writing content and applying styles to individual paragraphs in the associated Docs Page.",
"updated": 1617610435932
"updated": 1617610435932,
"translations": [
{
"language": "DE",
"text": "Mit anderen Worten beeinflussen Sie das Layout des jeweiligen Schritts, indem Sie Inhalte schreiben und Stile auf einzelne Absätze in der zugehörigen Docs-Page anwenden.",
"updated": 1633977352460
}
]
},
{
"style": "Note",
"text": "The HTML page features a limited space and does not support scrolling. If too much information is defined in the associated Docs Page, the resulting content overflows the available space in the tutorial window. There is no system-side control to deal with such overflows, so it's up to you to spread information across multiple steps and keep each page within its limits.",
"updated": 1613839536547
"updated": 1613839536547,
"translations": [
{
"language": "DE",
"text": "Die HTML / Tutorial -Seite verfügt über einen begrenzten Platz und unterstützt kein Scrollen. Wenn zu viele Informationen in der zugehörigen Docs Page definiert werden, übersteigt der resultierende Inhalt den verfügbaren Platz im Tutorial-Fenster. Es gibt keine systemseitige Kontrolle, um mit solchen Text-Überläufen (in den Tutorial fenstern) umzugehen, so dass es an Ihnen liegt, die Informationen auf mehrere Schritte zu verteilen und jede Seite innerhalb ihrer Grenzen zu halten.",
"updated": 1633977528479
}
]
},
{
"style": "Title",
"text": "Configuration Properties",
"updated": 1617635291377
"updated": 1617635291377,
"translations": [
{
"language": "DE",
"text": "Eigenschaften der Konfiguration",
"updated": 1633977545673
}
]
},
{
"style": "Subtitle",
@@ -84,19 +166,47 @@
{
"style": "Text",
"text": "The property icon requires two definitions:",
"updated": 1617635366207
"updated": 1617635366207,
"translations": [
{
"language": "DE",
"text": "Das Eigenschaftssymbol benötigt zwei Definitionen:",
"updated": 1633977572877
}
]
},
{
"style": "List",
"text": "The \"name\" of the icon without the extension; "
"text": "The \"name\" of the icon without the extension; ",
"translations": [
{
"language": "DE",
"text": "Der \"name\" des Symbols ohne die Erweiterung;",
"updated": 1633977609627
}
]
},
{
"style": "List",
"text": "The \"project\" the icon belongs to."
"text": "The \"project\" the icon belongs to.",
"translations": [
{
"language": "DE",
"text": "Das \"project\", zu dem das Symbol gehört.",
"updated": 1633977635502
}
]
},
{
"style": "Text",
"text": "For your reference, icons are stored in the following path:"
"text": "For your reference, icons are stored in the following path:",
"translations": [
{
"language": "DE",
"text": "Zu Ihrer Information: Die Icons (Symbole) werden unter folgendem Pfad gespeichert:",
"updated": 1633977674577
}
]
},
{
"style": "Json",
@@ -106,12 +216,26 @@
{
"style": "Success",
"text": "Use the existing collection of icons to illustrate each step of the tutorial. These illustrations help make for more compelling communication.",
"updated": 1617623866873
"updated": 1617623866873,
"translations": [
{
"language": "DE",
"text": "Verwenden Sie die vorhandene Sammlung von Icons (Symbolen), um jeden Schritt des Tutorials zu illustrieren. Diese Illustrationen tragen sehr viel zu einer überzeugenderen Kommunikation bei.",
"updated": 1633977745001
}
]
},
{
"style": "Text",
"text": "When the configuration exists, the icon is placed within a table, side by side with the text block that makes up the definition field of the associated Docs Page. When there is no icon, the definition occupies the full width of the page.",
"updated": 1617635415677
"updated": 1617635415677,
"translations": [
{
"language": "DE",
"text": "Wenn die Konfiguration vorhanden ist, wird das Symbol in einer Tabelle neben dem Textblock platziert, der das Definitionsfeld der zugehörigen Docs Page bildet. Wenn kein Symbol vorhanden ist, nimmt die Definition die gesamte Breite der Seite ein.",
"updated": 1633977797138
}
]
},
{
"style": "Json",
@@ -121,7 +245,14 @@
{
"style": "Text",
"text": "The above configuration places the balance.png icon of the Superalgos project in the table of the corresponding Docs page (see the docs property below).",
"updated": 1617635461827
"updated": 1617635461827,
"translations": [
{
"language": "DE",
"text": "Die obige Konfiguration platziert das Symbol balance.png des Superalgos-Projekts in der Tabelle der entsprechenden Docs-Seite (siehe die docs Eigenschaft unten).",
"updated": 1633977851249
}
]
},
{
"style": "Subtitle",
@@ -131,7 +262,14 @@
{
"style": "Text",
"text": "The position property determines the position of the floating HTML. There are three alternatives... \"Left\", \"Right\", or leave the field empty to position the page on the center of the screen.",
"updated": 1617635484212
"updated": 1617635484212,
"translations": [
{
"language": "DE",
"text": "Die Eigenschaft \"position\" bestimmt die Position des fließenden HTML-Dokuments (Tutorial-Fensters). Es gibt drei Alternativen... \"Links\", \"Rechts\", oder lassen Sie das Feld leer, um die Seite in der Mitte des Bildschirms zu positionieren.",
"updated": 1633977968939
}
]
},
{
"style": "Json",
@@ -141,7 +279,14 @@
{
"style": "Text",
"text": "The configuration above places the tutorial step on the left-hand side of the screen.",
"updated": 1617635642707
"updated": 1617635642707,
"translations": [
{
"language": "DE",
"text": "Bei der obigen Konfiguration befindet sich das Tutorial-Fenster auf der linken Seite des Bildschirms.",
"updated": 1633978012441
}
]
},
{
"style": "Subtitle",
@@ -150,7 +295,14 @@
},
{
"style": "Text",
"text": "The slider property determines the position of the horizontal slider. There are three alternatives... \"toTop\", \"toBottom\", \"toMiddle\"."
"text": "The slider property determines the position of the horizontal slider. There are three alternatives... \"toTop\", \"toBottom\", \"toMiddle\".",
"translations": [
{
"language": "DE",
"text": "Die Eigenschaft slider bestimmt die Position des horizontalen Schiebereglers. Es gibt drei Alternativen... \"toTop\", \"toBottom\", \"toMiddle\".",
"updated": 1633978051324
}
]
},
{
"style": "Json",
@@ -174,12 +326,26 @@
},
{
"style": "Text",
"text": "The pressButton property allows you to forcefully \"Stop\" the tutorial, go to the \"Next\" step, go to the \"Previous\" step, or \"Skip\" a step. When a step is loaded and one of these options is configured in this property, the action is applied immediately."
"text": "The pressButton property allows you to forcefully \"Stop\" the tutorial, go to the \"Next\" step, go to the \"Previous\" step, or \"Skip\" a step. When a step is loaded and one of these options is configured in this property, the action is applied immediately.",
"translations": [
{
"language": "DE",
"text": "Mit der Eigenschaft pressButton können Sie das Tutorial zwangsweise \"anhalten\", zum \"nächsten\" Schritt gehen, zum \"vorherigen\" Schritt gehen oder einen Schritt \"überspringen\". Wenn ein Schritt geladen wird und eine dieser Optionen in dieser Eigenschaft konfiguriert ist, wird die Aktion sofort ausgeführt.",
"updated": 1633978127988
}
]
},
{
"style": "Note",
"text": "A common use of this feature is to skip a step, for instance, a Tutorial Topic node that is used solely for organizational purposes within the hierarchy, thus features no content. Leave the field empty for the step to play in the usual fashion.",
"updated": 1617649582774
"updated": 1617649582774,
"translations": [
{
"language": "DE",
"text": "Eine häufige Verwendung dieser Funktion ist das Überspringen eines Schrittes, z.B. einer Tutorial-topic-node, die ausschließlich für organisatorische Zwecke innerhalb der Hierarchie verwendet wird und daher keinen Inhalt hat. Lassen Sie das Feld leer, damit der Schritt auf die übliche Weise abgespielt wird.",
"updated": 1633978359504
}
]
},
{
"style": "Json",
@@ -189,12 +355,26 @@
{
"style": "Text",
"text": "The above configuration takes the user to the next step in the tutorial without displaying any content for the node in question.",
"updated": 1617648136262
"updated": 1617648136262,
"translations": [
{
"language": "DE",
"text": "Die obige Konfiguration führt den Benutzer zum nächsten Schritt des Tutorials, ohne dass der Inhalt der betreffenden node angezeigt wird.",
"updated": 1633978461463
}
]
},
{
"style": "Success",
"text": "You may use Tutorial Topic nodes for organizational purposes only, for instance, to arrange the hierarchy in a way that it's easy to read and maintain. Topics with too many steps are harder to deal with later on. In other words, you may use a Tutorial Topic node to group several steps, even if you don't intend the Tutorial Topic node to display any content. In such cases, you may use this property to skip the step that is not intended for content display.",
"updated": 1617649616576
"updated": 1617649616576,
"translations": [
{
"language": "DE",
"text": "Sie können Tutorial Topic nodes nur zu organisatorischen Zwecken verwenden, z.B. um die Hierarchie so anzuordnen, dass sie einfach zu lesen und zu pflegen ist. Themen mit zu vielen Schritten sind später schwieriger zu handhaben. Mit anderen Worten: Sie können einen Tutorial Topic node verwenden, um mehrere Schritte zu gruppieren, auch wenn Sie nicht beabsichtigen, dass die Tutorial Topic node irgendeinen Inhalt anzeigt. In solchen Fällen können Sie diese Eigenschaft verwenden, um den Schritt zu überspringen, der nicht für die Anzeige von Inhalten vorgesehen ist.",
"updated": 1633979074457
}
]
},
{
"style": "Subtitle",
@@ -204,7 +384,14 @@
{
"style": "Text",
"text": "The docs property is used to point to the Docs Tutorial Page that feeds content to the particular tutorial step. The definition requires the name of the Project, the Docs Page Category which is always \"Tutorial\", and the complete name of the Docs Page, that is, the \"type\" as specified in the JSON file.",
"updated": 1617648211414
"updated": 1617648211414,
"translations": [
{
"language": "DE",
"text": "Die docs-Eigenschaft wird verwendet, um auf die Docs Tutorial Page zu verweisen, die den Inhalt für den jeweiligen Tutorial-Schritt liefert. Die Definition erfordert den Namen des Project (Projekts), die Docs Page Category (Kategorie) welche immer \"Tutorial\" ist, und den vollständigen Namen der Docs Page, das heißt den \"Typ\", wie in der JSON-Datei angegeben.",
"updated": 1633979212224
}
]
},
{
"style": "Json",
@@ -218,12 +405,26 @@
},
{
"style": "Text",
"text": "The property is used to control the behavior of the Docs panel. Within controlDocs, several properties are available, and all of them are optional. Let's review each in detail."
"text": "The property is used to control the behavior of the Docs panel. Within controlDocs, several properties are available, and all of them are optional. Let's review each in detail.",
"translations": [
{
"language": "DE",
"text": "Die Eigenschaft wird verwendet, um das Verhalten des Docs-Panels zu steuern. Innerhalb von controlDocs sind mehrere Eigenschaften verfügbar, die alle optional sind. Sehen wir uns jede im Detail an.",
"updated": 1633979296433
}
]
},
{
"style": "Text",
"text": "The panel property may be set to \"Open\" or \"Close\". This property controls the tab that allows you to open the Docs Panel in one step, and close it on a different step when it's no longer needed.",
"updated": 1617649653900
"updated": 1617649653900,
"translations": [
{
"language": "DE",
"text": "Die Panel-Eigenschaft kann auf \"Öffnen\" oder \"Schließen\" eingestellt werden. Diese Eigenschaft steuert die Registerkarte, mit der Sie das Doku-Panel in einem Schritt öffnen und in einem anderen Schritt wieder schließen können, wenn es nicht mehr benötigt wird.",
"updated": 1633979356912
}
]
},
{
"style": "Json",
@@ -237,12 +438,26 @@
{
"style": "Success",
"text": "If the Docs Panel is closed, the rest of the properties are somehow irrelevant. However, when the Docs Panel is open, the rest of the properties control what is displayed in the Docs Panel.",
"updated": 1617635061507
"updated": 1617635061507,
"translations": [
{
"language": "DE",
"text": "Wenn das Docs Panel geschlossen ist, sind die restlichen Eigenschaften irgendwie irrelevant. Wenn das Docs-Panel jedoch geöffnet ist, steuern die restlichen Eigenschaften, was im Docs-Panel angezeigt wird.",
"updated": 1633979402232
}
]
},
{
"style": "Text",
"text": "The property closeTutorialEditor may switch on and off the Docs editor. When set to false or when there is no definition, and provided no specific Docs Page is called (see controlDocs below), the Docs panel shows the page associated with the current tutorial step in editing mode.",
"updated": 1617649781891
"updated": 1617649781891,
"translations": [
{
"language": "DE",
"text": "Die Eigenschaft closeTutorialEditor kann den Docs-Editor ein- und ausschalten. Wenn die Eigenschaft auf false gesetzt ist oder wenn es keine Definition gibt und wenn keine spezifische Docs-Seite aufgerufen wird (siehe controlDocs unten), zeigt das Docs-Panel die Seite, die mit dem aktuellen Tutorial-Schritt im Bearbeitungsmodus verbunden ist.",
"updated": 1633979594120
}
]
},
{
"style": "Json",
@@ -252,12 +467,26 @@
{
"style": "Success",
"text": "Because this definition is set to false by default, this is the usual behavior. That is, by default, when the Docs Panel is opened while a tutorial step is playing, the Docs Panel shows the Docs Page associated with the specific step so that the page may be edited right then and there.",
"updated": 1617648335347
"updated": 1617648335347,
"translations": [
{
"language": "DE",
"text": "Da diese Definition standardmäßig auf false gesetzt ist, ist dies das standardmäßige Verhalten. Das heißt, wenn das Docs-Bedienfeld geöffnet wird, während ein Tutorial-Schritt abgespielt wird, zeigt das Docs-Bedienfeld standardmäßig die Docs-Seite an, die mit dem jeweiligen Schritt verknüpft ist, so dass die Seite direkt an Ort und Stelle bearbeitet werden kann.",
"updated": 1633979921238
}
]
},
{
"style": "Text",
"text": "When the closeTutorialEditor property is set to true and there is no request to open a Docs page (see page property below), then the Docs panel shows whatever Docs Page was being displayed in the previous step.",
"updated": 1617648434580
"updated": 1617648434580,
"translations": [
{
"language": "DE",
"text": "Wenn die Eigenschaft closeTutorialEditor auf true gesetzt ist und keine Anforderung zum Öffnen einer Dokumentseite vorliegt (siehe Eigenschaft page weiter unten), dann zeigt das Dokumentseiten-Panel die Dokumentseite an, die im vorherigen Schritt angezeigt wurde.",
"updated": 1633979700958
}
]
},
{
"style": "Json",
@@ -267,12 +496,26 @@
{
"style": "Success",
"text": "You may want to close the tutorial editor when the user is supposed to interact with the Docs from one step to the next. For example, let's say the tutorial instructs the user to run a search and discusses the search results in the following step. In that case, you will want the tutorial editor to remain closed, as otherwise, the search performed by the user would be lost, and instead the page corresponding to the new tutorial step would be loaded.",
"updated": 1617649832578
"updated": 1617649832578,
"translations": [
{
"language": "DE",
"text": "Es kann sinnvoll sein, den Tutorial Editor zu schließen, wenn der Benutzer von einem Schritt zum nächsten mit den Docs interagieren soll. Nehmen wir zum Beispiel an, das Tutorial weist den Benutzer an, eine Suche durchzuführen und dieses Ergebnis im nächsten Schritt zu besprechen. In diesem Fall möchten Sie, dass der Editor des Tutorials geschlossen bleibt, da sonst die vom Benutzer durchgeführte Suche verloren ginge und stattdessen die Seite geladen würde, die dem neuen Schritt des Tutorials entspricht.",
"updated": 1633979902886
}
]
},
{
"style": "Text",
"text": "The searchPage property overruns the tutorial editor settings and loads the home search page featuring the search box in the center.",
"updated": 1617649861459
"updated": 1617649861459,
"translations": [
{
"language": "DE",
"text": "Die Eigenschaft searchPage überschreibt die Einstellungen des Tutorial-Editors und lädt die Hauptsuchseite mit dem Suchfeld in der Mitte.",
"updated": 1633979953175
}
]
},
{
"style": "Json",
@@ -282,12 +525,26 @@
{
"style": "Success",
"text": "Use the above setting when you wish the user to get the clean search box to make a search or run a command.",
"updated": 1617648884933
"updated": 1617648884933,
"translations": [
{
"language": "DE",
"text": "Verwenden Sie die obige Einstellung, wenn Sie möchten, dass der Benutzer das saubere Suchfeld erhält, um eine Suche durchzuführen oder einen Befehl auszuführen.",
"updated": 1633980006636
}
]
},
{
"style": "Text",
"text": "The page property is where you define which Docs Page must be loaded. You must specify the Project, the Docs Page Category, and the \"type\" which is the complete name of the page. The optional property anchor allows you to point the user to a specific paragraph in the page with the Docs Anchor Style.",
"updated": 1630752089891
"updated": 1630752089891,
"translations": [
{
"language": "DE",
"text": "Mit der page property legen Sie fest, welche Docs Page geladen werden soll. Sie müssen das Project (Projekt), die Docs Page Category (Kategorie) und den \"type\" (Typ), also den vollständigen Namen der Seite, angeben. Die optionale Eigenschaft anchor ermöglicht es Ihnen, den Benutzer mit dem Docs Anchor Style auf einen bestimmten Absatz der Seite zu verweisen.",
"updated": 1633980112889
}
]
},
{
"style": "Json",
@@ -297,7 +554,14 @@
{
"style": "Success",
"text": "Use the above configuration when you wish the user to read a specific page in the Docs.",
"updated": 1617649085529
"updated": 1617649085529,
"translations": [
{
"language": "DE",
"text": "Verwenden Sie die obige Konfiguration, wenn Sie möchten, dass der Benutzer eine bestimmte Seite in den Docs liest.",
"updated": 1633980693215
}
]
}
]
}
@@ -53,6 +53,10 @@ function newEducationActionSwitch() {
UI.projects.education.spaces.tutorialSpace.resetTutorialProgress(action.node)
}
break
default: {
console.log("[WARN] Action sent to Education Action Switch does not belong here. Verify at the App Schema file of the node that triggered this action that the actionProject is pointing to the right project. -> Action = " + action.name + " -> Action Node Name = " + action.node.name)
}
}
}
}
@@ -27,6 +27,7 @@ function newFoundationsDocsCommmandInterface() {
function detectAppCommands() {
if (checkContributeCommand() === undefined) { return true }
if (checkUpdateCommand() === undefined) { return true }
if (fixAppSchema() === undefined) { return true }
function checkContributeCommand() {
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.contribute') {
@@ -130,6 +131,19 @@ function newFoundationsDocsCommmandInterface() {
}
}
}
function fixAppSchema() {
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('App.fix') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('app.fix') !== 0) { return 'Not Update Commands' }
httpRequest(undefined, 'App/FixAppSchema', onResponse)
return
function onResponse(err, data) {
}
}
}
function detectDocsCommands() {
@@ -107,7 +107,7 @@ function newEducationDocSpace() {
Deleting what was is here because is not longer used...
*/
window.localStorage.removeItem('Current Branch')
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'currentBranch', undefined)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'currentBranch', undefined)
function onResponse(err, data) {
/* Lets check the result of the call through the http interface */
@@ -133,10 +133,10 @@ function newEducationDocSpace() {
Getting the contributionsBranch
*/
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
let contributionsBranch = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(workspace.payload, 'contributionsBranch')
let contributionsBranch = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(workspace.payload, 'contributionsBranch')
if (contributionsBranch === undefined) {
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'contributionsBranch', UI.projects.education.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'contributionsBranch', UI.projects.education.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH)
UI.projects.education.spaces.docsSpace.contributionsBranch = UI.projects.education.globals.docs.DEFAULT_CONTRIBUTIONS_BRANCH
} else {
UI.projects.education.spaces.docsSpace.contributionsBranch = contributionsBranch
@@ -156,10 +156,10 @@ function newEducationDocSpace() {
Getting the used preferred languague
*/
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
let docsLanguage = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(workspace.payload, 'docsLanguage')
let docsLanguage = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(workspace.payload, 'docsLanguage')
if (docsLanguage === undefined) {
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'docsLanguage', UI.projects.education.globals.docs.DEFAULT_LANGUAGE)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'docsLanguage', UI.projects.education.globals.docs.DEFAULT_LANGUAGE)
UI.projects.education.spaces.docsSpace.language = UI.projects.education.globals.docs.DEFAULT_LANGUAGE
} else {
UI.projects.education.spaces.docsSpace.language = docsLanguage
@@ -250,7 +250,7 @@ function newEducationDocSpace() {
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
UI.projects.education.spaces.docsSpace.currentBranch = branch
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'currentBranch', branch)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'currentBranch', branch)
if (doNotNavigate === true) { return }
@@ -272,7 +272,7 @@ function newEducationDocSpace() {
function changeContributionsBranch(branch, doNotNavigate) {
UI.projects.education.spaces.docsSpace.contributionsBranch = branch
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'contributionsBranch', branch)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'contributionsBranch', branch)
if (doNotNavigate !== true) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Switching Branches - Contributions Branch Changed')
@@ -285,7 +285,7 @@ function newEducationDocSpace() {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Docs In ' + languageLabel)
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'docsLanguage', UI.projects.education.spaces.docsSpace.language)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'docsLanguage', UI.projects.education.spaces.docsSpace.language)
}
function sharePage() {
@@ -1271,7 +1271,7 @@ function newFoundationsDocsDocumentPage() {
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -1382,7 +1382,7 @@ function newFoundationsDocsDocumentPage() {
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -1478,7 +1478,7 @@ function newFoundationsDocsDocumentPage() {
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
let nodeArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(rootNode, appSchemaDocument.type)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -207,7 +207,7 @@ function newFoundationsDocsFooter() {
HTML = HTML + '<div class="docs-footer-row">'
HTML = HTML + '<div class="docs-footer-cell">'
HTML = HTML + '<h4>Join the Conversation</h4>'
HTML = HTML + '<p>We have a new <a href="https://discord.gg/CGeKC6WQQb" target="_blank">Discord Server</a> with multiple channels, or you may join the original individual Telegram groups listed to the right.</p>'
HTML = HTML + '<p>We have a new <a href="https://discord.gg/CGeKC6WQQb" target="_blank">Discord Server</a> with multiple channels and a new <a href="https://forum.superalgos.org/" target="_blank">Community Forum</a> or you may join the original individual Telegram groups listed to the right.</p>'
HTML = HTML + '</div>'
HTML = HTML + '<div class="docs-footer-cell">'
@@ -24,7 +24,7 @@ function newFoundationsDocsSearchEngine() {
let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
if (docsSpaceNode !== undefined) {
if (docsSpaceNode.docsSpaceSettings !== undefined) {
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.docsSpaceSettings.payload, 'indexContent')
let indexContent = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.docsSpaceSettings.payload, 'indexContent')
if (indexContent === false) {
callbackFunction()
return
@@ -280,7 +280,7 @@ function newFoundationsDocsSearchEngine() {
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode !== null) {
let nodeArray = UI.projects.foundations.utilities.branches.nodeBranchToArray(rootNode)
let nodeArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(rootNode)
allNodesFound = allNodesFound.concat(nodeArray)
}
}
@@ -296,7 +296,7 @@ function newFoundationsDocsSearchEngine() {
let node = allNodesFound[i]
if (node.project === project) {
let nodeNameTypePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(node)
let nodeNameTypePath = UI.projects.visualScripting.utilities.hierarchy.getNodeNameTypePath(node)
let docsSchemaDocument = {
nodeId: node.id,
@@ -112,7 +112,7 @@ function newEducationTutorialSpace() {
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
let workspace = UI.projects.foundations.spaces.designSpace.workspace
workspace.executeAction({ name: 'Play Tutorials', project: 'Foundations' })
workspace.executeAction({ name: 'Play Tutorials', project: 'Visual-Scripting' })
isInitialized = true
}
@@ -1380,11 +1380,16 @@ function newEducationTutorialSpace() {
}
}
let divHeight
if (fullscreenMode === false) {
html = html + '<h2 class="tutorial-font-medium">' + title + '</h2>'
divHeight = "78%"
} else {
divHeight = "91%"
}
html = html + '<div>'
html = html + '<div class="tutorial-content-div" style="height: ' + divHeight + '">'
if (schemaDocument.definition !== undefined && schemaDocument.definition.text !== '') {
if (fullscreenMode === false) {
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Network Client",
"relatedUiObject": "Network Client",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -11,21 +11,23 @@
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Process Definition",
"relatedUiObject": "Process Definition",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Product Definition",
"relatedUiObject": "Product Definition",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -11,14 +11,15 @@
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Blockchain Scanner Bot",
"relatedUiObject": "Blockchain Scanner Bot",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Ethereum Token",
"relatedUiObject": "Ethereum Token",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Ethereum Token",
"relatedUiObject": "Ethereum Token",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Ethereum Token",
"relatedUiObject": "Ethereum Token",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Ethereum Token",
"relatedUiObject": "Ethereum Token",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,7 +3,7 @@
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Blockchain Network",
"relatedUiObject": "Blockchain Network",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,14 +3,15 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Smart Contract",
"relatedUiObject": "Smart Contract",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
@@ -3,42 +3,47 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Blockchain",
"relatedUiObject": "Ethereum Blockchain",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Decentralized Application",
"relatedUiObject": "Ethereum Decentralized Application",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Token Definitions",
"relatedUiObject": "Ethereum Token Definitions",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Wallet",
"relatedUiObject": "Ethereum Wallet",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"label": "Add Data Mine",
"relatedUiObject": "Data Mine",
"actionFunction": "payload.executeAction"
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Ethereum"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
Loaded 100 of 1196 files, more files were not shown because too many files have changed in this diff. Show more