PageRenderTime 28ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/opennms-base-assembly/src/main/filtered/etc/rws-nbinventoryreport.xsl

https://github.com/ajakubo1/opennms
Extensible Stylesheet Language Transformations | 998 lines | 882 code | 116 blank | 0 comment | 0 complexity | 2dae10e5a0780d70120cce293df26332 MD5 | raw file
  1<?xml version="1.0" encoding="ISO-8859-1"?>
  2
  3<xsl:stylesheet version="1.0"
  4	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  5
  6	<xsl:template match="/">
  7		<html>
  8			<STYLE TYPE="text/css" MEDIA="print">
  9
 10				body {
 11				font-family: "lucida grande", verdana, sans-serif;
 12				font-size: small;
 13				}
 14
 15				#headerinfo, #header .navbar, #header hr {
 16				display: none;
 17				}
 18
 19				#footer, .pager, .key, input, #linkbar {
 20				display: none;
 21				}
 22
 23				#graph-results div form {
 24				display: none;
 25				}
 26
 27				#graph-results {
 28				text-align: center;
 29				}
 30
 31				p, li, td, th { font-size:small; }
 32				table { width:100%; border-collapse:collapse; }
 33td { border:1px solid black; }
 34th { text-align:left; }
 35
 36h2 { font-size: small; }
 37
 38h3 {
 39	text-align: center;
 40        border:1px solid #366903;
 41        margin-top: 7px;
 42        margin-bottom: 4px;
 43        font-size: 70%;
 44        padding: 6px;
 45} 
 46
 47a {
 48        color: #366903;
 49	text-decoration: none;
 50}
 51
 52select { font-size: small; }
 53		
 54		</STYLE>
 55		
 56			<STYLE TYPE="text/css" MEDIA="screen">
 57				/*
 58				Modifications:
 59
 60				2006 Aug 22: A few CSS tweaks - Note that we're overriding font size and
 61				margin within
 62				tables to make things a bit more readable. In general we should be
 63				removing HTML
 64				from event descriptions - need to fix this
 65				2006 Apr 25: Added table.wdth600
 66				2005 Oct 01: More CSS work. -- DJ Gregor
 67				2005 Sep 30: Hacked up heavily to use CSS for layout and markup. Some
 68				code
 69				(particularly #nav bits) provided by Mike Huot. -- DJ Gregor
 70
 71				*/
 72
 73				/* height and width stuff, width not really neccesary. */
 74				a {
 75				color: #366903;
 76				text-decoration:none;
 77				}
 78			 	a:hover {
 79				text-decoration: underline;
 80				}
 81				body {
 82				margin: 0px;
 83				padding: 0px;
 84				background: #FFF;
 85				color: #000;
 86				font-family: "Lucida Grande", Verdana, sans-serif;
 87				}
 88				p, td, th, li {
 89				font-size: 70%;
 90	line-height: 1.25em;
 91}
 92li li {
 93	font-size: 100%;
 94}
 95td td {
 96	font-size: 100%;
 97}
 98td th {
 99	font-size: 100%;
100}
101tr.even td {
102	background-color: #fff;
103}
104tr.odd td {
105	background-color: #fff;
106}
107p {
108	margin: 0 0 7px 0;
109}
110p.noBottomMargin {
111	margin-bottom: 0px;
112}
113form {
114	margin: 0;
115}
116input, select {
117	font-family: "lucida grande", verdana, sans-serif;
118	font-size: 70%;
119}
120p input, p select, li input, li select, td input, td select {
121	font-size: 100%;
122}
123.right {
124	text-align: right;
125}
126hr {
127	position: relative;
128	visibility: hidden;
129	margin: 0;
130	padding: 0;
131	height: 0;
132	clear: both;
133}
134h2 {
135	margin: 0;
136	font-size: 80%;
137}
138p h2, td h2 {
139	/* 70% * 114% = 80% */
140	font-size: 114%;
141}
142
143h3 {
144	background-image: url(../images/headingbg.png);
145	background-repeat: repeat-x;
146	background-position: center center;
147	background-color: #366903;
148	color: #FFF;
149	border:1px solid #999;
150	border-bottom: 0;
151	margin-bottom: 0;
152	margin-top: 7px;
153	font-size: 70%;
154	padding: 6px;
155} 
156p h3, td h3 {
157	font-size: 100%;
158}
159h3 a {
160	color: #FFF;
161}
162ul.plain {
163	list-style-type: none;
164	margin:0;
165	padding:0px;
166}
167ul.plain li { 
168	line-height:1.6em;
169}
170ul.error {
171	list-style-type: none;
172	margin:0;
173	padding:0px;
174}
175ul.error li { 
176	line-height:1.6em;
177	color: #F00;
178}
179span.error { 
180	color: #F00;
181}
182div.boxWrapper {
183	background-color: #FFF;
184	border: 1px solid #999;
185	border-top: 0;
186	padding: 4px 6px;
187	overflow: auto;
188}
189div.boxWrapper div.col {
190	margin:  20px auto;
191	width: 50%;
192}
193div.formOnly {
194	width:250px; 
195	text-align:right; 
196	margin:0 50px; 
197	padding:50px 0;
198}
199td div.clip {
200	margin:0; 
201	padding:0; 
202	height:1.5em; 
203	overflow:hidden;
204}
205
206/* Layouts */
207div.TwoColLeft {
208	width: 40%;
209	float: left;
210	position: relative;
211	margin-right: 2%;
212}
213div.TwoColRight {
214	width: 57%;
215	float: left;
216	position: relative;
217}
218
219div.TwoColLAdmin  {
220        width: 40%;
221        float: left;
222        position: relative;
223	margin-right: 2%;
224}
225
226div.TwoColRAdmin {
227        width: 58%;
228        float: left;
229        position: relative;
230}
231
232/* Treeview from UL/LI -- currently only in the scheduled outage page */
233
234.treeview
235{
236	list-style-type: none;
237	font-size: 120%;
238	padding-left: 0;
239}
240
241.treeview ul li
242{
243	list-style-type: none;
244	font-size: 100%;
245	margin-left: -2em;
246}
247
248/* Widget Box Body */
249.widget-box
250{
251	background: #cccccc;    
252}
253
254/*
255 * value in a widget-box that serves as the fieldname for the value to its right 
256 */
257.widget-box-fieldname
258{
259	background: #999999; 
260}
261
262#nav, #nav ul	/* all lists */
263{
264	padding: 0;
265	margin: 0;
266	list-style: none;
267	float: left;
268	width: 11em;
269}
270
271#nav li /* all list items */
272{
273	position: relative;
274	float: left;
275	line-height: 1.25em;
276	margin-bottom: -1px;
277	width: 11em;
278}
279	
280#nav li ul/* second-level lists */
281{
282	position: absolute;
283	left: -999em;
284	margin-left: 11.05em;
285	margin-top: 0em;
286	margin-bottom: 3px;
287}
288
289#nav li ul ul	/* third-and-above-level lists */
290{
291	left: -999em;
292}
293
294#nav li a
295{
296	width: 11em;
297	w\idth: 10em;
298	display: block;
299	text-decoration: none;
300	background-color: white;
301	border: 1px solid #c9dfc9;
302	padding: 0 0.5em;
303}
304
305#nav li a:hover
306{
307	color: #cccccc;
308	background-color: black;
309}
310
311#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul
312{
313	left: -999em;
314}
315	
316#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul	/* lists nested under hovered list items */
317{
318	left: auto;
319}
320
321#content {
322	position: relative;
323	background-image: url(../images/mainbg.png);
324	background-repeat: repeat-x;
325	background-color: #EEE;
326	margin: 0;
327	padding: 15px 20px 30px 20px;
328}
329
330.navbar ul
331{ 
332	list-style: none;
333	display: inline;
334}
335
336
337.navbar li
338{ 
339	padding: 0 10px 5px 0;
340	list-style: none;
341	display: inline;
342	color: #999;
343}
344
345#linkbar
346{
347	padding: 0 0 1em 0;
348}
349
350#linkbar ul
351{ 
352	list-style: none;
353	display: inline;
354	padding: 0 0 0 0;
355}
356
357#linkbar li
358{ 
359	list-style: none;
360	display: inline;
361	padding-right: 0.75em;
362}
363
364div.standard
365{
366	clear: both;
367	padding: 0.1em 1.0em 0.75em 0.75em;
368}
369span.filter {
370	color: #444;
371	border: 1px solid #CCC;
372	background-color: #DDD;
373	padding: 3px 4px;
374}
375
376table.top {
377	width: auto;
378	border: none;
379	background-color: transparent;
380	vertical-align: top;
381}
382table.top td {
383	border: none;
384	background-color: transparent;
385	vertical-align: top;
386}
387
388table.normal {
389	width: auto;
390}
391table.normal td {
392	border: none;
393	background-color: transparent;
394}
395td.normal {
396	border: none;
397	background-color: transparent;
398}
399
400table {
401	border-collapse: collapse;
402	width: 100%;
403	margin-top: 0;
404	margin-bottom: 10px;
405}
406aggr.status.table {
407	border-collapse: collapse;
408	width: 33%;
409	margin-top: 0;
410}
411.noWrap {
412	white-space: nowrap;
413}
414th {
415	border:1px solid #999;
416	padding: 4px 5px;
417	background-color: #444;
418	font-weight: bold;
419	text-align: left;
420	color: #FFF;
421}
422th a {
423	text-decoration: underline;
424	color: #FFF;
425}
426th a:hover {
427	color: #CCC;
428}
429/*Conflicting style*/
430td {
431	border: 1px solid #999;
432	padding: 4px 5px;
433	background-color: #FFF;
434}
435
436td td, td p {
437	font-size: 100%;
438	margin: 0;
439	padding: 0px;
440}
441
442table.wdth600 { 
443	width: 600px;
444}
445
446td.standardnavlinks
447{
448	width: 25%;
449}
450
451td.standardwarning
452{
453        background-color: #00FFFF;
454}
455
456.bold {
457	font-weight: bold;
458}
459
460
461td.status1 {
462	background-color: #C7DBAF;
463}
464
465
466#nodelist table
467{ 
468        width: 100%;
469        border: 0;
470}
471
472td.availunmanaged
473{
474	background-color: #CCC;
475	font-weight: bold;
476        text-align: right;
477}
478
479td.availgood
480{
481	background-color: green;
482	font-weight: bold;
483        text-align: right;
484}
485
486td.availwarn
487{
488	background-color: #ffff33;
489	font-weight: bold;
490        text-align: right;
491}
492
493td.availcrit
494{
495	background-color: #ff3333;
496	font-weight: bold;
497        text-align: right;
498}
499
500#eventlist
501{
502        clear: both;
503        padding: 0.1em 1.0em 0.75em 0.75em;
504}
505
506#include-eventlist td.sev_indeterminate
507{
508	background-color: #ADD8E6;
509	padding: 2px;
510}
511
512#include-eventlist td.sev_cleared
513{
514	background-color: #FFFFFF;
515	padding: 2px;
516}
517
518#include-eventlist td.sev_normal
519{
520    background-color: #00FF00;
521	padding: 2px;
522}
523
524#include-eventlist td.sev_warning
525{
526    background-color: #00FFFF;
527	padding: 2px;
528}
529
530#include-eventlist td.sev_minor
531{
532    background-color: #FFFF00;
533	padding: 2px;
534}
535
536#include-eventlist td.sev_major
537{
538        background-color: #FFA500;
539	padding: 2px;
540}
541
542#include-eventlist td.sev_critical
543{
544        background-color: #FF0000;
545	padding: 2px;
546}
547
548#include-charts
549{ 
550	text-align: center;
551	clear: both;
552}
553
554#graph-results
555{ 
556	text-align: center;
557}
558
559/*#graph-results-periods td */
560
561#graph-results .periods td
562{ 
563  width: 80px;
564  text-align: center;
565}
566
567#header {
568	position: relative;
569	margin: 0;
570	padding: 0;
571	background-color: #333;
572	background-image: url(../images/headerbg.png);
573	background-repeat: repeat-x;
574	color: #FFF;
575}
576#header a {
577	color:#FFF;
578}
579
580h1#headerlogo {
581	position: absolute;
582	z-index: 2;
583	margin: 0;
584	padding: 0;
585	left: 15px;
586	top: 13px;
587}
588#headerinfo {
589	position: relative;
590	margin: 0px;
591	padding: 10px;
592	text-align: right;
593}
594
595div.spacer {
596	position: relative;
597	clear: both;
598	height: 1px;
599}
600div.center {
601	text-align: center;
602}
603
604img {
605	border: none;
606}
607
608#headerdate {
609	float: right;
610	text-align: right;
611	font-weight: bold;
612	vertical-align: middle;
613}
614
615#headernavbarright {
616	position: relative;
617	float: right;
618	padding: 2px 0px 5px 0px;
619}
620
621#contentleft {
622	width: 48%;
623	position: relative;
624	float: left;
625}
626
627#contentright {
628	width: 48%;
629	float: right;
630	position: relative;
631}
632
633#index-contentleft {
634	position: relative;
635	width: 23%;
636	float: left;
637}
638
639#index-contentmiddle {
640	position: relative;
641	width: 48%;
642	float: left;
643	margin: 0 2%;
644}
645
646#index-contentright {
647	position: relative;
648	width: 24%;
649	float: left;
650}
651p.pager span {
652	display:block; 
653	float:right; 
654	position:relative;
655}
656p.key {
657	clear: both;
658	text-align: right;
659}
660p.key img {
661	position: relative;
662	float:right; 
663	margin-left:5px;
664}
665
666#footer {
667	clear: both;
668	text-align: center;
669	padding: 30px 2px 2px 2px;
670	background-image: url(../images/footerbg.png);
671	background-repeat: repeat-x;
672}
673
674.status-critical {
675    background-color: red;
676    text-align: center
677}
678
679.status-warning {
680    background-color: yellow;
681    text-align: center
682}
683
684.status-normal {
685    background-color: green;
686    text-align: center
687}
688
689
690#copyright
691{
692	text-align: center;
693	padding: 3px;
694}
695
696/* Status Colouring */
697tr.divider td {
698	border-top-width: 2px;
699}
700td.divider {
701	border-top-width: 2px;
702}
703td.bright {
704	padding-left: 20px;
705	background-position: top left;
706	background-repeat: repeat-y;
707}
708
709tr.Critical td { background-color: #F5CDCD; }
710tr.Critical td.divider { border-top: 2px solid #CC0000 !important; }
711tr.Critical td.bright { background-image: url(../images/bgCritical.png); }
712
713tr.Major td { background-color: #FFD7CD; }
714tr.Major td.divider { border-top: 2px solid #FF3300 !important; }
715tr.Major td.bright { background-image: url(../images/bgMajor.png); }
716
717tr.Minor td { background-color: #FFEBCD; }
718tr.Minor td.divider { border-top: 2px solid #FF9900 !important; }
719tr.Minor td.bright { background-image: url(../images/bgMinor.png); }
720
721tr.Warning td { background-color: #FFF5CD; }
722tr.Warning td.divider { border-top: 2px solid #FFCC00 !important; }
723tr.Warning td.bright { background-image: url(../images/bgWarning.png); }
724
725tr.Indeterminate td { background-color: #EBEBCD; }
726tr.Indeterminate td.divider { border-top: 2px solid #999900 !important; }
727tr.Indeterminate td.bright { background-image: url(../images/bgIndeterminate.png); }
728
729tr.Normal td { background-color: #D7E1CD; }
730tr.Normal td.divider { border-top: 2px solid #336600 !important; }
731tr.Normal td.bright { background-image: url(../images/bgNormal.png); }
732
733tr.Cleared td { background-color: #EEE; }
734tr.Cleared td.divider { border-top: 2px solid #999 !important; }
735tr.Cleared td.bright { background-image: url(../images/bgCleared.png); }
736
737tr.CellStatus td {
738	padding-left: 20px;
739	background-position: top left;
740	background-repeat: repeat-y;
741}
742
743tr.CellStatus td.Critical
744{
745	background-color: #F5CDCD; 
746	border-top: 2px solid #CC0000 !important;
747	background-image: url(../images/bgCritical.png);
748}
749
750tr.CellStatus td.Major
751{
752	background-color: #FFD7CD; 
753	border-top: 2px solid #FF3300 !important;
754	background-image: url(../images/bgMajor.png);
755}
756
757tr.CellStatus td.Minor
758{
759	background-color: #FFEBCD; 
760	border-top: 2px solid #FF9900 !important;
761	background-image: url(../images/bgMinor.png);
762}
763
764tr.CellStatus td.Warning
765{
766	background-color: #FFF5CD; 
767	border-top: 2px solid #FFCC00 !important;
768	background-image: url(../images/bgWarning.png);
769}
770
771tr.CellStatus td.Indeterminate
772{
773	background-color: #EBEBCD; 
774	border-top: 2px solid #999000 !important;
775	background-image: url(../images/bgIndeterminate.png);
776}
777
778tr.CellStatus td.Normal
779{
780	background-color: #D7E1CD; 
781	border-top: 2px solid #336600 !important;
782	background-image: url(../images/bgNormal.png);
783}
784
785tr.CellStatus td.Cleared
786{
787	background-color: #EEE; 
788	border-top: 2px solid #999 !important;
789	background-image: url(../images/bgCleared.png);
790}
791
792tr.CellStatus td.nobright
793{
794	background-image: none;
795}
796
797/* Pagination
798---------------------------------------- */
799.pagination {
800        height: 1%; /* IE tweak (holly hack) */
801        width: auto;
802        text-align: right;
803        margin-top: 5px;
804        margin-bottom: 5px;
805        font-size: 70%;        float: right;
806}
807
808.pagination span.page-sep {
809        display: none;
810}
811
812li.pagination {
813        margin-top: 0;
814}
815
816.pagination strong, .pagination b {
817	font-weight: normal;
818}
819
820.pagination span strong {
821        font-weight: normal;
822        color: #FFF;
823        background-color: #366903;
824}
825
826.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
827        font-weight: normal;
828        text-decoration: none;
829        color: #366903;
830        line-height: 1.5em;
831}
832
833.pagination span a:hover {
834        background-color: #366903;
835        color: #FFF;
836        text-decoration: none;
837}
838
839.pagination img {
840        vertical-align: middle;
841}
842		</STYLE>
843			<body>
844				<h3>OpenNMS/RWS Inventory Report on Request Date <xsl:value-of select="rws-nbinventoryreport/reportDate"/></h3>
845  				<table border="1" width="1000" bgcolor="#0000ff">
846					<tr>
847						<th align="left">
848								Request By User:
849								<xsl:value-of select="rws-nbinventoryreport/user"/> 
850								on 
851								<xsl:value-of select="rws-nbinventoryreport/reportRequestDate"/>
852						</th>
853					</tr>
854					<tr>
855						<th align="left">
856								Inventory Match Regular Expression:
857						<xsl:value-of select="rws-nbinventoryreport/theField"/></th>	
858					</tr>
859					<tr>
860						<th align="left">
861								Groups in repository:
862						<xsl:value-of select="rws-nbinventoryreport/totalGroups"/></th>	
863					</tr>
864					<tr>
865						<th align="left">
866								Groups With Matching Inventory :
867						<xsl:value-of select="rws-nbinventoryreport/groupsMatching"/></th>
868					</tr>
869					<tr>
870						<th align="left">
871								Groups without Nodes:
872						<xsl:value-of select="rws-nbinventoryreport/groupWithoutNodes"/></th>
873					</tr>
874					<tr>
875						<th align="left">
876								Groups with Nodes without Inventory at all:
877						<xsl:value-of select="rws-nbinventoryreport/groupsWithNodesWithoutinventoryAtAll"/></th>
878					</tr>
879					<tr>
880						<th align="left">
881								Groups with Nodes without Inventory at Report Date:
882						<xsl:value-of select="rws-nbinventoryreport/groupsWithNodesWithoutinventoryAtReportDate"/></th>
883					</tr>
884				</table>
885<p></p>
886				<xsl:for-each select="rws-nbinventoryreport/groupSet">
887  					<h3> Group:  <xsl:value-of select="groupSetName"/></h3>
888			   	<table border="1" width="1000" bgcolor="#dddddd">
889					<tr>
890						<th align="left">
891								Total number of Nodes:
892						<xsl:value-of select="totalNodes"/></th>	
893					</tr>
894					<tr>
895						<th align="left">
896								Nodes With Matching Inventory :
897						<xsl:value-of select="nodesMatching"/></th>
898					</tr>
899					<tr>
900						<th align="left">
901								Nodes without Inventory at all:
902						<xsl:value-of select="nodesWithoutinventoryAtAll"/></th>
903					</tr>
904					<tr>
905						<th align="left">
906								Nodes without Inventory at request Date:
907						<xsl:value-of select="nodesWithoutinventoryAtReportDate"/></th>
908					</tr>
909				</table>
910					<xsl:for-each select="nbisinglenode">
911					<h3>Device Name: <xsl:value-of select="devicename" /> </h3>
912					<table border="1" width="1000">
913						<tr>
914							<th width="20%">Creation Date</th>
915							<td>
916								<xsl:value-of select="creationdate" />
917							</td>
918						</tr>
919						<tr>
920							<th width="20%">Current Status</th>
921							<td>
922								<xsl:value-of select="status" />
923							</td>
924						</tr>
925							<th width="20%">Version</th>
926							<td>
927								<xsl:value-of select="version" />
928							</td>
929						<tr>
930						</tr>						
931					</table>
932							<xsl:for-each select="inventoryElement2RP">
933							<h3> Inventory Element: <xsl:value-of select="name" /></h3>
934							<table border="1" width="1000">
935								<xsl:for-each select="tupleRP">
936									<tr>
937										<th width="20%">
938											<xsl:value-of select="name" />
939										</th>
940										<td>
941											<xsl:value-of select="description" />
942										</td>
943									</tr>
944								</xsl:for-each>
945								
946								<xsl:choose>
947									<xsl:when test="inventoryMemoryRP/type">
948										<tr>
949											<th width="20%">Memory Type</th>
950											<th>Size</th>
951										</tr>
952										<xsl:for-each select="inventoryMemoryRP">
953											<tr>
954												<th width="20%">
955													<xsl:value-of select="type" />
956												</th>
957												<td>
958													<xsl:value-of select="size" />
959												</td>
960											</tr>
961										</xsl:for-each>
962									</xsl:when>
963								</xsl:choose>
964								
965								<xsl:choose>
966									<xsl:when test="inventorySoftwareRP/type">
967										<tr>
968											<th width="20%">Software </th>
969											<th>Type</th>
970										</tr>
971										<xsl:for-each select="inventorySoftwareRP">
972											<tr>
973												<th width="20%">
974													<xsl:value-of select="type" />
975												</th>
976												<td>
977													<xsl:value-of select="version" />
978												</td>
979											</tr>
980										</xsl:for-each>
981									</xsl:when>
982								</xsl:choose>
983						</table>
984						</xsl:for-each>
985					</xsl:for-each>
986				</xsl:for-each>
987				        <p><center>
988        OpenNMS <a href="help/about.jsp">Copyright</a> 2002-2009
989            <a href="http://www.opennms.com/">The OpenNMS Group, Inc.</a>
990            OpenNMS is a registered trademark of
991        <a href="http://www.opennms.com">The OpenNMS Group, Inc.</a>
992          </center></p>
993				
994			</body>
995		</html>
996	</xsl:template>
997
998</xsl:stylesheet>