4b0ac38ee4
* Starting on gergo/newAutomateModule * regenerated gql * minor gql optimizations * various fixes for project tabs * WIP featured functions * composable for ez debounced inputs * composable for ez debounced inputs * WIP fn card * TS error fixes * WIP cardd * WIP function cards * empty state done * WIP runs table * runs table looks good * run info dialog works * minor run dialog improvement * feat: add automate module with feature flag * added fautomate feature flag to fe2 as well * link to beta implemented * minor adjustment * enabling dev to skip migrations * Merge branch 'main' into fabians/fe2-automate-integration * tabs set up for single automation page * refactored editable title/description * models title fix * update title mutation * title done * WIP function card * feat: feature flags implementation * WIP runs * feat: feature flags feedback * Revert "feat: feature flags feedback" This reverts commit 139065bcbf967af207c2e98896ff3aae8ff2fdb0. * Revert "feat: feature flags implementation" This reverts commit 0614debb330ab092e96c71b7eccfaa8b4a280a4f. * minor row fix * core automation page done * wip automation fn settings * function settings dialog * apollo dev tools fix * feat: automation run trigger logic * functions page * WIP function page * fix FE2 lint issue * testing library borked, just skip interactive tests * tests fix * enabling automate module for testing * disabling module in test env * WIP fn page * parameters demo dialog * added markdown rendering * finished single function page * faked markdown * pkg json fix * pkg json fix * updated schema for triggers * more schema adjustments * adjusted FE to support triggers * added model select to automate edit * fixed up runs dialog & status icon * migrated viewer to new components * updated automate panel to fit designs in viewer * cleaning up old shit * mocks fix * fn logo size fix * runs table status fix * feat: automate module, automation creation and trigger * test: fix automate module tests * test: fixt automate module tests * feat: create function flow * linting fixes * test fix? * functions page fixes * WIP automation wizard * parameters step done * WIP details step * automation wizard done for the most part * triggering automation * enabled switch * create automation from fns page * create automation from fn page * details validation update * disable capability for switch * edit fn done * functions empty state * various empty states * minor adjustment * various minor fixes * automation status dialog responsivity * status icon responsivity fixes * viewer panel * empty state adjustments * fns page responsivitiy * fn page core responsivity * automation wizard responsivity * fn wizard responsity fixes * minor fix ups * fixed up existing backend stuff * fixing eslint hopefully * tryna fix eslint * automate code validation mechanism added * minor GQL schema change * maybethis fixes eslint? * more eslint debugging * fix cross-env missing * tryna fix eslint memory issues * ci test fix * error improvements * migrations for fn tables * Improve empty state * Update button copy in edit function dialog And remove unused icon * Refine function page design * WIP function create * fn creation tests added * Fix enable switch label text on Automation page * Update design of function card * Change tag to beta * Fix selected ring not being rounded * Minor copy changes here and there * Add border and header column bg to Table component * Update styling of Automations tab * Update styling of individual Automation page * Remove icon from button * fn update w/ tests * fn release creation w/ tests * fixing tests * GH auth endpoint * minor cleanup * WIP reporting function statuses * automation update/delete w/ tests * WIP automation revision & trigger tests * revision creation tests done * trigger tests * function run reporting works * report status tests WIP * run status update tests done * auth code handshake tests * a couple of FE2 fixes * WIP function retrieval queries & tests * WIP automation queries * removed all functions stuff * implemented fn queries * all kinds of queries & resolvers done * more queries * automations query * automation status resolution core algo * FE2 fixes * fixed up mocks * fix(fe2): disallow loading automations if non-owner * chore: circleci extension config change * fixing some benjamins changes * hydration mismatch fix * fixed tests * preview service fix? * env flag fix * more form validation improvements * proper automation status run ordering * featured mock fix * meta data fixed * introduce outdated label * log streaming mock moved to serverside * encryption in create for FE * fix: integration work * core encryption stuff implemented * fixing tests & linting * improved revision input validation * automation create works * automations status fix * fixed automation run queries * minor cleanup * implemented log streaming * properly handing redacted props in update rev flow * implemented subscriptions backend * WIP subscriptions FE implementation * subscriptions work? * feat: add docker compose based reverse proxy for the server stack * revert: restore docker compose ingress dockerfile * chore: disable automate module feature flag by default * fix: move nginx ingress file to the right place * Implement `automateFunctionRunStatusReport` (#2262) * untested implementation * no more errors * no more errors * lint * add all statuses to `AutomationRunStatusOrder` * fix: status reporting now works * park in the right place, grapple with tests * update tests * use correct run ids, adjust tests --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com> * fix: make tab selection robust by using dynamic ID lookup * tests: fix authz module tests * fix: frontend TS issue * ci: add automate encryption keys path value * Fix ts build errors from ui-components changes * fix: frontend automation status colors * add handling for all enum cases in useRunStatusMetadata * Fix merge issue * Use save button to update ProjectVisibility * Update copy around private projects * Use isPrivate * Remove title from Alert * Updates from PR --------- Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com> Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com> Co-authored-by: Benjamin Ottensten <benjamin.ottensten@gmail.com> Co-authored-by: Chuck Driesler <cdriesler.iv@gmail.com>
89 lines
2.3 KiB
Vue
89 lines
2.3 KiB
Vue
<template>
|
|
<FormSelectBase
|
|
v-model="selectValue"
|
|
:items="Object.values(items)"
|
|
label="Project visibility"
|
|
:show-label="showLabel"
|
|
:name="name || 'visibility'"
|
|
:allow-unset="false"
|
|
:disabled="disabled"
|
|
:label-id="labelId"
|
|
:button-id="buttonId"
|
|
by="id"
|
|
:help="
|
|
disabled
|
|
? 'You must be an Owner of this project to change this setting'
|
|
: undefined
|
|
"
|
|
>
|
|
<template #something-selected="{ value }">
|
|
<div class="text-sm">
|
|
<div class="font-bold">
|
|
{{ isArray(value) ? value[0].title : value.title }}
|
|
</div>
|
|
<span class="text-foreground-2 text-xs sm:text-sm">
|
|
{{ isArray(value) ? value[0].description : value.description }}
|
|
</span>
|
|
</div>
|
|
</template>
|
|
<template #option="{ item }">
|
|
<div class="flex flex-col">
|
|
<div class="label">{{ item.title }}</div>
|
|
<div class="label label--light text-foreground-2 text-xs sm:text-sm">
|
|
{{ item.description }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</FormSelectBase>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ProjectVisibility } from '~~/lib/common/generated/gql/graphql'
|
|
import { isArray } from 'lodash-es'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'update:modelValue', v: ProjectVisibility): void
|
|
}>()
|
|
|
|
const props = defineProps<{
|
|
modelValue: ProjectVisibility
|
|
showLabel?: boolean
|
|
name?: string
|
|
disabled?: boolean
|
|
}>()
|
|
|
|
const labelId = useId()
|
|
const buttonId = useId()
|
|
const items = ref<
|
|
Record<
|
|
ProjectVisibility,
|
|
{ id: ProjectVisibility; description: string; title: string }
|
|
>
|
|
>({
|
|
[ProjectVisibility.Public]: {
|
|
id: ProjectVisibility.Public,
|
|
description: 'Project is visible to everyone',
|
|
title: 'Discoverable'
|
|
},
|
|
[ProjectVisibility.Unlisted]: {
|
|
id: ProjectVisibility.Unlisted,
|
|
description: 'Anyone with the link can view',
|
|
title: 'Link Shareable'
|
|
},
|
|
[ProjectVisibility.Private]: {
|
|
id: ProjectVisibility.Private,
|
|
description: 'Only collaborators can access',
|
|
title: 'Private'
|
|
}
|
|
})
|
|
|
|
const selectedValue = computed({
|
|
get: () => props.modelValue,
|
|
set: (newVal) => emit('update:modelValue', newVal)
|
|
})
|
|
|
|
const selectValue = computed({
|
|
get: () => items.value[selectedValue.value],
|
|
set: (newVal) => (selectedValue.value = newVal.id)
|
|
})
|
|
</script>
|