Storage.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div>
  3. <a-form-model-item :label="$t('k8s.text_269')">
  4. <a-switch v-model="formData.enabled" />
  5. </a-form-model-item>
  6. <template v-if="formData.enabled">
  7. <a-form-model-item :label="$t('k8s.text_270')">
  8. <a-input-number v-model="formData.sizeMB" :min="1" /> GB
  9. </a-form-model-item>
  10. <a-form-model-item :label="$t('k8s.text_271')" :prop="prop">
  11. <base-select
  12. v-model="formData.storageClassName"
  13. resource="storageclasses"
  14. version="v1"
  15. :params="params" />
  16. </a-form-model-item>
  17. </template>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'KubeComponentMonitorStorage',
  23. props: {
  24. value: {
  25. type: Object,
  26. required: true,
  27. },
  28. prop: {
  29. type: String,
  30. required: true,
  31. },
  32. },
  33. data () {
  34. return {
  35. params: {
  36. scope: this.$store.getters.scope,
  37. cluster: this.$route.query.cluster,
  38. limit: 0,
  39. },
  40. formData: this.value,
  41. }
  42. },
  43. }
  44. </script>
  45. <style>
  46. </style>