mirror of https://github.com/apache/cloudstack.git
Handle project delete in detailsview. (#11197)
This commit is contained in:
parent
58484fb44d
commit
626f3de69a
|
|
@ -72,7 +72,7 @@ public class ListProjectRolesCmd extends BaseListCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
List<ProjectRole> projectRoles;
|
List<ProjectRole> projectRoles = new ArrayList<>();
|
||||||
if (getProjectId() != null && getProjectRoleId() != null) {
|
if (getProjectId() != null && getProjectRoleId() != null) {
|
||||||
projectRoles = Collections.singletonList(projRoleService.findProjectRole(getProjectRoleId(), getProjectId()));
|
projectRoles = Collections.singletonList(projRoleService.findProjectRole(getProjectRoleId(), getProjectId()));
|
||||||
} else if (StringUtils.isNotBlank(getRoleName())) {
|
} else if (StringUtils.isNotBlank(getRoleName())) {
|
||||||
|
|
|
||||||
|
|
@ -157,17 +157,6 @@ export default {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
inject: ['parentFetchData'],
|
inject: ['parentFetchData'],
|
||||||
watch: {
|
|
||||||
resource: {
|
|
||||||
deep: true,
|
|
||||||
handler (newItem) {
|
|
||||||
if (!newItem || !newItem.id) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fetchData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchData () {
|
fetchData () {
|
||||||
const params = {}
|
const params = {}
|
||||||
|
|
@ -175,6 +164,7 @@ export default {
|
||||||
params.page = this.page
|
params.page = this.page
|
||||||
params.pageSize = this.pageSize
|
params.pageSize = this.pageSize
|
||||||
this.updateProjectApi = this.$store.getters.apis.updateProject
|
this.updateProjectApi = this.$store.getters.apis.updateProject
|
||||||
|
if (!this.resource.id) return
|
||||||
this.fetchUsers()
|
this.fetchUsers()
|
||||||
this.fetchProjectAccounts(params)
|
this.fetchProjectAccounts(params)
|
||||||
if (this.isProjectRolesSupported()) {
|
if (this.isProjectRolesSupported()) {
|
||||||
|
|
|
||||||
|
|
@ -173,17 +173,6 @@ export default {
|
||||||
mounted () {
|
mounted () {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
resource: {
|
|
||||||
deep: true,
|
|
||||||
handler (newItem) {
|
|
||||||
if (!newItem || !newItem.id) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fetchData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
initForm () {
|
initForm () {
|
||||||
this.formRef = ref()
|
this.formRef = ref()
|
||||||
|
|
@ -192,6 +181,7 @@ export default {
|
||||||
},
|
},
|
||||||
fetchData () {
|
fetchData () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
if (!this.resource.id) return
|
||||||
api('listProjectRoles', { projectid: this.resource.id }).then(json => {
|
api('listProjectRoles', { projectid: this.resource.id }).then(json => {
|
||||||
const projectRoles = json.listprojectrolesresponse.projectrole
|
const projectRoles = json.listprojectrolesresponse.projectrole
|
||||||
if (!projectRoles || projectRoles.length === 0) {
|
if (!projectRoles || projectRoles.length === 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue