Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • gitkeep
  • dev protected
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1870-publicPrivateVisibility
  • Sprint/2022-01
  • Issue/1804-fixedValueFix
  • Sprint/2021-22
  • Issue/43-saveButton
  • Issue/1762-renamingResourceTypes
  • Sprint/2021-16
  • Product/1666-removeRadioButtons
  • Topic/1686-removeRadioButtons
  • Sprint/2021-15
  • Product/1573-ReadOnlyResources
  • Topic/1594-SetReadOnlyResources
  • Sprint/2021-14
  • Topic/1594-ApplyLinter
  • Product/1576-formGeneratorMultiselect
  • Topic/1535-formGeneratorMultiselect
  • v1.6.0
  • v1.5.0
  • v1.4.0
  • v1.3.1
  • v1.3.0
  • v1.2.0
  • v1.1.0
  • v1.0.3
  • v1.0.2
  • v1.0.1
  • v1.0.0
31 results

Setup.vue

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Setup.vue 1.79 KiB
    <template>
      <span>
        <coscine-loading-form-skeleton v-if="isLoading" />
        <span v-else>
          <span
            v-for="resourceTypeOptionKey of Object.keys(
              resource.resourceTypeOption
            )"
            :key="resourceTypeOptionKey"
          >
            <coscine-form-group
              v-if="resourceTypeOptionKey !== 'Id'"
              :mandatory="true"
              :labelFor="resourceTypeOptionKey"
              :label="$t(resourceTypeOptionKey + 'Label')"
            >
              <b-form-input
                v-if="
                  resourceTypeOptionKey !== 'AccessKey' &&
                  resourceTypeOptionKey !== 'SecretKey' &&
                  resourceTypeOptionKey !== 'Token' &&
                  resourceTypeOptionKey !== 'Size'
                "
                v-model="resource.resourceTypeOption[resourceTypeOptionKey]"
                :readonly="true"
              />
              <b-form-input
                v-else-if="resourceTypeOptionKey === 'Size'"
                :value="resource.resourceTypeOption[resourceTypeOptionKey] + ' GB'"
                :readonly="true"
              />
              <b-form-input
                v-else
                type="password"
                value="placeholder"
                :readonly="true"
              />
            </coscine-form-group>
          </span>
        </span>
      </span>
    </template>
    
    <script lang="ts">
    import Vue from "vue";
    import {
      CoscineFormGroup,
      CoscineLoadingFormSkeleton,
    } from "@coscine/component-library";
    import "@coscine/component-library/dist/index.css";
    
    export default Vue.extend({
      name: "Setup",
      components: {
        CoscineFormGroup,
        CoscineLoadingFormSkeleton,
      },
      data() {
        return {};
      },
      props: {
        resource: Object,
        isOwner: {
          default: false,
          type: Boolean,
        },
        isLoading: {
          default: false,
          type: Boolean,
        },
      },
      methods: {},
    });
    </script>
    
    <style></style>