1717 <p class =" ml-3 text-sm text-yellow-700" >{{ t('vaultDetails.warning.archived') }}</p >
1818 </div >
1919 </div >
20- <!--
21-
22- TODO https://github.com/shift7-ch/cipherduck-hub/issues/44
23- - get description and default vaules and possible values from /q/openapi/openapi.json
24- - add red start for mandatory etc.
25- - filter for archived
26- - fully dynamic: full list of attributes from openapi?
27- -->
28-
29- <div >
30- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.id') }}</h3 >
31- <div class =" mt-2 flex items-center justify-between" >
32- <p class =" text-sm text-gray-500" >{{ storageprofile.id }}</p >
33- </div >
34- </div >
35- <div >
36- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.name') }}</h3 >
37- <div class =" mt-2 flex items-center justify-between" >
38- <p class =" text-sm text-gray-500" >{{ storageprofile.name }}</p >
39- </div >
40- </div >
41- <div >
42- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.protocol') }}</h3 >
43- <div class =" mt-2 flex items-center justify-between" >
44- <p class =" text-sm text-gray-500" >{{ storageprofile.protocol }}</p >
45- </div >
46- </div >
47- <div v-if =" storageprofile.protocol == 'S3STS'" >
48- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.bucketPrefix') }}</h3 >
49- <div class =" mt-2 flex items-center justify-between" >
50- <p class =" text-sm text-gray-500" >{{ storageprofile.bucketPrefix }}</p >
51- </div >
52- </div >
53- <div v-if =" storageprofile.protocol == 'S3STS'" >
54- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsRoleArnClient') }}</h3 >
55- <div class =" mt-2 flex items-center justify-between" >
56- <p class =" text-sm text-gray-500" >{{ storageprofile.stsRoleArnClient }}</p >
57- </div >
58- </div >
59- <div v-if =" storageprofile.protocol == 'S3STS'" >
60- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsRoleArnHub') }}</h3 >
61- <div class =" mt-2 flex items-center justify-between" >
62- <p class =" text-sm text-gray-500" >{{ storageprofile.stsRoleArnHub }}</p >
63- </div >
64- </div >
65- <div v-if =" storageprofile.protocol == 'S3STS'" >
66- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsEndpoint') }}</h3 >
67- <div class =" mt-2 flex items-center justify-between" >
68- <p class =" text-sm text-gray-500" >{{ storageprofile.stsEndpoint }}</p >
69- </div >
70- </div >
71- <div >
72- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.withPathStyleAccessEnabled') }}</h3 >
73- <div class =" mt-2 flex items-center justify-between" >
74- <p class =" text-sm text-gray-500" >{{ storageprofile.withPathStyleAccessEnabled }}</p >
75- </div >
76- </div >
77- <div v-if =" storageprofile.protocol == 'S3STS'" >
78- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.region') }}</h3 >
79- <div class =" mt-2 flex items-center justify-between" >
80- <p class =" text-sm text-gray-500" >{{ storageprofile.region }}</p >
81- </div >
82- </div >
83- <div v-if =" storageprofile.protocol == 'S3STS'" >
84- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.regions') }}</h3 >
85- <div class =" mt-2 flex items-center justify-between" >
86- <p class =" text-sm text-gray-500" >{{ storageprofile.regions }}</p >
87- </div >
88- </div >
89- <div >
90- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.scheme') }}</h3 >
91- <div class =" mt-2 flex items-center justify-between" >
92- <p class =" text-sm text-gray-500" >{{ storageprofile.scheme }}</p >
93- </div >
94- </div >
95- <div >
96- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.hostname') }}</h3 >
97- <div class =" mt-2 flex items-center justify-between" >
98- <p class =" text-sm text-gray-500" >{{ storageprofile.hostname }}</p >
99- </div >
100- </div >
101- <div >
102- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.port') }}</h3 >
103- <div class =" mt-2 flex items-center justify-between" >
104- <p class =" text-sm text-gray-500" >{{ storageprofile.port }}</p >
105- </div >
106- </div >
107- <div >
108- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.oauthClientId') }}</h3 >
109- <div class =" mt-2 flex items-center justify-between" >
110- <p class =" text-sm text-gray-500" >{{ storageprofile.oauthClientId }}</p >
111- </div >
112- </div >
113- <div >
114- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.oauthTokenUrl') }}</h3 >
115- <div class =" mt-2 flex items-center justify-between" >
116- <p class =" text-sm text-gray-500" >{{ storageprofile.oauthTokenUrl }}</p >
117- </div >
118- </div >
119- <div >
120- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.oauthAuthorizationUrl') }}</h3 >
121- <div class =" mt-2 flex items-center justify-between" >
122- <p class =" text-sm text-gray-500" >{{ storageprofile.oauthAuthorizationUrl }}</p >
123- </div >
124- </div >
125- <div v-if =" storageprofile.protocol == 'S3STS'" >
126- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsRoleArn') }}</h3 >
127- <div class =" mt-2 flex items-center justify-between" >
128- <p class =" text-sm text-gray-500" >{{ storageprofile.stsRoleArn }}</p >
129- </div >
130- </div >
131- <div v-if =" storageprofile.protocol == 'S3STS'" >
132- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsRoleArn2') }}</h3 >
133- <div class =" mt-2 flex items-center justify-between" >
134- <p class =" text-sm text-gray-500" >{{ storageprofile.stsRoleArn2 }}</p >
135- </div >
136- </div >
137- <div v-if =" storageprofile.protocol == 'S3STS'" >
138- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.stsDurationSeconds') }}</h3 >
139- <div class =" mt-2 flex items-center justify-between" >
140- <p class =" text-sm text-gray-500" >{{ storageprofile.stsDurationSeconds }}</p >
20+ <div v-if =" storageprofile['protocol'] == 'S3STS'" >
21+ <div v-for =" (item,key) in openapi.components.schemas.StorageProfileS3STSDto.properties" >
22+ <h3 class =" font-medium text-gray-900" ><span v-if =" !item.nullable" style =" color : red ;" >* </span >{{ key }}</h3 >
23+ <div class =" mt-2 flex items-center justify-between" >
24+ <p class =" text-sm text-gray-600" >{{ storageprofile[key] }}</p >
25+ </div >
26+ <div class =" mt-2 flex items-center justify-between" >
27+ <p class =" text-sm text-gray-400" >{{ item.description }}</p >
28+ </div >
29+ <div class =" mt-2 flex items-center justify-between" >
30+ <p class =" text-sm text-gray-400" >type: {{ openapi.components.schemas.StorageProfileS3STSDto.properties[key].type }}</p >
31+ </div >
32+ <div v-if =" openapi.components.schemas.StorageProfileS3STSDto.properties[key].allOf" >
33+ <div class =" mt-2 flex items-center justify-between" >
34+ <p v-if =" openapi.components.schemas[openapi.components.schemas.StorageProfileS3STSDto.properties[key].allOf[0].$ref.split('/').pop()].enum" class =" text-sm text-gray-400" >enum: {{ openapi.components.schemas[openapi.components.schemas.StorageProfileS3STSDto.properties[key].allOf[0].$ref.split('/').pop()].enum }}</p >
35+ </div >
36+ <div class =" mt-2 flex items-center justify-between" >
37+ <p v-if =" openapi.components.schemas[openapi.components.schemas.StorageProfileS3STSDto.properties[key].allOf[0].$ref.split('/').pop()].pattern" class =" text-sm text-gray-400" >pattern: {{ openapi.components.schemas[openapi.components.schemas.StorageProfileS3STSDto.properties[key].allOf[0].$ref.split('/').pop()].pattern }}</p >
38+ </div >
39+ </div >
40+ <div class =" mt-2 flex items-center justify-between" v-if =" openapi.components.schemas.StorageProfileS3STSDto.properties[key].example" >
41+ <p class =" text-sm text-gray-400" >Example: {{ openapi.components.schemas.StorageProfileS3STSDto.properties[key].example }}</p >
42+ </div >
43+ <br />
14144 </div >
14245 </div >
143- <div >
144- <h3 class =" font-medium text-gray-900" >{{ t('storageprofile.oAuthTokenExchangeAudience') }}</h3 >
145- <div class =" mt-2 flex items-center justify-between" >
146- <p class =" text-sm text-gray-500" >{{ storageprofile.oAuthTokenExchangeAudience }}</p >
46+ <div v-if =" storageprofile['protocol'] == 'S3'" >
47+ <div v-for =" (item,key) in openapi.components.schemas.StorageProfileS3Dto.properties" >
48+ <h3 class =" font-medium text-gray-900" ><span v-if =" !item.nullable" style =" color : red ;" >* </span >{{ key }}</h3 >
49+ <div class =" mt-2 flex items-center justify-between" >
50+ <p class =" text-sm text-gray-600" >{{ storageprofile[key] }}</p >
51+ </div >
52+ <div class =" mt-2 flex items-center justify-between" >
53+ <p class =" text-sm text-gray-400" >{{ item.description }}</p >
54+ </div >
55+ <div class =" mt-2 flex items-center justify-between" >
56+ <p class =" text-sm text-gray-400" >type: {{ openapi.components.schemas.StorageProfileS3Dto.properties[key].type }}</p >
57+ </div >
58+ <div v-if =" openapi.components.schemas.StorageProfileS3Dto.properties[key].allOf" >
59+ <div class =" mt-2 flex items-center justify-between" >
60+ <p v-if =" openapi.components.schemas[openapi.components.schemas.StorageProfileS3Dto.properties[key].allOf[0].$ref.split('/').pop()].enum" class =" text-sm text-gray-400" >enum: {{ openapi.components.schemas[openapi.components.schemas.StorageProfileS3Dto.properties[key].allOf[0].$ref.split('/').pop()].enum }}</p >
61+ </div >
62+ <div class =" mt-2 flex items-center justify-between" >
63+ <p v-if =" openapi.components.schemas[openapi.components.schemas.StorageProfileS3Dto.properties[key].allOf[0].$ref.split('/').pop()].pattern" class =" text-sm text-gray-400" >pattern: {{ openapi.components.schemas[openapi.components.schemas.StorageProfileS3Dto.properties[key].allOf[0].$ref.split('/').pop()].pattern }}</p >
64+ </div >
65+ </div >
66+ <div class =" mt-2 flex items-center justify-between" v-if =" openapi.components.schemas.StorageProfileS3Dto.properties[key].example" >
67+ <p class =" text-sm text-gray-400" >example: {{ openapi.components.schemas.StorageProfileS3Dto.properties[key].example }}</p >
68+ </div >
69+ <br />
14770 </div >
14871 </div >
14972 </div >
15376import { ExclamationTriangleIcon } from ' @heroicons/vue/20/solid' ;
15477import { computed , onMounted , ref } from ' vue' ;
15578import { useI18n } from ' vue-i18n' ;
156- import backend , { StorageProfileDto , NotFoundError } from ' ../../common/backend' ;
79+ import backend , { NotFoundError , StorageProfileDto as StorageProfileDto2 } from ' ../../common/backend' ;
15780import FetchError from ' ../FetchError.vue' ;
81+ import { openapi } from ' ../../openapi/index' ;
15882
15983
16084const { t } = useI18n ({ useScope: ' global' });
@@ -167,7 +91,7 @@ const props = defineProps<{
16791const onFetchError = ref <Error | null >();
16892const allowRetryFetch = computed (() => onFetchError .value != null && ! (onFetchError .value instanceof NotFoundError )); // fetch requests either list something, or query from th storageprofile In the latter, a 404 indicates the vault does not exists anymore.
16993
170- const storageprofile = ref <StorageProfileDto >();
94+ const storageprofile = ref <StorageProfileDto2 >();
17195
17296onMounted (fetchData );
17397
0 commit comments