Skip to content
Snippets Groups Projects
Verified Commit 4b761c54 authored by Martin Weise's avatar Martin Weise
Browse files

Simplified interface

parent c7a0d19c
No related branches found
No related tags found
1 merge request!370Fixed the test
......@@ -54,30 +54,12 @@
</v-col>
</v-row>
<v-row>
<v-col
md="6">
<v-select
v-model="payload.is_public"
name="public"
:label="$t('pages.database.subpages.create.data.label')"
:hint="$t('pages.database.subpages.create.data.hint')"
persistent-hint
:variant="inputVariant"
:items="visibilityOptions"
item-title="name"
item-value="value"
:rules="[v => !!v || $t('validation.required')]"
return-object
required>
</v-select>
</v-col>
<v-col
md="6">
<v-col>
<v-select
v-model="payload.is_schema_public"
name="schema-public"
:label="$t('pages.database.subpages.create.schema.label')"
:hint="$t('pages.database.subpages.create.schema.hint')"
v-model="mode"
name="mode"
:label="$t('pages.database.subpages.create.visibility.label')"
:hint="$t('pages.database.subpages.create.visibility.hint')"
persistent-hint
:variant="inputVariant"
:items="visibilityOptions"
......@@ -86,6 +68,19 @@
:rules="[v => !!v || $t('validation.required')]"
return-object
required>
<template
v-slot:append-inner>
<v-tooltip
location="bottom">
<template
v-slot:activator="{ props }">
<v-icon
v-bind="props"
icon="mdi-help-circle-outline" />
</template>
{{ mode.hint }}
</v-tooltip>
</template>
</v-select>
</v-col>
</v-row>
......@@ -125,14 +120,17 @@ export default {
engines: [],
visibilityOptions: [
{
name: this.$t('toolbars.database.public'),
name: this.$t('pages.database.subpages.create.visibility.public.label'),
hint: this.$t('pages.database.subpages.create.visibility.public.hint'),
value: true
},
{
name: this.$t('toolbars.database.private'),
name: this.$t('pages.database.subpages.create.visibility.private.label'),
hint: this.$t('pages.database.subpages.create.visibility.private.hint'),
value: false
}
],
mode: true,
payload: {
name: null,
is_public: true,
......@@ -151,6 +149,7 @@ export default {
}
},
mounted () {
this.mode = this.visibilityOptions[0]
this.fetchContainers()
},
methods: {
......@@ -186,6 +185,8 @@ export default {
create () {
this.loading = true
this.payload.container_id = this.engine.id
this.payload.is_public = this.mode.value
this.payload.is_schema_public = this.mode.value
const databaseService = useDatabaseService()
databaseService.create(this.payload)
.then(async (database) => {
......
......@@ -653,13 +653,17 @@
"label": "Engine",
"hint": "Required"
},
"data": {
"label": "Data Visibility",
"hint": "Required"
"visibility": {
"label": "Visibility",
"hint": "Required",
"public": {
"label": "Public",
"hint": "Everything is visible to the public, e.g. to publish data used in a open-access paper. You can later update the visibility of data."
},
"schema": {
"label": "Schema Visibility",
"hint": "Required"
"private": {
"label": "Private",
"hint": "Nothing is visible to anyone without dedicated read-access, e.g. to work on a dataset. You can later update the visibility of data."
}
},
"submit": {
"text": "Create"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment