The system flag and extra table for that `ex_app_users` is removed to
optimize database usage and simplify the system logic.
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
PR should not break anything, for old parts added a workarounds, that we
will remove in a month when all ExApps will publish their updates.
**Changes**:
* UI now use the same algorithm/code for ExApp `register` & `update` as
the CLI commands.
* Deprecated "deploy" command, now `register` commands performs deploy.
**Refactoring**:
* Removed internal `DispatchInit` command, as from CLI we already can do
it without spawning additional process.
* Removed hack(`status['active']`) when we have some half-enabled state
of ExApp when it is not enabled, but already can call APIs, now ExApp
enables before calling `/init`
* Made code more consistent in many place.
OTHER CHANGES FOR DEVS:
* For `--json-info` parameter in occ `register` command keys renamed:
"appid" -> "id", "system_app" -> "system"
_Old naming is still supported but will be removed in future, in such
way we make consistent parameters between `info.xml` and `--json-info`._
----
Related: #219
_AppAPI will perform deploy & registration in a background and issue
should be fixed_
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
ExApp.php:
```php
$this->addType('status', 'string');
```
->
```php
$this->addType('status', 'json');
```
In DB we already have this field marked as json.
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Fixes: #122
1. Made sending the "init" request in a separate process
2. If "init" request fails with STATUS_NOT_IMPLEMENTED or
STATUS_NOT_FOUND sets the progress to 100
3. Added `wait-finish` optional parameter to `app_api:app:register` occ
command.
What is missing:
- [x] Global option: how long the "/init" request can be proceed.
- [x] Docs update for this
- [x] Update nc_py_api CI for this
- [x] Added test for registering ExApp that does not have "/init"
endpoint.
This allows to implement ExApp without "/init" endpoint and made it
optional.
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Fixes IDE warnings:
* Qualifier can be replaced with an import
* Argument matches the parameter's default value
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
When a daemon has been selected by default and then for some reason its
configuration is missing from the DB, the AppAPI application becomes
unusable from the UI.
Fix system flag env setup.
Added default algorithm of app release archive download and signature
check.
Fix scopes check in some type of daemon configurations (sanitize ocs api
url prefix)
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Show ExApps manually deployed and registered in ExApps management UI.
Only enable/disable actions allowed.
This is temporal solution, will be reworked later with mixed apps
concept.
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>