}
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;
}