MCPcopy Create free account
hub / github.com/apache/cloudstack / ProjectView

Function ProjectView

ui/src/store/modules/user.js:531–555  ·  view source on GitHub ↗
({ commit }, projectid)

Source from the content-addressed store, hash-verified

529 commit('SET_HEADER_NOTICES', noticeArray)
530 },
531 ProjectView ({ commit }, projectid) {
532 return new Promise((resolve, reject) => {
533 getAPI('listApis', { projectid: projectid }).then(response => {
534 const apis = {}
535 const apiList = response.listapisresponse.api
536 for (var idx = 0; idx < apiList.length; idx++) {
537 const api = apiList[idx]
538 const apiName = api.name
539 apis[apiName] = {
540 params: api.params,
541 response: api.response
542 }
543 }
544 commit('SET_APIS', apis)
545 resolve(apis)
546 store.dispatch('GenerateRoutes', { apis }).then(() => {
547 store.getters.addRouters.map(route => {
548 router.addRoute(route)
549 })
550 })
551 }).catch(error => {
552 reject(error)
553 })
554 })
555 },
556 RefreshFeatures ({ commit }) {
557 return new Promise((resolve, reject) => {
558 getAPI('listCapabilities').then(response => {

Callers

nothing calls this directly

Calls 5

getAPIFunction · 0.90
rejectFunction · 0.85
mapMethod · 0.80
dispatchMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected