}
modifyInstance(instance: PolicyInstance): void {
- let refreshedInstance: PolicyInstance;
this.policySvc
.getPolicyInstance(instance.policy_id)
- .subscribe((refreshedJson: any) => {
- refreshedInstance = refreshedJson;
+ .subscribe((refreshedJson: PolicyInstance) => {
+ this.openInstanceDialog(refreshedJson);
});
-
- this.openInstanceDialog(refreshedInstance);
}
private openInstanceDialog(policy: PolicyInstance) {
});
}
- noInstances(): number {
+ hasInstances(): boolean {
+ return this.instanceCount() > 0;
+}
+
+ instanceCount(): number {
return this.policyInstances.length;
}
deleteInstance(instance: PolicyInstance): void {
this.confirmDialogService
.openConfirmDialog(
+ "Delete Policy",
"Are you sure you want to delete this policy instance?"
)
.afterClosed()