Display certain parameters value in show device

Dan Morphis dan at milkcarton.com
Fri May 22 11:46:00 EDT 2015


The better way is to add guard code around the add firmware link. Check that the oui, productClass and softwareVersion hash entries aren't nil before trying to use them.

I won't be back at the office for a week. You can delete the offending lines for now so you can move forward, or try and add the guard code yourself. When I get back late next week I will submit a fix for the issue. 

-dan

> On May 22, 2015, at 6:15 AM, Fabien Bazille <fab.baz22 at gmail.com> wrote:
> 
> Thanks you very much Dan, it's working very well.
> 
> The last issue I'm trying to solve is a workaround into the show.html.erb to exclude all the device with an id containing "*SIP*" the display of the button add firmware who make bugs with the SIP Phone I'm using.
> 
> 
> Thanks you for your time Dan
> Best regards,
> 
> Fabien B 
> 
> 2015-05-22 15:39 GMT+02:00 Dan Morphis <dan at milkcarton.com>:
>> Look at device_parameters.yml in the gui config. parameters.json is in the cwmp config. Make sure you restart the cwmp and NBI process after you make changes to the parameters.json file. And to restart the gui after changing the device_parameters.yml file.
>> 
>> -dan
>> 
>> > On May 22, 2015, at 4:55 AM, Fabien Bazille <fab.baz22 at gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I would like to display some values on the show device page, I managed to display them on the index page, but i think the problem should be in the parameter.json.
>> >
>> > Parameter.json:
>> >
>> >  "InternetGatewayDevice.WANDevice./^\\d+$/.WANConnectionDevice./^\\d+$/.WANIPConnection./^\\d+$/.MACAddress" : {"alias" : "summary.mac", "type" : "mac"},
>> >
>> >   "InternetGatewayDevice.WANDevice./^\\d+$/.WANConnectionDevice./^\\d+$/.WANPPPConnection./^\\d+$/.ExternalIPAddress" : {"alias" : "summary.ip"},
>> >
>> >   "InternetGatewayDevice.LANDevice./^\\d+$/.WLANConfiguration./^\\d+$/.SSID" : {"alias" : "summary.wlanSsid"},
>> >
>> >   "InternetGatewayDevice.LANDevice./^\\d+$/.WLANConfiguration./^\\d+$/.PreSharedKey./^\\d+$/.KeyPassphrase" : {"alias" : "summary.wlanPassphrase"},
>> >
>> >  "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.DownstreamAttenuation" : {"alias" : "summary.DownstreamAttenuation"},
>> >
>> >  "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.UpstreamAttenuation" : {"alias" : "summary.UpstreamAttenuation"},
>> >
>> >  "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.DownstreamNoiseMargin" : {"alias" : "summary.DownstreamNoiseMargin"},
>> >
>> > "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.UpstreamNoiseMargin" : {"alias" : "summary.UpstreamNoiseMargin"},
>> >
>> >  "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.DownstreamCurrRate" : {"alias" : "summary.DownstreamCurrRate"},
>> >    "InternetGatewayDevice.WANDevice./^\\d+$/.WANDSLInterfaceConfig.UpstreamCurrRate" : {"alias" : "summary.UpstreamCurrRate"},
>> >
>> > I think it's the show.html.erb in the div summary who cause my trouble:
>> >
>> > <div class="summary">
>> > <% for k,v in Rails.configuration.summary_parameters %>
>> >   <% if v.is_a?(String) %>
>> >   <p>
>> >     <strong><%= k %>:</strong>
>> >     <%= param_value(v, @device) %>
>> >     <% if (p = get_param(v, @device)) != nil and p['_writable'] and can_edit_parameters %>
>> >     —
>> >     <% options = Rails.configuration.parameters_edit[p['_path'].gsub(/\.\d+\./, '..')] %>
>> >     <a href="#" onclick='editParam("<%= v %>", "<%= p['_type'] %>", <%= p['_value'].to_json.html_safe %>, <%= options.to_json.html_safe %>);return false;'>Edit</a>
>> >     <% end %>
>> >   </p>
>> >   <% else %>
>> >     <h2><%= k %></h2>
>> >     <%= render partial: 'object_table', locals: {params: v} %>
>> >   <% end %>
>> > <% end %>
>> > </div>
>> >
>> > If you have an advice, i'll take it.
>> >
>> > Thanks for your time
>> > Regards,
>> >
>> > Fabien B
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.genieacs.com
>> > http://lists.genieacs.com/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> Users at lists.genieacs.com
>> http://lists.genieacs.com/mailman/listinfo/users
> 
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20150522/6891fc7b/attachment.html>


More information about the Users mailing list