Updated displaying of policy types
[nonrtric.git] / dashboard / webapp-frontend / src / app / policy-control / policy-control.component.ts
index 019a637..d57019f 100644 (file)
@@ -107,6 +107,16 @@ export class PolicyControlComponent implements OnInit {
         return info;
     }
 
+    getDescription(policyType: PolicyType): string {
+        return JSON.parse(policyType.schema).description;
+    }
+
+    getName(policyType: PolicyType): string {
+        const title = JSON.parse(policyType.schema).title;
+        if (title) { return title; }
+        return policyType.name;
+    }
+
     isInstancesShown(policyType: PolicyType): boolean {
         return this.getPolicyTypeInfo(policyType).isExpanded.getValue();
     }