custom fields on devices and ports in the web from config (#945)
* custom device field web display and edit * make display work; relies on T::T calling dict slot or method with same syntax * add storing port custom fields * use resultset method instead, use cf_ prefix * update Pg min ver for jsonb * allow override of position and default for port custom fields * support hidden for custom fields * update description of Objects API class * allow left and mid position for custom fields * add custom fields in csv * change port control sidebar label * fix default missing bug on backend jobs
This commit is contained in:
@@ -79,14 +79,25 @@
|
||||
<tr>
|
||||
<td>
|
||||
[% config.label | html_entity %]
|
||||
</td>
|
||||
<td>
|
||||
[% TRY %]
|
||||
[% INCLUDE "plugin/${config.name}/device_details.tt" %]
|
||||
[% CATCH %]
|
||||
<!-- dummy content required by Template Toolkit TRY -->
|
||||
[% IF config.editable AND user_can_port_control %]
|
||||
<i class="icon-edit nd_edit-icon nd_device-details-edit"></i>
|
||||
[% END %]
|
||||
</td>
|
||||
[% TRY %]
|
||||
<td>
|
||||
[% INCLUDE "plugin/${config.name}/device_details.tt" %]
|
||||
</td>
|
||||
[% CATCH %]
|
||||
[% CLEAR %]
|
||||
[% IF config.editable AND user_can_port_control %]
|
||||
<td class="nd_editable-cell" contenteditable="true"
|
||||
data-field="[% config.field | html_entity %]" data-for-device="[% d.ip | html_entity %]">
|
||||
[% ELSE %]
|
||||
<td>
|
||||
[% END %]
|
||||
[% d.${config.field} | html_entity %]
|
||||
</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user