Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!/apps/admin_audit
!/apps/updatenotification
!/apps/theming
!/apps/workflowengine
/apps/files_external/3rdparty/irodsphp/PHPUnitTest
/apps/files_external/3rdparty/irodsphp/web
/apps/files_external/3rdparty/irodsphp/prods/test
Expand Down
23 changes: 23 additions & 0 deletions apps/workflowengine/appinfo/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

$application = new \OCA\WorkflowEngine\AppInfo\Application();
$application->registerHooksAndListeners();
90 changes: 90 additions & 0 deletions apps/workflowengine/appinfo/database.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<database>
<name>*dbname*</name>
<create>true</create>
<overwrite>false</overwrite>
<charset>utf8</charset>

<table>
<name>*dbprefix*flow_checks</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>4</length>
</field>

<field>
<name>class</name>
<type>text</type>
<notnull>true</notnull>
<length>256</length>
</field>
<field>
<name>operator</name>
<type>text</type>
<notnull>true</notnull>
<length>16</length>
</field>
<field>
<name>value</name>
<type>clob</type>
<notnull>false</notnull>
</field>
<field>
<name>hash</name>
<type>text</type>
<notnull>true</notnull>
<length>32</length>
</field>

<index>
<name>flow_unique_hash</name>
<unique>true</unique>
<field>
<name>hash</name>
</field>
</index>
</declaration>
</table>

<table>
<name>*dbprefix*flow_operations</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>4</length>
</field>

<field>
<name>class</name>
<type>text</type>
<notnull>true</notnull>
<length>256</length>
</field>
<field>
<name>name</name>
<type>text</type>
<notnull>true</notnull>
<length>256</length>
</field>
<field>
<name>checks</name>
<type>clob</type>
<notnull>false</notnull>
</field>
<field>
<name>operation</name>
<type>clob</type>
<notnull>false</notnull>
</field>
</declaration>
</table>
</database>
23 changes: 23 additions & 0 deletions apps/workflowengine/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<info>
<id>workflowengine</id>
<name>Files Workflow Engine</name>
<description></description>
<licence>AGPL</licence>
<author>Morris Jobke</author>
<version>1.0.0</version>
<namespace>WorkflowEngine</namespace>

<category>other</category>
<website>https://github.com/nextcloud/server</website>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<repository type="git">https://github.com/nextcloud/server.git</repository>

<types>
<filesystem/>
</types>

<dependencies>
<owncloud min-version="9.2" max-version="9.2" />
</dependencies>
</info>
30 changes: 30 additions & 0 deletions apps/workflowengine/appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

return [
'routes' => [
['name' => 'flowOperations#getChecks', 'url' => '/checks', 'verb' => 'GET'], // TODO rm and do via js?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should this be done via JS? -> let's move this to another issue/PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already made a PR in #582

['name' => 'flowOperations#getOperations', 'url' => '/operations', 'verb' => 'GET'],
['name' => 'flowOperations#addOperation', 'url' => '/operations', 'verb' => 'POST'],
['name' => 'flowOperations#updateOperation', 'url' => '/operations/{id}', 'verb' => 'PUT'],
['name' => 'flowOperations#deleteOperation', 'url' => '/operations/{id}', 'verb' => 'DELETE'],
]
];
43 changes: 43 additions & 0 deletions apps/workflowengine/css/admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.workflowengine .operation {
padding: 5px;
border-bottom: #eee 1px solid;
border-left: rgba(0,0,0,0) 1px solid;
}
.workflowengine .operation.modified {
border-left: rgb(255, 94, 32) 1px solid;
}
.workflowengine .operation button {
margin-bottom: 0;
}
.workflowengine .operation span.info {
padding: 7px;
color: #eee;
}
.workflowengine .rules .operation:nth-last-child(2) {
margin-bottom: 5px;
}

.workflowengine .pull-right {
float: right
}

.workflowengine .operation .msg {
border-radius: 3px;
margin: 3px 3px 3px 0;
padding: 5px;
transition: opacity .5s;
}

.workflowengine .operation .button-delete,
.workflowengine .operation .button-delete-check {
opacity: 0.5;
padding: 7px;
}
.workflowengine .operation .button-delete:hover,
.workflowengine .operation .button-delete:focus,
.workflowengine .operation .button-delete-check:hover,
.workflowengine .operation .button-delete-check:focus {
opacity: 1;
cursor: pointer;
}

Loading