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
|
||||
public void execute() {
|
||||
List<ProjectRole> projectRoles;
|
||||
List<ProjectRole> projectRoles = new ArrayList<>();
|
||||
if (getProjectId() != null && getProjectRoleId() != null) {
|
||||
projectRoles = Collections.singletonList(projRoleService.findProjectRole(getProjectRoleId(), getProjectId()));
|
||||
} else if (StringUtils.isNotBlank(getRoleName())) {
|
||||
|
|
|
|||
|
|
@ -157,17 +157,6 @@ export default {
|
|||
this.fetchData()
|
||||
},
|
||||
inject: ['parentFetchData'],
|
||||
watch: {
|
||||
resource: {
|
||||
deep: true,
|
||||
handler (newItem) {
|
||||
if (!newItem || !newItem.id) {
|
||||
return
|
||||
}
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchData () {
|
||||
const params = {}
|
||||
|
|
@ -175,6 +164,7 @@ export default {
|
|||
params.page = this.page
|
||||
params.pageSize = this.pageSize
|
||||
this.updateProjectApi = this.$store.getters.apis.updateProject
|
||||
if (!this.resource.id) return
|
||||
this.fetchUsers()
|
||||
this.fetchProjectAccounts(params)
|
||||
if (this.isProjectRolesSupported()) {
|
||||
|
|
|
|||
|
|
@ -173,17 +173,6 @@ export default {
|
|||
mounted () {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
resource: {
|
||||
deep: true,
|
||||
handler (newItem) {
|
||||
if (!newItem || !newItem.id) {
|
||||
return
|
||||
}
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initForm () {
|
||||
this.formRef = ref()
|
||||
|
|
@ -192,6 +181,7 @@ export default {
|
|||
},
|
||||
fetchData () {
|
||||
this.loading = true
|
||||
if (!this.resource.id) return
|
||||
api('listProjectRoles', { projectid: this.resource.id }).then(json => {
|
||||
const projectRoles = json.listprojectrolesresponse.projectrole
|
||||
if (!projectRoles || projectRoles.length === 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue