Browse Source
feat(settings): Deploy daemon selection support during ExApp installation
feat(settings): Deploy daemon selection support during ExApp installation
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>pull/53756/head
No known key found for this signature in database
GPG Key ID: 934CB29F9F59B0D1
17 changed files with 302 additions and 18 deletions
-
1apps/settings/src/app-types.ts
-
41apps/settings/src/components/AppAPI/DaemonSelectionDialog.vue
-
77apps/settings/src/components/AppAPI/DaemonSelectionEntry.vue
-
77apps/settings/src/components/AppAPI/DaemonSelectionList.vue
-
26apps/settings/src/components/AppList/AppItem.vue
-
12apps/settings/src/components/AppStoreSidebar/AppDeployOptionsModal.vue
-
36apps/settings/src/components/AppStoreSidebar/AppDetailsTab.vue
-
4apps/settings/src/mixins/AppManagement.js
-
20apps/settings/src/store/app-api-store.ts
-
4dist/8737-8737.js
-
4dist/8737-8737.js.license
-
2dist/8737-8737.js.map
-
4dist/settings-apps-view-4529.js
-
4dist/settings-apps-view-4529.js.license
-
2dist/settings-apps-view-4529.js.map
-
4dist/settings-vue-settings-apps-users-management.js
-
2dist/settings-vue-settings-apps-users-management.js.map
@ -0,0 +1,41 @@ |
|||||
|
<!-- |
||||
|
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
||||
|
- SPDX-License-Identifier: AGPL-3.0-or-later |
||||
|
--> |
||||
|
<template> |
||||
|
<NcDialog :open="show" |
||||
|
:name="t('settings', 'Choose Deploy Daemon for {appName}', {appName: app.name })" |
||||
|
size="normal" |
||||
|
@update:open="closeModal"> |
||||
|
<DaemonSelectionList :app="app" |
||||
|
:deploy-options="deployOptions" |
||||
|
@close="closeModal" /> |
||||
|
</NcDialog> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import { defineProps, defineEmits } from 'vue' |
||||
|
import NcDialog from '@nextcloud/vue/components/NcDialog' |
||||
|
import DaemonSelectionList from './DaemonSelectionList.vue' |
||||
|
|
||||
|
defineProps({ |
||||
|
show: { |
||||
|
type: Boolean, |
||||
|
required: true, |
||||
|
}, |
||||
|
app: { |
||||
|
type: Object, |
||||
|
required: true, |
||||
|
}, |
||||
|
deployOptions: { |
||||
|
type: Object, |
||||
|
required: false, |
||||
|
default: () => ({}), |
||||
|
}, |
||||
|
}) |
||||
|
|
||||
|
const emit = defineEmits(['update:show']) |
||||
|
const closeModal = () => { |
||||
|
emit('update:show', false) |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,77 @@ |
|||||
|
<!-- |
||||
|
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
||||
|
- SPDX-License-Identifier: AGPL-3.0-or-later |
||||
|
--> |
||||
|
<template> |
||||
|
<NcListItem :name="itemTitle" |
||||
|
:details="isDefault ? t('settings', 'Default') : ''" |
||||
|
:force-display-actions="true" |
||||
|
:counter-number="daemon.exAppsCount" |
||||
|
:active="isDefault" |
||||
|
counter-type="highlighted" |
||||
|
@click.stop="selectDaemonAndInstall"> |
||||
|
<template #subname> |
||||
|
{{ daemon.accepts_deploy_id }} |
||||
|
</template> |
||||
|
</NcListItem> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import NcListItem from '@nextcloud/vue/components/NcListItem' |
||||
|
import AppManagement from '../../mixins/AppManagement.js' |
||||
|
import { useAppsStore } from '../../store/apps-store' |
||||
|
import { useAppApiStore } from '../../store/app-api-store' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaemonSelectionEntry', |
||||
|
components: { |
||||
|
NcListItem, |
||||
|
}, |
||||
|
mixins: [AppManagement], // TODO: Convert to Composition API when AppManagement is refactored |
||||
|
props: { |
||||
|
daemon: { |
||||
|
type: Object, |
||||
|
required: true, |
||||
|
}, |
||||
|
isDefault: { |
||||
|
type: Boolean, |
||||
|
required: true, |
||||
|
}, |
||||
|
app: { |
||||
|
type: Object, |
||||
|
required: true, |
||||
|
}, |
||||
|
deployOptions: { |
||||
|
type: Object, |
||||
|
required: false, |
||||
|
default: () => ({}), |
||||
|
}, |
||||
|
}, |
||||
|
setup() { |
||||
|
const store = useAppsStore() |
||||
|
const appApiStore = useAppApiStore() |
||||
|
|
||||
|
return { |
||||
|
store, |
||||
|
appApiStore, |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
itemTitle() { |
||||
|
return this.daemon.name + ' - ' + this.daemon.display_name |
||||
|
}, |
||||
|
daemons() { |
||||
|
return this.appApiStore.dockerDaemons |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
closeModal() { |
||||
|
this.$emit('close') |
||||
|
}, |
||||
|
selectDaemonAndInstall() { |
||||
|
this.closeModal() |
||||
|
this.enable(this.app.id, this.daemon, this.deployOptions) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,77 @@ |
|||||
|
<!-- |
||||
|
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
||||
|
- SPDX-License-Identifier: AGPL-3.0-or-later |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="daemon-selection-list"> |
||||
|
<ul v-if="dockerDaemons.length > 0" |
||||
|
:aria-label="t('settings', 'Registered Deploy daemons list')"> |
||||
|
<DaemonSelectionEntry v-for="daemon in dockerDaemons" |
||||
|
:key="daemon.id" |
||||
|
:daemon="daemon" |
||||
|
:is-default="defaultDaemon.name === daemon.name" |
||||
|
:app="app" |
||||
|
:deploy-options="deployOptions" |
||||
|
@close="closeModal" /> |
||||
|
</ul> |
||||
|
<NcEmptyContent v-else |
||||
|
class="daemon-selection-list__empty-content" |
||||
|
:name="t('settings', 'No Deploy daemons configured')" |
||||
|
:description="t('settings', 'Register a custom one or setup from available templates')"> |
||||
|
<template #icon> |
||||
|
<FormatListBullet :size="20" /> |
||||
|
</template> |
||||
|
<template #action> |
||||
|
<NcButton :href="appApiAdminPage"> |
||||
|
{{ t('settings', 'Manage Deploy daemons') }} |
||||
|
</NcButton> |
||||
|
</template> |
||||
|
</NcEmptyContent> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import { computed, defineProps } from 'vue' |
||||
|
import { generateUrl } from '@nextcloud/router' |
||||
|
|
||||
|
import NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent' |
||||
|
import NcButton from '@nextcloud/vue/components/NcButton' |
||||
|
import FormatListBullet from 'vue-material-design-icons/FormatListBulleted.vue' |
||||
|
import DaemonSelectionEntry from './DaemonSelectionEntry.vue' |
||||
|
import { useAppApiStore } from '../../store/app-api-store.ts' |
||||
|
|
||||
|
defineProps({ |
||||
|
app: { |
||||
|
type: Object, |
||||
|
required: true, |
||||
|
}, |
||||
|
deployOptions: { |
||||
|
type: Object, |
||||
|
required: false, |
||||
|
default: () => ({}), |
||||
|
}, |
||||
|
}) |
||||
|
|
||||
|
const appApiStore = useAppApiStore() |
||||
|
|
||||
|
const dockerDaemons = computed(() => appApiStore.dockerDaemons) |
||||
|
const defaultDaemon = computed(() => appApiStore.defaultDaemon) |
||||
|
const appApiAdminPage = computed(() => generateUrl('/settings/admin/app_api')) |
||||
|
const emit = defineEmits(['close']) |
||||
|
const closeModal = () => { |
||||
|
emit('close') |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
.daemon-selection-list { |
||||
|
max-height: 350px; |
||||
|
overflow-y: scroll; |
||||
|
padding: 2rem; |
||||
|
|
||||
|
&__empty-content { |
||||
|
margin-top: 0; |
||||
|
text-align: center; |
||||
|
} |
||||
|
} |
||||
|
</style> |
4
dist/8737-8737.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
dist/8737-8737.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4
dist/settings-apps-view-4529.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
dist/settings-apps-view-4529.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4
dist/settings-vue-settings-apps-users-management.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
dist/settings-vue-settings-apps-users-management.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue