Dan,

I am getting the following error:

undefined method `join' for nil:NilClass

Extracted source:

%>
“<%= param_names.keys.join('","').html_safe %>","Last inform”
<% @devices.each do |device| %>
“<%= param_names.collect{|k,v| (p = get_param(v, device)).is_a?(String) ? p : p['_value'] rescue ''}.join('","').html_safe %>","<%= tags(device['_tags']) %>”
<% end %>

Note I have removed the portion to sort by last inform, I only wish to sort by tags.

Kris

 

On November 22, 2016 at 5:20 PM Dan Morphis <[email protected]> wrote:

I haven't tried it, but try putting this at the end of the 6th line in genieacs-gui/app/views/devices/index.csv.erb:
,"<%= tags(device['_tags']) %>"

This to your genieacs-gui/config/parameter_renderers.yml file:
_tags: tags

and create this file: genieacs-gui/config/parameter_renderers/tags.rb:
def tags(val)
  val.join(", ")
end



On Tue, Nov 22, 2016 at 6:25 AM, Kris Germann <[email protected]> wrote:

I'd like to add a tag field to the CSV export and sort by that by default... is this possible?

I am building a reporting mechanism for new additions for some of my wholesalers that use my ACS and this would be quite useful.

Kris


_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to