Przeglądaj źródła

Adding check if url exists and module is installed

gabriel 6 lat temu
rodzic
commit
4bc7b7aa2c

+ 2 - 2
composer.lock

@@ -1641,7 +1641,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "65b2f7d20973ab2108bd5a2a03acd5c6364e2ff2"
+                "reference": "5e124f6f6dd407ba4cfa6cb34db67f8c9c2a4a1f"
             },
             "type": "library",
             "autoload": {
@@ -1656,7 +1656,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2019-04-05T14:00:21+00:00"
+            "time": "2019-04-16T15:54:39+00:00"
         },
         {
             "name": "ik/check-sintax-bundle",

Plik diff jest za duży
+ 570 - 546
src/StatsBundle/Controller/StatsController.php


+ 6 - 3
src/StatsBundle/Resources/views/CmtsInterface/base_list_field_cmts.html.twig

@@ -6,16 +6,19 @@
     {% set cmtss = admin.parameters.cmtss_server %}
     {% set cmtsId = object.getCmtsDeviceId() %}
 
-    {% if urls[server]['url_cablemodem'] is defined and cmtsId is not null %}
+    {% if urls[server]['url_cablemodem'] is defined and
+        urls[server]['url_cablemodem'] is not null and
+        urls[server]['url_cablemodem'] is not 'null' and
+        cmtsId is not null %}
         {% set url = urls[server]['url_cablemodem'] ~ "/admin/cablemodem/cmts/" ~ cmtsId ~ "/show" %}
     {% else %}
         {% set url = "#" %}
     {% endif %}
 
     {% if cmtss[server][cmtsId] is defined %}
-        <a href="{{url}}" target="_blank">{{cmtss[server][cmtsId]}}</a>
+        <a href="{{ url }}" target="_blank">{{ cmtss[server][cmtsId] }}</a>
     {% else %}
-        {{cmtsId}}
+        {{ cmtsId }}
     {% endif %}
 
 {% endblock %}