Skip to content
Merged
Prev Previous commit
Next Next commit
UI changes for storage access group apis
  • Loading branch information
sureshanaparti committed Jul 4, 2025
commit 1d10bd08621a8da616e7ab9d77b5c05962adc691
8 changes: 4 additions & 4 deletions ui/src/views/infra/ClusterUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<script>
import { ref, reactive, toRaw } from 'vue'
import { api } from '@/api'
import { getAPI, postAPI } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'

export default {
Expand Down Expand Up @@ -130,7 +130,7 @@ export default {
fetchStorageAccessGroupsData () {
const params = {}
this.storageAccessGroupsLoading = true
api('listStorageAccessGroups', params).then(json => {
getAPI('listStorageAccessGroups', params).then(json => {
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
for (const sag of sags) {
if (!this.storageAccessGroups.includes(sag.name)) {
Expand Down Expand Up @@ -168,7 +168,7 @@ export default {
params.clustername = values.name
this.loading = true

api('updateCluster', params).then(json => {
postAPI('updateCluster', params).then(json => {
this.$message.success({
content: `${this.$t('label.action.update.cluster')} - ${values.name}`,
duration: 2
Expand All @@ -181,7 +181,7 @@ export default {
}

if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
api('configureStorageAccess', {
postAPI('configureStorageAccess', {
clusterid: params.id,
storageaccessgroups: params.storageaccessgroups
}).then(response => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/infra/ConnectedAgentsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</template>

<script>
import { api } from '@/api'
import { getAPI } from '@/api'
import Status from '@/components/widgets/Status'

export default {
Expand Down Expand Up @@ -76,7 +76,7 @@ export default {
methods: {
fetchData () {
this.hostAgents = []
api('listHosts', {
getAPI('listHosts', {
listall: true,
managementserverid: this.resource.id
}).then(json => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/infra/HostUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default {
fetchStorageAccessGroupsData () {
const params = {}
this.storageAccessGroupsLoading = true
api('listStorageAccessGroups', params).then(json => {
getAPI('listStorageAccessGroups', params).then(json => {
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
for (const sag of sags) {
if (!this.storageAccessGroups.includes(sag.name)) {
Expand Down Expand Up @@ -196,7 +196,7 @@ export default {
}

if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
api('configureStorageAccess', {
postAPI('configureStorageAccess', {
hostid: params.id,
storageaccessgroups: params.storageaccessgroups
}).then(response => {
Expand Down
8 changes: 4 additions & 4 deletions ui/src/views/infra/PodUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<script>
import { ref, reactive, toRaw } from 'vue'
import { api } from '@/api'
import { getAPI, postAPI } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'

export default {
Expand Down Expand Up @@ -124,7 +124,7 @@ export default {
fetchStorageAccessGroupsData () {
const params = {}
this.storageAccessGroupsLoading = true
api('listStorageAccessGroups', params).then(json => {
getAPI('listStorageAccessGroups', params).then(json => {
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
for (const sag of sags) {
if (!this.storageAccessGroups.includes(sag.name)) {
Expand All @@ -147,7 +147,7 @@ export default {
params.name = values.name
this.loading = true

api('updatePod', params).then(json => {
postAPI('updatePod', params).then(json => {
this.$message.success({
content: `${this.$t('label.action.update.pod')} - ${values.name}`,
duration: 2
Expand All @@ -160,7 +160,7 @@ export default {
}

if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
api('configureStorageAccess', {
postAPI('configureStorageAccess', {
podid: params.id,
storageaccessgroups: params.storageaccessgroups
}).then(response => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/infra/UpdatePrimaryStorage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default {
fetchStorageAccessGroupsData () {
const params = {}
this.storageAccessGroupsLoading = true
api('listStorageAccessGroups', params).then(json => {
getAPI('listStorageAccessGroups', params).then(json => {
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
for (const sag of sags) {
if (!this.storageAccessGroups.includes(sag.name)) {
Expand Down Expand Up @@ -228,7 +228,7 @@ export default {
}

if (args.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== args.storageaccessgroups) {
api('configureStorageAccess', {
postAPI('configureStorageAccess', {
storageid: args.id,
storageaccessgroups: args.storageaccessgroups
}).then(response => {
Expand Down
8 changes: 4 additions & 4 deletions ui/src/views/infra/ZoneUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

<script>
import { ref, reactive, toRaw } from 'vue'
import { api } from '@/api'
import { getAPI, postAPI } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'

export default {
Expand Down Expand Up @@ -182,7 +182,7 @@ export default {
fetchStorageAccessGroupsData () {
const params = {}
this.storageAccessGroupsLoading = true
api('listStorageAccessGroups', params).then(json => {
getAPI('listStorageAccessGroups', params).then(json => {
const sags = json.liststorageaccessgroupsresponse.storageaccessgroup || []
for (const sag of sags) {
if (!this.storageAccessGroups.includes(sag.name)) {
Expand All @@ -202,7 +202,7 @@ export default {

this.loading = true

api('updateZone', params).then(json => {
postAPI('updateZone', params).then(json => {
this.$message.success({
content: `${this.$t('label.action.update.zone')} - ${values.name}`,
duration: 2
Expand All @@ -215,7 +215,7 @@ export default {
}

if (params.storageaccessgroups !== undefined && (this.resource.storageaccessgroups ? this.resource.storageaccessgroups.split(',').join(',') : '') !== params.storageaccessgroups) {
api('configureStorageAccess', {
postAPI('configureStorageAccess', {
zoneid: params.id,
storageaccessgroups: params.storageaccessgroups
}).then(response => {
Expand Down