Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ad976c6
Unified workflow management
juliusknorr Aug 6, 2019
e7e9166
Add endpoint to test operations before submitting
juliusknorr Aug 9, 2019
aed630a
Adjust template id
juliusknorr Aug 19, 2019
9f8ccf1
Use entity/event definitions from backend
juliusknorr Aug 19, 2019
0f84696
Styling fixes
juliusknorr Aug 19, 2019
aa00f40
Adjust to new backend URLs
juliusknorr Aug 28, 2019
bd281da
Move to vuex store
juliusknorr Aug 29, 2019
af3cb9c
Use trigger hint
juliusknorr Aug 29, 2019
b3bafb1
Add missing files
juliusknorr Aug 30, 2019
f36b50c
Migrate plugins to vuex store
juliusknorr Aug 30, 2019
ae55829
Document plugins to be used by integrators
juliusknorr Aug 30, 2019
28a7721
Handle operator registration properly
juliusknorr Aug 31, 2019
69ac169
Do not use shot tag
juliusknorr Aug 31, 2019
1742f97
Allow placeholder and validation without custom vue component
juliusknorr Sep 2, 2019
11d6486
Migrate check plugins
juliusknorr Sep 2, 2019
2364fc8
Make rule listing more compact
juliusknorr Sep 2, 2019
c665d54
Fix removing checks
juliusknorr Sep 2, 2019
d6b3af9
Load checks from the backend
juliusknorr Sep 6, 2019
98666a9
Move over checker plugins
juliusknorr Sep 6, 2019
0b67062
Add moment-timezone
juliusknorr Sep 6, 2019
24aec9b
Frontend polishing
juliusknorr Sep 9, 2019
e17a666
Implement custom check components and fix linting
juliusknorr Sep 9, 2019
335d7cf
Add tag selector
juliusknorr Sep 9, 2019
370242c
Add request url selector
juliusknorr Sep 9, 2019
99e1063
Add user group selector
juliusknorr Sep 9, 2019
9e00788
Add nextcloud-router
juliusknorr Sep 9, 2019
7683208
Workflow vue cleanup
juliusknorr Sep 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Frontend polishing
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Sep 10, 2019
commit 24aec9b9d27378ab19ebe028f46f26bcf0a1b901
4 changes: 4 additions & 0 deletions apps/workflowengine/src/components/Check.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export default {
margin-top: -5px;
margin-bottom: -5px;
}
button.action-item.action-item--single.icon-delete {
height: 34px;
width: 34px;
}
.invalid {
border: 1px solid var(--color-error) !important;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/workflowengine/src/components/Checks/RequestTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
display: flex;
flex-grow: 1;
flex-wrap: wrap;
max-width: 200px;
max-width: 180px;

.multiselect {
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions apps/workflowengine/src/components/Checks/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const RequestChecks = [
{ operator: 'in', name: t('workflowengine', 'between') },
{ operator: '!in', name: t('workflowengine', 'not between') }
],
// TODO: implement component
component: RequestTime
},
{
Expand All @@ -54,7 +53,8 @@ const RequestChecks = [
{ operator: 'matches', name: t('workflowengine', 'matches') },
{ operator: '!matches', name: t('workflowengine', 'does not match') }
],
component: RequestUserAgent
// TODO: implement component
// component: RequestUserAgent
},
{
class: 'OCA\\WorkflowEngine\\Check\\UserGroupMembership',
Expand Down
17 changes: 13 additions & 4 deletions apps/workflowengine/src/components/Operation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<h3>{{ operation.name }}</h3>
<small>{{ operation.description }}</small>
</div>
<slot />
<div class="actions__item_options">
<slot />
</div>
</div>
</template>

Expand All @@ -28,13 +30,14 @@ export default {
<style scoped lang="scss">
.actions__item {
display: flex;
flex-wrap: wrap;
flex-direction: column;
flex-grow: 1;
margin-left: -1px;
padding: 10px;
border-radius: var(--border-radius-large);
margin-right: 20px;
margin-bottom: 5px;
margin-bottom: 20px;
}
.icon {
display: block;
Expand All @@ -49,6 +52,10 @@ export default {
.actions__item__description {
text-align: center;
}
.actions__item_options {
width: 100%;
margin-top: 10px;
}
h3, small {
padding: 6px;
display: block;
Expand Down Expand Up @@ -83,7 +90,9 @@ export default {
width: 50px;
margin: 0;
margin-right: 10px;
filter: invert(1);
&:not(.icon-invert) {
filter: invert(1);
}
}
}

Expand All @@ -94,7 +103,7 @@ export default {
.icon-convert-pdf {
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' version='1.1' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff'%3E%3Cpath d='m7.0624 2.9056c-0.20526 0-0.36653 0.14989-0.36653 0.34066v8.8571c0 0.19077 0.16127 0.34066 0.36653 0.34066h8.0637c0.20526 0 0.36653-0.14989 0.36653-0.34066v-7.1538l-2.1992-2.044zm4.2518 2.6571s0.05132 0.64725-0.10996 1.567c0.52414 1.3987 1.0996 1.5875 1.3562 1.7033 0.54247-0.040873 1.1472-0.068129 1.6861 0.2044 0.36653 0.19486 0.65536 1.022-0.21992 1.022-0.39586-0.023161-1.1267-0.23574-1.6494-0.47692-0.78145 0.081762-1.752 0.21802-2.5657 0.54505-0.91633 1.4308-1.3268 1.6352-1.6494 1.6352-0.89067-0.21802-0.41052-1.3149-0.073304-1.4989 0.40319-0.32022 0.87601-0.50417 1.0263-0.54505 0.065969-0.10221 1.0146-1.8327 1.2462-2.5549-0.21992-0.69767-0.27123-1.4349-0.14661-1.8736 0.57179-0.69358 1.0996-0.23846 1.0996 0.27253zm-0.51315 2.1121c-0.19793 0.72015-0.98817 2.1012-0.95299 2.044 0.81004-0.33044 1.5394-0.42923 2.3458-0.54505-0.38559-0.16011-0.84009-0.17033-1.3928-1.4989z' stroke-width='.70672'/%3E%3Cpath d='m16.246-9.7651c-2.05e-4 0.0144-6e-3 0.027629-6e-3 0.042066-0.0044 2.2592 2.0761 3.742 4.0564 3.6477v1.2349l2.3737-2.2265-2.3377-2.3407-3e-3 1.2289c-1.0287 0.1337-1.8811-0.66867-1.8659-1.5414 2.9e-4 -0.016152 0.0083-0.029062 9e-3 -0.045071z' stroke-width='.67694'/%3E%3Cpath d='m3.2734 5.1094v1.4492h-2.7676v2.5h2.7246l-0.0019532 1.4629 3.0996-2.6387-3.0547-2.7734z'/%3E%3Cpath d='m8.334-11.356c-0.78035-0.78051-1.9205-1.0863-2.9866-0.80073a0.51533 0.51533 0 1 0 0.26293 0.99405c0.71208-0.19075 1.4702 0.01747 1.9914 0.53876 0.46076 0.46083 0.65567 1.1026 0.56688 1.7376a0.61838 0.61838 0 1 0-0.87225 0.87442l0.8687 0.86886a0.61838 0.61838 0 0 0 0.86992 7.91e-5l0.86886-0.8687a0.61838 0.61838 0 0 0 0.0011543-0.88702 0.61838 0.61838 0 0 0-0.67634-0.12303c0.04094-0.86013-0.27221-1.7117-0.89472-2.3343zm-3.3067 1.0814a0.61838 0.61838 0 0 0-0.015967-0.01364l-0.86984-0.87a0.61838 0.61838 0 0 0-0.042126-0.04213 0.61838 0.61838 0 0 0-0.82551 0.04205l-0.87 0.86984a0.61838 0.61838 0 0 0 0.66145 1.0237c-0.024276 0.84049 0.29182 1.6675 0.90045 2.2762 0.78035 0.78052 1.9205 1.0863 2.9866 0.80073a0.51533 0.51533 0 1 0-0.27202-0.99408c-0.71208 0.19075-1.4669-0.011716-1.988-0.53306-0.45484-0.45491-0.65183-1.0905-0.57258-1.7183l0.018216 0.018221a0.61843 0.61843 0 0 0 0.88935-0.85959z' stroke-width='.68342'/%3E%3Cpath d='m31.219 0.33675v0.00113h-6.9286v1.3295l6.9286 0.036145c0.0026-1.821e-4 0.0053 2.074e-4 0.0079 0 0.0053-4.166e-4 0.01058-0.00137 0.01581-0.00113 0.65203-0.00106 1.1749 0.44619 1.1867 1.0392 0.0108 0.5673-0.60099 1.0888-1.3381 1.0019l-0.0013-0.79858-1.6753 1.5203 1.7016 1.4481-0.0013-0.8031c1.419 0.06127 2.9112-0.90236 2.9081-2.3709-0.0029-1.3197-1.2547-2.4007-2.7961-2.4014-0.0023-1e-6 -0.0043-0.00113-0.0066-0.00113z' stroke-width='.462'/%3E%3Crect x='31.116' y='-1.6777' width='4.3279' height='7.5909'/%3E%3C/g%3E%3C/svg%3E");
}
.icon-invert {
.colored .icon-invert {
filter: invert(1);
}
</style>
46 changes: 0 additions & 46 deletions apps/workflowengine/src/components/Operations/ConvertToPdf.vue

This file was deleted.

31 changes: 0 additions & 31 deletions apps/workflowengine/src/components/Operations/Tag.vue

This file was deleted.

10 changes: 6 additions & 4 deletions apps/workflowengine/src/components/Rule.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="section rule" :style="{ borderLeftColor: operation.color || '' }">
<!-- TODO: icon-confirm -->
<div class="trigger">
<p>
<span>{{ t('workflowengine', 'When') }}</span>
Expand All @@ -21,10 +20,10 @@
<div class="buttons">
<Actions>
<ActionButton v-if="rule.id < -1" icon="icon-close" @click="cancelRule">
Cancel rule creation
{{ t('workflowengine', 'Cancel rule creation') }}
</ActionButton>
<ActionButton v-else icon="icon-close" @click="deleteRule">
Remove rule
{{ t('workflowengine', 'Remove rule') }}
</ActionButton>
</Actions>
</div>
Expand Down Expand Up @@ -204,14 +203,17 @@ export default {
}
}
.trigger p, .action p {
min-height: 34px;
display: flex;
align-items: center;

& > span {
min-width: 50px;
text-align: right;
color: var(--color-text-maxcontrast);
padding-right: 5px;
padding-right: 10px;
padding-top: 7px;
margin-bottom: auto;
}
.multiselect {
flex-grow: 1;
Expand Down
6 changes: 1 addition & 5 deletions apps/workflowengine/src/components/Workflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,11 @@ export default {
flex-wrap: wrap;
max-width: 900px;
.actions__item {
max-width: 290px;
max-width: 280px;
flex-basis: 250px;
}
}

.actions__more {
text-align: center;
}

button.icon {
padding-left: 32px;
background-position: 10px center;
Expand Down
23 changes: 0 additions & 23 deletions apps/workflowengine/src/workflowengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,6 @@ window.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, {
// Register shipped checks
ShippedChecks.forEach((checkPlugin) => window.OCA.WorkflowEngine.registerCheck(checkPlugin))

/**
* FIXME: remove before merge as this is for UI testing only
*/
const demo = [
{
id: 'OCA\\TestExample\\Operation1',
name: 'Convert to PDF',
description: 'Convert a file to PDF using Libreoffice',
iconClass: 'icon-convert-pdf',
color: 'var(--color-success)',
operation: 'deny'
},
{
id: 'OCA\\TestExample\\Operation2',
name: 'Notify me',
description: 'Send a Nextcloud Notification',
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

Expand Down
12 changes: 0 additions & 12 deletions apps/workflowengine/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,5 @@ module.exports = {
publicPath: '/js/',
filename: 'workflowengine.js',
jsonpFunction: 'webpackJsonpWorkflowengine'
},
module: {
rules: [
{
test: /\.handlebars/,
loader: "handlebars-loader",
query: {
extensions: '.handlebars',
helperDirs: path.join(__dirname, 'src/hbs_helpers'),
}
}
]
}
}