Yangman - cleaned code 76/43776/1
authorLubomir Balogh <lubalogh@cisco.com>
Fri, 12 Aug 2016 11:52:54 +0000 (13:52 +0200)
committerLubomir Balogh <lubalogh@cisco.com>
Fri, 12 Aug 2016 11:56:01 +0000 (13:56 +0200)
- removed commented code blocks, debug outputs
- fixed linter errors

Change-Id: I48a1b7fbd67ca07900375bce0deaec882e0c0af7
Signed-off-by: Lubomir Balogh <lubalogh@cisco.com>
modules/yangman-resources/src/main/resources/yangman/controllers/modules-list.controller.js
modules/yangman-resources/src/main/resources/yangman/controllers/request-header.controller.js
modules/yangman-resources/src/main/resources/yangman/controllers/requests-list.controller.js
modules/yangman-resources/src/main/resources/yangman/controllers/yang-form.controller.js
modules/yangman-resources/src/main/resources/yangman/controllers/yangman.controller.js
modules/yangman-resources/src/main/resources/yangman/services/parameters.services.js
modules/yangman-resources/src/main/resources/yangman/services/requests.services.js
modules/yangman-resources/src/main/resources/yangman/services/yangman-design.services.js
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/request-data.tpl.html
modules/yangman-resources/src/main/resources/yangman/views/rightpanel/request-header.tpl.html
modules/yangman-resources/src/main/resources/yangman/yangman.less

