Skip to content

Commit 85a4613

Browse files
UI changes for storage access group apis
1 parent ca622da commit 85a4613

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

ui/src/views/infra/ClusterUpdate.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
<script>
8484
import { ref, reactive, toRaw } from 'vue'
85-
import { api } from '@/api'
85+
import { getAPI, postAPI } from '@/api'
8686
import TooltipLabel from '@/components/widgets/TooltipLabel'
8787
8888
export 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 => {

ui/src/views/infra/ConnectedAgentsTab.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</template>
3232

3333
<script>
34-
import { api } from '@/api'
34+
import { getAPI } from '@/api'
3535
import Status from '@/components/widgets/Status'
3636
3737
export default {
@@ -76,7 +76,7 @@ export default {
7676
methods: {
7777
fetchData () {
7878
this.hostAgents = []
79-
api('listHosts', {
79+
getAPI('listHosts', {
8080
listall: true,
8181
managementserverid: this.resource.id
8282
}).then(json => {

ui/src/views/infra/HostUpdate.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default {
147147
fetchStorageAccessGroupsData () {
148148
const params = {}
149149
this.storageAccessGroupsLoading = true
150-
api('listStorageAccessGroups', params).then(json => {
150+
getAPI('listStorageAccessGroups', params).then(json => {
151151
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
152152
for (const sag of sags) {
153153
if (!this.storageAccessGroups.includes(sag.name)) {
@@ -196,7 +196,7 @@ export default {
196196
}
197197
198198
if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
199-
api('configureStorageAccess', {
199+
postAPI('configureStorageAccess', {
200200
hostid: params.id,
201201
storageaccessgroups: params.storageaccessgroups
202202
}).then(response => {

ui/src/views/infra/PodUpdate.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
<script>
7777
import { ref, reactive, toRaw } from 'vue'
78-
import { api } from '@/api'
78+
import { getAPI, postAPI } from '@/api'
7979
import TooltipLabel from '@/components/widgets/TooltipLabel'
8080
8181
export default {
@@ -124,7 +124,7 @@ export default {
124124
fetchStorageAccessGroupsData () {
125125
const params = {}
126126
this.storageAccessGroupsLoading = true
127-
api('listStorageAccessGroups', params).then(json => {
127+
getAPI('listStorageAccessGroups', params).then(json => {
128128
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
129129
for (const sag of sags) {
130130
if (!this.storageAccessGroups.includes(sag.name)) {
@@ -147,7 +147,7 @@ export default {
147147
params.name = values.name
148148
this.loading = true
149149
150-
api('updatePod', params).then(json => {
150+
postAPI('updatePod', params).then(json => {
151151
this.$message.success({
152152
content: `${this.$t('label.action.update.pod')} - ${values.name}`,
153153
duration: 2
@@ -160,7 +160,7 @@ export default {
160160
}
161161
162162
if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
163-
api('configureStorageAccess', {
163+
postAPI('configureStorageAccess', {
164164
podid: params.id,
165165
storageaccessgroups: params.storageaccessgroups
166166
}).then(response => {

ui/src/views/infra/UpdatePrimaryStorage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default {
179179
fetchStorageAccessGroupsData () {
180180
const params = {}
181181
this.storageAccessGroupsLoading = true
182-
api('listStorageAccessGroups', params).then(json => {
182+
getAPI('listStorageAccessGroups', params).then(json => {
183183
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
184184
for (const sag of sags) {
185185
if (!this.storageAccessGroups.includes(sag.name)) {
@@ -228,7 +228,7 @@ export default {
228228
}
229229
230230
if (args.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== args.storageaccessgroups) {
231-
api('configureStorageAccess', {
231+
postAPI('configureStorageAccess', {
232232
storageid: args.id,
233233
storageaccessgroups: args.storageaccessgroups
234234
}).then(response => {

ui/src/views/infra/ZoneUpdate.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
<script>
128128
import { ref, reactive, toRaw } from 'vue'
129-
import { api } from '@/api'
129+
import { getAPI, postAPI } from '@/api'
130130
import TooltipLabel from '@/components/widgets/TooltipLabel'
131131
132132
export default {
@@ -182,7 +182,7 @@ export default {
182182
fetchStorageAccessGroupsData () {
183183
const params = {}
184184
this.storageAccessGroupsLoading = true
185-
api('listStorageAccessGroups', params).then(json => {
185+
getAPI('listStorageAccessGroups', params).then(json => {
186186
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
187187
for (const sag of sags) {
188188
if (!this.storageAccessGroups.includes(sag.name)) {
@@ -202,7 +202,7 @@ export default {
202202
203203
this.loading = true
204204
205-
api('updateZone', params).then(json => {
205+
postAPI('updateZone', params).then(json => {
206206
this.$message.success({
207207
content: `${this.$t('label.action.update.zone')} - ${values.name}`,
208208
duration: 2
@@ -215,7 +215,7 @@ export default {
215215
}
216216
217217
if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
218-
api('configureStorageAccess', {
218+
postAPI('configureStorageAccess', {
219219
zoneid: params.id,
220220
storageaccessgroups: params.storageaccessgroups
221221
}).then(response => {

0 commit comments

Comments
 (0)