Skip to content

Commit 6b70cd1

Browse files
authored
Merge branch 'master' into try_md
2 parents ccf59de + 9fda66c commit 6b70cd1

File tree

14 files changed

+414
-229
lines changed

14 files changed

+414
-229
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
"dependencies": {
2727
"@apollo/client": "3.13.8",
2828
"@hpcc-js/wasm": "2.22.4",
29-
"@lumino/default-theme": "2.1.9",
30-
"@lumino/widgets": "2.7.0",
29+
"@lumino/default-theme": "2.1.10",
30+
"@lumino/widgets": "2.7.1",
3131
"@mdi/js": "7.4.47",
3232
"@vueuse/core": "13.1.0",
3333
"apexcharts": "3.54.1",
3434
"axios": "1.9.0",
35-
"dedent": "1.5.3",
35+
"dedent": "1.6.0",
3636
"enumify": "2.0.0",
3737
"graphiql": "3.8.3",
3838
"graphql": "16.11.0",
@@ -49,16 +49,16 @@
4949
"subscriptions-transport-ws": "0.11.0",
5050
"svg-pan-zoom": "3.6.2",
5151
"unified": "11.0.5",
52-
"vue": "3.5.13",
52+
"vue": "3.5.14",
5353
"vue-i18n": "11.1.3",
5454
"vue-router": "4.5.1",
5555
"vue-the-mask": "0.11.1",
5656
"vue3-apexcharts": "1.8.0",
57-
"vuetify": "3.8.2",
57+
"vuetify": "3.8.4",
5858
"vuex": "4.1.0"
5959
},
6060
"devDependencies": {
61-
"@cypress/code-coverage": "3.14.1",
61+
"@cypress/code-coverage": "3.14.2",
6262
"@vitejs/plugin-vue": "5.2.4",
6363
"@vitest/coverage-istanbul": "3.1.3",
6464
"@vue/test-utils": "2.4.6",

src/components/graphqlFormGenerator/EditRuntimeForm.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import { cloneDeep, isArray, isEqual, snakeCase, startCase } from 'lodash'
5757
import { VTextarea } from 'vuetify/components/VTextarea'
5858
import VuetifyConfig, { getComponentProps, RUNTIME_SETTING } from '@/components/graphqlFormGenerator/components/vuetify'
5959
import { findByName, mutate, mutationStatus } from '@/utils/aotf'
60+
import GEnum from '@/components/graphqlFormGenerator/components/Enum.vue'
6061
6162
const NamedTypes = {
6263
...VuetifyConfig.namedTypes,
@@ -65,7 +66,12 @@ const NamedTypes = {
6566
rows: '1',
6667
autoGrow: true,
6768
style: 'font-family: monospace;'
68-
}
69+
},
70+
TaskRunMode: {
71+
is: GEnum,
72+
// Workaround https://github.com/cylc/cylc-flow/pull/6554#discussion_r1922563421
73+
allowedValues: ['Live', 'Skip'],
74+
},
6975
}
7076
7177
export default {

src/components/graphqlFormGenerator/components/Enum.vue

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

1818
<template>
1919
<v-select
20-
persistent-hint
2120
v-model="model"
2221
v-bind="$attrs"
23-
:items="type.enumValues"
22+
:items="enumValues"
2423
item-title="name"
2524
:hint="itemDesc"
2625
placeholder="Select an option"
26+
persistent-hint
2727
/>
2828
</template>
2929

@@ -32,13 +32,31 @@ import { formElement } from '@/components/graphqlFormGenerator/mixins'
3232
3333
export default {
3434
name: 'g-enum',
35+
3536
mixins: [formElement],
37+
38+
props: {
39+
/** Specify a subset of the type's enum values that will be displayed. */
40+
allowedValues: {
41+
type: Array,
42+
required: false,
43+
},
44+
},
45+
3646
computed: {
47+
enumValues () {
48+
return this.allowedValues?.length
49+
? this.type.enumValues.filter(
50+
({ name }) => this.allowedValues.includes(name)
51+
)
52+
: this.type.enumValues
53+
},
54+
3755
itemDesc () {
3856
return this.type.enumValues.find(
3957
({ name }) => name === this.modelValue
4058
)?.description ?? ''
41-
}
59+
},
4260
}
4361
}
4462
</script>

0 commit comments

Comments
 (0)