diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-09-06 13:47:11 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-10 09:01:25 +0200 |
commit | d6b3af9d776c224015f9e9d8a4d858acae6f8560 (patch) | |
tree | 967ff1a894f2d1739a30945c1ee1b57acfd3ce8d /apps/workflowengine/src/workflowengine.js | |
parent | c665d5475affc844e583a8a546466ae27c045bb5 (diff) | |
download | nextcloud-server-d6b3af9d776c224015f9e9d8a4d858acae6f8560.tar.gz nextcloud-server-d6b3af9d776c224015f9e9d8a4d858acae6f8560.zip |
Load checks from the backend
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/src/workflowengine.js')
-rw-r--r-- | apps/workflowengine/src/workflowengine.js | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/apps/workflowengine/src/workflowengine.js b/apps/workflowengine/src/workflowengine.js index 6f96f454262..e05ac0a5053 100644 --- a/apps/workflowengine/src/workflowengine.js +++ b/apps/workflowengine/src/workflowengine.js @@ -4,7 +4,6 @@ import store from './store' import Settings from './components/Workflow' import FileValues from './components/Values/file' -import {Operators} from './services/Operation'; /** * A plugin for displaying a custom value field for checks @@ -63,7 +62,29 @@ window.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, { // Register shipped checks for file entity FileValues.forEach((checkPlugin) => window.OCA.WorkflowEngine.registerCheck(checkPlugin)) -Object.values(Operators).forEach((operatorPlugin) => window.OCA.WorkflowEngine.registerOperator(operatorPlugin)) + +/** + * FIXME: remove before merge as this is for UI testing only + */ +const demo = [ + { + id: 'OCA\\TestExample\\Operation1', + name: 'Rename file', + description: '🚧 For UI mocking only', + iconClass: 'icon-address-white', + color: 'var(--color-success)', + operation: 'deny' + }, + { + id: 'OCA\\TestExample\\Operation2', + name: 'Notify me', + description: '🚧 For UI mocking only', + iconClass: 'icon-comment-white', + color: 'var(--color-warning)', + operation: 'deny' + } +] +demo.forEach((operatorPlugin) => window.OCA.WorkflowEngine.registerOperator(operatorPlugin)) Vue.use(Vuex) Vue.prototype.t = t |