;
Bc           @   s  d  k  Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d k l	 Z	 d  k
 Z
 d d d d g  d  Z d d d d d d  Z d d d d g  d	  Z e i i e i d  d e e i d
  Z e d j o( e d e i i e i d  d  n d  S(   N(   s   Sorters   /i   i    i   c   	   
   C   s   d } x t i i |  | |  D]z } | d d j oY | i	 | d  | | j  o7 t |  | | | d d | | | | d d | q n | d 7} q W| | f Sd  S(   Ni    s   priorityi   s   names   /i   s	   node_list(   s   cous   PL2_PLDBs   pldbs   stat_node_lists	   from_dates   to_dates   paths   xs	   node_lists   appends	   cur_levels   levelss   getNodeLists   cou_bias(	   s	   from_dates   to_dates   paths   levelss   cou_biass	   cur_levels	   node_lists   xs   cou(    (    s    C:\Python\PL\PL_SelectToplist.pys   getNodeList   s     ;s    c   	   
   C   s  d } x t i i |  | |  D] } | d d j o | d | | d d | d d d	 | d d
 7} | |  d | | | d d t
 | d  t
 | |  d 7} | | j  o7 t |  | | | d d | | | | d d | q n | d 7} q W| | f Sd  S(   Ni    s   priorityi   s   <option value="s   names   ">i   i   s   _s	   </option>s    s   /s   
s   nodeHTML(   s   cous   PL2_PLDBs   pldbs   stat_node_lists	   from_dates   to_dates   paths   xs   nodeHTMLs	   cur_levels   strs   levelss   cou_biass
   searchNode(	   s	   from_dates   to_dates   paths   levelss   cou_biass	   cur_levels   nodeHTMLs   xs   cou(    (    s    C:\Python\PL\PL_SelectToplist.pys
   searchNode   s     6B;c   	   
   C   s   d } x t i i |  | |  D] } | d d j o t i	 | d  | d <t
 i | d  | d <| i |  | | j  o7 t |  | | | d d | | | | d d	 | q n | d 7} q W| | f Sd  S(
   Ni    s   priorityi   s   names   name2s   num_addresss   /i   s	   host_list(   s   cous   PL2_PLDBs   pldbs   stat_node_lists	   from_dates   to_dates   paths   xs   PL_miscs   removeDataBeforeSlashs   IP_miscs   dottedQuadToNum_2s	   host_lists   appends	   cur_levels   levelss   getNodess   cou_bias(	   s	   from_dates   to_dates   paths   levelss   cou_biass	   cur_levels	   host_lists   xs   cou(    (    s    C:\Python\PL\PL_SelectToplist.pys   getNodes-   s     ;c   "      C   s  d k  l } d k l } d  k } | |   } | d  }
 t i	 o
 d } n d } t i o d d }! n d }! t i o
 d }! n d }	 d } d } d } t i } t i	 } d	 d
 } d d } t i i t i d d  d  } y t i } Wn d } n Xt i }  t i } d t   } | t i t   7} | d t   7} | o | d t   7} n | o  d  k } | | i  d  7} n |  o | d 7} n | d t   7} | i   } | i" d | i# | d d   } | i" d | i# |   } t& i'   \ } } x< | D]4 } | d t* | d  d t* | d  d 7} qW| d t   7} t i o4 | d t   7} t i o | d t   7} qn | d t   7} xk t+ d  d!  D]Z } | d" t* |  d# 7} | | i#   i- j o | d$ 7} n | d% t* |  d 7} qW| d& t   7} d' d( d) d* d+ d, d- d. d/ d0 d1 d2 g } xm t+ d d3  D]\ } | d4 t* |  d# 7} | d5 | i#   i0 j o | d$ 7} n | d% | | d6 7} qeW| d7 t   7} xw t+ d d8  D]f } | d4 t* |  d# 7} | d5 | i#   i2 j o | d$ 7} n | d% t* d9 | d5  d6 7} qW| d: t   7} |  o | d; 7} n | d< t   7} t i	 o | Sn d= GH| GHd  Sd  S(>   N(   s   escape(   s   Sorters   groups   .rpys   .pyi   iX   i    s   <!s   --s   -s   ->s   .:-s   ___s    s]   %(begComment)s -->
#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="brinet ab">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="sv">
<meta name="ROBOTS" content="All">
<meta name="RESOURCE-TYPE" content="document">
<meta name="distribution" content="GLOBAL">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="Thu, 01 Dec 1994 16:00:00 GMT">
<link rel="STYLESHEET" href="./statistics.css" type="text/css">

<style type="text/css">

	.selectButtonOver {
		font-weight: bold;
		background:#CCCCCC;
		height:23px;
		width:130px;}
	.selectButton { 
		background:#CCCCCC;
		height:23px;
		width:100px;
	}
	.selectTable {<
		background-color:#e0e0e0;
	}
	.selectTableOver {
		background-color: #000000;
	}
</style>

<script language="JavaScript">

