From 14724835e271422f196d97b9a5a65346fbb02e94 Mon Sep 17 00:00:00 2001 From: Joey Hagedorn Date: Thu, 15 Jun 2006 15:43:07 +0000 Subject: Initial commit of Django based reporting subsystem. Only works with fake data so far... git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1883 ce84e21b-d406-0410-9b95-82705330c041 --- reports/site_media/base.css | 5 + reports/site_media/boxypastel.css | 214 ++++++++++++++++++++++++++++++++++++++ reports/site_media/global.css | 9 ++ reports/site_media/layout.css | 30 ++++++ reports/site_media/main.js | 27 +++++ reports/site_media/sorttable.js | 203 ++++++++++++++++++++++++++++++++++++ 6 files changed, 488 insertions(+) create mode 100644 reports/site_media/base.css create mode 100644 reports/site_media/boxypastel.css create mode 100644 reports/site_media/global.css create mode 100644 reports/site_media/layout.css create mode 100644 reports/site_media/main.js create mode 100644 reports/site_media/sorttable.js (limited to 'reports/site_media') diff --git a/reports/site_media/base.css b/reports/site_media/base.css new file mode 100644 index 000000000..50ac79832 --- /dev/null +++ b/reports/site_media/base.css @@ -0,0 +1,5 @@ + +/* Import other styles */ +@import url('global.css'); +@import url('layout.css'); +@import url('boxypastel.css); \ No newline at end of file diff --git a/reports/site_media/boxypastel.css b/reports/site_media/boxypastel.css new file mode 100644 index 000000000..896c8c428 --- /dev/null +++ b/reports/site_media/boxypastel.css @@ -0,0 +1,214 @@ +/* body */ +/*body {*/ +/* background-color: #fff;*/ +/* color: #000;*/ +/* font: 12px 'Lucida Grande', Arial, Helvetica, sans-serif;*/ +/* margin-left:25px;*/ +/* margin-right:100px;*/ +/* }*/ + + + +/* links */ +a:link { + color: #00f; + text-decoration: none; + } +a:visited { + color: #00a; + text-decoration: none; + } +a:hover { + color: #00a; + text-decoration: underline; + } +a:active { + color: #00a; + text-decoration: underline; + } +/* divs*/ +div.bad { + border: 1px solid #660000; + background: #FF6A6A; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.modified { + border: 1px solid #CC9900; + background: #FFEC8B; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.clean { + border: 1px solid #006600; + background: #9AFF9A; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.extra { + border: 1px solid #006600; + background: #6699CC; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.warning { + border: 1px solid #CC3300; + background: #FF9933; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.all-warning { + border: 1px solid #DD5544; + background: #FFD9A2; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.down { + border: 1px solid #999; + background-color: #DDD; + margin: 10px 0; + padding: 8px; + text-align: left; + margin-left:50px; + margin-right:50px; + } +div.items { + display: none; + } +div.nodebox { + border: 1px solid #c7cfd5; + background: #f1f5f9; + margin: 20px 0; + padding: 8px 8px 16px 8px; + text-align: left; + position:relative; + } +div.header { + background-color: #DDD; + padding: 8px; + text-indent:50px; + position:relative; + } +/*Divs For Statusbar*/ +div.redbar { + border: 0px solid #660000; + background: #FF6666; + margin: 0px; + float: left; + } + +div.greenbar { + border: 0px solid #006600; + background: #66FF66; + margin: 0px; + float: left; + } +div.statusborder { + border: 1px solid #000000; + background: #FF6666; + margin: 0px; + float: right; + width: 100%; + } + /*invisitable*/ +table.invisitable { + width: 100%; + border: 0px; + cell-padding: 0px; + padding: 0px; + border-width: 0px; + } +/*Spans*/ +span.nodename { + font-style: italic; + } +span.nodelisttitle { + font-size: 14px; + } +span.mini-date { + font-size: 10px; + position: absolute; + right: 65px; + } + +h2 { + font-size: 16px; + color: #000; + } + +ul.plain { + list-style-type:none; + text-align: left; + } + +.notebox { + position: absolute; + top: 0px; + right: 0px; + padding: 1px; + text-indent:0px; + border: 1px solid #FFF; + background: #999; + color: #FFF; + } + +.configbox { + position: absolute; + bottom: 0px; + right: 0px; + padding: 1px; + text-indent:0px; + border: 1px solid #999; + background: #FFF; + color: #999; + } + +p.indented{ + text-indent: 50px + } + +/* Sortable tables */ +table.sortable a.sortheader { + background-color:#dfd; + font-weight: bold; + text-decoration: none; + display: block; + +} +table.sortable { + padding: 2px 4px 2px 4px; + border: 1px solid #000000; + border-spacing: 0px +} +td.sortable{ + padding: 2px 8px 2px 8px; +} + +th.sortable{ + background-color:#F3DD91; + border: 1px solid #FFFFFF; +} +tr.tablelist { + background-color:#EDF3FE; +} +tr.tablelist-alt{ + background-color:#FFFFFF; +} diff --git a/reports/site_media/global.css b/reports/site_media/global.css new file mode 100644 index 000000000..1dc57f3ca --- /dev/null +++ b/reports/site_media/global.css @@ -0,0 +1,9 @@ + +body { + margin:0; + padding:0; + font-size:12px; + font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; + color:#000; + background:#fff; + } diff --git a/reports/site_media/layout.css b/reports/site_media/layout.css new file mode 100644 index 000000000..f6f08098c --- /dev/null +++ b/reports/site_media/layout.css @@ -0,0 +1,30 @@ +/* Page Structure */ +#container { position:absolute; top: 3em; margin-left:1em; margin-right:2em; padding:0; margin-top:1.5em; min-width: 650px; } +#header { width:100%; } +#content-main { float:left; } + +/* HEADER */ +#header { background:#000; color:#ffc; position:absolute;} +#header a:link, #header a:visited { color:white; } +#header a:hover { text-decoration:underline; } +#branding h1 { padding:0 10px; font-size:18px; margin:8px 0; font-weight:normal; color:#f4f379; } +#branding h2 { padding:0 10px; font-size:14px; margin:-8px 0 8px 0; font-weight:normal; color:#ffc; } +#user-tools { position:absolute; top:0; right:0; padding:1.2em 10px; font-size:11px; text-align:right; } + +/*SIDEBAR*/ +#sidebar {float: left; position: relative; width: auto; height: 100%; margin-top: 3em; padding-right: 1.5em; padding-left: 1.5em; padding-top: 1em; padding-bottom:3em; background: #000; color:ffc; } +a.sidebar:link {color: #fff;} +a.sidebar:active {color: #fff;} +a.sidebar:visited {color: #fff;} +a.sidebar:hover {color: #fff;} +ul.sidebar { + color: #ffc; + text-decoration: none; + list-style-type: none; + text-indent: -1em; +} +ul.sidebar-level2 { + text-indent: -2em; + list-style-type: none; + font-size: 11px; +} \ No newline at end of file diff --git a/reports/site_media/main.js b/reports/site_media/main.js new file mode 100644 index 000000000..556130466 --- /dev/null +++ b/reports/site_media/main.js @@ -0,0 +1,27 @@ +function toggleLayer(whichLayer) + { + if (document.getElementById) + { + // this is the way the standards work + var style2 = document.getElementById(whichLayer).style; + style2.display = style2.display? "":"block"; + } + else if (document.all) + { + // this is the way old msie versions work + var style2 = document.all[whichLayer].style; + style2.display = style2.display? "":"block"; + } + else if (document.layers) + { + // this is the way nn4 works + var style2 = document.layers[whichLayer].style; + style2.display = style2.display? "":"block"; + } + } + +function MM_jumpMenu(targ,selObj,restore) +{ //v3.0 + eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); + if (restore) selObj.selectedIndex=0; +} \ No newline at end of file diff --git a/reports/site_media/sorttable.js b/reports/site_media/sorttable.js new file mode 100644 index 000000000..83c87708e --- /dev/null +++ b/reports/site_media/sorttable.js @@ -0,0 +1,203 @@ + +// +// Sourced originally from: +// +// http://www.kryogenix.org/code/browser/sorttable/ + + + +addEvent(window, "load", sortables_init); + +var SORT_COLUMN_INDEX; + +function sortables_init() { + // Find all tables with class sortable and make them sortable + if (!document.getElementsByTagName) return; + tbls = document.getElementsByTagName("table"); + for (ti=0;ti 0) { + var firstRow = table.rows[0]; + } + if (!firstRow) return; + + // Assign classes to the rows when the table's first loaded + for (i=1;i'+txt+''; + } +} + +function ts_getInnerText(el) { + if (typeof el == "string") return el; + if (typeof el == "undefined") { return el }; + if (el.innerText) return el.innerText; //Not needed but it is faster + var str = ""; + + var cs = el.childNodes; + var l = cs.length; + for (var i = 0; i < l; i++) { + switch (cs[i].nodeType) { + case 1: //ELEMENT_NODE + str += ts_getInnerText(cs[i]); + break; + case 3: //TEXT_NODE + str += cs[i].nodeValue; + break; + } + } + return str; +} + +function ts_resortTable(lnk, clid) { + // get the span + var span; + for (var ci=0;ci