move Observium plugin outside of Netdisco dist

This commit is contained in:
Oliver Gorwits
2013-12-08 18:58:25 +00:00
parent 6bb2e3819f
commit 01303875b2
23 changed files with 2269 additions and 5 deletions

View File

@@ -0,0 +1,6 @@
<a href="http://[% settings.plugin_observium.webhost | uri %]/device/hostname=[% device.dns || device.name | uri %]/tab=port/ifdescr=[% row.base64url_port %]/"
[% 'target="_blank"' IF settings.plugin_observium.open_in_new_window %]
class="btn nd_observium"
data-content='
<img src="http://[% settings.plugin_observium.webhost | uri %]/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></a>

View File

@@ -0,0 +1,6 @@
.nd_observium-style {
min-width: none;
max-width: none;
margin-top: 5px;
margin-left: 15px;
}

View File

@@ -0,0 +1,25 @@
$(document).ready(function() {
// bind qtip2 event to all future .nd_observium buttons
$('#ports_pane').on('mouseover', '.nd_observium', function(event) {
$(this).qtip({
overwrite: false,
content: {
attr: 'data-content'
},
show: {
event: event.type,
ready: true
},
position: {
my: 'left center',
at: 'right centre',
target: 'mouse'
},
style: {
classes: 'qtip-bootstrap nd_observium-style'
}
});
});
});