feat(console): seo metatags, fix policy bugs, project options (#844)

* add seo service, index meta info

* fix policy buttons, refresh

* refresh after timeout

* loading spinner for login policy, complexity

* fix user form, add project role options

* authtoken options

* seo service lint

* style lint

* remove duplicate authmethod

* en i18n

* Update console/src/assets/i18n/en.json

Co-authored-by: Fabi <[email protected]>

Co-authored-by: Fabi <[email protected]>
This commit is contained in:
Max Peintner
2020-10-16 13:51:52 +02:00
committed by GitHub
co-authored by Fabi
parent c3b4c3f264
commit b1d61afc8f
30 changed files with 310 additions and 80 deletions
@@ -20,7 +20,7 @@ import { PolicyComponentServiceType } from '../policy-component-types.enum';
export class OrgIamPolicyComponent implements OnDestroy {
@Input() service!: AdminService;
private managementService!: ManagementService;
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
public serviceType!: PolicyComponentServiceType;
public iamData!: AdminOrgIamPolicyView.AsObject | MgmtOrgIamPolicyView.AsObject;
@@ -47,11 +47,7 @@ export class OrgIamPolicyComponent implements OnDestroy {
}
return this.route.params;
})).subscribe(_ => {
this.getData().then(data => {
if (data) {
this.iamData = data.toObject();
}
});
this.fetchData();
});
}
@@ -59,6 +55,14 @@ export class OrgIamPolicyComponent implements OnDestroy {
this.sub.unsubscribe();
}
public fetchData(): void {
this.getData().then(data => {
if (data) {
this.iamData = data.toObject();
}
});
}
private async getData(): Promise<AdminOrgIamPolicyView | MgmtOrgIamPolicyView | undefined> {
switch (this.serviceType) {
case PolicyComponentServiceType.MGMT:
@@ -114,7 +118,7 @@ export class OrgIamPolicyComponent implements OnDestroy {
this.adminService.RemoveOrgIamPolicy(this.org.id).then(() => {
this.toast.showInfo('ORG.POLICY.TOAST.RESETSUCCESS', true);
setTimeout(() => {
this.getData();
this.fetchData();
}, 1000);
}).catch(error => {
this.toast.showError(error);