Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ jobs:
with:
CONF_PATH: ./.github/labeler/build.yml

cypress-tests:
uses: ./.github/workflows/tests-e2e.yml
playwright-tests:
uses: ./.github/workflows/playwright.yml
if: ${{ needs.path-filter.outputs.apps == 'true' || needs.path-filter.outputs.packages == 'true' || needs.path-filter.outputs.ci == 'true' || needs.path-filter.outputs.e2e == 'true' }}
needs:
- path-filter
Expand All @@ -140,19 +140,19 @@ jobs:
with:
NODE_VERSION: ${{ needs.expose-vars.outputs.NODE_VERSION }}
TAG: pr-${{ github.event.pull_request.number || github.event.number }}
BROWSERS: "${{ github.base_ref == 'main' && 'chrome,firefox' || 'firefox' }}"

playwright-tests:
uses: ./.github/workflows/playwright.yml
cypress-tests:
uses: ./.github/workflows/tests-e2e.yml
if: ${{ needs.path-filter.outputs.apps == 'true' || needs.path-filter.outputs.packages == 'true' || needs.path-filter.outputs.ci == 'true' || needs.path-filter.outputs.e2e == 'true' }}
needs:
- cypress-tests
- playwright-tests
- path-filter
- expose-vars
- build
with:
NODE_VERSION: ${{ needs.expose-vars.outputs.NODE_VERSION }}
TAG: pr-${{ github.event.pull_request.number || github.event.number }}
BROWSERS: "${{ github.base_ref == 'main' && 'chrome,firefox' || 'firefox' }}"

deploy-tests:
uses: ./.github/workflows/tests-deploy.yml
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ keycloak/data
# dist
dist
build
auto-imports.d.ts
components.d.ts
*.tsbuildinfo

Expand Down
4 changes: 1 addition & 3 deletions apps/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WORKDIR /app

COPY --chown=node:root package.json ./

# Install pnpm version defined in package.json "packageManager" property
RUN npm install --global corepack@latest && corepack enable && corepack enable pnpm

COPY --chown=node:root pnpm-workspace.yaml pnpm-lock.yaml ./
Expand All @@ -15,9 +16,6 @@ COPY --chown=node:root packages/shared/package.json ./packages/shared/package.js
COPY --chown=node:root packages/test-utils/package.json ./packages/test-utils/package.json
COPY --chown=node:root packages/tsconfig/package.json ./packages/tsconfig/package.json

# Install pnpm version defined in package.json "packageManager" property
RUN npm install --global corepack@latest && corepack enable && corepack enable pnpm

RUN pnpm install --ignore-scripts # --no-optional

COPY --chown=node:root packages/ ./packages/
Expand Down
70 changes: 0 additions & 70 deletions apps/client/cypress/e2e/specs/01-logs.e2e.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:e2e": "cypress open --browser=firefox",
"test:e2e-ci": "cypress run --browser=firefox",
"kube:e2e-ci": "CLIENT_HOST=console.dso.local CLIENT_PORT=80 cypress run",
"type-check": "vue-tsc --noEmit -p tsconfig.json || exit 0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

"type-check": "vue-tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"@cpn-console/shared": "workspace:^",
Expand Down
173 changes: 173 additions & 0 deletions apps/client/src/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
// biome-ignore lint: disable
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const createPinia: typeof import('pinia')['createPinia']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineStore: typeof import('pinia')['defineStore']
const effectScope: typeof import('vue')['effectScope']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const mapActions: typeof import('pinia')['mapActions']
const mapGetters: typeof import('pinia')['mapGetters']
const mapState: typeof import('pinia')['mapState']
const mapStores: typeof import('pinia')['mapStores']
const mapWritableState: typeof import('pinia')['mapWritableState']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const setActivePinia: typeof import('pinia')['setActivePinia']
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const storeToRefs: typeof import('pinia')['storeToRefs']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useId: typeof import('vue')['useId']
const useLink: typeof import('vue-router')['useLink']
const useModel: typeof import('vue')['useModel']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useScheme: typeof import('@gouvminint/vue-dsfr')['useScheme']
const useSlots: typeof import('vue')['useSlots']
const useTabs: typeof import('@gouvminint/vue-dsfr')['useTabs']
const useTemplateRef: typeof import('vue')['useTemplateRef']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}

