diff --git a/Netdisco/lib/Netdisco/Web.pm b/Netdisco/lib/Netdisco/Web.pm index a5cdcf2f..87fcc4c5 100644 --- a/Netdisco/lib/Netdisco/Web.pm +++ b/Netdisco/lib/Netdisco/Web.pm @@ -46,7 +46,7 @@ hook 'before' => sub { }; ajax '/ajax/content/device/:thing' => sub { - return "
Hello ". param('thing') ."
"; + return "Hello, this is where the ". param('thing') ." content goes.
"; }; # 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' }, diff --git a/Netdisco/public/css/style.css b/Netdisco/public/css/style.css index 9aed99a5..d5173415 100644 --- a/Netdisco/public/css/style.css +++ b/Netdisco/public/css/style.css @@ -32,11 +32,23 @@ form .clearfix.success input { padding: 30px 60px 40px 90px; } +.inputs-list:first-child { + padding-top: 2px !important; +} + +.device_label { + color: #0069D6; +} + .nd_loginform { margin-top: 30px; margin-bottom: 0px; } +.nd_days_select { + width: 56px; +} + .nd_sidesearchform { padding-left: 0px; } @@ -72,3 +84,33 @@ form .clearfix.success input { padding: 0px; height: 100%; } + +.nd_collapser { + cursor: pointer; +} + +.nd_collapse_pre_hidden { + display: none; +} + +a:hover { + text-decoration: none; +} + +.arrow-up { + float: right; + margin-top: 6px; + margin-right: 11px; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 8px solid #F89406; +} + +.arrow-down { + float: right; + margin-top: 6px; + margin-right: 11px; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-top: 8px solid #F89406; +} diff --git a/Netdisco/public/javascripts/jquery-collapser.min.js b/Netdisco/public/javascripts/jquery-collapser.min.js new file mode 100644 index 00000000..05ab00b9 --- /dev/null +++ b/Netdisco/public/javascripts/jquery-collapser.min.js @@ -0,0 +1,9 @@ +/* + * jQuery - Collapser - Plugin v1.0 + * http://www.aakashweb.com/ + * Copyright 2010, Aakash Chakravarthy + * Released under the MIT License. + */ + +(function($){$.fn.collapser=function(options,beforeCallback,afterCallback){var defaults={target:'next',targetOnly:null,effect:'slide',changeText:true,expandHtml:'Expand',collapseHtml:'Collapse',expandClass:'',collapseClass:''};var options=$.extend(defaults,options);var expHtml,collHtml,effectShow,effectHide;if(options.effect=='slide'){effectShow='slideDown';effectHide='slideUp';}else{effectShow='fadeIn';effectHide='fadeOut';}if(options.changeText==true){expHtml=options.expandHtml;collHtml=options.collapseHtml;}function callBeforeCallback(obj){if(beforeCallback!==undefined){beforeCallback.apply(obj);}}function callAfterCallback(obj){if(afterCallback!==undefined){afterCallback.apply(obj);}}function hideElement(obj,method){callBeforeCallback(obj);if(method==1){obj[options.target](options.targetOnly)[effectHide]();obj.html(expHtml);obj.removeClass(options.collapseClass);obj.addClass(options.expandClass);}else{$(document).find(options.target)[effectHide]();obj.html(expHtml);obj.removeClass(options.collapseClass);obj.addClass(options.expandClass);}callAfterCallback(obj);}function showElement(obj,method){callBeforeCallback(obj) +if(method==1){obj[options.target](options.targetOnly)[effectShow]();obj.html(collHtml);obj.removeClass(options.expandClass);obj.addClass(options.collapseClass);}else{$(document).find(options.target)[effectShow]();obj.html(collHtml);obj.removeClass(options.expandClass);obj.addClass(options.collapseClass);}callAfterCallback(obj);}function toggleElement(obj,method){if(method==1){if(obj[options.target](options.targetOnly).is(':visible')){hideElement(obj,1);}else{showElement(obj,1);}}else{if($(document).find(options.target).is(':visible')){hideElement(obj,2);}else{showElement(obj,2);}}}return this.each(function(){if($.fn[options.target]&&$(this)[options.target]()){$(this).toggle(function(){toggleElement($(this),1);},function(){toggleElement($(this),1);});}else{$(this).toggle(function(){toggleElement($(this),2);},function(){toggleElement($(this),2);});}if($.fn[options.target]&&$(this)[options.target]()){if($(this)[options.target]().is(':hidden')){$(this).html(expHtml);$(this).removeClass(options.collapseClass);$(this).addClass(options.expandClass);}else{$(this).html(collHtml);$(this).removeClass(options.expandClass);$(this).addClass(options.collapseClass);}}else{if($(document).find(options.target).is(':hidden')){$(this).html(expHtml);}else{$(this).html(collHtml);}}});};})(jQuery); \ No newline at end of file diff --git a/Netdisco/views/device.tt b/Netdisco/views/device.tt index e93928fe..66061541 100644 --- a/Netdisco/views/device.tt +++ b/Netdisco/views/device.tt @@ -5,7 +5,8 @@ [% FOREACH tab IN vars.tabs %][% d.dns.remove(settings.domain_suffix) %]
+[% d.dns.remove(settings.domain_suffix) %]