8282
8383<script >
8484import { ref , reactive , toRaw } from ' vue'
85- import { api } from ' @/api'
85+ import { getAPI , postAPI } from ' @/api'
8686import TooltipLabel from ' @/components/widgets/TooltipLabel'
8787
8888export default {
@@ -130,7 +130,7 @@ export default {
130130 fetchStorageAccessGroupsData () {
131131 const params = {}
132132 this .storageAccessGroupsLoading = true
133- api (' listStorageAccessGroups' , params).then (json => {
133+ getAPI (' listStorageAccessGroups' , params).then (json => {
134134 const sags = json .liststorageaccessgroupsresponse .storageaccessgroup || []
135135 for (const sag of sags) {
136136 if (! this .storageAccessGroups .includes (sag .name )) {
@@ -168,7 +168,7 @@ export default {
168168 params .clustername = values .name
169169 this .loading = true
170170
171- api (' updateCluster' , params).then (json => {
171+ postAPI (' updateCluster' , params).then (json => {
172172 this .$message .success ({
173173 content: ` ${ this .$t (' label.action.update.cluster' )} - ${ values .name } ` ,
174174 duration: 2
@@ -181,7 +181,7 @@ export default {
181181 }
182182
183183 if (params .storageaccessgroups !== undefined && (this .resource .storageaccessgroups ? this .resource .storageaccessgroups .split (' ,' ).join (' ,' ) : ' ' ) !== params .storageaccessgroups ) {
184- api (' configureStorageAccess' , {
184+ postAPI (' configureStorageAccess' , {
185185 clusterid: params .id ,
186186 storageaccessgroups: params .storageaccessgroups
187187 }).then (response => {
0 commit comments