Skip to content

Commit

Permalink
Fix ExApp management state if default Deploy daemon is not available (#…
Browse files Browse the repository at this point in the history
…314)

Resolves: #307

- [x] Allow disable and remove actions if default Deploy daemon is not
available.
- [x] Set ping timeout to 3s

---------

Signed-off-by: Andrey Borysenko <[email protected]>
  • Loading branch information
andrey18106 authored Jul 2, 2024
1 parent b0c62cc commit 2387ced
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.7.1 - 2024-07-xx]

### Fixed

- Allow ExApps management disable and remove actions if default Deploy daemon is not accessible. #314
- Fixed Deploy daemon avilability check using ping timeout set to 3s. #314

## [2.7.0 - 2024-07-01]

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion lib/DeployActions/DockerActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ public function removeVolume(string $dockerUrl, string $volume): array {
public function ping(string $dockerUrl): bool {
$url = $this->buildApiUrl($dockerUrl, '_ping');
try {
$response = $this->guzzleClient->get($url);
$response = $this->guzzleClient->get($url, [
'timeout' => 3,
]);
if ($response->getStatusCode() === 200) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Apps/AppDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
class="uninstall"
type="button"
:value="t('settings', 'Remove')"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible"
:disabled="installing || isLoading"
@click="remove(app.id, removeData)">
<input v-if="app.active"
class="enable"
type="button"
:value="disableButtonText"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible || isInitializing || isDeploying"
:disabled="installing || isLoading || isInitializing || isDeploying"
@click="disable(app.id)">
<input v-if="!app.active && (app.canInstall || app.isCompatible)"
:title="enableButtonTooltip"
Expand Down
4 changes: 2 additions & 2 deletions src/components/Apps/AppItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
<NcButton v-if="app.canUnInstall"
class="uninstall"
type="tertiary"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible"
:disabled="installing || isLoading"
@click.stop="remove(app.id, removeData)">
{{ t('settings', 'Remove') }}
</NcButton>
<NcButton v-if="app.active"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible || isInitializing || isDeploying"
:disabled="installing || isLoading || isInitializing || isDeploying"
@click.stop="disable(app.id)">
{{ disableButtonText }}
</NcButton>
Expand Down

0 comments on commit 2387ced

Please sign in to comment.