Merge "Fix template generated by Template Generator"
This commit is contained in:
commit
ecfa725666
@ -128,7 +128,7 @@
|
||||
connected_options[property] = [];
|
||||
}
|
||||
connected_options[property].push({
|
||||
value: hotgenUtils.get_resource_string(hotgenStates.get_label_by_uuid(node.id)),
|
||||
value: { 'get_resource': hotgenStates.get_label_by_uuid(node.id) },
|
||||
id: node.id,
|
||||
resource_type: node.title,
|
||||
edge: edge
|
||||
|
@ -131,7 +131,7 @@
|
||||
var output_key = resource_name + '_' + output_detail[idx].property;
|
||||
outputs_root[output_key] = {
|
||||
description: 'The ' + output_detail[idx].property + ' of ' + resource_name +'.',
|
||||
value: '{ get_attr: ['+resource_name+', '+output_detail[idx].property+'] }',
|
||||
value: { 'get_attr': [resource_name, output_detail[idx].property] },
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -94,9 +94,6 @@
|
||||
}
|
||||
}])
|
||||
.factory('hotgenUtils', function(){
|
||||
var get_resource_string = function(identity){
|
||||
return '{ get_resource: '+identity+' }';
|
||||
}
|
||||
var filter_and_return_get_resource_element = function(array, property){
|
||||
var return_val = [];
|
||||
var idx = array.length-1;
|
||||
@ -201,7 +198,8 @@
|
||||
}
|
||||
var strip_property = function check_property(resource_data, property){
|
||||
|
||||
if (resource_data[property] == null || resource_data[property] == ''){
|
||||
// remove empty properties or private Angular properties (start with $$)
|
||||
if (resource_data[property] == null || resource_data[property] == '' || property.lastIndexOf("$$",0) === 0){
|
||||
delete resource_data[property];
|
||||
} else if (resource_data[property].constructor && resource_data[property].constructor == Object){
|
||||
extract_dict(resource_data[property]);
|
||||
@ -217,7 +215,6 @@
|
||||
}
|
||||
|
||||
return {
|
||||
get_resource_string: get_resource_string,
|
||||
escape_characters: escape_characters,
|
||||
extract_keyvalue: extract_keyvalue,
|
||||
extract_list_of_keyvalue: extract_list_of_keyvalue,
|
||||
|
@ -169,12 +169,6 @@
|
||||
expect(hotgenUtils).toBeDefined();
|
||||
});
|
||||
|
||||
it('should return string contains get_resource', function(){
|
||||
var returnValue = hotgenUtils.get_resource_string('identity');
|
||||
|
||||
expect(returnValue).toEqual('{ get_resource: identity }');
|
||||
});
|
||||
|
||||
it('should filter elements', function(){
|
||||
var property = 'name';
|
||||
var array = ['ignore me', 1, '{ get_resource: find me }',
|
||||
|
Loading…
Reference in New Issue
Block a user