index 686d19e8bc5f0857b6b309fa6e53b4e5f775c6ab..b801edf1277cf3e3c5c24897ecdaf7eecb0d9561 100644 (file)
@@ -69,7 +69,7 @@ define([
 
             if ( $scope.selectedDatastore && (module === $scope.selectedModule)) {
                 haveSelectedDS = $scope.selectedModule.children.filter(function(item){
-                   return item === $scope.selectedDatastore;
+                    return item === $scope.selectedDatastore;
                 });
             }
 
@@ -104,12 +104,10 @@ define([
                 $scope.setGlobalParams(apis, augGroups);
                 modulesList.allNodes = allNodes;
                 modulesList.treeApis = YangUtilsService.generateApiTreeData(apis);
-                // $scope.processingModulesSuccessCallback();
                 modulesList.showLoadingBox = false;
                 showToastInfoBox('YANGMAN_LOADED_MODULES');
 
                 PluginsHandlerService.plugAll(apis, modulesList);
-                // $scope.$broadcast('LOAD_REQ_DATA');
             }, function () {
                 showToastInfoBox('YANGMAN_LOADED_MODULES_ERROR');
                 modulesList.showLoadingBox = false;
@@ -122,7 +120,6 @@ define([
         function setModule(module, e){
             if ( $(e.target).hasClass('top-element') ) {
                 module.expanded = !module.expanded;
-                //$scope.setModule(module);
             }
         }
 
@@ -152,5 +149,4 @@ define([
             }, 500);
         }
     }
-
 });
index 10b3f8f100b52276c3dddebac74469eb16d331c9..ce0e1702a57635312c8ffacb016a885fa06567a6 100644 (file)
@@ -121,8 +121,6 @@ define([
             } else {
                 $scope.setJsonView(true, false);
             }
-
-            // sendRequestData({}, 'RECEIVED');
         }
 
         /**
@@ -335,18 +333,10 @@ define([
         }
 
 
-        function finishRequestProgress (message){
+        function finishRequestProgress(message){
             $scope.rootBroadcast('YANGMAN_EXECUTING_REQUEST_PROGRESS_STOP');
-            // $mdToast.show(
-            //     $mdToast.simple()
-            //         .textContent(message)
-            //         .position('bottom right')
-            //         .parent(angular.element('.yangmanModule__right-panel__header'))
-            //         .hideDelay(1500)
-            // );
         }
 
-
         /**
          * Execute request operation
          */
@@ -470,8 +460,6 @@ define([
                     $scope.rootBroadcast('YANGMAN_SELECT_THE_NEWEST_REQUEST');
                 });
 
-                //setNodeDataFromRequestData(requestHeader.requestUrl);
-
                 if (response.data) {
                     // try to fill code mirror editor
                     sendRequestData(response.data, constants.REQUEST_DATA_TYPE_RECEIVED);
index ad717ef47ef6409722c6509db1d8c7f34b34c474..62a35f891961f1126a63fff73e1352e5382911ff 100644 (file)
@@ -72,9 +72,6 @@ define([
         vm.deselectAllRequests = deselectAllRequests;
         vm.filterCollReq = filterCollReq;
 
-
-
-
         /**
          * Save request obje to collection from other controller
          * @param reqObj
index 1101976b6e783806904e0aa41518324311a76707..22f3c24998beff4f6b6792e3aeda61222ed7f7cd 100644 (file)
@@ -23,7 +23,7 @@ define([
 
     YangFormCtrl.$inject = ['$scope', '$rootScope', '$filter', 'constants', 'YangUtilsService'];
 
-    function YangFormCtrl($scope, $rootScope, $filter, constants, YangUtilsService) {
+    function YangFormCtrl($scope, $rootScope, $filter, constants) {
         var yangForm = this;
 
         yangForm.viewPath = $scope.globalViewPath + 'rightpanel/form';
index 107fe1fded57ab0bf9d9f5143ad9d6c098fbd94e..7c4a37273cda67e5d1b56bc7ccd28c8fba982a62 100644 (file)
@@ -268,7 +268,6 @@ define([
 
             if ( expand ) {
                 $scope.node = null;
-                // toggleLeftPanel(leftPanel);
                 setLeftPanel(leftPanel);
                 $scope.$broadcast('YANGMAN_MODULE_D_INIT');
             } else {
index a5ce415bea7deea8a62d5fc2e099433195ad1bd5..7c7d3fd07da759537a179dcbb10f8a54e21a7f44 100644 (file)
@@ -15,7 +15,7 @@ define([
 
             service.createEmptyParametersList = createEmptyParametersList;
             service.createParameter = createParameter;
-            // service.validateFile = validateFile;
+            service.validateFile = validateFile;
 
             /**
              * Validating collection import file
index e02c862ac74d98f69ff787a2579dbb28acba3e1d..cde859f8b65ff4ee3070400f9ed937ae91538607 100644 (file)
@@ -285,8 +285,6 @@ define([
          */
         function createHistoryRequest(sentData, receivedData, path, operation, status, name, collection, timestamp,
                                       responseStatus, responseStatusText, responseTime) {
-            // TODO: investigate, if this line is needed
-            // var receivedDataProcessed = status === 'success' ? receivedData : null,
             var result = new HistoryRequestModel(PathUtilsService, YangUtilsService, ParsingJsonService);
 
             timestamp = timestamp || Date.now();
index 6b86af468b0bb453663459a01ea9fb292084b454..1eb37f4c6ffc103b9647e2577547e1ed2ce8565b 100644 (file)
@@ -90,7 +90,7 @@ define([], function () {
                 handles: 'e',
                 minWidth: 300,
                 stop: function(event, ui) {
-                    if (typeof(Storage) !== "undefined") {
+                    if (typeof(Storage) !== 'undefined') {
                         localStorage.setItem('yangman__left-panel-width', ui.size.width);
                     }
                 },
index d2e8c94ddaed168f0a2abba2ee1042c0d314daa4..48075019d40618e05244fac3c6aaeec8ef3b7848 100644 (file)
@@ -6,6 +6,6 @@
 
 <div class="paramsBox" ng-show="requestData.paramsArray.length">
     <div  ng-repeat="param in requestData.paramsArray" class="line">
-        <strong><<{{param.name}}>></strong> : <span>{{param.value !== undefined ? param.value : 'YANGUI_PARAM_DONT_REPLACE' | translate}}</span>
+        <strong>&lt;&lt;{{param.name}}&gt;&gt;</strong> : <span>{{param.value !== undefined ? param.value : 'YANGUI_PARAM_DONT_REPLACE' | translate}}</span>
     </div>
 </div>
index 23e01d3213d08c3f1a72621f2a2cc9b38837280f..2493e2779287cb9690ae4a54773369110fa8a813 100644 (file)
@@ -17,7 +17,8 @@
             <md-input-container flex md-no-float ng-if="rightPanelSection === requestHeader.constants.DISPLAY_TYPE_REQ_DATA">
                 <input type="text"
                        ng-model="requestHeader.requestUrl"
-                       placeholder="{{'YANGMAN_REQ_URL' | translate}}">
+                       placeholder="{{'YANGMAN_REQ_URL' | translate}}"
+                       spellcheck="false">
             </md-input-container>
 
             <div ng-repeat="pathElem in selectedSubApi.pathArray"
index a054734dfaa1e1ba6bd32f58612249264e079aad..bb9a4ca5829c54fdbcb3133d2e244b42a2db173d 100644 (file)
@@ -1084,25 +1084,12 @@ md-input-container{
                 }
 
             }
-
-            .selected{
-                button{
-                    //background-color: rgba(158,158,158,0.2);
-                }
-            }
-
         }
 
         &__collections-list{
             padding: 0;
             background: @listBackColor;
             height: 100%;
-
-            .selected{
-                button{
-                    //background-color: rgba(158,158,158,0.2);
-                }
-            }
         }
 
         &__collection{