diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-02-14 14:57:38 +0100 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-02-14 14:57:38 +0100 |
commit | b01ed257f2c93f5be85071888fab90251be358da (patch) | |
tree | 8b071eb8e5944c813aebb749f1603a940b0912c6 /src/main/resources/META-INF | |
parent | 9d6523c5d6a1ef50903dc5842dc9caf6b01ff03c (diff) |
Remove designer in Clamp UI
Remove the designer of Clamp UI as the DCAE Designer will be used now
Issue-ID: CLAMP-115
Change-Id: Ice5bae6cdfe9d37dc5d61d2df7ec475821425e7a
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/resources/META-INF')
17 files changed, 58 insertions, 574 deletions
diff --git a/src/main/resources/META-INF/resources/designer/css/app.css b/src/main/resources/META-INF/resources/designer/css/app.css index e387dc03..34842ef5 100644 --- a/src/main/resources/META-INF/resources/designer/css/app.css +++ b/src/main/resources/META-INF/resources/designer/css/app.css @@ -63,7 +63,7 @@ a:link { .canvas{ margin-top: -20px; } -.content .canvas, + .content.with-error .canvas { visibility: hidden; } diff --git a/src/main/resources/META-INF/resources/designer/index.html b/src/main/resources/META-INF/resources/designer/index.html index 31b20e34..928f030e 100644 --- a/src/main/resources/META-INF/resources/designer/index.html +++ b/src/main/resources/META-INF/resources/designer/index.html @@ -10,7 +10,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -82,12 +82,6 @@ <body> -<button id="cldsopendiagrambtn" style="display:none"/> -<button id="cldsgetdiagrambtn" style="display:none"/> - - - - <div ng-controller="dialogCtrl" style="display: none;"> <div class="row"> @@ -181,12 +175,6 @@ <script src="scripts/ActivityModellingCtrl.js"></script> <!-- Activity Modelling end --> - <!-- Property Explorer Controller start --> - <script src="scripts/propertyExplorerCtrl.js"></script> - <!-- Property Explorer Controller end --> - - - <!-- dialog box ctl start --> <script type="text/javascript" src="scripts/common_variables.js"></script> <!-- <script src="scripts/ImportProjectCtrl.js"></script> --> @@ -214,7 +202,6 @@ <script src="scripts/ExtraUserInfoService.js"></script> <script src="scripts/saveConfirmationModalPopUpCtrl.js"></script> <script src="scripts/CldsTemplateService.js"></script> - <script src="scripts/CldsOpenTemplateCtrl.js"></script> <script src="scripts/GlobalPropertiesCtrl.js"></script> <script src="scripts/AlertService.js"></script> @@ -222,7 +209,6 @@ <link rel="stylesheet" href="css/kendo.material.min.css"> <link rel="stylesheet" href="css/kendo.common-material.core.css"> <script src="scripts/kendo.custom.min.js"></script> - <script src="./index.js"></script> <script src="scripts/aOnBoot.js"></script> diff --git a/src/main/resources/META-INF/resources/designer/modeler/Gruntfile.js b/src/main/resources/META-INF/resources/designer/modeler/Gruntfile.js index 8d764461..d8f131e9 100644 --- a/src/main/resources/META-INF/resources/designer/modeler/Gruntfile.js +++ b/src/main/resources/META-INF/resources/designer/modeler/Gruntfile.js @@ -68,16 +68,6 @@ module.exports = function(grunt) { } ] }, - bpmn_js: { - files: [ - { - expand: true, - cwd: resolvePath('bpmn-js', 'assets'), - src: ['**/*.*', '!**/*.js'], - dest: '<%= config.dist %>/vendor' - } - ] - }, app: { files: [ { diff --git a/src/main/resources/META-INF/resources/designer/modeler/dist/index.html b/src/main/resources/META-INF/resources/designer/modeler/dist/index.html index 61f71418..41137cf9 100644 --- a/src/main/resources/META-INF/resources/designer/modeler/dist/index.html +++ b/src/main/resources/META-INF/resources/designer/modeler/dist/index.html @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -66,5 +66,5 @@ </div> </ul> </body> -<script src="index.js"></script> + </html> diff --git a/src/main/resources/META-INF/resources/designer/partials/menu.html b/src/main/resources/META-INF/resources/designer/partials/menu.html index e4f617cc..677a2437 100644 --- a/src/main/resources/META-INF/resources/designer/partials/menu.html +++ b/src/main/resources/META-INF/resources/designer/partials/menu.html @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -147,22 +147,9 @@ id="{{section.name}}" role="presentation" ng-click="emptyMenuClick(section.link,section.name)">{{section.name}}</a> </li> - - <li ng-repeat="section in tabs[dropDownName]" - ng-if="section.name==='Create Template'"><a - id="{{section.name}}" role="presentation" - ng-click="emptyMenuClick(section.link,section.name)" - ng-class="{true:'ThisLink', false:''}[!(userInfo['permissionUpdateTemplate'])]">{{section.name}}</a> - </li> - - <li ng-repeat="section in tabs[dropDownName]" - ng-if="section.name==='Open Template'"><a - id="{{section.name}}" role="presentation" - ng-click="emptyMenuClick(section.link,section.name)">{{section.name}}</a> - </li> - + <li ng-repeat="section in tabs[dropDownName]" - ng-if="section.name != 'Create CL' && section.name != 'Create Template' && section.name != 'Open CL' && section.name != 'Open Template' && section.name != 'ECOMP User Guide - Design Overview' && section.name != 'ECOMP User Guide - Closed Loop Design' && section.name != 'ECOMP User Guide - CLAMP' && section.name != 'User Info'"><a + ng-if="section.name != 'Create CL' && section.name != 'Open CL' && section.name != 'ECOMP User Guide - Design Overview' && section.name != 'ECOMP User Guide - Closed Loop Design' && section.name != 'ECOMP User Guide - CLAMP' && section.name != 'User Info'"><a id="{{section.name}}" role="presentation" ng-click="emptyMenuClick(section.link,section.name)" class="ThisLink">{{section.name}}</a> diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html index 00e16751..a0b8f4e7 100644 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -394,7 +394,7 @@ label { setMultiSelect(); - if (readOnly||readMOnly){ + if (readMOnly){ $('select[multiple] option').each(function() { var input = $('input[value="' + $(this).val() + '"]'); input.prop('disabled', true); @@ -746,7 +746,7 @@ label { $("#newIdError").show(); return; } - if (!(readOnly||readMOnly)){ + if (!(readMOnly)){ startNextItem(); } else { if ($("#policyTable .highlight").length == 0){ diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html index 7fc04316..5cefa4f8 100644 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,7 +37,6 @@ <div> <b style="font-size:14px;">User Permissions:</b> <div ng-if="userInfo['permissionReadTemplate']">Read Template</div> - <div ng-if="userInfo['permissionUpdateTemplate']">Edit Template</div> <div ng-if="userInfo['permissionReadCl']">Read Model</div> <div ng-if="userInfo['permissionUpdateCl']">Edit Model</div> </div> @@ -46,4 +45,4 @@ <!-- <button ng-click="Ok()" class="btn btn-primary">Save Changes</button> --> <button ng-click="close(true)" class="btn btn-primary">Close</button> </div> -</div>
\ No newline at end of file +</div> diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html index 323891e6..36004d8b 100644 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -510,7 +510,7 @@ $('#formId'+count+' #closedLoopEventStatus').val(str[3]).multiselect('refresh'); } - if ((!(readOnly||readMOnly)) && ($('#formId'+count + ' #deleteThresh').prop('disabled'))) { + if ((!(readMOnly)) && ($('#formId'+count + ' #deleteThresh').prop('disabled'))) { $('#formId'+count + ' #deleteThresh').prop('disabled', false); } } diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js index 195886c9..f6092b8f 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js +++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -273,7 +273,7 @@ app.service('cldsModelService', ['alertService', '$http', '$q', function(alertSe document.getElementById("modeler_name").textContent = headerText; document.getElementById("templa_name").textContent = ("Template Used - " + selected_template); setStatus(pars) - disableBPMNAddSVG(pars); + addSVG(pars); this.enableDisableMenuOptions(pars); @@ -319,7 +319,7 @@ app.service('cldsModelService', ['alertService', '$http', '$q', function(alertSe } - function disableBPMNAddSVG(pars) { + function addSVG(pars) { var svg = pars.imageText.substring(pars.imageText.indexOf("<svg")) if ($("#svgContainer").length > 0) @@ -340,22 +340,16 @@ app.service('cldsModelService', ['alertService', '$http', '$q', function(alertSe lastElementSelected = $($(event.target).parent()).attr("data-element-id") checkIfElementType(name) - }) - $(".bjs-container").attr("hidden", ""); + }); } this.enableDisableMenuOptions = function(pars) { var permittedActionCd = pars.permittedActionCd; //dropdown options - always true - document.getElementById('Open Template').classList.remove('ThisLink'); document.getElementById('Open CL').classList.remove('ThisLink'); - document.getElementById('Save Template').classList.add('ThisLink'); - document.getElementById('Template Properties').classList.add('ThisLink'); - document.getElementById('Revert Template Changes').classList.add('ThisLink'); - document.getElementById('Close Template').classList.add('ThisLink'); - if (readOnly || readMOnly) { + if (readMOnly) { //enable model options document.getElementById('Properties CL').classList.remove('ThisLink'); document.getElementById('Close Model').classList.remove('ThisLink'); @@ -377,11 +371,6 @@ app.service('cldsModelService', ['alertService', '$http', '$q', function(alertSe document.getElementById('Refresh Status').classList.remove('ThisLink'); document.getElementById('Refresh ASDC').classList.remove('ThisLink'); } - if (readTOnly) { - document.getElementById('Create Template').classList.add('ThisLink'); - } else { - document.getElementById('Create Template').classList.remove('ThisLink'); - } // enable/disable menu options based on permittedActionCd list this.checkPermittedActionCd(permittedActionCd, 'Validation Test', 'TEST'); diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js index f31d72e5..b00f4fe5 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js +++ b/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -44,8 +44,8 @@ app.controller('CldsOpenModelCtrl', $scope.paramsRetry = function() { //$("#paramsWarn").hide(); - var currentValue = $("#service").val() == null ? previous : $("#service").val(); - $("#ridinSpinners").css("display","") + var currentValue = $("#service").val() == null ? previous : $("#service").val(); + $("#ridinSpinners").css("display","") loadSharedPropertyByService(currentValue,true,callBack); $("#ridinSpinners").css("display","none") }; @@ -144,14 +144,13 @@ app.controller('CldsOpenModelCtrl', cldsTemplateService.getTemplate( templateName ).then(function(pars) { - var tempImageText=pars.imageText - var bpmnText=pars.bpmnText + var tempImageText=pars.imageText; var authorizedToUp = pars.userAuthorizedToUpdate; pars={} pars.imageText=tempImageText pars.status= "DESIGN"; - if (readOnly || readMOnly){ + if (readMOnly){ pars.permittedActionCd=[""]; } else { pars.permittedActionCd=["TEST", "SUBMIT"]; @@ -164,8 +163,6 @@ app.controller('CldsOpenModelCtrl', // set model bpmn and open diagram $rootScope.isPalette = true; - modelXML = bpmnText; - visibility_model(); }, function(data) { //alert("getModel failed"); @@ -202,7 +199,6 @@ app.controller('CldsOpenModelCtrl', cldsModelService.getModel( originalModel ).then(function(pars) { // process data returned - var bpmnText = pars.bpmnText; var propText = pars.propText; var status = pars.status; var controlNamePrefix = pars.controlNamePrefix; @@ -210,7 +206,7 @@ app.controller('CldsOpenModelCtrl', selected_template=pars.templateName; typeID = pars.typeId; pars.status="DESIGN"; - if (readOnly || readMOnly){ + if (readMOnly){ pars.permittedActionCd=[""]; } else { pars.permittedActionCd=["TEST", "SUBMIT"]; @@ -235,8 +231,6 @@ app.controller('CldsOpenModelCtrl', // set model bpmn and open diagram $rootScope.isPalette = true; - modelXML = bpmnText; - visibility_model(); }, function(data) { //alert("getModel failed"); @@ -271,28 +265,6 @@ app.controller('CldsOpenModelCtrl', // set model bpmn and open diagram $rootScope.isPalette = true; - var initialDiagram = - '<?xml version="1.0" encoding="UTF-8"?>' + - '<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + - 'xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" ' + - 'xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" ' + - 'xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" ' + - 'targetNamespace="http://bpmn.io/schema/bpmn" ' + - 'id="Definitions_1">' + - '<bpmn:process id="Process_1" isExecutable="false">' + - '<bpmn:startEvent id="StartEvent_1"/>' + - '</bpmn:process>' + - '<bpmndi:BPMNDiagram id="BPMNDiagram_1">' + - '<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">' + - '<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">' + - '<dc:Bounds x="50" y="162" width="36" height="36" />' + - '</bpmndi:BPMNShape>' + - '</bpmndi:BPMNPlane>' + - '</bpmndi:BPMNDiagram>' + - '</bpmn:definitions>'; - - modelXML = initialDiagram; - visibility_model(); $modalInstance.close("closed"); } $scope.revertChanges=function(){ @@ -301,7 +273,7 @@ app.controller('CldsOpenModelCtrl', $scope.openModel = function(){ reloadDefaultVariables(false) if(document.getElementById("readOnly")){ - readOnly=document.getElementById("readOnly").checked; + readMOnly=document.getElementById("readOnly").checked; } var modelName = document.getElementById("modelName").value; @@ -319,7 +291,6 @@ app.controller('CldsOpenModelCtrl', cldsModelService.getModel( modelName ).then(function(pars) { // process data returned - var bpmnText = pars.bpmnText; var propText = pars.propText; var status = pars.status; controlNamePrefix = pars.controlNamePrefix; @@ -333,7 +304,7 @@ app.controller('CldsOpenModelCtrl', actionStateCd = pars.event.actionStateCd; deploymentId = pars.deploymentId; - if (readMOnly || readOnly){ + if (readMOnly){ pars.permittedActionCd= [""]; } cldsModelService.processActionResponse(modelName, pars); @@ -348,8 +319,6 @@ app.controller('CldsOpenModelCtrl', // set model bpmn and open diagram $rootScope.isPalette = true; - modelXML = bpmnText; - visibility_model(); }, function(data) { //alert("getModel failed"); @@ -361,4 +330,4 @@ app.controller('CldsOpenModelCtrl', setMultiSelect(); } ] -);
\ No newline at end of file +); diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js index a9ad8a3b..8e979f15 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js +++ b/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -63,133 +63,5 @@ app.service('cldsTemplateService', ['alertService', '$http', '$q', function (ale return def.promise; }; - this.setTemplate = function(templateName, controlNamePrefixIn, bpmnTextIn, propTextIn){ - - - var def = $q.defer(); - var sets = []; - - var svcUrl = "/restservices/clds/v1/clds/model/" + modelName; - var svcRequest = {name: templateName, controlNamePrefix: controlNamePrefixIn, bpmnText: bpmnTextIn, propText: propTextIn}; - - - $http.put(svcUrl, svcRequest) - .success(function(data){ - - def.resolve(data); - - }) - .error(function(data){ - - def.reject("Save Model not successful"); - }); - - return def.promise; - }; - this.processAction = function(uiAction, templateName, controlNamePrefixIn, bpmnTextIn, propTextIn,svgXmlIn){ - - - var def = $q.defer(); - var sets = []; - var svcUrl = "/restservices/clds/v1/cldsTempate/template/"+templateName; - - var svcRequest = {name: templateName, controlNamePrefix: controlNamePrefixIn, bpmnText: bpmnTextIn, propText: propTextIn, imageText:svgXmlIn}; - $http.put(svcUrl, svcRequest) - .success(function(data){ - - def.resolve(data); - alertService.alertMessage("Action Successful:"+uiAction,1) - - }) - .error(function(data){ - - def.reject(" not successful"); - alertService.alertMessage("Action Failure:"+uiAction,2) - - }); - - return def.promise; - }; - this.checkPermittedActionCd = function(permittedActionCd, menuText, actionCd){ - - if ( permittedActionCd.indexOf(actionCd) > -1 ) { - document.getElementById(menuText).classList.remove('ThisLink'); - } else { - document.getElementById(menuText).classList.add('ThisLink'); - } - }; - this.processActionResponse = function(templateName, pars){ - - // populate control name (prefix and uuid here) - var controlNamePrefix = pars.controlNamePrefix; - var controlNameUuid = pars.controlNameUuid; - var permittedActionCd = pars.permittedActionCd; - - var headerText = "Closed Loop Modeler - " + templateName; - if ( controlNameUuid != null ) { - var actionCd = pars.event.actionCd; - var actionStateCd = pars.event.actionStateCd; -// headerText = headerText + " [" + controlNamePrefix + controlNameUuid + "] [" + actionCd + ":" + actionStateCd + "]"; - headerText = headerText + " [" + controlNamePrefix + controlNameUuid + "]"; - } - - document.getElementById("modeler_name").textContent = headerText; - - //dropdown options -- always true - document.getElementById('Open Template').classList.remove('ThisLink'); - document.getElementById('Open CL').classList.remove('ThisLink'); - document.getElementById('Save CL').classList.add('ThisLink'); - document.getElementById('Properties CL').classList.add('ThisLink'); - document.getElementById('Revert Model Changes').classList.add('ThisLink'); - document.getElementById('Close Model').classList.add('ThisLink'); - - // enable menu options - if (readTOnly){ - //enable temp options (read only, Open Template) - document.getElementById('Template Properties').classList.remove('ThisLink'); - document.getElementById('Close Template').classList.remove('ThisLink'); - - //disable temp menu options (read only, Open Template) - document.getElementById('Create Template').classList.add('ThisLink'); - document.getElementById('Save Template').classList.add('ThisLink'); - document.getElementById('Revert Template Changes').classList.add('ThisLink'); - - //disable save/properties for model - document.getElementById('Refresh ASDC').classList.add('ThisLink'); - } else { - //enable temp options - document.getElementById('Create Template').classList.remove('ThisLink'); - document.getElementById('Save Template').classList.remove('ThisLink'); - document.getElementById('Template Properties').classList.remove('ThisLink'); - document.getElementById('Validation Test').classList.remove('ThisLink'); - if(!pars.newTemplate){ - document.getElementById('Revert Template Changes').classList.remove('ThisLink'); - } - document.getElementById('Close Template').classList.remove('ThisLink'); - - document.getElementById('Refresh Status').classList.remove('ThisLink'); - - //disable model options - document.getElementById('Refresh ASDC').classList.add('ThisLink'); - - - } - if (readMOnly){ - document.getElementById('Create CL').classList.add('ThisLink'); - } else { - document.getElementById('Create CL').classList.remove('ThisLink'); - } - - // enable/disable menu options based on permittedActionCd list - this.checkPermittedActionCd(permittedActionCd, 'Validation Test', 'TEST'); - this.checkPermittedActionCd(permittedActionCd, 'Submit', 'SUBMIT'); - this.checkPermittedActionCd(permittedActionCd, 'Resubmit', 'RESUBMIT'); - this.checkPermittedActionCd(permittedActionCd, 'Update', 'UPDATE'); - this.checkPermittedActionCd(permittedActionCd, 'Stop', 'STOP'); - this.checkPermittedActionCd(permittedActionCd, 'Restart', 'RESTART'); - this.checkPermittedActionCd(permittedActionCd, 'Delete', 'DELETE'); - this.checkPermittedActionCd(permittedActionCd, 'Deploy', 'DEPLOY'); - this.checkPermittedActionCd(permittedActionCd, 'UnDeploy', 'UNDEPLOY'); - - }; + }]); diff --git a/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js index d312d039..78a364a8 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js +++ b/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -87,10 +87,7 @@ function DashboardCtrl($scope, $rootScope, $resource, $http, $timeout, } $rootScope.initProjectExplorer(); - - visibility_model(); changecolor(selected_model); - }; $scope.selectActivityTestSet = function() { console.log("selectActivityTestSet"); diff --git a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js index cd2f5ed1..f1eca314 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js +++ b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,7 +40,7 @@ app.controller('GlobalPropertiesCtrl', } setMultiSelect(); - if(readOnly||readMOnly){ + if(readMOnly){ $("#savePropsBtn").attr("disabled", ""); $('select[multiple] option').each(function() { var input = $('input[value="' + $(this).val() + '"]'); @@ -61,4 +61,4 @@ app.controller('GlobalPropertiesCtrl', }; } ] -);
\ No newline at end of file +); diff --git a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js index c0a16ce2..212f3962 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js +++ b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ + //When element is first created it should have a red box because it hasn't been edited function newElementProcessor(id) { if ($('g[data-element-id="' + id + '"]').length > 0) { @@ -60,7 +61,7 @@ var isObject = function(a) { }; function loadPropertyWindow(type) { - if (readOnly || readMOnly) { + if (readMOnly) { if ($("#add_one_more").length == 1) { $("#add_one_more").off(); $("#add_one_more").click(function(event) { @@ -72,11 +73,6 @@ function loadPropertyWindow(type) { ($("select:not([multiple])")).multiselect("disable"); } - if (readTOnly) { - $("textarea").attr("disabled", ""); - $("#savePropsBtn").attr("disabled", ""); - } - var props = defaults_props[type]; for (p in props) { @@ -313,7 +309,6 @@ function setASDCFields() { function reloadDefaultVariables(isTemp) { isTemplate = isTemp; vf_Services = null; - readOnly = false; } $(window).load(function() { diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index fd39a6f6..19906d96 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -272,16 +272,13 @@ var app = angular.module('clds-app', ['ngRoute', 'Datafactory', 'userPreferencesService', 'cldsModelService', - 'cldsTemplateService', 'extraUserInfoService', function($scope, $rootScope, $timeout, dialogs, $location, MenuService, Datafactory, - userPreferencesService, cldsModelService, - cldsTemplateService, extraUserInfoService) { + userPreferencesService, cldsModelService, extraUserInfoService) { console.log("MenuCtrl"); $rootScope.screenName = "Universal Test Modeler"; $rootScope.testSet = null; - $rootScope.isNew = false; var testingType = ""; $rootScope.contactUs = function() { console.log("contactUs"); @@ -294,20 +291,13 @@ var app = angular.module('clds-app', ['ngRoute', .then( function(pars) { $scope.userInfo = pars; - if (!($scope.userInfo["permissionUpdateTemplate"])) { - readTOnly = true; - }; if (!($scope.userInfo["permissionUpdateCl"])) { readMOnly = true; }; }); $scope.emptyMenuClick = function(value, name) { - if ($rootScope.isNew && - (name != "Save Template" && - name != "Close Template" && name != "Template Properties")) { - saveConfirmationNotificationPopUp(); - } else if ($rootScope.isNewClosed && + if ($rootScope.isNewClosed && name != "Save CL" && name != "Close Model" && name != "Properties CL") { @@ -323,11 +313,8 @@ var app = angular.module('clds-app', ['ngRoute', if (data) { if ($rootScope.isNewClosed) { isSaveCheck("Save CL"); - } else { - isSaveCheck("Save Template"); - } + } $rootScope.isNewClosed = false; - $rootScope.isNew = false; } else { return false; } @@ -343,24 +330,9 @@ var app = angular.module('clds-app', ['ngRoute', $rootScope.contactUs(); } else if (name == "Log Out") { $scope.logout(); - } else if (name == "Revert Template Changes") { - $scope.cldsRevertTemplate(); } else if (name == "Revert Model Changes") { $scope.cldsRevertModel(); - } else if (name == "Create Template") { - $rootScope.isNew = true; - $scope.cldsCreateTemplate(); - } else if (name == "Open Template") { - $scope.cldsOpenTemplate(); - } else if (name == "Save Template") { - $scope - .cldsTemplatePerformAction("SAVE"); - $rootScope.isNewClosed = false; - $rootScope.isNew = false; - } else if (name == "Template Properties") { - $scope.cldsOpenTemplateProperties(); - } else if (name == "Close Model" || - name == "Close Template") { + } else if (name == "Close Model") { $scope.cldsClose(); } else if (name == "Refresh ASDC") { $scope.cldsRefreshASDC(); @@ -371,7 +343,6 @@ var app = angular.module('clds-app', ['ngRoute', $scope.cldsOpenModel(); } else if (name == "Save CL") { $rootScope.isNewClosed = false; - $rootScope.isNew = false; $scope.cldsPerformAction("SAVE"); } else if (name == "Validation Test") { $scope.cldsPerformAction("TEST"); @@ -415,26 +386,6 @@ var app = angular.module('clds-app', ['ngRoute', }; $scope.tabs = { - "Template": [{ - link: "/cldsCreateTemplate", - name: "Create Template" - }, { - link: "/cldsOpenTemplate", - name: "Open Template" - }, { - link: "/cldsSaveTemplate", - name: "Save Template" - }, { - link: "/cldsOpenTemplateProperties", - name: "Template Properties" - }, { - link: "/RevertChanges", - name: "Revert Template Changes" - }, { - link: "/Close", - name: "Close Template" - }], - "Closed Loop": [{ link: "/cldsCreateModel", name: "Create CL" @@ -786,63 +737,13 @@ var app = angular.module('clds-app', ['ngRoute', * $scope.openProject = function(){ * $location.path('/dashboard_upload'); }; */ - $rootScope.cldsOpenTemplateProperties = function() { - - var dlg = dialogs - .create( - 'partials/portfolios/global_template_properties.html', - 'CldsOpenTemplateCtrl', {}, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - - dlg.result.then(function(name) { - - // $scope.modelName =modelName; - // $("#" + - // selected_model).addClass("selectedcolor"); - // alert ("model name:"+$scope.modelName); - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in your - // name!'; - }); - } $scope.cldsClose = function() { var dlg = dialogs .create( 'partials/portfolios/confirmation_window.html', - 'CldsOpenTemplateCtrl', { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - - dlg.result.then(function(name) { - - // $scope.name = name; - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in your - // name!'; - }); - }; - $scope.cldsOpenTemplate = function() { - - var dlg = dialogs - .create( - 'partials/portfolios/clds_open_template.html', - 'CldsOpenTemplateCtrl', { + 'CldsOpenModelCtrl', { closable: true, draggable: true }, { @@ -885,32 +786,7 @@ var app = angular.module('clds-app', ['ngRoute', }); }; - $scope.cldsCreateTemplate = function() { - - var dlg = dialogs - .create( - 'partials/portfolios/clds_create_template.html', - 'CldsOpenTemplateCtrl', { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - // $scope.name = name; - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in your - // name!'; - }); - - }; $scope.cldsRefreshASDC = function() { var dlg = dialogs @@ -962,84 +838,6 @@ var app = angular.module('clds-app', ['ngRoute', }; - $scope.cldsRevertTemplate = function() { - - var dlg = dialogs - .create( - 'partials/portfolios/ConfirmRevertChanges.html', - 'CldsOpenTemplateCtrl', { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - - dlg.result.then(function(name) { - - // $scope.name = name; - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in your - // name!'; - }); - - }; - $scope.cldsTemplatePerformAction = function( - uiAction) { - - var modelName = selected_model; - var controlNamePrefix = "ClosedLoop-"; - var bpmnText = modelXML; - // serialize model properties - var propText = JSON.stringify(elementMap); - - var svgXml = ""; - console.log(abootDiagram.saveSVG({ - format: true - }, function(err, xml) { - - if (err) - console.log("error") - else - console.log(xml) - svgXml = xml; - })); - console.log("cldsTemplatePerformAction: " + - uiAction + " modelName=" + modelName); - console.log("cldsTemplatePerformAction: " + - uiAction + " controlNamePrefix=" + - controlNamePrefix); - console.log("cldsTemplatePerformAction: " + - uiAction + " bpmnText=" + bpmnText); - console.log("cldsTemplatePerformAction: " + - uiAction + " propText=" + propText); - cldsTemplateService - .processAction(uiAction, modelName, - controlNamePrefix, bpmnText, - propText, svgXml) - .then( - function(pars) { - console - .log("processAction"); - console - .log("cldsTemplatePerformAction: pars=" + - pars); - cldsTemplateService - .processActionResponse( - modelName, - pars); - }, - function(data) { - - // alert("setModel failed: " - // + data); - }); - }; - $rootScope.cldsOpenModelProperties = function() { var dlg = dialogs @@ -1133,16 +931,8 @@ var app = angular.module('clds-app', ['ngRoute', var propText = JSON.stringify(elementMap); var templateName = selected_template - var svgXml = ""; - console.log(abootDiagram.saveSVG({ - format: true - }, function(err, xml) { - if (err) - console.log("error") - else - console.log(xml) - svgXml = xml; - })); + var svgXml = $("#svgContainer").html(); + console.log("cldsPerformAction: " + uiAction + " modelName=" + modelName); console.log("cldsPerformAction: " + uiAction + @@ -1177,16 +967,7 @@ var app = angular.module('clds-app', ['ngRoute', }; $scope.refreshStatus = function() { var modelName = selected_model; - var svgXml = ""; - console.log(abootDiagram.saveSVG({ - format: true - }, function(err, xml) { - if (err) - console.log("error") - else - console.log(xml) - svgXml = xml; - })); + var svgXml = $("#svgContainer").html(); console.log("refreStatus modelName=" + modelName); cldsModelService .getModel(modelName) @@ -1237,17 +1018,8 @@ var app = angular.module('clds-app', ['ngRoute', // serialize model properties var propText = JSON.stringify(elementMap); var templateName = selected_template; - var svgXml = ""; - - console.log(abootDiagram.saveSVG({ - format: true - }, function(err, xml) { - if (err) - console.log("error") - else - console.log(xml) - svgXml = xml; - })); + var svgXml = $("#svgContainer").html(); + console.log("cldsPerformAction: " + uiAction + " modelName=" + modelName); console.log("cldsPerformAction: " + uiAction + @@ -1323,28 +1095,6 @@ var app = angular.module('clds-app', ['ngRoute', }; $scope.VesCollectorWindow = function(vesCollector) { - if (isTemplate) { - var dlg = dialogs - .create( - 'partials/portfolios/Template_model.html', - 'ImportSchemaCtrl', - vesCollector, { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - - }); - } else { // if (isTemplate) - var dlg = dialogs .create( 'partials/portfolios/vesCollector_properties.html', @@ -1364,16 +1114,12 @@ var app = angular.module('clds-app', ['ngRoute', }); - } + }; $scope.HolmesWindow = function(holmes) { - if (isTemplate) { - var partial = 'partials/portfolios/Template_model.html' - } else { - var partial = 'partials/portfolios/holmes_properties.html' - } + var partial = 'partials/portfolios/holmes_properties.html' var dlg = dialogs .create( @@ -1391,26 +1137,7 @@ var app = angular.module('clds-app', ['ngRoute', }; $scope.TCAWindow = function(tca) { - if (isTemplate) { - var dlg = dialogs - .create( - 'partials/portfolios/Template_model.html', - 'ImportSchemaCtrl', - tca, { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) {}, function() { - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - } else { + var dlg = dialogs .create( 'partials/portfolios/tca_properties.html', @@ -1431,34 +1158,10 @@ var app = angular.module('clds-app', ['ngRoute', // $scope.name = 'You did not enter in // your name!'; }); - } + }; $scope.PolicyWindow = function(policy) { - - if (isTemplate) { - var dlg = dialogs - .create( - 'partials/portfolios/Template_model.html', - 'ImportSchemaCtrl', - policy, { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - } else { var dlg = dialogs .create( 'partials/portfolios/PolicyWindow_properties.html', @@ -1482,7 +1185,6 @@ var app = angular.module('clds-app', ['ngRoute', // your name!'; }); - } }; } diff --git a/src/main/resources/META-INF/resources/designer/scripts/common_variables.js b/src/main/resources/META-INF/resources/designer/scripts/common_variables.js index b0c7d9e5..0648ccbd 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/common_variables.js +++ b/src/main/resources/META-INF/resources/designer/scripts/common_variables.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,9 +50,7 @@ var lastElementSelected=null var isTemplate=null; var vf_Services=null; var asdc_Services=null; -var readOnly=false;//for when the user select read only on clamp app -var readMOnly=false; -var readTOnly=false; +var readMOnly=false; // model is readonly var runningInstances={} var typeID = ''; -var deploymentId = '';
\ No newline at end of file +var deploymentId = ''; diff --git a/src/main/resources/META-INF/resources/index.html b/src/main/resources/META-INF/resources/index.html index 282585f4..34f8be23 100644 --- a/src/main/resources/META-INF/resources/index.html +++ b/src/main/resources/META-INF/resources/index.html @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,9 +24,9 @@ <html> <head> - <title>camunda Tasklist</title> + <title>Clamp UI</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <meta http-equiv="refresh" content="0;URL='/camunda/app/tasklist/'"> + <meta http-equiv="refresh" content="0;URL='/designer/index.html'"> </head> <body> |