Plugins can have CSS and Javascript loaded within <head>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
|
||||
<td>
|
||||
[% TRY %]
|
||||
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
|
||||
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
||||
[% CATCH %]
|
||||
<!-- dummy content required by Template Toolkit TRY -->
|
||||
[% END %]
|
||||
@@ -43,13 +43,13 @@
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
[% IF row.up_admin == 'up' %]
|
||||
<td nowrap class="nd_editable-cell" data-action="down"
|
||||
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
<i class="icon-hand-down nd_hand-icon"
|
||||
rel="tooltip" data-placement="top" data-offset="3"
|
||||
data-animation="" data-title="Click to Disable"></i>
|
||||
[% ELSE %]
|
||||
<td nowrap class="nd_editable-cell" data-action="up"
|
||||
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
<i class="icon-hand-up nd_hand-icon"
|
||||
rel="tooltip" data-placement="top" data-offset="3"
|
||||
data-animation="" data-title="Click to Enable"></i>
|
||||
@@ -66,13 +66,9 @@
|
||||
[% FOREACH config IN settings._extra_device_port_cols %]
|
||||
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
|
||||
<td>
|
||||
[% TRY %]
|
||||
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
|
||||
[% CATCH %]
|
||||
<!-- dummy content required by Template Toolkit TRY -->
|
||||
[% END %]
|
||||
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
||||
</td>
|
||||
[% END %]
|
||||
[% END -%]
|
||||
|
||||
[% IF params.c_descr %]
|
||||
<td nowrap>[% row.descr | html_entity %]</td>
|
||||
@@ -97,7 +93,7 @@
|
||||
[% IF params.c_name %]
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
<td nowrap class="nd_editable-cell" contenteditable="true"
|
||||
data-field="c_name" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
<i class="icon-edit nd_edit-icon"></i>
|
||||
[% ELSE %]
|
||||
<td nowrap>
|
||||
@@ -123,7 +119,7 @@
|
||||
[% IF params.c_vlan %]
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
<td class="nd_editable-cell" contenteditable="true"
|
||||
data-field="c_vlan" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
data-field="c_vlan" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||
<i class="icon-edit nd_edit-icon"></i>
|
||||
<div class="nd_editable-cell-content">
|
||||
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
|
||||
@@ -164,7 +160,7 @@
|
||||
[% IF row.power.admin == 'true' %]
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
<td nowrap data-action="false"
|
||||
data-field="c_power" data-for-device="[% device | html_entity %]"
|
||||
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
|
||||
data-for-port="[% row.port | html_entity %]">
|
||||
|
||||
<i class="icon-off nd_power-icon nd_power-on"
|
||||
@@ -184,7 +180,7 @@
|
||||
[% ELSE %]
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
<td nowrap data-action="true"
|
||||
data-field="c_power" data-for-device="[% device | html_entity %]"
|
||||
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
|
||||
data-for-port="[% row.port | html_entity %]">
|
||||
|
||||
<i class="icon-off nd_power-icon"
|
||||
@@ -256,7 +252,7 @@
|
||||
[% NEXT UNLESS config.position == 'right' AND params.${config.name} %]
|
||||
<td>
|
||||
[% TRY %]
|
||||
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
|
||||
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
|
||||
[% CATCH %]
|
||||
<!-- dummy content required by Template Toolkit TRY -->
|
||||
[% END %]
|
||||
|
||||
@@ -17,26 +17,34 @@
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-history.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-deserialize.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery.qtip.min.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/d3.min.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/toastr.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var uri_base = '[% uri_base %]';
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/netdisco.js"></script>
|
||||
|
||||
[% IF vars.user.port_control %]
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/toastr.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/netdisco_portcontrol.js"></script>
|
||||
[% END %]
|
||||
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/toastr.css"/>
|
||||
[% FOREACH add_js IN settings._additional_javascript %]
|
||||
<script type="text/javascript" src="[% uri_base %]/plugin/[% add_js %]/[% add_js %].js"></script>
|
||||
[% END %]
|
||||
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/jquery.qtip.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/smoothness/jquery-ui.custom.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/toastr.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/netdisco.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/nd_print.css" media="print"/>
|
||||
|
||||
[% FOREACH add_css IN settings._additional_css %]
|
||||
<link rel="stylesheet" href="[% uri_base %]/plugin/[% add_css %]/[% add_css %].css"/>
|
||||
[% END %]
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- not yet a hyperlink as observium does not support device details page by device-name -->
|
||||
<img src="http://[% settings.plugin_c_observiumsparklines.webhost | html_entity %]/graph.php?type=port_bits&device=[% device | uri %]&port=[% row.port | uri %]&from=-1d&to=now&width=100&height=20&legend=no"/>
|
||||
@@ -0,0 +1,4 @@
|
||||
<button class="btn" rel="popover" data-trigger="hover" data-html="true" data-content='
|
||||
<img src="http://[% settings.plugin_observiumsparklines.webhost | html_entity %]/graph.php?type=port_bits&device=[% device.dns || device.name | uri %]&port=[% row.port | uri %]&from=-1w&to=now&width=208&height=100&title=yes"/>
|
||||
'
|
||||
><i class="icon-bar-chart"></i></button>
|
||||
Reference in New Issue
Block a user