Add Log in UI
[clamp.git] / src / main / resources / META-INF / resources / designer / scripts / CldsModelService.js
index b0977be..34e90e6 100644 (file)
@@ -70,7 +70,6 @@ app
                    var svcUrl = "/restservices/clds/v2/loop/" + modelName;
                    $http.get(svcUrl).success(function(data) {
                        cl_props = data;
-                       $("#loop_name").text(getLoopName());
                            def.resolve(data);
                    }).error(function(data) {
                            def.reject("Open Model not successful");
@@ -139,7 +138,7 @@ app
            };
            this.processActionResponse = function(modelName) {
                // populate control name (prefix and uuid here)
-                   var headerText = "Closed Loop Modeler - " + modelName;
+               $("#loop_name").text(getLoopName());
                    setStatus();
                    manageCLImage(modelName);
                    enableDisableMenuOptions();
@@ -181,9 +180,9 @@ app
                    '<span id="status_clds" style="position: absolute;  left: 61%;top: 151px; font-size:20px;">Status: '
                    + statusMsg + '</span>');
            }
+           
            function manageCLImage(modelName) {
                getModelImage(modelName).then(function(pars) {
-                       //var svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/2000/svg"> <defs> <marker viewBox="0 0 20 20" markerWidth="10" markerHeight="10" orient="auto" refX="11" refY="10" id="markerSjdype4kmnw"> <path d="M 1 5 L 11 10 L 1 15 Z" style="stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;" fill="#000000" /> </marker> <marker viewBox="0 0 20 20" markerWidth="20" markerHeight="20" orient="auto" refX="6" refY="6" id="markerSjdype4kmny"> <circle cx="6" cy="6" r="3.5" style="stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;" fill="#ffffff" stroke="#000000" /> </marker> <marker viewBox="0 0 20 20" markerWidth="20" markerHeight="20" orient="auto" refX="8.5" refY="5" id="markerSjdype4kmo0"> <path d="m 1 5 l 0 -3 l 7 3 l -7 3 z" style="stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;" fill="#ffffff" stroke="#000000" /> </marker> <marker viewBox="0 0 20 20" markerWidth="10" markerHeight="10" orient="auto" refX="11" refY="10" id="markerSjdype4kmo2"> <path d="M 1 5 L 11 10 L 1 15" style="stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;" fill="#ffffff" stroke="#000000" /> </marker> <marker viewBox="0 0 20 20" markerWidth="10" markerHeight="10" orient="auto" refX="-1" refY="10" id="markerSjdype4kmo4"> <path d="M 0 10 L 8 6 L 16 10 L 8 14 Z" style="stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;" fill="#ffffff" stroke="#000000" /> </marker> <marker viewBox="0 0 20 20" markerWidth="10" markerHeight="10" orient="auto" refX="-5" refY="10" id="markerSjdype4kmo6"> <path d="M 1 4 L 5 16" style="stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;" fill="#000000" stroke="#000000" /> </marker> </defs><g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="start-circle" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g shape-rendering="geometricPrecision" text-rendering="optimizeQuality" stroke-width="2"> <circle fill="none" r="17" cx="34" cy="41"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="Arrow_d0b22360-770d-4b05-b81c-cf148b121341" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g shape-rendering="geometricPrecision" text-rendering="optimizeQuality" stroke-width="2"> <line y2="41" fill="none" x1="51" x2="170" y1="41"/> <polygon fill="none" points=" 166 38 166 44 172 41"/>             <polygon points=" 166 38 166 44 172 41" stroke="none"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="VES" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g shape-rendering="geometricPrecision" text-rendering="optimizeQuality" stroke-width="2"> <rect fill="none" x="174" width="123" y="1" height="82"/> </g> <g fill-opacity="0" fill="rgb(0,0,0)" text-rendering="optimizeQuality" shape-rendering="geometricPrecision" stroke="rgb(0,0,0)" stroke-opacity="0" stroke-width="2"> <rect x="174" width="123" y="1" height="82" stroke="none"/> </g> <g font-family="sans-serif" shape-rendering="geometricPrecision" text-rendering="optimizeQuality"> <text x="223" xml:space="preserve" y="42" stroke="none">VES</text> <line y2="83" fill="none" stroke-width="2" x1="194" x2="194" y1="1"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="Arrow_d4351927-d77a-4e04-82d1-cd8f2b008137" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="2" shape-rendering="geometricPrecision" font-family="sans-serif"> <line y2="41" fill="none" x1="297" x2="416" y1="41"/> <polygon fill="none" points=" 412 38 412 44 418 41"/> <polygon points=" 412 38 412 44 418 41" stroke="none"/> </g> </g> </g>    <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="TCA" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="2" shape-rendering="geometricPrecision" font-family="sans-serif"> <rect fill="none" x="420" width="123" y="1" height="82"/> </g> <g fill-opacity="0" fill="rgb(0,0,0)" text-rendering="optimizeQuality" font-family="sans-serif" shape-rendering="geometricPrecision" stroke="rgb(0,0,0)" stroke-opacity="0" stroke-width="2"> <rect x="420" width="123" y="1" height="82" stroke="none"/> </g> <g font-family="sans-serif" shape-rendering="geometricPrecision" text-rendering="optimizeQuality"> <text x="470" xml:space="preserve" y="42" stroke="none">TCA</text> <line y2="62" fill="none" stroke-width="2" x1="420" x2="543" y1="62"/> </g> </g> </g>   <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="Arrow_5ae2966f-f971-4c3b-8237-efa551beb531" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="2" shape-rendering="geometricPrecision" font-family="sans-serif"> <line y2="41" fill="none" x1="543" x2="662" y1="41"/> <polygon fill="none" points=" 658 38 658 44 664 41"/> <polygon points=" 658 38 658 44 664 41" stroke="none"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="Policy" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="2" shape-rendering="geometricPrecision" font-family="sans-serif"> <rect fill="none" x="666" width="123" y="1" height="82"/> </g> <g fill-opacity="0" fill="rgb(0,0,0)" text-rendering="optimizeQuality" font-family="sans-serif" shape-rendering="geometricPrecision" stroke="rgb(0,0,0)" stroke-opacity="0" stroke-width="2"> <rect x="666" width="123" y="1" height="82" stroke="none"/> </g> <g font-family="sans-serif" shape-rendering="geometricPrecision" text-rendering="optimizeQuality"> <text x="710" xml:space="preserve" y="42" stroke="none">Policy</text> <line y2="1" fill="none" stroke-width="2" x1="666" x2="727" y1="42"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="Arrow_ed5ccaed-6d8c-44e9-8245-85f66523cb44" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="2" shape-rendering="geometricPrecision" font-family="sans-serif"> <line y2="41" fill="none" x1="789" x2="908" y1="41"/> <polygon fill="none" points=" 904 38 904 44 910 41"/> <polygon points=" 904 38 904 44 910 41" stroke="none"/> </g> </g> </g> <g fill-opacity="1" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" font-family="&apos;Dialog&apos;" font-style="normal" data-element-id="circle_stop" stroke-linejoin="miter" font-size="12px" image-rendering="auto" stroke-dashoffset="0"><!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs"/> <g> <g text-rendering="optimizeQuality" stroke-width="4" shape-rendering="geometricPrecision" font-family="sans-serif"> <circle fill="none" r="17" cx="929" cy="41"/> </g> </g> </g> </svg>';
                        var svg = pars;
                            if ($("#svgContainer").length > 0)
                                    $("#svgContainer").remove();