diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-31 11:41:07 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-03-12 18:51:02 +0100 |
commit | ce94a998dd5a5801beef7874dd13752095e35de0 (patch) | |
tree | 8d91631f709549c40555dcb74e9976519f895ae2 /apps/files_external/appinfo | |
parent | 23cc3cc5f2f42166c37fbe03fa62d3dd1dbfe5ed (diff) | |
download | nextcloud-server-ce94a998dd5a5801beef7874dd13752095e35de0.tar.gz nextcloud-server-ce94a998dd5a5801beef7874dd13752095e35de0.zip |
Use storage id + appframework for ext storage CRUD
- Added StorageConfig class to replace ugly arrays
- Implemented StorageService and StorageController for Global and User
storages
- Async status checking for storages (from Xenopathic)
- Auto-generate id for external storage configs (not the same as
storage_id)
- Refactor JS classes for external storage settings, this mostly
moves/encapsulated existing global event handlers into the
MountConfigListView class.
- Added some JS unit tests for the external storage UI
Diffstat (limited to 'apps/files_external/appinfo')
-rw-r--r-- | apps/files_external/appinfo/app.php | 2 | ||||
-rw-r--r-- | apps/files_external/appinfo/application.php | 7 | ||||
-rw-r--r-- | apps/files_external/appinfo/routes.php | 38 |
3 files changed, 26 insertions, 21 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php index e74ce3594c1..7ea1e96bf2f 100644 --- a/apps/files_external/appinfo/app.php +++ b/apps/files_external/appinfo/app.php @@ -6,6 +6,8 @@ * later. * See the COPYING-README file. */ +$app = new \OCA\Files_external\Appinfo\Application(); + $l = \OC::$server->getL10N('files_external'); OC::$CLASSPATH['OC\Files\Storage\StreamWrapper'] = 'files_external/lib/streamwrapper.php'; diff --git a/apps/files_external/appinfo/application.php b/apps/files_external/appinfo/application.php index b1605bb98a8..3e6b80ccb48 100644 --- a/apps/files_external/appinfo/application.php +++ b/apps/files_external/appinfo/application.php @@ -12,12 +12,13 @@ use \OCA\Files_External\Controller\AjaxController; use \OCP\AppFramework\App; use \OCP\IContainer; - /** - * @package OCA\Files_External\Appinfo - */ +/** + * @package OCA\Files_External\Appinfo + */ class Application extends App { public function __construct(array $urlParams=array()) { parent::__construct('files_external', $urlParams); + $container = $this->getContainer(); /** diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index 5c7c4eca909..506c9d34e26 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -22,28 +22,30 @@ namespace OCA\Files_External\Appinfo; +/** + * @var $this OC\Route\Router + **/ + $application = new Application(); $application->registerRoutes( - $this, - array( - 'routes' => array( - array( - 'name' => 'Ajax#getSshKeys', - 'url' => '/ajax/sftp_key.php', - 'verb' => 'POST', - 'requirements' => array() - ) - ) - ) + $this, + array( + 'resources' => array( + 'global_storages' => array('url' => '/globalstorages'), + 'user_storages' => array('url' => '/userstorages'), + ), + 'routes' => array( + array( + 'name' => 'Ajax#getSshKeys', + 'url' => '/ajax/sftp_key.php', + 'verb' => 'POST', + 'requirements' => array() + ) + ) + ) ); -/** @var $this OC\Route\Router */ - -$this->create('files_external_add_mountpoint', 'ajax/addMountPoint.php') - ->actionInclude('files_external/ajax/addMountPoint.php'); -$this->create('files_external_remove_mountpoint', 'ajax/removeMountPoint.php') - ->actionInclude('files_external/ajax/removeMountPoint.php'); - +// TODO: move these to app framework $this->create('files_external_add_root_certificate', 'ajax/addRootCertificate.php') ->actionInclude('files_external/ajax/addRootCertificate.php'); $this->create('files_external_remove_root_certificate', 'ajax/removeRootCertificate.php') |