KNOX-1750 - Unable to view descriptor service params
authorKevin Risden <krisden@apache.org>
Fri, 25 Jan 2019 17:55:32 +0000 (12:55 -0500)
committerKevin Risden <krisden@apache.org>
Fri, 25 Jan 2019 17:55:39 +0000 (12:55 -0500)
Signed-off-by: Kevin Risden <krisden@apache.org>
gateway-admin-ui/admin-ui/app/resource-detail/descriptor.ts

index 3310f46..6e5a6ca 100644 (file)
@@ -26,14 +26,20 @@ export class Descriptor {
 
     private dirty = false;
 
-    static getServiceParamNames(service: Service): string[] {
+    // getServiceParamNames must not be static since it is used in a view
+    // https://stackoverflow.com/questions/41857047/call-static-function-from-angular2-template
+    // noinspection JSMethodCanBeStatic
+    getServiceParamNames(service: Service): string[] {
         if (!service.params) {
             service.params = {};
         }
         return Object.getOwnPropertyNames(service.params);
     }
 
-    static getServiceParamValue(service: Service, name: string): string {
+    // getServiceParamValue must not be static since it is used in a view
+    // https://stackoverflow.com/questions/41857047/call-static-function-from-angular2-template
+    // noinspection JSMethodCanBeStatic
+    getServiceParamValue(service: Service, name: string): string {
         return service.params[name];
     }