function setMenu(menu) {
	contextMenu="contextMenu"+menu;
	}

	function groupSelected(value)  {
		//var site = "PL2_SelectHosts%(fileExt)s"?group=" + value
		//var myPopUp = window.open(site, "control2");
			updateChartType()
		updateToplist()
	}

	function chartTypeChanged() {
		updateChartType()
		updateToplist()
	}

	function updateChartType() {
		for (var i = 0; i < document.selectgroup.diagramtype.length; i++) {
			if (document.selectgroup.diagramtype[i].checked==true) {
				document.selectgroup.charttype.value=document.selectgroup.diagramtype[i].value
			}
		}
	}

	function updateToplist() {
		if (document.selectgroup.autodraw.checked == true) {

			document.selectgroup.action = "PL2_ToplistGraph%(fileExt)s"
			document.selectgroup.target = "toplist"
			document.selectgroup.submit()

			document.selectgroup.action = "PL2_SelectHosts%(fileExt)s"
			document.selectgroup.target = "control2"
			document.selectgroup.submit()

		}
	}

	function test() {
			document.selectgroup.action = "http://www.brinet.se/cgi/PL_ToplistGraph.py?grpah=43"
			document.selectgroup.target = "_blank"
			document.selectgroup.submit()
	}

	function callToplist(site)  {
		var myWindow = window.open(site, "toplist");
		myWindow.focus()
	}

	function callPopUp(site, target)  {
		var myPopUp = window.open(site, target);
		myPopUp.focus()
	}

	function channelStat()  {
		var channelStatPopUp = window.open('PL2_SpeedGraph.rpy?chart=11&IP=Channel-1 RX-speed', 'channelStat_%(PL_address)s', 'menubar=no, width=800, height=360, titlebar=no');
		channelStatPopUp.focus()
	}

	function CPUStat()  {
		var CPUStatPopUp = window.open('PL2_SpeedGraph.rpy?chart=11&IP=CPU-load Usage', 'channelStat_%(PL_address)s', 'menubar=no, width=800, height=360, titlebar=no');
		CPUStatPopUp.focus()
	}

	function webStat()  {
		var webstatPopUp = window.open('PL2_wc.rpy', 'webStat_%(PL_address)s', 'menubar=no, width=484, height=360, titlebar=no');
		webstatPopUp.focus()
	}

var groupValue = '/'

</script>
	s=   
</head>

<body bgcolor="#e0e0e0" onload="updateToplist()">
	s  

<script>
var custom = 0
var priority ="%(priority)s"
var development = "%(development)s"
var twisted = "%(twisted)s"
var bgpmenu = "%(bgp)s"
var bgpmenu1 = "%(bgp1)s"
var bgpmenu2 = "%(bgp2)s"
var maintarget = "_self"
var toolBox = "%(toolBox)s"
var input_IP = 1

</script>

<!--
	 Milonic DHTML Website Navigation Menu Version 5.0+
	 Copyright 2004 (c) Milonic Solutions Limited (UK). All Rights Reserved.
	 Please visit http://www.milonic.com/ for more information.
-->

<script type="text/javascript" src="milonic_src.js"></script>
<param copyright="JavaScript Menu by Milonic" value="http://www.milonic.com/"></param>
<script	type="text/javascript">

if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 

</script>

<script type="text/javascript" src="contextmenu.js"></script>
			s3   <div style="top:15px; left:0px; position:relative">s  
<form name="selectgroup" metod="post" encType="multipart/form-data" action="PL2_ToplistGraph%(fileExt)s" target="toplist">
  <table width="470" height="%(selectgroupheight)s" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="164"><p><b>Group (NetObject)</B> <br>
            <select name ="%(group)s" style="width:150px; height:20px; " "encType="multipart/form-data" onchange="groupSelected(value)"  >
              <!-- %(endComment)s
	s   %Y-%m-%d 00:00i   iQ s   <option value="/s   names   ">s
   </option>
