Skip to content

Commit

Permalink
Merge pull request #602 from nextcloud/backport-workflow-engine
Browse files Browse the repository at this point in the history
🚧 [WIP] Backport workflow engine 🚧
  • Loading branch information
nickvergessen authored Aug 4, 2016
2 parents d896d42 + fc7bd03 commit 713e201
Show file tree
Hide file tree
Showing 40 changed files with 3,657 additions and 7 deletions.
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install:

script:
- sh -c "if [ '$TC' = 'syntax' ]; then composer install && lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .; fi"
- sh -c "if [ '$TC' = 'app:check-code' ]; then ./occ app:check-code admin_audit; ./occ app:check-code comments; ./occ app:check-code federation; fi"
- sh -c "if [ '$TC' = 'app:check-code' ]; then ./occ app:check-code admin_audit; ./occ app:check-code comments; ./occ app:check-code federation; ./occ app:check-code workflowengine; fi"
- sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
- sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"

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 <hey@morrisjobke.de>
*
* @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 <hey@morrisjobke.de>
*
* @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#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'],
['name' => 'requestTime#getTimezones', 'url' => '/timezones', 'verb' => 'GET'],
]
];
52 changes: 52 additions & 0 deletions apps/workflowengine/css/admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.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;
}

.workflowengine .rules .icon-loading-small {
display: inline-block;
margin-right: 5px;
}

.workflowengine .invalid-input {
border-color: #aa0000;
}

Loading

0 comments on commit 713e201

Please sign in to comment.