Skip to content

Commit

Permalink
NC 18 Workflow integration #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jan 8, 2020
1 parent 2d945e7 commit 93ffbcb
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions js/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

var Component = {
name: 'WorkflowScript',
items: [],
render: function (createElement) {
var self = this;
var items = [];
for (let navigation of Component.items) {
items.push(createElement('option', {
domProps: {
value: navigation.id,
innerText: navigation.name
}
}))
}
return createElement('div', {
style: {
width: '100%'
Expand All @@ -25,27 +35,27 @@
self.$emit('input', event.target.value)
}
}
}, [
createElement('option', {
domProps: {
value: '1',
innerText: 'test'
},

})
]
}, items
)
])
},
props: {
value: ''
},
data: function () {
return {
description: t('workflow_script', 'Available placeholder variables are listed in the documentation') + '↗',
link: 'https://github.com/nextcloud/workflow_script#placeholders'
}
}
beforeMount() {
this.fetchDatasets()
},
methods: {
fetchDatasets() {
$.ajax({
type: 'GET',
url: OC.generateUrl('apps/analytics/dataset'),
success: function (data) {
Component.items = data;
}
});
},
},
};

window.OCA.WorkflowEngine.registerOperator({
Expand Down

0 comments on commit 93ffbcb

Please sign in to comment.