<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I was wondering if anyone had an idea for the issue I’m facing (history below),</div><div class=""><br class=""></div><div class="">Kris</div><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 23, 2016, at 12:23 PM, Kris Germann <<a href="mailto:kgermann@portal.net.co" class="">kgermann@portal.net.co</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

    <meta charset="UTF-8" class="">
<div class="">Thanks for your patience Dan, here's the error I'm getting:<br class=""><br class="">/opt/genieacs-gui/app/views/devices/index.csv.erb:6: syntax error, unexpected '(', expecting ')' ...;@output_buffer.append=( @tags(device['_tags']) );@output_b... ... ^ /opt/genieacs-gui/app/views/devices/index.csv.erb:6: syntax error, unexpected ')', expecting keyword_end ...end=( @tags(device['_tags']) );@output_buffer.safe_append='" ... ^<br class=""><br class="">Extracted source (around line #6):<br class=""><br class="">          <br class="">"<%= param_names.keys.join('","').html_safe %>","Last inform"<br class=""><% @devices.each do |device| %><br class="">  "<%= param_names.collect{|k,v| (p = get_param(v, device)).is_a?(String) ? p : p['_value'] rescue ''}.join('","').html_safe %>","<%= @tags(device['_tags'])  %>"<br class=""><% end %><br class=""><br class="">Rails.root: /opt/genieacs-gui<br class=""><br class="">Application Trace | Framework Trace | Full Trace<br class="">app/views/devices/index.csv.erb:6: syntax error, unexpected '(', expecting ')'<br class="">app/views/devices/index.csv.erb:6: syntax error, unexpected ')', expecting keyword_end<br class="">app/controllers/devices_controller.rb:77:in `block in index'<br class="">app/controllers/application_controller.rb:40:in `can?'<br class="">app/controllers/devices_controller.rb:57:in `index'<br class=""><br class=""><blockquote type="cite" class="">
On November 23, 2016 at 11:31 AM Dan Morphis <<a href="mailto:dan@milkcarton.com" class="">dan@milkcarton.com</a>> wrote:<br class=""><br class=""><div dir="ltr" class="">replace <span style="font-size: 12.8px;" class="">tags(device['_tags'])  with @</span><span style="font-size: 12.8px;" class="">tags(device['_tags']) </span></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Nov 23, 2016 at 6:12 AM, Kris Germann <span class=""><<a href="mailto:kgermann@portal.net.co" target="_blank" class="">kgermann@portal.net.co</a>></span> wrote:<br class=""><blockquote class="gmail_quote"><u class=""></u>

    
<div class=""><div class=""><br class="webkit-block-placeholder"></div><p class="">Dan,</p><p class="">I am getting the following error:</p><pre class=""><em class="">undefined method `join' for nil:NilClass<br class=""></em><br class="">Extracted source:<br class=""></pre><div class="m_-5914782217015676642line"><br class=""></div><div class="m_-5914782217015676642line">%>
</div><div class="m_-5914782217015676642line">“<%= param_names.keys.join('","').<wbr class="">html_safe %>","Last inform”</div><div class="m_-5914782217015676642line">  <% @devices.each do |device| %>
</div><div class="m_-5914782217015676642line m_-5914782217015676642active">“<%= param_names.collect{|k,v| (p = get_param(v, device)).is_a?(String) ? p : p['_value'] rescue ''}.join('","').html_safe %>","<%= tags(device['_tags']) %>”</div><div class="m_-5914782217015676642line">  <% end %>
</div><div class="m_-5914782217015676642line"><br class=""></div><div class="m_-5914782217015676642line">Note I have removed the portion to sort by last inform, I only wish to sort by tags.</div><span class="HOEnZb"><font color="#888888" class=""><div class="m_-5914782217015676642line"><br class=""></div><div class="m_-5914782217015676642line">Kris</div></font></span><div class=""><div class="h5"><p class=""> <br class=""></p><blockquote type="cite" class="">On November 22, 2016 at 5:20 PM Dan Morphis <<a href="mailto:dan@milkcarton.com" target="_blank" class="">dan@milkcarton.com</a>> wrote:<br class=""><br class=""><div dir="ltr" class="">I haven't tried it, but try putting this at the end of the 6th line in genieacs-gui/app/views/<wbr class="">devices/index.csv.erb:<div class="">,"<%= tags(device['_tags']) %>"<br class=""></div><div class=""><br class=""></div><div class="">This to your genieacs-gui/config/parameter_<wbr class="">renderers.yml file:</div><div class="">_tags: tags<br class=""></div><div class=""><br class=""></div><div class="">and create this file: genieacs-gui/config/parameter_<wbr class="">renderers/tags.rb:</div><div class=""><div class="">def tags(val)</div><div class="">  val.join(", ")</div><div class="">end</div></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="m_-5914782217015676642ox-9393e993e4-gmail_extra"><br class=""><div class="m_-5914782217015676642ox-9393e993e4-gmail_quote">On Tue, Nov 22, 2016 at 6:25 AM, Kris Germann <<a href="mailto:kgermann@portal.net.co" target="_blank" class="">kgermann@portal.net.co</a>> wrote:<br class=""><blockquote class=""><u class=""></u><div class=""><p class="">I'd like to add a tag field to the CSV export and sort by that by default... is this possible?</p><p class="">I am building a reporting mechanism for new additions for some of my wholesalers that use my ACS and this would be quite useful.</p><p class="">Kris</p></div><br class="">______________________________<wbr class="">_________________<br class=""> Users mailing list<br class=""> <a href="mailto:Users@lists.genieacs.com" target="_blank" class="">Users@lists.genieacs.com</a><br class=""> <a href="http://lists.genieacs.com/mailman/listinfo/users" target="_blank" class="">http://lists.genieacs.com/mail<wbr class="">man/listinfo/users</a><br class=""> <br class=""></blockquote></div><br class=""></div>______________________________<wbr class="">_________________<br class="">Users mailing list<br class=""><a href="mailto:Users@lists.genieacs.com" target="_blank" class="">Users@lists.genieacs.com</a><br class=""><a href="http://lists.genieacs.com/mailman/listinfo/users" target="_blank" class="">http://lists.genieacs.com/<wbr class="">mailman/listinfo/users</a><br class=""></blockquote></div></div></div>
 
</blockquote></div><br class=""></div>
</blockquote>
<br class=""> </div>
 </div></blockquote></div><br class=""></body></html>