-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin integration status page (#2686)
- Loading branch information
1 parent
2f1abf0
commit 975492d
Showing
20 changed files
with
796 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Permissions from '../../security/permissions' | ||
import IntegrationService from '../../services/integrationService' | ||
import PermissionChecker from '../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationRead) | ||
const payload = await new IntegrationService(req).findGlobalIntegrations( | ||
req.params.tenantId, | ||
req.query, | ||
) | ||
|
||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Permissions from '../../security/permissions' | ||
import IntegrationService from '../../services/integrationService' | ||
import PermissionChecker from '../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationRead) | ||
|
||
const payload = await new IntegrationService(req).findGlobalIntegrationsStatusCount( | ||
req.params.tenantId, | ||
req.query, | ||
) | ||
|
||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 0 additions & 94 deletions
94
frontend/src/modules/admin/modules/integration/components/integration-list.vue
This file was deleted.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
...d/src/modules/admin/modules/integration/components/status/integration-platform-select.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template> | ||
<lf-dropdown placement="bottom-end" width="20rem"> | ||
<template #trigger> | ||
<lf-button type="secondary" class="!font-normal"> | ||
<template v-if="!model"> | ||
<lf-icon-old name="apps-2-line" :size="16" /> | ||
All integrations | ||
</template> | ||
<template v-else> | ||
<img :src="lfIntegrations[model]?.image" :alt="lfIntegrations[model]?.name" class="w-4 h-4 object-contain"> | ||
{{ lfIntegrations[model]?.name }} | ||
</template> | ||
<lf-icon-old name="arrow-down-s-line" :size="16" /> | ||
</lf-button> | ||
</template> | ||
<div class="max-h-80 overflow-y-scroll -m-2 p-2"> | ||
<lf-dropdown-item :selected="!model" @click="model = ''"> | ||
<div class="flex items-center gap-2"> | ||
<lf-icon-old name="apps-2-line" :size="16" /> | ||
All integrations | ||
</div> | ||
</lf-dropdown-item> | ||
<lf-dropdown-separator /> | ||
<lf-dropdown-item | ||
v-for="(integration, key) in lfIntegrations" | ||
:key="key" | ||
:selected="model === key" | ||
@click="model = key" | ||
> | ||
<div class="flex items-center gap-2"> | ||
<img :src="integration.image" :alt="integration.name" class="w-4 h-4 object-contain"> | ||
{{ integration.name }} | ||
</div> | ||
</lf-dropdown-item> | ||
</div> | ||
</lf-dropdown> | ||
</template> | ||
<script lang="ts" setup> | ||
import { computed } from 'vue'; | ||
import LfButton from '@/ui-kit/button/Button.vue'; | ||
import LfIconOld from '@/ui-kit/icon/IconOld.vue'; | ||
import LfDropdown from '@/ui-kit/dropdown/Dropdown.vue'; | ||
import LfDropdownItem from '@/ui-kit/dropdown/DropdownItem.vue'; | ||
import LfDropdownSeparator from '@/ui-kit/dropdown/DropdownSeparator.vue'; | ||
import { lfIntegrations } from '@/config/integrations'; | ||
const props = defineProps<{ | ||
modelValue?: string, | ||
}>(); | ||
const emit = defineEmits<{(e: 'update:modelValue', value: string)}>(); | ||
const model = computed({ | ||
get() { | ||
return props.modelValue || ''; | ||
}, | ||
set(value: string) { | ||
emit('update:modelValue', value); | ||
}, | ||
}); | ||
</script> | ||
<script lang="ts"> | ||
export default { | ||
name: 'LfAdminIntegrationPlatformSelect', | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
frontend/src/modules/admin/modules/integration/config/status/not-connected.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IntegrationStatusConfig } from '@/modules/admin/modules/integration/config/status/index'; | ||
|
||
const notConnected: IntegrationStatusConfig = { | ||
key: 'notConnected', | ||
show: (integration: any) => !integration || integration.status === 'not-connected', | ||
statuses: ['not-connected'], | ||
status: { | ||
text: 'Not-connected', | ||
icon: '', | ||
color: 'text-gray-600', | ||
}, | ||
actionBar: { | ||
background: 'bg-gray-50', | ||
color: 'text-gray-900', | ||
}, | ||
tabs: { | ||
text: 'Not connected', | ||
empty: 'No integrations to be connected', | ||
badge: 'bg-gray-100', | ||
}, | ||
}; | ||
|
||
export default notConnected; |
Oops, something went wrong.