open app on resolved policy
[groupbasedpolicy.git] / groupbasedpolicy-ui / module / src / main / resources / gbp / endpoints / endpoint.service.js
index fca475366c59a1621b46144b49b3925cc7a138a8..42aa4fb5125b311634e51e5a624a17817c5dc1a6 100644 (file)
@@ -23,8 +23,20 @@ define([], function () {
             this.setData = setData;
             this.post = post;
             this.deleteEndpoint = deleteEndpoint;
+            this.getEndpointContextTypeAcronym = getEndpointContextTypeAcronym;
 
             /* Implementation */
+
+            function getEndpointContextTypeAcronym() {
+                switch(this.data['context-type']) {
+                    case 'l2-l3-forwarding:l2-bridge-domain':
+                        return 'L2B';
+                    case 'l2-l3-forwarding:l2-flood-domain':
+                        return 'L2F';
+                    default:
+                        return 'L3';
+                }
+            }
             /**
              * fills Endpoint object with data
              * @param data