Added eSON service to _blank target
diff --git a/xos/configurations/frontend/mocks/mcord.yaml b/xos/configurations/frontend/mocks/mcord.yaml
index 475ba37..5e79fda 100644
--- a/xos/configurations/frontend/mocks/mcord.yaml
+++ b/xos/configurations/frontend/mocks/mcord.yaml
@@ -16,6 +16,12 @@
view_url: /mcord/?service=vBBU
kind: RAN
+ eSON:
+ type: tosca.nodes.Service
+ properties:
+ view_url: http://www.google.com
+ kind: RAN
+
# EPC
vMME:
type: tosca.nodes.Service
diff --git a/xos/core/views/mCordServiceGrid.py b/xos/core/views/mCordServiceGrid.py
index 70a1c4a..e94f831 100644
--- a/xos/core/views/mCordServiceGrid.py
+++ b/xos/core/views/mCordServiceGrid.py
@@ -45,8 +45,13 @@
image_url = service.icon_url
if (not image_url):
image_url = "/static/primarycons_blue/gear_2.png"
+ if service.view_url.startswith("http"):
+ target = 'target="_blank"'
+ else:
+ target = ''
+
html = html + '<div class="col-xs-4 text-center service-container">'
- html = html + '<a href="%s">' % (service.view_url)
+ html = html + '<a href="%s" %s>' % (service.view_url, target)
html = html + '<img class="img-responsive" src="%s">' % (image_url)
html = html + "<h4>" + service.name + "</h4>"
html = html + '</a>'