initial implementaton of ports sidebar

This commit is contained in:
Oliver Gorwits
2012-01-09 19:12:06 +00:00
parent 28116d40c8
commit fe09ad7dd9
7 changed files with 153 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ hook 'before' => sub {
};
ajax '/ajax/content/device/:thing' => sub {
return "<p>Hello ". param('thing') ."</p>";
return "<p>Hello, this is where the ". param('thing') ." content goes.</p>";
};
# device ports with a description (er, name) matching
@@ -76,6 +76,30 @@ get '/device' => sub {
return;
}
# list of columns
var('port_columns' => [
{ name => 'port', label => 'Port' },
{ name => 'description', label => 'Description' },
{ name => 'type', label => 'Type' },
{ name => 'duplex', label => 'Duplex' },
{ name => 'lastchange', label => 'Last Change' },
{ name => 'name', label => 'Name' },
{ name => 'speed', label => 'Speed' },
{ name => 'mac', label => 'Port Mac' },
{ name => 'mtu', label => 'MTU' },
{ name => 'native', label => 'Native VLAN' },
{ name => 'vlan', label => 'VLAN Membership' },
{ name => 'connected', label => 'Connected Devices' },
{ name => 'stp', label => 'Spanning Tree' },
{ name => 'status', label => 'Status' },
]);
# details for connected devices
var('connected_properties' => [
{ name => 'age', label => 'Age Stamp' },
{ name => 'ip', label => 'IP Address' },
]);
# list of tabs
var('tabs' => [
{ id => 'details', label => 'Details' },