From d182202fc6001983541504ed323d68479086317e Mon Sep 17 00:00:00 2001 From: WuKong Date: Sat, 22 Apr 2017 13:25:07 +0200 Subject: add moonv4 Change-Id: I247af788d0b0fb961fbc85416486b241eb1d807c Signed-off-by: WuKong --- .../action/mapping/metarules-add.tpl.html | 50 +++++ .../action/mapping/metarules-map.tpl.html | 102 +++++++++ .../action/mapping/metarules-unmap.tpl.html | 35 +++ .../action/mapping/metarules.controller.add.js | 99 +++++++++ .../action/mapping/metarules.map.controller.js | 213 ++++++++++++++++++ .../action/mapping/metarules.unmap.controller.js | 74 +++++++ .../metarules/action/metarules-edit-basic.tpl.html | 67 ++++++ .../edit/metarules/action/metarules-edit.tpl.html | 62 ++++++ .../metarules/action/metarules.controller.edit.js | 49 +++++ .../metarules/action/metarules.edit.basic.dir.js | 98 +++++++++ .../model/edit/metarules/metarules-list.tpl.html | 149 +++++++++++++ .../app/model/edit/metarules/metarules.list.dir.js | 237 +++++++++++++++++++++ 12 files changed, 1235 insertions(+) create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-add.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-map.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-unmap.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.controller.add.js create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.map.controller.js create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.unmap.controller.js create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit-basic.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html create mode 100644 moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js (limited to 'moonv4/moon_gui/static/app/model/edit/metarules') diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-add.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-add.tpl.html new file mode 100644 index 00000000..a721e6d0 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-add.tpl.html @@ -0,0 +1,50 @@ +
+ +
+ +
+ + + +
+ + + +
+ Name is required +
+ +
+
+ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + + + Create + + + + +
+ +
+ +
+
+ +
diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-map.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-map.tpl.html new file mode 100644 index 00000000..1830204b --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-map.tpl.html @@ -0,0 +1,102 @@ + diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-unmap.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-unmap.tpl.html new file mode 100644 index 00000000..bb02aba2 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules-unmap.tpl.html @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.controller.add.js b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.controller.add.js new file mode 100644 index 00000000..a95951fa --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.controller.add.js @@ -0,0 +1,99 @@ +(function() { + + 'use strict'; + + angular + .module('moon') + .directive('moonMetaRulesAdd', moonMetaRulesAdd); + + moonMetaRulesAdd.$inject = []; + + function moonMetaRulesAdd() { + + return { + templateUrl : 'html/model/edit/metarules/action/mapping/metarules-add.tpl.html', + bindToController : true, + controller : moonMetaRulesAddController, + controllerAs : 'add', + scope : { + metaRules : '=' + }, + restrict : 'E', + replace : true + }; + } + + + angular + .module('moon') + .controller('moonMetaRulesAddController', moonMetaRulesAddController); + + moonMetaRulesAddController.$inject = ['$scope', 'metaRuleService', 'alertService', '$translate', 'formService', 'utilService']; + + function moonMetaRulesAddController($scope, metaRuleService, alertService, $translate, formService, utilService) { + + var add = this; + + /* + * + */ + + add.laoading = false; + + add.form = {}; + + add.metaRule = { name: null, description: null, subject_categories : [], object_categories : [], action_categories : [] }; + + add.create = createMetaRule; + + activate(); + + function activate(){ + + } + + function createMetaRule() { + + if(formService.isInvalid(add.form)) { + + formService.checkFieldsValidity(add.form); + + } else { + + add.loading = true; + + metaRuleService.data.create({}, add.metaRule, createSuccess, createError); + + } + + function createSuccess(data) { + + var createdMetaRule = utilService.transformOne(data, 'meta_rules'); + + $translate('moon.model.metarules.add.success', { metaRuleName: createdMetaRule.name }).then(function (translatedValue) { + alertService.alertSuccess(translatedValue); + }); + + add.loading = false; + + $scope.$emit('event:metaRuleCreatedSuccess', createdMetaRule); + + } + + function createError(reason) { + + $translate('moon.model.metarules.add.error', { metaRuleName: add.metaRule.name }).then(function (translatedValue) { + alertService.alertError(translatedValue); + }); + + add.loading = false; + + $scope.$emit('event:metaRuleCreatedError', add.project); + + } + + } + + } + +})(); diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.map.controller.js b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.map.controller.js new file mode 100644 index 00000000..cf9ba06c --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.map.controller.js @@ -0,0 +1,213 @@ +(function() { + + 'use strict'; + + angular + .module('moon') + .controller('moonMetaRulesMapController', moonMetaRulesMapController); + + moonMetaRulesMapController.$inject = ['$scope', '$rootScope', 'alertService', '$translate', 'formService', 'metaRuleService', 'modelService', 'utilService']; + + function moonMetaRulesMapController($scope, $rootScope, alertService, $translate, formService, metaRuleService, modelService, utilService ) { + + var map = this; + + /* + * + */ + + map.metaRules = []; + + map.model = $scope.model; + + map.addMetaRuleToList = false; + + map.mapToModel = mapToModel; + + map.deleteMetaRule = deleteMetaRule; + + activate(); + + function activate() { + + resolveMetaRules(); + + } + + /* + * ---- events + */ + var rootListeners = { + + 'event:metaRuleCreatedSuccess': $rootScope.$on('event:metaRuleCreatedSuccess', metaRuleCreatedSuccess), + 'event:metaRuleCreatedError': $rootScope.$on('event:metaRuleCreatedError', metaRuleCreatedError) + + }; + + for (var unbind in rootListeners) { + $scope.$on('$destroy', rootListeners[unbind]); + } + + + /* + * + */ + + function resolveMetaRules() { + + map.metaRulesLoading = true; + + metaRuleService.findAllWithCallback( + function(metaRules){ + map.metaRules = metaRules; + map.metaRulesLoading = false; + } + ); + + } + + function mapToModel() { + + if (formService.isInvalid(map.form)) { + + formService.checkFieldsValidity(map.form); + + } else { + + map.mappingLoading = true; + + var modelToSend = angular.copy(map.model); + + modelToSend.meta_rules.push(map.selectedMetaRule.id); + + modelService.update(modelToSend, mapSuccess, mapError); + + } + + function mapSuccess(data) { + + var modelReceived = utilService.transformOne(data, 'models'); + + metaRuleService.findSomeWithMetaData(modelReceived.meta_rules).then(function(metaRules){ + + modelReceived.meta_rules_values = metaRules; + + $translate('moon.model.metarules.map.success', { + + modelName: modelReceived.name, + metaRuleName: map.selectedMetaRule.name + + }).then(function (translatedValue) { + + alertService.alertSuccess(translatedValue); + + }); + + map.mappingLoading = false; + + $scope.$emit('event:metaRuleMapToModelSuccess', modelReceived); + + }); + + } + + function mapError(response) { + + $translate('moon.model.metarules.map.error', { + + modelName: map.model.name, + metaRuleName: map.selectedMetaRule.name + + }).then(function (translatedValue) { + + alertService.alertError(translatedValue); + + }); + + map.mappingLoading = false; + + } + } + + function cleanSelectedValue(){ + + delete map.selectedMetaRule; + + } + + + function deleteMetaRule(){ + + if(!map.selectedMetaRule){ + + return; + + } + + map.mappingLoading = true; + + var metaRuleTodelete = angular.copy(map.selectedMetaRule); + + metaRuleService.delete(metaRuleTodelete, deleteSuccess, deleteError); + + function deleteSuccess(data) { + + $translate('moon.model.metarules.delete.success', { metaRuleName: metaRuleTodelete.name }).then(function (translatedValue) { + alertService.alertSuccess(translatedValue); + }); + + cleanSelectedValue(); + + map.mappingLoading = false; + + resolveMetaRules(); + + // later this event will have to be catch, because the model can use the deleted MetaRule + $scope.$emit('event:deleteMetaRule', metaRuleTodelete); + + } + + function deleteError(reason) { + + $translate('moon.model.metarules.delete.error', { metaRuleName: metaRuleTodelete.name }).then(function (translatedValue) { + alertService.alertError(translatedValue); + }); + + map.mappingLoading = false; + + } + } + + + + + + + /** + * This function will add a metaRule to the current list of metaRules + * @param event + * @param metaRule {...} metaRule to add + */ + function metaRuleCreatedSuccess(event, metaRule) { + + map.metaRules.push(metaRule); + showList(); + + } + + /** + * This function hide the add MetaRule Modal + * @param event + */ + function metaRuleCreatedError(event) { + + } + + function showList(){ + map.addMetaRuleToList = false; + } + + } + + +})(); \ No newline at end of file diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.unmap.controller.js b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.unmap.controller.js new file mode 100644 index 00000000..30f32d51 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/mapping/metarules.unmap.controller.js @@ -0,0 +1,74 @@ +/** + * @author arnaud marhin + */ + +(function() { + + 'use strict'; + + angular + .module('moon') + .controller('MetaRulesUnMapController', MetaRulesUnMapController); + + MetaRulesUnMapController.$inject = ['$scope', '$translate', 'alertService', 'modelService']; + + function MetaRulesUnMapController($scope, $translate, alertService, modelService) { + + var unmap = this; + + /* + * + */ + + unmap.model = $scope.model; + unmap.metaRule = $scope.metaRule; + + unmap.unMappingLoading = false; + + unmap.unmap = unMapModelToMetaRule; + + /* + * + */ + + function unMapModelToMetaRule() { + + unmap.unMappingLoading = true; + + var modelToUpdate = angular.copy(unmap.model); + + modelToUpdate.meta_rules = _.without(modelToUpdate.meta_rules, unmap.metaRule.id); + + modelService.update(modelToUpdate, unMapSuccess, unMapError); + + function unMapSuccess(data) { + + $translate('moon.model.metarules.unmap.success', { modelName: unmap.model.name, metaRuleName: unmap.metaRule.name }) + .then(function (translatedValue) { + alertService.alertSuccess(translatedValue); + }); + + unmap.unMappingLoading = false; + + $scope.$emit('event:metaRuleUnMappedToModelSuccess', modelToUpdate); + + } + + function unMapError(reason) { + + $translate('moon.model.metarules.unmap.error', { modelName: unmap.model.name, metaRuleName: unmap.metaRule.name }) + .then(function (translatedValue) { + alertService.alertError(translatedValue); + }); + + unmap.unMappingLoading = false; + + $scope.$emit('event:metaRuleUnMappedToModelError'); + + } + + } + + } + +})(); diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit-basic.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit-basic.tpl.html new file mode 100644 index 00000000..b6136195 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit-basic.tpl.html @@ -0,0 +1,67 @@ +
+ +
+ +
+ + + +
+ + + +
+ +
+ +
+ + + +
+ + + +
+ Name is required +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ + + Init + + +
+ +
+ + + + Update + + + + +
+ +
+ +
+ +
\ No newline at end of file diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit.tpl.html new file mode 100644 index 00000000..7b074448 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules-edit.tpl.html @@ -0,0 +1,62 @@ + diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js new file mode 100644 index 00000000..b2ebc45d --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js @@ -0,0 +1,49 @@ +(function() { + + 'use strict'; + + angular + .module('moon') + .controller('MetaRulesEditController', MetaRulesEditController); + + MetaRulesEditController.$inject = ['$scope', '$rootScope']; + + function MetaRulesEditController($scope, $rootScope) { + + var edit = this; + + edit.metaRule = $scope.metaRule; + + activate(); + + function activate(){ + } + + + /* + * ---- events + */ + var rootListeners = { + + 'event:metaRuleBasicUpdatedSuccess': $rootScope.$on('event:metaRuleBasicUpdatedSuccess', metaRuleUpdatedSuccess) + + }; + + for (var unbind in rootListeners) { + $scope.$on('$destroy', rootListeners[unbind]); + } + + /** + * When the MetaRule is updated, this function refresh the current metaRule with the new changes + * @param event + * @param metaRule + */ + function metaRuleUpdatedSuccess(event, metaRule){ + + edit.metaRule = metaRule; + + } + + } + +})(); diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js new file mode 100644 index 00000000..603e7a33 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js @@ -0,0 +1,98 @@ +(function() { + + 'use strict'; + + angular + .module('moon') + .directive('moonMetaRulesEditBasic', moonMetaRulesEditBasic); + + moonMetaRulesEditBasic.$inject = []; + + function moonMetaRulesEditBasic() { + + return { + templateUrl : 'html/model/edit/metarules/action/metarules-edit-basic.tpl.html', + bindToController : true, + controller : moonMetaRulesEditBasicController, + controllerAs : 'edit', + scope : { + metaRule : '=' + }, + restrict : 'E', + replace : true + }; + + } + + angular + .module('moon') + .controller('moonMetaRulesEditBasicController', moonMetaRulesEditBasicController); + + moonMetaRulesEditBasicController.$inject = ['$scope', 'metaRuleService', 'formService', 'alertService', '$translate', 'utilService']; + + function moonMetaRulesEditBasicController($scope, metaRuleService, formService, alertService, $translate, utilService){ + + var edit = this; + + edit.editMetaRule = editMetaRule; + edit.init = init; + + edit.form = {}; + + activate(); + + function activate(){ + + edit.metaRule = $scope.edit.metaRule; + + edit.metaRuleToEdit = angular.copy(edit.metaRule); + + } + + function editMetaRule(){ + + if(formService.isInvalid(edit.form)) { + + formService.checkFieldsValidity(edit.form); + + }else{ + + edit.loading = true; + + metaRuleService.update(edit.metaRuleToEdit, updateSuccess, updateError); + + } + + function updateSuccess(data) { + + var updatedMetaRule = utilService.transformOne(data, 'meta_rules'); + + $translate('moon.model.metarules.edit.basic.success', { metaRuleName: updatedMetaRule.name }).then( function(translatedValue) { + alertService.alertSuccess(translatedValue); + }); + + edit.loading = false; + + $scope.$emit('event:metaRuleBasicUpdatedSuccess', updatedMetaRule); + + } + + function updateError(reason) { + + $translate('moon.model.edit.basic.error', { metaRuleName: edit.metaRule.name }).then( function(translatedValue) { + alertService.alertError(translatedValue); + }); + + edit.loading = false; + + } + } + + function init(){ + + edit.metaRuleToEdit = angular.copy(edit.metaRule); + + } + } + +})(); diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html new file mode 100644 index 00000000..c36700ff --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html @@ -0,0 +1,149 @@ +
+ +
+ +

List of Meta Rules

+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Name
+
+
Description
+
+
Number of Subjects
+
+
Number of Subjects
+
+
Number of Actions
+
+
Actions
+
There is no Meta Rules
+ +
+ + + +
+ + + +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js b/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js new file mode 100644 index 00000000..8fba0266 --- /dev/null +++ b/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js @@ -0,0 +1,237 @@ +(function() { + + 'use strict'; + + angular + .module('moon') + .directive('moonMetaRulesList', moonMetaRulesList); + + moonMetaRulesList.$inject = []; + + function moonMetaRulesList() { + + return { + templateUrl : 'html/model/edit/metarules/metarules-list.tpl.html', + bindToController : true, + controller : moonMetaRulesListController, + controllerAs : 'list', + scope : { + // if edit and delete possibilities are displayed + // Value are True or False + editMode : '=', + mappedModel : '=' + }, + restrict : 'E', + replace : true + }; + } + + angular + .module('moon') + .controller('moonMetaRulesListController', moonMetaRulesListController); + + moonMetaRulesListController.$inject = ['$scope', '$rootScope', 'NgTableParams', '$filter', '$modal', 'metaRuleService']; + + function moonMetaRulesListController($scope, $rootScope, NgTableParams, $filter, $modal, metaRuleService ){ + + var list = this; + + list.table = {}; + + list.editMode = $scope.list.editMode; + list.model = $scope.list.mappedModel; + list.metaRules = list.model.meta_rules_values; + + list.getMetaRules = getMetaRules; + list.hasMetaRules = hasMetaRules; + list.showDetail = showDetail; + list.getSubjectList = getSubjectList; + list.getObjectList = getObjectList; + list.getActionlist = getActionlist; + list.getShowDetailValue = getShowDetailValue; + + list.showDetailValue = false; + + list.subject_list = []; + list.object_list = []; + list.action_list = []; + + list.edit = { modal: $modal({ template: 'html/model/edit/metarules/action/metarules-edit.tpl.html', show: false }), + showModal: showEditModal }; + + list.map = { modal: $modal({ template: 'html/model/edit/metarules/action/mapping/metarules-map.tpl.html', show: false }), + showModal: showMapModal }; + + list.unmap = { modal: $modal({ template: 'html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html', show: false }), + showModal: showUnmapModal }; + + activate(); + + function activate(){ + + newMetaRulesTable(); + + } + + /* + * ---- events + */ + var rootListeners = { + + 'event:metaRuleMapToModelSuccess': $rootScope.$on('event:metaRuleMapToModelSuccess', updateModelFromMapSuccess), + + 'event:metaRuleUnMappedToModelSuccess': $rootScope.$on('event:metaRuleUnMappedToModelSuccess', modelUnmappedSuccess), + 'event:metaRuleUnMappedToModelError': $rootScope.$on('event:metaRuleUnMappedToModelError', modelUnmappedError) + + }; + + for (var unbind in rootListeners) { + $scope.$on('$destroy', rootListeners[unbind]); + } + + + + function newMetaRulesTable() { + + list.table = new NgTableParams({ + + page: 1, // show first page + count: 10, // count per page + sorting: { + name: 'asc' // initial sorting + } + + }, { + + total: function () { return list.getMetaRules().length; }, // length of data + getData: function($defer, params) { + + var orderedData = params.sorting() ? $filter('orderBy')(list.getMetaRules(), params.orderBy()) : list.getMetaRules(); + $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); + + }, + $scope: { $data: {} } + + }); + + return list.table; + + } + + /** + * If the directive is not in editMode and displaying MetaData Content, if the editMode change to true, MetaData Content need to be hidden + */ + $scope.$watch('list.editMode', function(newValue, oldValue){ + list.showDetailValue = false; + }); + + function getMetaRules() { + return (list.metaRules) ? list.metaRules : []; + } + + function hasMetaRules() { + return list.getMetaRules().length > 0; + } + + function showDetail(aMetaRule){ + + if(aMetaRule.id === getShowDetailValue().id){ + + list.showDetailValue = false; + list.subject_list = []; + list.object_list = []; + list.action_list = []; + + }else{ + + list.subject_list = aMetaRule.subject_categories_values; + list.object_list = aMetaRule.object_categories_values; + list.action_list = aMetaRule.action_categories_values; + list.showDetailValue = aMetaRule; + + } + + } + + function showEditModal(aMetaRule) { + list.edit.modal.$scope.metaRule = aMetaRule; + list.edit.modal.$promise.then(list.edit.modal.show); + } + + function getShowDetailValue(){ + return list.showDetailValue; + } + + function getSubjectList(){ + return list.subject_list; + } + + function getObjectList(){ + return list.object_list; + } + + function getActionlist(){ + return list.action_list; + } + + /* + * ---- add + */ + function showMapModal() { + list.map.modal.$scope.model = list.model; + list.map.modal.$promise.then(list.map.modal.show); + } + + function refreshRules(){ + + list.metaRules = list.model.meta_rules_values; + list.table.total(list.getMetaRules().length); + list.table.reload(); + + } + + function updateModelFromMapSuccess(event, model){ + + list.model = model; + + refreshRules(); + + list.map.modal.hide(); + + } + + /* + * ---- unmap + */ + + function showUnmapModal(metaRule) { + + list.unmap.modal.$scope.model = list.model; + list.unmap.modal.$scope.metaRule = metaRule; + list.unmap.modal.$promise.then(list.unmap.modal.show); + + } + + function modelUnmappedSuccess(event, model) { + + list.model = model; + + metaRuleService.findSomeWithCallback(list.model.meta_rules, function(meta_rules){ + + list.model.meta_rules_values = meta_rules; + refreshRules(); + list.unmap.modal.hide(); + + }); + + + + } + + function modelUnmappedError(event) { + list.unmap.modal.hide(); + } + + } + +})(); -- cgit 1.2.3-korg