-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '132-s3-metadata-update-endpoint' of https://github.com/…
…I-GUIDE/catalogapi into 132-s3-metadata-update-endpoint
- Loading branch information
Showing
4 changed files
with
146 additions
and
106 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
121 changes: 121 additions & 0 deletions
121
frontend/src/components/register/cd.register-s3-bucket.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,121 @@ | ||
<template> | ||
<v-card variant="elevated" class="mx-4"> | ||
<v-card-title class="text-overline"> S3 Bucket Information </v-card-title> | ||
<v-divider></v-divider> | ||
<v-card-text> | ||
<v-form> | ||
<v-row> | ||
<v-col class="py-0" lg="6" cols="12"> | ||
<v-text-field | ||
v-model.trim="modelValue.path" | ||
:error-messages="form.path.$errors.map((e) => e.$message)" | ||
@blur="form.path.$touch" | ||
@input="form.path.$touch" | ||
clearable | ||
class="my-4" | ||
label="Path*" | ||
hide-details="auto" | ||
variant="outlined" | ||
density="compact" | ||
> | ||
</v-text-field> | ||
|
||
<div | ||
class="text-subtitle-1 text-medium-emphasis pl-3 mb-4 hint" | ||
style="word-break: break-word" | ||
> | ||
{{ `e.g. 'data/.hs/dataset_metadata.json'` }} | ||
</div> | ||
</v-col> | ||
<v-col class="py-0" lg="6" cols="12"> | ||
<v-text-field | ||
v-model.trim="modelValue.bucket" | ||
:error-messages="form.bucket.$errors.map((e) => e.$message)" | ||
@blur="form.bucket.$touch" | ||
@input="form.bucket.$touch" | ||
clearable | ||
class="my-4" | ||
label="Bucket*" | ||
type="url" | ||
hide-details="auto" | ||
variant="outlined" | ||
density="compact" | ||
> | ||
</v-text-field> | ||
|
||
<div | ||
class="text-subtitle-1 text-medium-emphasis pl-3 mb-4 hint" | ||
style="word-break: break-word" | ||
> | ||
{{ `e.g. 'iguide-catalog'` }} | ||
</div> | ||
</v-col> | ||
<v-col class="py-0" cols="12"> | ||
<v-text-field | ||
v-model.trim="modelValue.endpointUrl" | ||
:error-messages="form.endpointUrl.$errors.map((e) => e.$message)" | ||
@blur="form.endpointUrl.$touch" | ||
@input="form.endpointUrl.$touch" | ||
clearable | ||
class="my-4" | ||
label="Endpoint URL*" | ||
type="url" | ||
hide-details="auto" | ||
variant="outlined" | ||
density="compact" | ||
> | ||
</v-text-field> | ||
|
||
<div | ||
class="text-subtitle-1 text-medium-emphasis pl-3 mb-4 hint" | ||
style="word-break: break-word" | ||
> | ||
{{ `e.g. 'https://iguide-catalog.s3.us-west-2.amazonaws.com/'` }} | ||
</div> | ||
</v-col> | ||
</v-row> | ||
</v-form> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Prop, Vue, toNative } from "vue-facing-decorator"; | ||
import { useVuelidate } from "@vuelidate/core"; | ||
import { url, required, helpers } from "@vuelidate/validators"; | ||
import { useRouter } from "vue-router"; | ||
@Component({ | ||
name: "cd-register-s3-bucket", | ||
components: {}, | ||
}) | ||
class CdRegisterS3Bucket extends Vue { | ||
@Prop() modelValue!: { path: string; bucket: string; endpointUrl: string }; | ||
form: any = null; | ||
isSaving = false; | ||
router = useRouter(); | ||
created() { | ||
this.form = useVuelidate( | ||
{ | ||
path: { required: helpers.withMessage("required", required) }, | ||
bucket: { required: helpers.withMessage("required", required) }, | ||
endpointUrl: { | ||
required: helpers.withMessage("required", required), | ||
url: helpers.withMessage("not a valid URL address", url), | ||
}, | ||
}, | ||
this.modelValue, | ||
); | ||
this.form.$validate(); | ||
} | ||
} | ||
export default toNative(CdRegisterS3Bucket); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.hint { | ||
margin-top: -1rem; | ||
} | ||
</style> |
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