-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d1a14c6
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ | ||
{ | ||
type: 'fakevars', | ||
module : 'fakevars', | ||
action : 'assign', | ||
groupTitle : 'Fakevars', | ||
groupIcon : 'fad fa-lg fa-equals comp-flows', | ||
title : 'Fakevars - @@var(name)@@', | ||
icon : 'fad fa-lg fa-equals comp-flows', | ||
properties : [ | ||
{ | ||
group: 'Info', | ||
variables: [ | ||
{ name: 'info_Text', type: 'static', help: '🧪 EXPERIMENTAL</br>ℹ️ This action will only run if your NODE_ENV is set to development</br>☢️ Do not store sensitive data and then leave the code publicly available.'} | ||
]}, | ||
{ | ||
group: 'Variables', | ||
variables: [ | ||
{ name: 'get', optionName: 'getvars', key: 'var', keyValue: 'value', title: 'GET', type: 'grid', defaultValue: {}, serverDataBindings: true, | ||
columns: [ | ||
{ field: 'var', caption: 'Name', size: '30%', editable: {type: 'text'}}, | ||
{ field: 'value', caption: 'Value', size: '70%', editable: {type: 'datapicker'}}]}, | ||
{ name: 'post', optionName: 'postvars', key: 'var', keyValue: 'value', title: 'POST', type: 'grid', defaultValue: {}, serverDataBindings: true, | ||
columns: [ | ||
{ field: 'var', caption: 'Name', size: '30%', editable: {type: 'text'}}, | ||
{ field: 'value', caption: 'Value', size: '70%', editable: {type: 'datapicker'}}]}, | ||
]}, | ||
{ | ||
group: 'Output', | ||
variables: [ | ||
{ name: 'output', optionName: 'output', title: 'Output', initValue: false, defaultValue: false, type: 'boolean'} | ||
]} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
assign: function (options) { | ||
if (process.env.NODE_ENV == 'development') { | ||
options = this.parse(options) | ||
if (options.getvars) { | ||
this.set({ | ||
$_GET: options.getvars | ||
}); | ||
} | ||
if (options.postvars) { | ||
this.set({ | ||
$_POST: options.postvars | ||
}); | ||
} | ||
return { | ||
"$_GET": this.global.data.$_GET, | ||
"$_POST": this.global.data.$_POST | ||
} | ||
} | ||
} | ||
} | ||
|