// for vue template auto import
import { UnwrapRef } from 'vue'
declare module 'vue' {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
readonly mapActions: UnwrapRef<typeof import('pinia')['mapActions']>
readonly mapGetters: UnwrapRef<typeof import('pinia')['mapGetters']>
readonly mapState: UnwrapRef<typeof import('pinia')['mapState']>
readonly mapStores: UnwrapRef<typeof import('pinia')['mapStores']>
readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
readonly ref: UnwrapRef<typeof import('vue')['ref']>
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly unref: UnwrapRef<typeof import('vue')['unref']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
readonly useId: UnwrapRef<typeof import('vue')['useId']>
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
readonly useScheme: UnwrapRef<typeof import('@gouvminint/vue-dsfr')['useScheme']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly useTabs: UnwrapRef<typeof import('@gouvminint/vue-dsfr')['useTabs']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly watch: UnwrapRef<typeof import('vue')['watch']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
}
}
3 changes: 3 additions & 0 deletions apps/client/src/components/AdminRoleForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function closeModal() {
<DsfrCheckbox
v-for="perm in scope.perms"
:key="perm.key"
value="!!(ADMIN_PERMS[perm.key] & role.permissions)"
:model-value="!!(ADMIN_PERMS[perm.key] & role.permissions)"
:data-testid="`${perm.key}-cbx`"
:label="perm.label"
Expand Down Expand Up @@ -202,6 +203,8 @@ function closeModal() {
:key="user.email"
:label="`${user.lastName} ${user.firstName}`"
:hint="user.email"
:name="`checkbox-${user.id}`"
value="user.adminRoleIds.includes(role.id)"
:model-value="user.adminRoleIds.includes(role.id)"
@update:model-value="(checked: boolean) => switchUserMembership(checked, user)"
/>
Expand Down
6 changes: 3 additions & 3 deletions apps/client/src/components/ClusterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const isConnectionDetailsShown = ref(true)
:required="true"
data-testid="memoryInput"
:placeholder="ONE_TENTH_STR"
@update:model-value="(value: string) => localCluster.memory = localeParseFloat(value)"
@update:model-value="(value: string | number | undefined) => localCluster.memory = localeParseFloat(value as string)"
/>
<DsfrInputGroup
v-model="localCluster.cpu"
Expand All @@ -394,7 +394,7 @@ const isConnectionDetailsShown = ref(true)
:required="true"
data-testid="cpuInput"
:placeholder="ONE_TENTH_STR"
@update:model-value="(value: string) => localCluster.cpu = localeParseFloat(value)"
@update:model-value="(value: string | number | undefined) => localCluster.cpu = localeParseFloat(value as string)"
/>
<DsfrInputGroup
v-model="localCluster.gpu"
Expand All @@ -407,7 +407,7 @@ const isConnectionDetailsShown = ref(true)
:required="true"
data-testid="gpuInput"
:placeholder="ONE_TENTH_STR"
@update:model-value="(value: string) => localCluster.gpu = localeParseFloat(value)"
@update:model-value="(value: string | number | undefined) => localCluster.gpu = localeParseFloat(value as string)"
/>
<div
v-if="localCluster.privacy === ClusterPrivacy.DEDICATED"
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/components/ConfigParam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DEFAULT, DISABLED, ENABLED } from '@cpn-console/shared'

const props = defineProps<{
options: {
value: Ref<string>
value: globalThis.Ref<string>
description: string | undefined
name: string
disabled: boolean
Expand Down Expand Up @@ -50,7 +50,7 @@ function set(data: string) {
:placeholder="props.options.placeholder || 'Non défini'"
data-testid="input"
:disabled="props.options.disabled"
@update:model-value="(event: string) => set(event)"
@update:model-value="(event: string | number | undefined) => set(event as string)"
/>
<DsfrSegmentedSet
v-else-if="props.options.kind === 'switch'"
Expand Down
Loading
Loading