s4    %(begComment)s -->
		</select>
			<br>
	</p></td>
	s  

	<td width="306" rowspan="4" valign="top" class="selectTable"><table border="0" align="left" cellpadding="1" cellspacing="0" id="slect">
		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=41&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Current Month">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=31&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Current Week">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=21&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Current Day">
			</td>
		</tr>
		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=42&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Prev Month">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=32&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Prev Week">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=22&img=2&group=' + groupValue + '&hostsingraph=-1')" value="Prev Day">
			</td>
		</tr>
		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=43&img=2&group=' + groupValue + '&hostsingraph=-1')" value="1 Month back">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=33&img=2&group=' + groupValue + '&hostsingraph=-1')" value="1 Week back">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input type="button" class="selectButton"
				onClick="callToplist('PL2_ToplistGraph%(fileExt)s?graph=23&img=2&group=' + groupValue + '&hostsingraph=-1')" value="1 Day back">
			</td>
		</tr>
		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick="channelStat()" value="Channel 1 Stat">
			</td>
			
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick="CPUStat()" value="CPU-load">
			</td>
			
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='statlogout%(fileExt)s' value="Logout">
			</td>sw
  

		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>
		</tr> 

		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>
		</tr>

		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=webStat() value="Web stat">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>
		</tr> 		<tr>
			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="Export to CSV">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="Export to XML">
			</td>

			<td class="selectTable" onmouseover="this.className='selectTableOver'" onmouseout="this.className='normal'">
				<input name="" type="button" class="selectButton"
				onClick=location.href='#' value="">
			</td>
		</tr> s   
	</table></td>
	</tr>
	<tr>

	<td>
	<table width="170" height="28" border="0" cellspacing="0" cellpadding="0">

	<td><select name="year" style="width:52px; height:20px; "onchange="updateToplist()">
	<!-- %(endComment)s
	i  i  s     <option value="s   "s   selecteds   >s    %(begComment)s -->
	  </select>
		<select name="month" size="1" style="width:50px; height:20px; " onchange="updateToplist()">
		<!--  %(endComment)s
	s   Jans   Febs   Mars   Aprs   Mays   Juns   Juls   Augs   Seps   Octs   Novs   Deci   s   <option value="i   s	   </option>s    %(begComment)s -->
        </select>

        <select name="day" style="width:35; height:20px; " onchange="updateToplist()">
          <!--%(endComment)s
	i   s   %02ds   %(begComment)s -->
      </select>
      </td>
      </table>
      </td>
    </tr>
    <tr >
      <td width="164" height="28" >
        <input type="submit" value="Draw toplist" >
        <input type="reset" value="Reset">
      </td>
    </tr>
    <tr>
      <td><input type="hidden" name = "img" value="2">
        <input type="hidden" name = "charttype" value="2">
        <input type="hidden" name = "hostsingraph" value="-1">
<table width="80" height="100" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#666666">
        <tr>
          <td width="240" height="63"><table width="89" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <th height="10" class="style1"><span class="style6">Diagramtype</span></th>
              </tr>
              <tr>
                <td height="10"><span class="style6">
                  <input type="radio" name="diagramtype" value="5" onClick="chartTypeChanged()">
                  Year</span> </td>
              </tr>
              <tr>
                <td height="10"><span class="style6"> </span><span class="style6"> </span><span class="style6"> </span>
                  <input type="radio" name="diagramtype" value="4" onClick="chartTypeChanged()">
              Month </td>
              </tr>
              <tr>
                <td height="10"><span class="style6">
                  <input type="radio" name="diagramtype" value="3" onClick="chartTypeChanged()">
            Week</span></td>
              </tr>
              <tr>
                <td height="10"><span class="style6">
                  <input type="radio" name="diagramtype" value="2" onClick="chartTypeChanged()" checked >
            Day </span></td>
              </tr>
              <tr>
                <td height="10"><span class="style6">
                  <input type="checkbox" name="autodraw" value="Checked" checked >
            Autodraw</span></td>
              </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
  </table>
</form>
	s   </div>s'   
</body>
</html>
<!--   %(endComment)s
s   Content-type: text/html
(3   s   cgis   escapes   sorts   Sorters   times   file2recalls	   file2Calls   groups   PL2_inis   twisteds   fileExts   developments   selectgroupheights   textButtonss   prioritys   bgps   bgp1s   bgp2s
   begComments
   endComments   PL2_address1s	   translates   strings	   maketranss
   PL_addresss	   popUpMenus   toolBoxs   varss   HTMLs   PL2_javascripts   script2s   PL2_menus   menuss   todays   strftimes	   localtimes	   from_dates   to_dates   PL_miscs   rootObjs   cous   xs   strs   ranges   years   tm_years
   monthnamess   months   tm_mons   days   tm_mday("   s   file2recalls
   IP_addresss   environs   years   months   fileExts   to_dates   escapes   Sorters   prioritys   groups   PL2_address1s   bgp1s   twisteds   bgp2s
   endComments	   from_dates   HTMLs   todays
   PL_addresss   developments	   popUpMenus
   monthnamess   days   PL2_menus   cous
   begComments	   file2Calls   bgps   rootObjs   times   xs   toolBoxs   selectgroupheight(    (    s    C:\Python\PL\PL_SelectToplist.pys   selectToplist<   s    	



		

!
		t"		# 2
C
D *  $7
s   __main__s   file2recall(   s   os.paths   oss   syss   strings   IP_miscs   PL_miscs   PL2_inis   PL2_PLDBs   sorts   Sorters   PL2_javascripts   getNodeLists
   searchNodes   getNodess   paths   splits   argvs   Nones   environs   selectToplists   __name__(   s   IP_miscs   PL2_inis   selectToplists   strings   getNodeLists   PL2_javascripts   Sorters   syss
   searchNodes   getNodess   PL2_PLDBs   PL_miscs   os(    (    s    C:\Python\PL\PL_SelectToplist.pys   ?   s   						,  