29 Commits

Author SHA1 Message Date
6cfbeb7fe7 feat(DockerEngine): use API from HaRP instead of using Docker directly
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-05-29 09:30:51 +03:00
6c2bf2a76e fix(DeployDaemon): support for daemon names containing spaces
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-04-29 14:40:17 +03:00
3851d7d592 Fix AppManager method name
* According to 9e327a5890 (diff-e69a8a7fe6497b2b323e5b1247790347fc614a007e88ef017bad764781591ffbL413)

Signed-off-by: Robin Windey <ro.windey@gmail.com>
2025-02-13 21:55:07 +00:00
e27b687ddf feat: Advanced deploy options
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2025-01-20 19:23:27 +02:00
c5f3d6a764 docs(reuse): Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-18 08:40:54 +01:00
b8200b70b5 chore: sync changes for Apps management migration to settings (#417)
This PR synchronizes backend logic for ExAppFetcher and required changes
for Apps management.

![Screen Shot 2024-10-14 at 17 01
48](https://github.com/user-attachments/assets/60667041-92b1-4d9e-a78a-9476a1271d1f)

## TODO

- [ ] Merge with the server PR for settings app changes:
https://github.com/nextcloud/server/pull/48665
- [x] Remove old UI parts that are not needed anymore

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Co-authored-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2024-10-29 21:26:46 +02:00
1eab9f6814 feat: remove ApiScopes (#373)
Ongoing optimization, unnecessary stuff removal to reduce the number of
requests during AppAPIAuth.

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-09-04 20:37:02 +03:00
eea14dc504 optimization: system flag and ex_app_users removal (#323)
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>
2024-07-11 17:08:52 +00:00
8b2639968c Add removeData parameter to ExApp Remove UI (#301)
Closes #297.

---------

Signed-off-by: Edward Ly <contact@edward.ly>
2024-06-10 18:13:42 +03:00
3d503b3403 drop ExApp scopes table, rewrite code of it (#285)
This is ongoing part of optimizations of reducing the number of
database/cache requests.

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-05-07 10:50:51 +03:00
3bf5132211 feat: Test deploy feature (#279)
This PR introduces a "Test deploy" button for each Daemon configuration
to verify each step and identify the error.

Resolves: https://github.com/cloud-py-api/app_api/issues/174

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-04-29 13:36:32 +03:00
d140563ba5 fix removable state, disallow only on deploy (#242)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-02-21 16:31:17 +00:00
b6a3fd233a fix: allow to remove app on init stage or error (#235)
Allow remove ExApp on initialization step or if error occurred.

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-02-20 18:28:42 +00: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
8a6c373d9a fixed errors found during installing on "Unraid" (#217)
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-01-26 17:30:37 +00:00
003794670a Daemon Templates, Docker Socket Proxy, AppAPI 2.0 (#212) 2024-01-25 12:33:48 +00: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
7738659d08 removed old style attributes definitions (#183)
subj, we do not support NC26
2023-12-27 17:20:59 +03:00
76f448cddb fix(i18n): Fixes for reports at Transifex. (#180) 2023-12-23 00:48:09 +00:00
3e1e7588f2 ExApps management and Admin settings UI logic fixes (#177)
Resolves: #171 

Also fixes:

* Update button in UI not working.

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2023-12-21 12:51:46 +00:00
dcd54913e5 Cleanup useless comments (#176)
Yolo PR, just performed a cleanup type comments that are already
specified in code
2023-12-20 19:53:24 +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
83333b5e0a cleanup: Qualifier -> Imports (#125)
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>
2023-11-25 10:59:07 +03:00
e6bd36be30 fixed UI error when default_daemon_config config missing (#109)
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.
2023-11-07 13:15:03 +03:00
e409b7e0ce ExApp init, disable apps actions if daemon not accessible (#96)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2023-10-19 17:28:52 +03:00
b54621cce6 added archive download and signature check as for default (#88)
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>
2023-10-06 13:55:32 +03:00
859c229ac8 list apps not registered in appstore (#83)
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>
2023-10-04 20:14:11 +03:00
8017dba784 UI implementation(appstore, daemons) (#77)
- [ ] polish
- [ ] update docs with screenshots

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2023-10-02 20:55:33 +03:00