8 Commits

Author SHA1 Message Date
af00e1787f Test deploy adjustments (#280)
Test Deploy fixes, timeout logic adjustments, docs.
2024-04-30 13:59:54 +03:00
41f229bf9a fix: do not spam error, do not rewrite previous error (#271)
1. Removes spam about the same error every 5 minutes
2. If there is already some kind of error there, then do not overwrite
it and do nothing

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-04-16 12:29:26 +03:00
c7d1c3e8b8 "Deploy" removed, Register Rework (#233)
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>
2024-02-19 18:50:06 +03:00
7ad5541eae removed "optional API Scope" support (#220)
* added URL encoding for Docker Container Pull action
* added two logs with `info` level for PullImage action
* removed "optional API Scope" support
* added AppAPI options toggles in Admin settings
* added RestartPolicy option to created containers

CI fails unrelated:
https://github.com/pytest-dev/pytest-asyncio/issues/737

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Nextcloud bot <bot@nextcloud.com>
Co-authored-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2024-02-01 21:58:00 +03:00
4168cbbd60 ExApp status: do not encode & decode with hands (#211)
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>
2024-01-15 12:41:08 +03:00
9c87bb9cb9 inverted ExApp status.init_start_time condition check (#155)
Resolves #154
2023-12-16 14:39:25 +03:00
50277224d3 ExApp UI Implementation (Part1) (#135)
This PR adds ability for ExApp to have entry in TopMenu and provide it's
own page when clicking on it.

* OCS API for specifying InitialStates, Scripts, Styles, TopMenu
* Small corrections and refactoring of code that relates on UI
* Small bug fixes to other parts of AppAPI, mostly for FileActions Menu.

PR is ready, after merging this, one additional PR will be created that
relates to this one.
That PR will cover missing parts:
* Docs, changelog update
* FileActions Menu rework(icon specifying)
* Fixes of stuff that will be found if any, related to UI
* CI Actions and Makefile adjusting, to keep `js/proxy_js` folder
* Fix of Proxying stuff

Merging this PR will allow nc_py_api's PR to be finished on this theme
and finish first example for testing.

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
2023-12-03 16:30:03 +03:00
ec0324b0df Rework of App:Register (#128)
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>
2023-11-27 15:31:37 +03:00