YangUI Controllers Split 63/37963/1
authorStanislav Jamrich <sjamrich@cisco.com>
Thu, 21 Apr 2016 11:35:59 +0000 (13:35 +0200)
committerStanislav Jamrich <sjamrich@cisco.com>
Thu, 21 Apr 2016 11:38:33 +0000 (13:38 +0200)
All controllers have been splitted into separate files (one component per
one file)

Change-Id: I029b2a56f517c53992d5caa3d02a416f5019df12
Signed-off-by: Stanislav Jamrich <sjamrich@cisco.com>
26 files changed:
modules/yangui-resources/src/main/resources/yangui/controllers/api/augmentation-modal.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/case.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/choice.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/coll-box.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/container.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-bit.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-empty.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-enum.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/filter.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/input.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf-list.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/list.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/output.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/rpc.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/type-bit.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/type-empty.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/type-enum.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/api/type.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/history/req-in-history.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/history/request-history.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/parameters/history-param.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/parameters/param-box.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/controllers/parameters/params-view.controller.js [new file with mode: 0644]
modules/yangui-resources/src/main/resources/yangui/yangui.controller.js

diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/augmentation-modal.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/augmentation-modal.controller.js
new file mode 100644 (file)
index 0000000..030c1d2
--- /dev/null
@@ -0,0 +1,8 @@
+define([], function() {
+    angular.module('app.yangui').controller('augmentationModalCtrl', ['$scope', function($scope){
+        $scope.init = function(node){
+            $scope.node = node;
+        };
+    }]);
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/case.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/case.controller.js
new file mode 100644 (file)
index 0000000..ff39fcc
--- /dev/null
@@ -0,0 +1,12 @@
+define([], function() {
+    angular.module('app.yangui').controller('caseCtrl', function ($scope) {
+        $scope.empty = ($scope.case.children.length === 0 || ($scope.case.children.length === 1 && $scope.case.children[0].children.length ===0));
+
+        $scope.augModalView = false;
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/choice.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/choice.controller.js
new file mode 100644 (file)
index 0000000..7423037
--- /dev/null
@@ -0,0 +1,20 @@
+define([], function() {
+    angular.module('app.yangui').controller('choiceCtrl', function ($scope, constants) {
+        $scope.constants = constants;
+        $scope.augModalView = false;
+
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+
+        $scope.caseShowing = function (node) {
+            return !node.augmentationId ? true : $scope.augmentations.getAugmentation(node.parent, node.augmentationId).expanded;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/coll-box.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/coll-box.controller.js
new file mode 100644 (file)
index 0000000..e85ee9d
--- /dev/null
@@ -0,0 +1,43 @@
+define([], function() {
+    angular.module('app.yangui').controller('collBoxCtrl', ['$scope','HistoryServices',function ($scope, HistoryServices) {
+
+        $scope.collection = {
+            name: '',
+            group: ''
+        };
+
+        $scope.selectedRequest = null;
+        $scope.editBox = false;
+
+        $scope.addHistoryItemToColl = function(){
+            var elemToAdd = $scope.selectedRequest.clone();
+
+            HistoryServices.setNameAndGroup($scope.collection.name, $scope.collection.group, elemToAdd);
+            $scope.saveElemToList(elemToAdd);
+
+            if ( $scope.editBox ) {
+                $scope.deleteRequestItem($scope.selectedRequest, 'collectionList');
+            }
+
+            $scope.hideCollBox();
+        };
+
+        $scope.moveHistoryItemToGroup = function(elem, event){
+            var elemToMove = elem.clone();
+
+            HistoryServices.setNameAndGroup($scope.collection.name, $scope.collection.group, elemToMove);
+            $scope.saveElemToList(elemToMove);
+            $scope.deleteRequestItem(elem, 'collectionList');
+            $scope.hideCollBox();
+        };
+
+        $scope.$on('COLL_CLEAR_VAL_SET_REQ', function(e, req, edit){
+            $scope.collection.name = edit ? req.name : '';
+            $scope.collection.group = edit ? req.groupName : '';
+            $scope.selectedRequest = req;
+            $scope.editBox = edit;
+        });
+
+    }]);
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/container.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/container.controller.js
new file mode 100644 (file)
index 0000000..bceba70
--- /dev/null
@@ -0,0 +1,14 @@
+define([], function() {
+    angular.module('app.yangui').controller('containerCtrl', function ($scope) {
+        $scope.augModalView = false;
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-bit.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-bit.controller.js
new file mode 100644 (file)
index 0000000..569dba7
--- /dev/null
@@ -0,0 +1,12 @@
+define([], function() {
+    angular.module('app.yangui').controller('filterTypeBitCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            $scope.type.setLeafValue($scope.type.bitsValues,true);
+
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-empty.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-empty.controller.js
new file mode 100644 (file)
index 0000000..5f6fc9f
--- /dev/null
@@ -0,0 +1,9 @@
+define([], function() {
+    angular.module('app.yangui').controller('filterTypeEmptyCtrl', function($scope){
+        $scope.valueChanged = function(){
+            $scope.type.setLeafValue($scope.type.emptyValue);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-enum.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type-enum.controller.js
new file mode 100644 (file)
index 0000000..b8f7381
--- /dev/null
@@ -0,0 +1,15 @@
+define([], function() {
+    angular.module('app.yangui').controller('filterTypeEnumCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            var value = $scope.type.selEnum && $scope.type.selEnum.label ? $scope.type.selEnum.label : '';
+
+            $scope.type.setLeafValue(value);
+
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter-type.controller.js
new file mode 100644 (file)
index 0000000..d73deb5
--- /dev/null
@@ -0,0 +1,11 @@
+define([], function() {
+    angular.module('app.yangui').controller('filterTypeCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/filter.controller.js
new file mode 100644 (file)
index 0000000..9592436
--- /dev/null
@@ -0,0 +1,10 @@
+define([], function() {
+    angular.module('app.yangui').controller('filter', function($scope, listFiltering){
+        $scope.isFilter = true;
+
+        $scope.getFilterTypeArray = function(type){
+            return listFiltering.getFilterTypeArray(type);
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/input.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/input.controller.js
new file mode 100644 (file)
index 0000000..f0ba184
--- /dev/null
@@ -0,0 +1,14 @@
+define([], function() {
+    angular.module('app.yangui').controller('inputCtrl', function ($scope) {
+        $scope.augModalView = false;
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf-list.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf-list.controller.js
new file mode 100644 (file)
index 0000000..75e30b9
--- /dev/null
@@ -0,0 +1,22 @@
+define([], function() {
+    angular.module('app.yangui').controller('leafListCtrl', function ($scope) {
+
+        $scope.addListElem = function() {
+            $scope.node.addListElem();
+        };
+
+        $scope.removeListElem = function(elem){
+            $scope.node.removeListElem(elem);
+        };
+
+        $scope.changed = function() {
+            $scope.preview();
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/leaf.controller.js
new file mode 100644 (file)
index 0000000..a664c0c
--- /dev/null
@@ -0,0 +1,35 @@
+define([], function() {
+    angular.module('app.yangui').controller('leafCtrl', function ($scope) {
+        var types = [
+            'binary',
+            'bits',
+            'boolean',
+            'decimal64',
+            'enumeration',
+            'empty',
+            'identityref',
+            'instance-identifier',
+            'int16',
+            'int32',
+            'int64',
+            'int8',
+            'leafref',
+            'string',
+            'uint16',
+            'uint32',
+            'uint64',
+            'uint8',
+            'union'
+        ];
+
+        $scope.getLeafType = function(){
+            var label = $scope.node.getChildren('type')[0].label;
+            return types.indexOf(label) !== -1 ? label : 'default';
+        };
+
+        $scope.displayValue = function() {
+            return $scope.node.typeChild.label !== 'empty';
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/list.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/list.controller.js
new file mode 100644 (file)
index 0000000..1dade90
--- /dev/null
@@ -0,0 +1,124 @@
+define([], function() {
+    angular.module('app.yangui').controller('listCtrl', function ($scope, listFiltering, nodeWrapper) {
+        $scope.actElement = null;
+        $scope.showModal = false;
+        $scope.showListFilter = false;
+        $scope.filterListHover = 0;
+        $scope.currentDisplayIndex = 1;
+        $scope.displayOffsets = [-1, 0, 1];
+        $scope.augModalView = false;
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+
+        $scope.$on('EV_REFRESH_LIST_INDEX', function(event) {
+            $scope.currentDisplayIndex = 1;
+        });
+
+        $scope.addListElem = function() {
+            $scope.showListFilter = false;
+            $scope.showModal = false;
+            listFiltering.removeEmptyFilters($scope.node);
+            $scope.node.addListElem();
+        };
+
+        $scope.removeListElem = function(elemIndex,fromFilter) {
+            $scope.node.removeListElem(elemIndex,fromFilter);
+            $scope.preview();
+            $scope.currentDisplayIndex = Math.max(Math.min($scope.currentDisplayIndex, $scope.node.listData.length - 2), 1);
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+
+        $scope.shiftDisplayNext = function(typeListData) {
+            $scope.currentDisplayIndex = Math.min($scope.currentDisplayIndex + 3, $scope.node[typeListData].length - 2);
+        };
+
+        $scope.shiftDisplayPrev = function() {
+            $scope.currentDisplayIndex = Math.max($scope.currentDisplayIndex - 3, 1);
+        };
+
+        $scope.showPrevButton = function() {
+            return $scope.currentDisplayIndex > 1;
+        };
+
+        $scope.showNextButton = function(typeListData) {
+            return $scope.node[typeListData] && $scope.currentDisplayIndex < $scope.node[typeListData].length - 2; //node is selected after view is loaded
+        };
+
+        $scope.showModalWin = function() {
+            $scope.showModal = !$scope.showModal;
+            if($scope.showListFilter){
+                $scope.showListFilter = !$scope.showListFilter;
+            }
+        };
+
+        $scope.showListFilterWin = function() {
+            $scope.showListFilter = !$scope.showListFilter;
+            if($scope.showModal){
+                $scope.showModal = !$scope.showModal;
+            }
+            listFiltering.showListFilterWin($scope.filterRootNode,$scope.node);
+        };
+
+        $scope.getFilterData = function() {
+            listFiltering.getFilterData($scope.node);
+        };
+
+        $scope.switchFilter = function(showedFilter) {
+            listFiltering.switchFilter($scope.node,showedFilter);
+        };
+
+        $scope.createNewFilter = function() {
+            listFiltering.createNewFilter($scope.node);
+        };
+
+        $scope.applyFilter = function() {
+            listFiltering.applyFilter($scope.node);
+            $scope.showListFilter = !$scope.showListFilter;
+            $scope.currentDisplayIndex = 1;
+            if($scope.node.filteredListData.length){
+                $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.filteredListData,$scope.node.refKey);
+            }else{
+                $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.listData,$scope.node.refKey);
+            }
+        };
+
+        $scope.clearFilterData = function(changeAct, filterForClear, removeFilters) {
+            listFiltering.clearFilterData($scope.node,changeAct,filterForClear,removeFilters);
+            if(changeAct){
+                $scope.showListFilter = !$scope.showListFilter;
+            }
+            $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.listData,$scope.node.refKey);
+        };
+
+        $scope.activeFilter = function(filter) {
+            if(filter.active == 1){
+                filter.active = 2;
+            }else{
+                filter.active = 1;
+            }
+        };
+
+        $scope.getListName = function(offset, config) {
+            var createdListItemName = $scope.node.createListName($scope.currentDisplayIndex + offset);
+
+            if ( createdListItemName.length > 33 ) {
+                return {
+                    name: createdListItemName.substring(0,30) + '...',
+                    tooltip: createdListItemName
+                };
+            } else {
+                return {
+                    name: config ? createdListItemName || '[' + ($scope.currentDisplayIndex + offset) + ']' : createdListItemName,
+                    tooltip: ''
+                };
+            }
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/output.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/output.controller.js
new file mode 100644 (file)
index 0000000..ec73082
--- /dev/null
@@ -0,0 +1,15 @@
+define([], function() {
+    angular.module('app.yangui').controller('outputCtrl', function ($scope) {
+        $scope.augModalView = false;
+        $scope.notEditable = true;
+
+        $scope.toggleExpandedAugModal = function(){
+            $scope.augModalView = !$scope.augModalView;
+        };
+
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/rpc.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/rpc.controller.js
new file mode 100644 (file)
index 0000000..ca644ba
--- /dev/null
@@ -0,0 +1,8 @@
+define([], function() {
+    angular.module('app.yangui').controller('rpcCtrl', function ($scope) {
+        $scope.toggleExpanded = function() {
+            $scope.node.expanded = !$scope.node.expanded;
+        };
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-bit.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-bit.controller.js
new file mode 100644 (file)
index 0000000..31b8385
--- /dev/null
@@ -0,0 +1,19 @@
+define([], function() {
+    angular.module('app.yangui').controller('typeBitCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            $scope.type.setLeafValue($scope.type.bitsValues);
+
+            if($scope.previewVisible) {
+                $scope.preview();
+            } else {
+                $scope.buildRoot();
+            }
+
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-empty.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-empty.controller.js
new file mode 100644 (file)
index 0000000..aa61a51
--- /dev/null
@@ -0,0 +1,15 @@
+define([], function() {
+    angular.module('app.yangui').controller('typeEmptyCtrl', function($scope){
+        $scope.valueChanged = function(){
+            $scope.type.setLeafValue($scope.type.emptyValue);
+
+            if($scope.previewVisible) {
+                $scope.preview();
+            } else {
+                $scope.buildRoot();
+            }
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-enum.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/type-enum.controller.js
new file mode 100644 (file)
index 0000000..095cff2
--- /dev/null
@@ -0,0 +1,21 @@
+define([], function() {
+    angular.module('app.yangui').controller('typeEnumCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            var value = $scope.type.selEnum && $scope.type.selEnum.label ? $scope.type.selEnum.label : '';
+
+            $scope.type.setLeafValue(value);
+
+            if($scope.previewVisible) {
+                $scope.preview();
+            } else {
+                $scope.buildRoot();
+            }
+
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/api/type.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/api/type.controller.js
new file mode 100644 (file)
index 0000000..f53797d
--- /dev/null
@@ -0,0 +1,17 @@
+define([], function() {
+    angular.module('app.yangui').controller('typeCtrl', function($scope){
+
+        $scope.valueChanged = function(){
+            if($scope.previewVisible) {
+                $scope.preview();
+            } else {
+                $scope.buildRoot();
+            }
+
+            $scope.node.checkValueType();
+            $scope.node.fill($scope.node.label, $scope.node.value);
+        };
+
+    });
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/history/req-in-history.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/history/req-in-history.controller.js
new file mode 100644 (file)
index 0000000..78af3f7
--- /dev/null
@@ -0,0 +1,37 @@
+define([], function() {
+    angular.module('app.yangui').controller('reqInHistoryCtrl', ['$scope',
+
+        function ($scope) {
+
+            $scope.rList = null;
+
+            $scope.init = function (list) {
+                $scope.rList = list;
+            };
+
+            $scope.showData = false;
+
+            $scope.showShistoryData  = function(){
+                $scope.$broadcast('YANGUI_SHOW_SEND_HISTORY_DATA');
+                $scope.expandHistoryData();
+            };
+
+            $scope.showRhistoryData  = function(){
+                $scope.$broadcast('YANGUI_SHOW_RECEIVED_HISTORY_DATA');
+                $scope.expandHistoryData();
+            };
+
+            $scope.expandHistoryData = function(){
+                $scope.showData = !$scope.showData;
+            };
+
+            $scope.executeRequest = function(){
+                $scope.$broadcast('YANGUI_EXECUTE_REQ');
+            };
+
+            $scope.fillRequest = function(){
+                $scope.$broadcast('YANGUI_FILL_REQ');
+            };
+        }]);
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/history/request-history.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/history/request-history.controller.js
new file mode 100644 (file)
index 0000000..fd6763e
--- /dev/null
@@ -0,0 +1,182 @@
+
+define([], function() {
+
+    angular.module('app.yangui').controller('requestHistoryCtrl', ['$scope', '$rootScope','pathUtils','HistoryServices', 'handleFile', 'yangUtils', 'constants', 'mountPointsConnector', '$filter', 'parsingJson',
+        function ($scope, $rootScope, pathUtils, HistoryServices, handleFile, yangUtils, constants, mountPointsConnector, $filter, parsingJson) {
+
+            $scope.collectionBoxView = false;
+
+
+            var mountPrefix = constants.MPPREFIX;
+
+            $scope.getApiCallback = function(pathString) {
+                var snp = pathUtils.getStorageAndNormalizedPath(pathString),
+                    mpSearchPath = mountPointsConnector.alterMpPath(pathString), //if the path is for mountpoint then get the path to treedata structure
+                    apiIndexes = pathUtils.searchNodeByPath(mpSearchPath, $scope.treeApis, $scope.treeRows),
+                    selApi = apiIndexes ? $scope.apis[apiIndexes.indexApi] : null,
+                    selSubApi = selApi ? selApi.subApis[apiIndexes.indexSubApi] : null,
+                    copiedApi = selSubApi ? selSubApi.clone({ storage: snp.storage, withoutNode: true, clonePathArray: true }) : null;
+
+                if (copiedApi) {
+                    copiedApi.pathArray.forEach(function(p){
+                        p.hover = false;
+                    });
+
+                    pathUtils.fillPath(copiedApi.pathArray, snp.normalizedPath);
+                }
+
+                var searchedModule = pathUtils.getModuleNameFromPath(pathString);
+
+                if(mpSearchPath.indexOf(mountPrefix) !== -1 && copiedApi){
+                    copiedApi = $scope.selSubApi && searchedModule === $scope.selSubApi.pathArray[1].module ? copiedApi : null;
+                }
+
+                return copiedApi;
+            };
+
+            $scope.requestList = HistoryServices.createEmptyHistoryList('requestList', $scope.getApiCallback);
+            $scope.collectionList = HistoryServices.createEmptyCollectionList('collectionList', $scope.getApiCallback);
+            $scope.parameterList = HistoryServices.createEmptyParamList('parameterList');
+            $scope.parameterList.loadListFromStorage();
+
+            $scope.popupHistory = { show: false};
+
+            $scope.$on('REFRESH_HISTORY_REQUEST_APIS', function(event, callback){
+                $scope.requestList.refresh();
+                $scope.collectionList.refresh();
+            });
+
+
+            $scope.$on('GET_PARAMETER_LIST', function(event, callback){
+                callback($scope.parameterList);
+            });
+
+            $scope.$on('YUI_ADD_TO_HISTORY', function(event, status, data, requestData, operation, requestPath) {
+                $scope.addRequestToList(status, data, requestData, operation, requestPath);
+            });
+
+            $scope.addRequestToList = function(status, receivedData, sentData, operation, path) {
+                if(typeof(Storage) !== "undefined") {
+
+                    var rList = HistoryServices.createEmptyHistoryList(),
+                        reqObj = HistoryServices.createHistoryRequest(sentData, receivedData, path, null, operation, status, null, null, $scope.getApiCallback);
+
+                    reqObj.refresh($scope.getApiCallback);
+
+                    $scope.requestList.addRequestToList(reqObj);
+                    $scope.requestList.saveToStorage();
+                }
+            };
+
+            $scope.reqHistoryFunc = function(){
+                $scope.popupHistory.show = !$scope.popupHistory.show;
+
+                $scope.requestList.loadListFromStorage();
+                $scope.collectionList.loadListFromStorage();
+                $scope.requestList.show = false;
+            };
+
+            $scope.showCollBox = function(req, edit){
+                $scope.collectionBoxView = true;
+                $scope.$broadcast('COLL_CLEAR_VAL_SET_REQ', req, edit);
+            };
+
+
+            $scope.hideCollBox = function(){
+                $scope.collectionBoxView = false;
+            };
+
+            $scope.saveElemToList = function(elem) {
+                $scope.collectionList.addRequestToList(elem);
+                $scope.collectionList.saveToStorage();
+            };
+
+            $scope.saveParamToList = function(elem, oldElem) {
+                $scope.parameterList.saveRequestToList(elem, oldElem);
+            };
+
+            $scope.deleteRequestItem = function(elem, list){
+                $scope[list].deleteRequestItem(elem);
+                $scope[list].saveToStorage();
+            };
+
+            $scope.clearHistoryData = function(list){
+                $scope[list].clear();
+                $scope[list].saveToStorage();
+            };
+
+            var clearFileInputValue = function() {
+                var el = document.getElementById("upload-collection");
+                el.value = '';
+            };
+
+            $scope.exportHistoryData = function() {
+                var cListJSON = localStorage.getItem("collectionList");
+
+                handleFile.downloadFile('requestCollection.json', cListJSON, 'json', 'charset=utf-8', function(){
+                    $scope.setStatusMessage('success', 'EXPORT_COLLECTIONS_SUCCESS');
+                },function(e){
+                    $scope.setStatusMessage('danger', 'EXPORT_COLLECTIONS_ERROR', e);
+                    console.error('ExportCollection error:', e);
+                });
+            };
+
+            $scope.readCollectionFromFile = function($fileContent) {
+                var data = $fileContent,
+                    checkArray = ['sentData','receivedData','path','group','parametrizedPath','method','status','name'];
+
+                if(data && HistoryServices.validateFile(data, checkArray)){
+                    try {
+                        $scope.collectionList.loadListFromFile(data);
+                        $scope.collectionList.saveToStorage();
+                        $scope.setStatusMessage('success', 'LOAD_COLLECTIONS_SUCCESS');
+                        clearFileInputValue();
+                    }catch(e) {
+                        clearFileInputValue();
+                        $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR', e);
+                        console.error('DataStorage error:', e);
+                    }
+                }else{
+                    $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR');
+                    clearFileInputValue();
+                }
+            };
+
+            $scope.executeCollectionRequest = function(req, dataForView, showData) {
+                var sdata = dataForView ? parsingJson.parseJson(dataForView) : req.sentData,
+                    path = req.parametrizedPath && showData ? req.parametrizedPath : req.api.buildApiRequestString();
+
+                path = $scope.parameterizeData(path);
+                $scope.fillStandardApi(path, req.path);
+
+                if(sdata) {
+                    $scope.fillApiData(sdata);
+                }
+
+                var requestPath = req.api.parent.basePath + path;
+
+                $scope.executeOperation(req.method, function(data){
+                    if ( !data &&  req.receivedData ){
+                        $scope.node.fill($scope.node.label,req.receivedData[$scope.node.label]);
+                    }
+                }, requestPath);
+            };
+
+            $scope.groupView = {};
+
+            $scope.setGroupView = function(key) {
+                $scope.groupView[key] = false;
+            };
+
+            $scope.toggleExpanded = function(key) {
+                $scope.groupView[key] = !$scope.groupView[key];
+            };
+
+            $scope.$on('LOAD_REQ_DATA', function(){
+                $scope.reqHistoryFunc();
+            });
+
+        }]);
+
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/history-param.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/history-param.controller.js
new file mode 100644 (file)
index 0000000..b57106f
--- /dev/null
@@ -0,0 +1,52 @@
+define([], function() {
+    angular.module('app.yangui').controller('historyParamCtrl',['$scope','HistoryServices', 'handleFile',
+        function($scope, HistoryServices, handleFile){
+
+            $scope.showParamBox = function(param){
+                $scope.$broadcast('HISTORY_INIT_PARAM', param);
+            };
+
+            $scope.createNewParam = function(){
+                return HistoryServices.createParameter('','');
+            };
+
+            var clearFileInputValue = function() {
+                var el = document.getElementById("upload-parameters");
+                el.value = '';
+            };
+
+            $scope.exportParametersData = function() {
+                var cListJSON = localStorage.getItem("parameterList");
+
+                handleFile.downloadFile('parameters.json', cListJSON, 'json', 'charset=utf-8', function(){
+                    $scope.setStatusMessage('success', 'EXPORT_PARAMETERS_SUCCESS');
+                },function(e){
+                    $scope.setStatusMessage('danger', 'EXPORT_PARAMETERS_ERROR', e);
+                    console.error('ExportCollection error:', e);
+                });
+            };
+
+            $scope.readParametersFromFile = function($fileContent) {
+                var data = $fileContent,
+                    checkArray = ['name', 'value'];
+
+                if(data && HistoryServices.validateFile(data, checkArray)){
+                    try {
+                        $scope.parameterList.loadListFromFile(data);
+                        $scope.parameterList.saveToStorage();
+                        $scope.setStatusMessage('success', 'LOAD_PARAMETERS_SUCCESS');
+                        clearFileInputValue();
+                    }catch(e) {
+                        clearFileInputValue();
+                        $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR', e);
+                        console.error('DataStorage error:', e);
+                    }
+                }else{
+                    $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR');
+                    clearFileInputValue();
+                }
+            };
+
+        }]);
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/param-box.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/param-box.controller.js
new file mode 100644 (file)
index 0000000..1a652e5
--- /dev/null
@@ -0,0 +1,32 @@
+define([], function() {
+    angular.module('app.yangui').controller('paramBoxCtrl', ['$scope', 'HistoryServices', 'eventDispatcher', 'constants', function ($scope, HistoryServices, eventDispatcher, constants) {
+        $scope.paramObj = null;
+        $scope.oldParam = null;
+        $scope.boxView = false;
+
+        $scope.hideParamBox = function(){
+            $scope.boxView = false;
+            $scope.paramObj = $scope.createNewParam();
+        };
+
+        var addEditSuccessfull = function() {
+            $scope.hideParamBox();
+            $scope.parameterList.saveToStorage();
+        };
+
+        eventDispatcher.registerHandler(constants.EV_PARAM_EDIT_SUCC, addEditSuccessfull);
+
+        $scope.saveParam = function(){
+            $scope.saveParamToList($scope.paramObj, $scope.oldParam);
+        };
+
+        $scope.$on('HISTORY_INIT_PARAM', function(e, obj){
+            if ( obj ){
+                $scope.paramObj = obj.clone();
+                $scope.oldParam = obj;
+                $scope.boxView = true;
+            }
+        });
+    }]);
+
+});
diff --git a/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/params-view.controller.js b/modules/yangui-resources/src/main/resources/yangui/controllers/parameters/params-view.controller.js
new file mode 100644 (file)
index 0000000..000ac03
--- /dev/null
@@ -0,0 +1,113 @@
+define([], function() {
+    angular.module('app.yangui').controller('paramsViewCtrl', ['$scope', 'pathUtils', 'yangUtils', 'requestDataFactory', 'parsingJson',
+        function($scope, pathUtils, yangUtils, requestDataFactory, parsingJson){
+            $scope.sDataForView = null;
+            $scope.rDataForView = null;
+            $scope.isSentData = false;
+            $scope.paramsArray = [];
+            $scope.paramsBoxView = false;
+
+            setInstanceEvents = function(cmInstance){
+                cmInstance.on('changes', function(){
+                    if(angular.isFunction(cmInstance.showHint)){
+                        cmInstance.showHint();
+                    }
+                });
+
+                cmInstance.on('cursorActivity', function(){
+                    var lineString = cmInstance.getLine(cmInstance.getCursor().line);
+                    $scope.paramsArray = requestDataFactory.scanDataParams($scope.parameterList, lineString);
+                    $scope.paramsBoxView = $scope.paramsArray.length ? true : false;
+
+                    if(!$scope.$$phase) {
+                        $scope.$apply();
+                    }
+                });
+            };
+
+            $scope.dataEditorOptions = {
+                mode: 'javascript',
+                lineNumbers: true,
+                theme:'eclipse',
+                readOnly: false,
+                lineWrapping : true,
+                matchBrackets: true,
+                extraKeys: {"Ctrl-Space": "autocomplete"},
+                onLoad : function(cmInstance){
+                    setInstanceEvents(cmInstance);
+                    cmInstance.data = {parameterListObj:$scope.parameterList};
+                }
+            };
+
+            $scope.hideParamListBox = function(){
+                $scope.paramsBoxView = false;
+            };
+
+            $scope.clearParametrizedData = function(){
+                $scope.req.clearParametrizedData();
+                var dataForViewObj = $scope.req.sentData;
+
+                $scope.sDataForView = dataForViewObj ? $scope.req.setDataForView(true, dataForViewObj) : '';
+            };
+
+            $scope.fillRequestData = function(pathElem, identifier) {
+                if($scope.req.api && $scope.req.api.clonedPathArray.indexOf(pathElem) === ($scope.req.api.clonedPathArray.length - 1)) {
+                    var data = parsingJson.parseJson($scope.sDataForView);
+                    pathUtils.fillListRequestData(data, pathElem.name, identifier.label, identifier.value);
+                    var strippedData = yangUtils.stripAngularGarbage(data, $scope.req.getLastPathDataElemName());
+
+                    angular.copy(strippedData, parsingJson.parseJson($scope.sDataForView));
+                    $scope.sDataForView = JSON.stringify(strippedData, null, 4);
+                }
+
+                $scope.req.parametrizedPath = pathUtils.translatePathArray($scope.req.api.clonedPathArray).join('/');
+            };
+
+            $scope.getDataEditorOptions = function(read, theme){
+                $scope.dataEditorOptions.readOnly = read;
+                $scope.dataEditorOptions.theme = theme;
+
+                return $scope.dataEditorOptions;
+            };
+
+            $scope.saveParametrizedData = function(list){
+                var parametrizedPath = $scope.req.api.parent.basePath + pathUtils.translatePathArray($scope.req.api.clonedPathArray).join('/'),
+                    jsonParsingErrorClbk = function(e){$scope.setStatusMessage('danger', 'YANGUI_JSON_PARSING_ERROR', e.message);},
+                    newReq = $scope.req.copyWithParametrizationAsNatural(parametrizedPath, $scope.getApiCallback, $scope.sDataForView, jsonParsingErrorClbk);
+
+                if(newReq){
+                    $scope.req.clearParametrizedData();
+
+                    list.addRequestToList(newReq);
+                    list.saveToStorage();
+
+                    $scope.expandHistoryData();
+                    $scope.setStatusMessage('success', 'YANGUI_PARAMETRIZED_DATA_SAVED', e.message);
+                }
+                return true;
+            };
+
+            var setSentData = function(isSentData) {
+                $scope.isSentData = isSentData ? isSentData : $scope.isSentData;
+            };
+
+            $scope.$on('YANGUI_SHOW_SEND_HISTORY_DATA', function() {
+                $scope.sDataForView = $scope.req.setDataForView(true, $scope.req.sentData);
+                setSentData(true);
+            });
+
+            $scope.$on('YANGUI_SHOW_RECEIVED_HISTORY_DATA', function() {
+                $scope.rDataForView = $scope.req.setDataForView(false, $scope.req.receivedData);
+                setSentData(false);
+            });
+
+            $scope.$on('YANGUI_EXECUTE_REQ', function(){
+                $scope.executeCollectionRequest($scope.req, $scope.sDataForView, $scope.showData);
+            });
+
+            $scope.$on('YANGUI_FILL_REQ', function(){
+                $scope.fillApiAndData($scope.req, $scope.isSentData ? $scope.sDataForView : $scope.rDataForView );
+            });
+        }]);
+
+});
index a8f4b21f829a568264de2b7ef2587ce07493c4d4..60219a2fa00e019ddce7ca2900d525a30f38bf71 100644 (file)
@@ -7,9 +7,37 @@ var services = [
         'app/yangui/directives/sticky.directive',\r
         'app/yangui/directives/read_file.directive',\r
         'app/yangui/directives/ui-codemirror.directive'\r
+    ],\r
+    controllers = [\r
+        'app/yangui/controllers/api/augmentation-modal.controller',\r
+        'app/yangui/controllers/api/case.controller',\r
+        'app/yangui/controllers/api/coll-box.controller',\r
+        'app/yangui/controllers/api/container.controller',\r
+        'app/yangui/controllers/api/filter.controller',\r
+        'app/yangui/controllers/api/filter-type.controller',\r
+        'app/yangui/controllers/api/filter-type-bit.controller',\r
+        'app/yangui/controllers/api/filter-type-empty.controller',\r
+        'app/yangui/controllers/api/filter-type-enum.controller',\r
+        'app/yangui/controllers/parameters/history-param.controller',\r
+        'app/yangui/controllers/api/choice.controller',\r
+        'app/yangui/controllers/api/input.controller',\r
+        'app/yangui/controllers/api/leaf.controller',\r
+        'app/yangui/controllers/api/leaf-list.controller',\r
+        'app/yangui/controllers/api/list.controller',\r
+        'app/yangui/controllers/api/output.controller',\r
+        'app/yangui/controllers/parameters/param-box.controller',\r
+        'app/yangui/controllers/parameters/params-view.controller',\r
+        'app/yangui/controllers/history/req-in-history.controller',\r
+        'app/yangui/controllers/history/request-history.controller',\r
+        'app/yangui/controllers/api/rpc.controller',\r
+        'app/yangui/controllers/api/type.controller',\r
+        'app/yangui/controllers/api/type-bit.controller',\r
+        'app/yangui/controllers/api/type-empty.controller',\r
+        'app/yangui/controllers/api/type-enum.controller'\r
     ];\r
 \r
-define(['app/yangui/yangui.module'].concat(services).concat(directives), function(yangui) {\r
+define(['app/yangui/yangui.module'].concat(services).concat(directives).concat(controllers), function(yangui) {\r
+\r
 \r
   yangui.register.controller('yanguiCtrl', ['$scope', '$timeout', '$rootScope', '$http', '$filter', 'YangUtilsRestangular', 'yangUtils', 'reqBuilder', 'custFunct',\r
     'pluginHandler', 'pathUtils', 'constants', 'nodeWrapper', 'mountPointsConnector', 'filterConstants','displayMountPoints','yinParser', 'designUtils', 'eventDispatcher', 'syncFact',\r
@@ -577,811 +605,27 @@ define(['app/yangui/yangui.module'].concat(services).concat(directives), functio
 \r
 \r
 \r
-  yangui.register.controller('requestHistoryCtrl', ['$scope', '$rootScope','pathUtils','HistoryServices', 'handleFile', 'yangUtils', 'constants', 'mountPointsConnector', '$filter', 'parsingJson', \r
-    function ($scope, $rootScope, pathUtils, HistoryServices, handleFile, yangUtils, constants, mountPointsConnector, $filter, parsingJson) {\r
-\r
-    $scope.collectionBoxView = false;\r
-    \r
-    \r
-    var mountPrefix = constants.MPPREFIX;\r
-\r
-    $scope.getApiCallback = function(pathString) {\r
-        var snp = pathUtils.getStorageAndNormalizedPath(pathString),\r
-            mpSearchPath = mountPointsConnector.alterMpPath(pathString), //if the path is for mountpoint then get the path to treedata structure\r
-            apiIndexes = pathUtils.searchNodeByPath(mpSearchPath, $scope.treeApis, $scope.treeRows),\r
-            selApi = apiIndexes ? $scope.apis[apiIndexes.indexApi] : null,\r
-            selSubApi = selApi ? selApi.subApis[apiIndexes.indexSubApi] : null,\r
-            copiedApi = selSubApi ? selSubApi.clone({ storage: snp.storage, withoutNode: true, clonePathArray: true }) : null;\r
-\r
-        if (copiedApi) {\r
-            copiedApi.pathArray.forEach(function(p){\r
-                p.hover = false;\r
-            });\r
-\r
-            pathUtils.fillPath(copiedApi.pathArray, snp.normalizedPath);\r
-        }\r
-\r
-        var searchedModule = pathUtils.getModuleNameFromPath(pathString);\r
-\r
-        if(mpSearchPath.indexOf(mountPrefix) !== -1 && copiedApi){\r
-            copiedApi = $scope.selSubApi && searchedModule === $scope.selSubApi.pathArray[1].module ? copiedApi : null;\r
-        }\r
-\r
-        return copiedApi;\r
-    };\r
-\r
-    $scope.requestList = HistoryServices.createEmptyHistoryList('requestList', $scope.getApiCallback);\r
-    $scope.collectionList = HistoryServices.createEmptyCollectionList('collectionList', $scope.getApiCallback);\r
-    $scope.parameterList = HistoryServices.createEmptyParamList('parameterList');\r
-    $scope.parameterList.loadListFromStorage();\r
-    \r
-    $scope.popupHistory = { show: false};\r
-\r
-    $scope.$on('REFRESH_HISTORY_REQUEST_APIS', function(event, callback){\r
-        $scope.requestList.refresh();\r
-        $scope.collectionList.refresh();\r
-    });\r
-\r
-        \r
-    $scope.$on('GET_PARAMETER_LIST', function(event, callback){\r
-        callback($scope.parameterList);\r
-    });\r
-\r
-    $scope.$on('YUI_ADD_TO_HISTORY', function(event, status, data, requestData, operation, requestPath) {\r
-        $scope.addRequestToList(status, data, requestData, operation, requestPath);\r
-    });\r
-\r
-    $scope.addRequestToList = function(status, receivedData, sentData, operation, path) {\r
-        if(typeof(Storage) !== "undefined") {\r
-\r
-            var rList = HistoryServices.createEmptyHistoryList(),\r
-                reqObj = HistoryServices.createHistoryRequest(sentData, receivedData, path, null, operation, status, null, null, $scope.getApiCallback);\r
-\r
-            reqObj.refresh($scope.getApiCallback);\r
-\r
-            $scope.requestList.addRequestToList(reqObj);\r
-            $scope.requestList.saveToStorage();\r
-        }\r
-    };\r
-    \r
-    $scope.reqHistoryFunc = function(){\r
-        $scope.popupHistory.show = !$scope.popupHistory.show;\r
-\r
-        $scope.requestList.loadListFromStorage();\r
-        $scope.collectionList.loadListFromStorage();\r
-        $scope.requestList.show = false;\r
-    };\r
-\r
-    $scope.showCollBox = function(req, edit){\r
-      $scope.collectionBoxView = true;\r
-      $scope.$broadcast('COLL_CLEAR_VAL_SET_REQ', req, edit);\r
-    };\r
-    \r
-\r
-    $scope.hideCollBox = function(){\r
-      $scope.collectionBoxView = false;\r
-    };\r
-\r
-    $scope.saveElemToList = function(elem) {\r
-        $scope.collectionList.addRequestToList(elem);\r
-        $scope.collectionList.saveToStorage();\r
-    };\r
-\r
-    $scope.saveParamToList = function(elem, oldElem) {\r
-        $scope.parameterList.saveRequestToList(elem, oldElem);\r
-    };\r
-\r
-    $scope.deleteRequestItem = function(elem, list){\r
-        $scope[list].deleteRequestItem(elem);\r
-        $scope[list].saveToStorage();\r
-    };\r
-\r
-    $scope.clearHistoryData = function(list){\r
-        $scope[list].clear();\r
-        $scope[list].saveToStorage();\r
-    };\r
-\r
-    var clearFileInputValue = function() {\r
-        var el = document.getElementById("upload-collection");\r
-        el.value = '';\r
-    };\r
-\r
-    $scope.exportHistoryData = function() {\r
-        var cListJSON = localStorage.getItem("collectionList");\r
-\r
-        handleFile.downloadFile('requestCollection.json', cListJSON, 'json', 'charset=utf-8', function(){\r
-            $scope.setStatusMessage('success', 'EXPORT_COLLECTIONS_SUCCESS');\r
-        },function(e){\r
-            $scope.setStatusMessage('danger', 'EXPORT_COLLECTIONS_ERROR', e);\r
-            console.error('ExportCollection error:', e);\r
-        });\r
-    };\r
-\r
-    $scope.readCollectionFromFile = function($fileContent) {\r
-        var data = $fileContent,\r
-            checkArray = ['sentData','receivedData','path','group','parametrizedPath','method','status','name'];\r
-\r
-        if(data && HistoryServices.validateFile(data, checkArray)){\r
-            try {\r
-              $scope.collectionList.loadListFromFile(data);\r
-              $scope.collectionList.saveToStorage();\r
-              $scope.setStatusMessage('success', 'LOAD_COLLECTIONS_SUCCESS');\r
-              clearFileInputValue();\r
-            }catch(e) {\r
-                clearFileInputValue();\r
-                $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR', e);\r
-                console.error('DataStorage error:', e);\r
-            }\r
-        }else{\r
-            $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR');\r
-            clearFileInputValue();\r
-        }\r
-    };\r
-\r
-    $scope.executeCollectionRequest = function(req, dataForView, showData) {\r
-        var sdata = dataForView ? parsingJson.parseJson(dataForView) : req.sentData,\r
-            path = req.parametrizedPath && showData ? req.parametrizedPath : req.api.buildApiRequestString();\r
-\r
-        path = $scope.parameterizeData(path);\r
-        $scope.fillStandardApi(path, req.path);\r
-\r
-        if(sdata) {\r
-            $scope.fillApiData(sdata);\r
-        }\r
-\r
-        var requestPath = req.api.parent.basePath + path;\r
-\r
-        $scope.executeOperation(req.method, function(data){\r
-            if ( !data &&  req.receivedData ){\r
-              $scope.node.fill($scope.node.label,req.receivedData[$scope.node.label]);\r
-            }\r
-        }, requestPath);\r
-    };\r
-\r
-    $scope.groupView = {};\r
-\r
-    $scope.setGroupView = function(key) {\r
-      $scope.groupView[key] = false;\r
-    };\r
-\r
-    $scope.toggleExpanded = function(key) {\r
-        $scope.groupView[key] = !$scope.groupView[key];\r
-    };\r
-\r
-    $scope.$on('LOAD_REQ_DATA', function(){\r
-      $scope.reqHistoryFunc();\r
-    });\r
-\r
-  }]);\r
-\r
-    yangui.register.controller('reqInHistoryCtrl', ['$scope',\r
-        function ($scope) {\r
-\r
-            $scope.rList = null;\r
-\r
-            $scope.init = function (list) {\r
-                $scope.rList = list;\r
-            };\r
-\r
-            $scope.showData = false;\r
-\r
-            $scope.showShistoryData  = function(){\r
-                $scope.$broadcast('YANGUI_SHOW_SEND_HISTORY_DATA');\r
-                $scope.expandHistoryData();\r
-            };\r
-\r
-            $scope.showRhistoryData  = function(){\r
-                $scope.$broadcast('YANGUI_SHOW_RECEIVED_HISTORY_DATA');\r
-                $scope.expandHistoryData();\r
-            };\r
-\r
-            $scope.expandHistoryData = function(){\r
-                $scope.showData = !$scope.showData;\r
-            };\r
-\r
-            $scope.executeRequest = function(){\r
-                $scope.$broadcast('YANGUI_EXECUTE_REQ');\r
-            };\r
-\r
-            $scope.fillRequest = function(){\r
-                $scope.$broadcast('YANGUI_FILL_REQ');\r
-            };\r
-        }]);\r
-\r
-    yangui.register.controller('paramsViewCtrl', ['$scope', 'pathUtils', 'yangUtils', 'requestDataFactory', 'parsingJson',\r
-        function($scope, pathUtils, yangUtils, requestDataFactory, parsingJson){\r
-            $scope.sDataForView = null;\r
-            $scope.rDataForView = null;\r
-            $scope.isSentData = false;\r
-            $scope.paramsArray = [];\r
-            $scope.paramsBoxView = false;\r
-\r
-            setInstanceEvents = function(cmInstance){\r
-                cmInstance.on('changes', function(){\r
-                    if(angular.isFunction(cmInstance.showHint)){\r
-                        cmInstance.showHint();\r
-                    }\r
-                });\r
-\r
-                cmInstance.on('cursorActivity', function(){\r
-                    var lineString = cmInstance.getLine(cmInstance.getCursor().line);\r
-                    $scope.paramsArray = requestDataFactory.scanDataParams($scope.parameterList, lineString);\r
-                    $scope.paramsBoxView = $scope.paramsArray.length ? true : false;\r
-\r
-                    if(!$scope.$$phase) {\r
-                        $scope.$apply();\r
-                    }\r
-                });\r
-            };\r
-\r
-            $scope.dataEditorOptions = {\r
-                mode: 'javascript',\r
-                lineNumbers: true,\r
-                theme:'eclipse',\r
-                readOnly: false,\r
-                lineWrapping : true,\r
-                matchBrackets: true,\r
-                extraKeys: {"Ctrl-Space": "autocomplete"},\r
-                onLoad : function(cmInstance){\r
-                    setInstanceEvents(cmInstance);\r
-                    cmInstance.data = {parameterListObj:$scope.parameterList};\r
-                }\r
-            };\r
-\r
-            $scope.hideParamListBox = function(){\r
-                $scope.paramsBoxView = false;\r
-            };\r
-\r
-            $scope.clearParametrizedData = function(){\r
-                $scope.req.clearParametrizedData();\r
-                var dataForViewObj = $scope.req.sentData;\r
-\r
-                $scope.sDataForView = dataForViewObj ? $scope.req.setDataForView(true, dataForViewObj) : '';\r
-            };\r
-\r
-            $scope.fillRequestData = function(pathElem, identifier) {\r
-                if($scope.req.api && $scope.req.api.clonedPathArray.indexOf(pathElem) === ($scope.req.api.clonedPathArray.length - 1)) {\r
-                    var data = parsingJson.parseJson($scope.sDataForView);\r
-                    pathUtils.fillListRequestData(data, pathElem.name, identifier.label, identifier.value);\r
-                    var strippedData = yangUtils.stripAngularGarbage(data, $scope.req.getLastPathDataElemName());\r
-\r
-                    angular.copy(strippedData, parsingJson.parseJson($scope.sDataForView));\r
-                    $scope.sDataForView = JSON.stringify(strippedData, null, 4);\r
-                }\r
-\r
-                $scope.req.parametrizedPath = pathUtils.translatePathArray($scope.req.api.clonedPathArray).join('/');\r
-            };\r
-\r
-            $scope.getDataEditorOptions = function(read, theme){\r
-                $scope.dataEditorOptions.readOnly = read;\r
-                $scope.dataEditorOptions.theme = theme;\r
-\r
-                return $scope.dataEditorOptions;\r
-            };\r
-\r
-            $scope.saveParametrizedData = function(list){\r
-                var parametrizedPath = $scope.req.api.parent.basePath + pathUtils.translatePathArray($scope.req.api.clonedPathArray).join('/'),\r
-                    jsonParsingErrorClbk = function(e){$scope.setStatusMessage('danger', 'YANGUI_JSON_PARSING_ERROR', e.message);},\r
-                    newReq = $scope.req.copyWithParametrizationAsNatural(parametrizedPath, $scope.getApiCallback, $scope.sDataForView, jsonParsingErrorClbk);\r
-\r
-                    if(newReq){\r
-                        $scope.req.clearParametrizedData();\r
-\r
-                        list.addRequestToList(newReq);\r
-                        list.saveToStorage();\r
-\r
-                        $scope.expandHistoryData();\r
-                        $scope.setStatusMessage('success', 'YANGUI_PARAMETRIZED_DATA_SAVED', e.message);\r
-                    }\r
-                    return true;\r
-            };\r
-\r
-            var setSentData = function(isSentData) {\r
-                $scope.isSentData = isSentData ? isSentData : $scope.isSentData;\r
-            };\r
-\r
-            $scope.$on('YANGUI_SHOW_SEND_HISTORY_DATA', function() {\r
-                $scope.sDataForView = $scope.req.setDataForView(true, $scope.req.sentData);\r
-                setSentData(true);\r
-            });\r
-\r
-            $scope.$on('YANGUI_SHOW_RECEIVED_HISTORY_DATA', function() {\r
-                $scope.rDataForView = $scope.req.setDataForView(false, $scope.req.receivedData);\r
-                setSentData(false);\r
-            });\r
-\r
-            $scope.$on('YANGUI_EXECUTE_REQ', function(){\r
-                $scope.executeCollectionRequest($scope.req, $scope.sDataForView, $scope.showData);\r
-            });\r
-\r
-            $scope.$on('YANGUI_FILL_REQ', function(){\r
-                $scope.fillApiAndData($scope.req, $scope.isSentData ? $scope.sDataForView : $scope.rDataForView );\r
-            });\r
-        }]);\r
-\r
-  yangui.register.controller('collBoxCtrl', ['$scope','HistoryServices',function ($scope, HistoryServices) {\r
-    \r
-    $scope.collection = {\r
-      name: '',\r
-      group: ''\r
-    };\r
-\r
-    $scope.selectedRequest = null;\r
-    $scope.editBox = false;\r
-\r
-    $scope.addHistoryItemToColl = function(){\r
-        var elemToAdd = $scope.selectedRequest.clone();\r
-\r
-        HistoryServices.setNameAndGroup($scope.collection.name, $scope.collection.group, elemToAdd);\r
-        $scope.saveElemToList(elemToAdd);\r
-\r
-        if ( $scope.editBox ) {\r
-            $scope.deleteRequestItem($scope.selectedRequest, 'collectionList');\r
-        }\r
-\r
-        $scope.hideCollBox();\r
-    };\r
-\r
-    $scope.moveHistoryItemToGroup = function(elem, event){\r
-        var elemToMove = elem.clone();\r
-\r
-        HistoryServices.setNameAndGroup($scope.collection.name, $scope.collection.group, elemToMove);\r
-        $scope.saveElemToList(elemToMove);\r
-        $scope.deleteRequestItem(elem, 'collectionList');\r
-        $scope.hideCollBox();\r
-    };\r
-\r
-    $scope.$on('COLL_CLEAR_VAL_SET_REQ', function(e, req, edit){\r
-        $scope.collection.name = edit ? req.name : '';\r
-        $scope.collection.group = edit ? req.groupName : '';\r
-        $scope.selectedRequest = req;\r
-        $scope.editBox = edit;\r
-    });\r
-\r
-  }]);\r
-  \r
-  yangui.register.controller('historyParamCtrl',['$scope','HistoryServices', 'handleFile', \r
-    function($scope, HistoryServices, handleFile){\r
-          \r
-    $scope.showParamBox = function(param){\r
-        $scope.$broadcast('HISTORY_INIT_PARAM', param);\r
-    };\r
-    \r
-    $scope.createNewParam = function(){\r
-        return HistoryServices.createParameter('','');\r
-    };\r
-    \r
-    var clearFileInputValue = function() {\r
-        var el = document.getElementById("upload-parameters");\r
-        el.value = '';\r
-    };\r
-\r
-    $scope.exportParametersData = function() {\r
-        var cListJSON = localStorage.getItem("parameterList");\r
-\r
-        handleFile.downloadFile('parameters.json', cListJSON, 'json', 'charset=utf-8', function(){\r
-            $scope.setStatusMessage('success', 'EXPORT_PARAMETERS_SUCCESS');\r
-        },function(e){\r
-            $scope.setStatusMessage('danger', 'EXPORT_PARAMETERS_ERROR', e);\r
-            console.error('ExportCollection error:', e);\r
-        });\r
-    };\r
-\r
-    $scope.readParametersFromFile = function($fileContent) {\r
-        var data = $fileContent,\r
-            checkArray = ['name', 'value'];\r
-\r
-        if(data && HistoryServices.validateFile(data, checkArray)){\r
-            try {\r
-              $scope.parameterList.loadListFromFile(data);\r
-              $scope.parameterList.saveToStorage();\r
-              $scope.setStatusMessage('success', 'LOAD_PARAMETERS_SUCCESS');\r
-              clearFileInputValue();\r
-            }catch(e) {\r
-                clearFileInputValue();\r
-                $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR', e);\r
-                console.error('DataStorage error:', e);\r
-            }\r
-        }else{\r
-            $scope.setStatusMessage('danger', 'PARSE_JSON_FILE_ERROR');\r
-            clearFileInputValue();\r
-        }\r
-    };\r
-\r
-  }]);\r
-\r
-  yangui.register.controller('paramBoxCtrl', ['$scope', 'HistoryServices', 'eventDispatcher', 'constants', function ($scope, HistoryServices, eventDispatcher, constants) {\r
-    $scope.paramObj = null;\r
-    $scope.oldParam = null;\r
-    $scope.boxView = false;\r
-\r
-    $scope.hideParamBox = function(){\r
-        $scope.boxView = false;\r
-        $scope.paramObj = $scope.createNewParam();\r
-    };\r
 \r
-    var addEditSuccessfull = function() {\r
-        $scope.hideParamBox();\r
-        $scope.parameterList.saveToStorage();\r
-    };\r
 \r
-    eventDispatcher.registerHandler(constants.EV_PARAM_EDIT_SUCC, addEditSuccessfull);\r
 \r
-    $scope.saveParam = function(){\r
-        $scope.saveParamToList($scope.paramObj, $scope.oldParam);\r
-    };\r
 \r
-    $scope.$on('HISTORY_INIT_PARAM', function(e, obj){\r
-        if ( obj ){\r
-            $scope.paramObj = obj.clone();\r
-            $scope.oldParam = obj;\r
-            $scope.boxView = true;\r
-        }\r
-    });\r
-  }]);\r
-\r
-  yangui.register.controller('leafCtrl', function ($scope) {\r
-    var types = [\r
-                  'binary', \r
-                  'bits', \r
-                  'boolean', \r
-                  'decimal64', \r
-                  'enumeration', \r
-                  'empty', \r
-                  'identityref', \r
-                  'instance-identifier', \r
-                  'int16', \r
-                  'int32', \r
-                  'int64', \r
-                  'int8', \r
-                  'leafref', \r
-                  'string', \r
-                  'uint16', \r
-                  'uint32', \r
-                  'uint64', \r
-                  'uint8', \r
-                  'union'\r
-                ];\r
-\r
-      $scope.getLeafType = function(){\r
-        var label = $scope.node.getChildren('type')[0].label;\r
-        return types.indexOf(label) !== -1 ? label : 'default';\r
-      };\r
 \r
-      $scope.displayValue = function() {\r
-          return $scope.node.typeChild.label !== 'empty';\r
-      };\r
-  });\r
 \r
-  yangui.register.controller('containerCtrl', function ($scope) {\r
-      $scope.augModalView = false;\r
 \r
-      $scope.toggleExpandedAugModal = function(){\r
-        $scope.augModalView = !$scope.augModalView;\r
-      };\r
 \r
-      $scope.toggleExpanded = function() {\r
-          $scope.node.expanded = !$scope.node.expanded;\r
-      };\r
-  });\r
 \r
-  yangui.register.controller('caseCtrl', function ($scope) {\r
-      $scope.empty = ($scope.case.children.length === 0 || ($scope.case.children.length === 1 && $scope.case.children[0].children.length ===0));\r
 \r
-      $scope.augModalView = false;\r
 \r
-      $scope.toggleExpandedAugModal = function(){\r
-        $scope.augModalView = !$scope.augModalView;\r
-      };\r
-  });\r
-\r
-  yangui.register.controller('augmentationModalCtrl', ['$scope', function($scope){\r
-    $scope.init = function(node){\r
-      $scope.node = node;\r
-    };\r
-  }]);\r
-\r
-  yangui.register.controller('choiceCtrl', function ($scope, constants) {\r
-    $scope.constants = constants;\r
-    $scope.augModalView = false;\r
-\r
-    $scope.toggleExpandedAugModal = function(){\r
-      $scope.augModalView = !$scope.augModalView;\r
-    };\r
-\r
-    $scope.toggleExpanded = function() {\r
-        $scope.node.expanded = !$scope.node.expanded;\r
-    };\r
-\r
-    $scope.caseShowing = function (node) {\r
-      return !node.augmentationId ? true : $scope.augmentations.getAugmentation(node.parent, node.augmentationId).expanded;\r
-    };\r
-  });\r
-\r
-  yangui.register.controller('rpcCtrl', function ($scope) {\r
-    $scope.toggleExpanded = function() {\r
-        $scope.node.expanded = !$scope.node.expanded;\r
-    };\r
-  });\r
-\r
-  yangui.register.controller('inputCtrl', function ($scope) {\r
-    $scope.augModalView = false;\r
-\r
-    $scope.toggleExpandedAugModal = function(){\r
-      $scope.augModalView = !$scope.augModalView;\r
-    };\r
-\r
-    $scope.toggleExpanded = function() {\r
-        $scope.node.expanded = !$scope.node.expanded;\r
-    };\r
-  });\r
-\r
-  yangui.register.controller('outputCtrl', function ($scope) {\r
-    $scope.augModalView = false;\r
-    $scope.notEditable = true;\r
-\r
-    $scope.toggleExpandedAugModal = function(){\r
-      $scope.augModalView = !$scope.augModalView;\r
-    };\r
-\r
-    $scope.toggleExpanded = function() {\r
-        $scope.node.expanded = !$scope.node.expanded;\r
-    };\r
-  });\r
-\r
-  yangui.register.controller('listCtrl', function ($scope, listFiltering, nodeWrapper) {\r
-      $scope.actElement = null;\r
-      $scope.showModal = false;\r
-      $scope.showListFilter = false;\r
-      $scope.filterListHover = 0;\r
-      $scope.currentDisplayIndex = 1;\r
-      $scope.displayOffsets = [-1, 0, 1];\r
-      $scope.augModalView = false;\r
-\r
-      $scope.toggleExpandedAugModal = function(){\r
-        $scope.augModalView = !$scope.augModalView;\r
-      };\r
 \r
-      $scope.$on('EV_REFRESH_LIST_INDEX', function(event) {\r
-          $scope.currentDisplayIndex = 1;\r
-      });\r
 \r
-      $scope.addListElem = function() {\r
-          $scope.showListFilter = false;\r
-          $scope.showModal = false;\r
-          listFiltering.removeEmptyFilters($scope.node);\r
-          $scope.node.addListElem();\r
-      };\r
 \r
-      $scope.removeListElem = function(elemIndex,fromFilter) {\r
-          $scope.node.removeListElem(elemIndex,fromFilter);\r
-          $scope.preview();\r
-          $scope.currentDisplayIndex = Math.max(Math.min($scope.currentDisplayIndex, $scope.node.listData.length - 2), 1);\r
-      };\r
 \r
-      $scope.toggleExpanded = function() {\r
-          $scope.node.expanded = !$scope.node.expanded;\r
-      };\r
 \r
-      $scope.shiftDisplayNext = function(typeListData) {\r
-          $scope.currentDisplayIndex = Math.min($scope.currentDisplayIndex + 3, $scope.node[typeListData].length - 2);\r
-      };\r
 \r
-      $scope.shiftDisplayPrev = function() {\r
-          $scope.currentDisplayIndex = Math.max($scope.currentDisplayIndex - 3, 1);\r
-      };\r
 \r
-      $scope.showPrevButton = function() {\r
-         return $scope.currentDisplayIndex > 1;\r
-      };\r
 \r
-      $scope.showNextButton = function(typeListData) {\r
-         return $scope.node[typeListData] && $scope.currentDisplayIndex < $scope.node[typeListData].length - 2; //node is selected after view is loaded\r
-      };\r
-\r
-      $scope.showModalWin = function() {\r
-        $scope.showModal = !$scope.showModal;\r
-        if($scope.showListFilter){\r
-            $scope.showListFilter = !$scope.showListFilter;\r
-        }\r
-      };\r
-\r
-      $scope.showListFilterWin = function() {\r
-          $scope.showListFilter = !$scope.showListFilter;\r
-          if($scope.showModal){\r
-              $scope.showModal = !$scope.showModal;\r
-          }\r
-          listFiltering.showListFilterWin($scope.filterRootNode,$scope.node);\r
-      };\r
-\r
-      $scope.getFilterData = function() {\r
-          listFiltering.getFilterData($scope.node);\r
-      };\r
-\r
-      $scope.switchFilter = function(showedFilter) {\r
-         listFiltering.switchFilter($scope.node,showedFilter);\r
-      };\r
-\r
-      $scope.createNewFilter = function() {\r
-         listFiltering.createNewFilter($scope.node);\r
-      };\r
 \r
-      $scope.applyFilter = function() {\r
-          listFiltering.applyFilter($scope.node);\r
-          $scope.showListFilter = !$scope.showListFilter;\r
-          $scope.currentDisplayIndex = 1;\r
-          if($scope.node.filteredListData.length){\r
-            $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.filteredListData,$scope.node.refKey);\r
-          }else{\r
-            $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.listData,$scope.node.refKey);\r
-          }\r
-      };\r
 \r
-      $scope.clearFilterData = function(changeAct, filterForClear, removeFilters) {\r
-        listFiltering.clearFilterData($scope.node,changeAct,filterForClear,removeFilters);\r
-        if(changeAct){\r
-            $scope.showListFilter = !$scope.showListFilter;\r
-        }\r
-        $scope.node.doubleKeyIndexes = nodeWrapper.checkKeyDuplicity($scope.node.listData,$scope.node.refKey);\r
-      };\r
-\r
-      $scope.activeFilter = function(filter) {\r
-        if(filter.active == 1){\r
-            filter.active = 2;\r
-        }else{\r
-            filter.active = 1;\r
-        }\r
-      };\r
-\r
-      $scope.getListName = function(offset, config) {\r
-        var createdListItemName = $scope.node.createListName($scope.currentDisplayIndex + offset);\r
-\r
-        if ( createdListItemName.length > 33 ) {\r
-          return {\r
-            name: createdListItemName.substring(0,30) + '...',\r
-            tooltip: createdListItemName\r
-          };\r
-        } else {\r
-          return {\r
-            name: config ? createdListItemName || '[' + ($scope.currentDisplayIndex + offset) + ']' : createdListItemName,\r
-            tooltip: ''\r
-          };\r
-        }\r
-      };\r
-\r
-  });\r
-\r
-  yangui.register.controller('leafListCtrl', function ($scope) {\r
-\r
-      $scope.addListElem = function() {\r
-          $scope.node.addListElem();\r
-      };\r
-\r
-      $scope.removeListElem = function(elem){\r
-          $scope.node.removeListElem(elem);\r
-      };\r
-\r
-      $scope.changed = function() {\r
-          $scope.preview();\r
-      };\r
-\r
-      $scope.toggleExpanded = function() {\r
-          $scope.node.expanded = !$scope.node.expanded;\r
-      };\r
-\r
-  });\r
-\r
-  yangui.register.controller('typeCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      if($scope.previewVisible) {\r
-        $scope.preview();\r
-      } else {\r
-        $scope.buildRoot();\r
-      }\r
-\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-\r
-  });\r
-\r
-  yangui.register.controller('filterTypeCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-\r
-  });\r
-\r
-  yangui.register.controller('typeEmptyCtrl', function($scope){\r
-    $scope.valueChanged = function(){\r
-      $scope.type.setLeafValue($scope.type.emptyValue);\r
-\r
-      if($scope.previewVisible) {\r
-          $scope.preview();\r
-      } else {\r
-          $scope.buildRoot();\r
-      }\r
-    };\r
-    \r
-  });\r
-\r
-  yangui.register.controller('filterTypeEmptyCtrl', function($scope){\r
-    $scope.valueChanged = function(){\r
-      $scope.type.setLeafValue($scope.type.emptyValue);\r
-    };\r
-    \r
-  });\r
-\r
-  yangui.register.controller('typeEnumCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      var value = $scope.type.selEnum && $scope.type.selEnum.label ? $scope.type.selEnum.label : '';\r
-\r
-      $scope.type.setLeafValue(value);\r
-\r
-      if($scope.previewVisible) {\r
-        $scope.preview();\r
-      } else {\r
-        $scope.buildRoot();\r
-      }\r
-\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-    \r
-  });\r
-\r
-yangui.register.controller('typeBitCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      $scope.type.setLeafValue($scope.type.bitsValues);\r
-\r
-      if($scope.previewVisible) {\r
-        $scope.preview();\r
-      } else {\r
-        $scope.buildRoot();\r
-      }\r
-\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-    \r
-  });\r
-\r
-  yangui.register.controller('filter', function($scope, listFiltering){\r
-    $scope.isFilter = true;\r
-\r
-    $scope.getFilterTypeArray = function(type){\r
-      return listFiltering.getFilterTypeArray(type);\r
-    };\r
-  });\r
-\r
-  yangui.register.controller('filterTypeEnumCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      var value = $scope.type.selEnum && $scope.type.selEnum.label ? $scope.type.selEnum.label : '';\r
-\r
-      $scope.type.setLeafValue(value);\r
-\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-    \r
-  });\r
-\r
-  yangui.register.controller('filterTypeBitCtrl', function($scope){\r
-\r
-    $scope.valueChanged = function(){\r
-      $scope.type.setLeafValue($scope.type.bitsValues,true);\r
-\r
-      $scope.node.checkValueType();\r
-      $scope.node.fill($scope.node.label, $scope.node.value);\r
-    };\r
-    \r
-  });\r
 \r
   yangui.register.filter('onlyConfigStmts', function(nodeUtils){\r
         return function(nodes){\r