Changeset 344 for trunk


Ignore:
Timestamp:
Nov 1, 2017, 7:24:34 AM (6 years ago)
Author:
g7moreau
Message:
  • Many small improvment and error &nbsp ->   ...
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r342 r344  
    17321732 <thead>
    17331733  <tr>
    1734    <th scope="col" class="klask-header-left">Switch &#8645;</th>
     1734   <th scope="col" class="klask-header-left">Switch&nbsp;&#8645;</th>
    17351735   <th scope="col" class="sorttable_nosort">Port</th>
    17361736   <th scope="col" class="sorttable_nosort">Link</th>
    1737    <th scope="col" class="sorttable_alpha">Hostname-FQ &#8645;</th>
    1738    <th scope="col" class="hklask-ipv4">IPv4-Address &#8645;</th>
    1739    <th scope="col" class="sorttable_alpha">MAC-Address &#8645;</th>
    1740    <th scope="col" class="sorttable_alpha">VLAN &#8645;</th>
    1741    <th scope="col" class="klask-header-right">Date &#8645;</th>
     1737   <th scope="col" class="sorttable_alpha">Hostname-FQ&nbsp;&#8645;</th>
     1738   <th scope="col" class="hklask-ipv4">IPv4-Address&nbsp;&#8645;</th>
     1739   <th scope="col" class="sorttable_alpha">MAC-Address&nbsp;&#8645;</th>
     1740   <th scope="col" class="sorttable_alpha">VLAN&nbsp;&#8645;</th>
     1741   <th scope="col" class="klask-header-right">Date&nbsp;&#8645;</th>
    17421742  </tr>
    17431743 </thead>
     
    21782178 <thead>
    21792179  <tr>
    2180    <th scope="col" class="klask-header-left">Switch &#8645</th>
     2180   <th scope="col" class="klask-header-left">Switch&nbsp;&#8645;</th>
    21812181   <th scope="col" class="sorttable_nosort">Port</th>
    2182    <th scope="col" class="sorttable_alpha">VLAN-Bad &#8645</th>
    2183    <th scope="col" class="sorttable_alpha">VLAN-Good &#8645</th>
    2184    <th scope="col" class="sorttable_alpha">Date-Last &#8645</th>
    2185    <th scope="col" class="sorttable_alpha">Date-Good &#8645</th>
    2186    <th scope="col" class="sorttable_alpha">MAC-Address &#8645</th>
    2187    <th scope="col" class="klask-header-right">Hostname-FQ &#8645</th>
     2182   <th scope="col" class="sorttable_alpha">VLAN-Bad&nbsp;&#8645;</th>
     2183   <th scope="col" class="sorttable_alpha">VLAN-Good&nbsp;&#8645;</th>
     2184   <th scope="col" class="sorttable_alpha">Date-Last&nbsp;&#8645;</th>
     2185   <th scope="col" class="sorttable_alpha">Date-Good&nbsp;&#8645;</th>
     2186   <th scope="col" class="sorttable_alpha">MAC-Address&nbsp;&#8645;</th>
     2187   <th scope="col" class="klask-header-right">Hostname-FQ&nbsp;&#8645;</th>
    21882188  </tr>
    21892189 </thead>
     
    27352735 <thead>
    27362736  <tr>
    2737    <th scope="col" class="klask-header-left">IPv4-Address &#8645</th>
    2738    <th scope="col" class="sorttable_alpha">Hostname-FQ &#8645</th>
    2739    <th scope="col" class="sorttable_alpha">VLAN &#8645</th>
    2740    <th scope="col" class="klask-header-right">Date &#8645</th>
     2737   <th scope="col" class="klask-header-left">IPv4-Address&nbsp;&#8645;</th>
     2738   <th scope="col" class="sorttable_alpha">Hostname-FQ&nbsp;&#8645;</th>
     2739   <th scope="col" class="sorttable_alpha">VLAN&nbsp;&#8645;</th>
     2740   <th scope="col" class="klask-header-right">Date&nbsp;&#8645;</th>
    27412741  </tr>
    27422742 </thead>
  • trunk/push-web

    r343 r344  
    55# 2011/03/30 gabriel - make it generic
    66
     7export PATH=/bin:/sbin:/usr/bin:/usr/sbin
     8export LANG=C
     9
    710SITE_NAME=''
    811REMOTE_SERVER=localhost
     
    2124
    2225
    23 # local command
    24 MKDIR=/bin/mkdir
    25 DATE=/bin/date
    26 CAT=/bin/cat
    27 TAIL=/usr/bin/tail
    28 HEAD=/usr/bin/head
    29 SSH=/usr/bin/ssh
    30 SCP=/usr/bin/scp
    31 KLASK=/usr/sbin/klask
    32 RSYNC=/usr/bin/rsync
    33 
    3426# remote command
    3527DOT=/usr/bin/dot
    3628
    3729
    38 $MKDIR -p ${TMP}
     30mkdir -p ${TMP}
    3931if [ ! -d ${TMP} ]
    4032then
     
    4537
    4638
    47 LOCALTIME=$($DATE "+%Y-%m-%d %H:%M")
    48 
    49 
    50 $KLASK exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt
    51 
    52 
    53 $KLASK exportdb    > ${TMP}/hostname-db.txt
    54 $KLASK exportsw    > ${TMP}/switch-db.txt
    55 $KLASK ip-free     > ${TMP}/ipfree-db.txt
    56 $KLASK bad-vlan-id > ${TMP}/badvlan-db.txt
    57 
    58 
    59 $CAT <<END > ${TMP}/index.html
     39LOCALTIME=$(date "+%Y-%m-%d %H:%M")
     40
     41
     42klask exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt
     43
     44
     45klask exportdb    > ${TMP}/hostname-db.txt
     46klask exportsw    > ${TMP}/switch-db.txt
     47klask ip-free     > ${TMP}/ipfree-db.txt
     48klask bad-vlan-id > ${TMP}/badvlan-db.txt
     49
     50
     51cat <<END > ${TMP}/index.html
    6052<html>
    6153<head>
     
    8678  <li id="selected"><a href="index.html">IP detected</a></li>
    8779  <li><a href="ip-free.html">IP available</a></li>
    88   <li><a href="bad-vlan-id.html">Bad VLAN ID</a></li>
     80  <li><a href="bad-vlan-id.html">VLAN mismatch</a></li>
    8981 </ul>
    9082</div>
     
    9385<p>
    9486The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment:
    95 <a href="hostname-db.txt">Computers</a>,
    96 <a href="switch-db.txt">Switches</a>,
     87<a href="hostname-db.txt">Computers DB</a>,
     88<a href="switch-db.txt">Switches DB</a>,
    9789<a href="ipfree-db.txt">IP available</a>,
    98 <a href="badvlan-db.txt">Bad VLAN ID</a>,
    99 <a href="switch-map.txt">Map</a>.
    100 </p>
    101 END
    102 
    103 $KLASK exportdb --format html >> ${TMP}/index.html
    104 
    105 $CAT <<END >> ${TMP}/index.html
     90<a href="badvlan-db.txt">VLAN mismatch</a>,
     91<a href="switch-map.txt">Map dot source</a>.
     92</p>
     93END
     94
     95klask exportdb --format html >> ${TMP}/index.html
     96
     97cat <<END >> ${TMP}/index.html
    10698</div>
    10799<p class="copyright">
     
    113105
    114106
    115 $CAT <<END > ${TMP}/ip-free.html
     107cat <<END > ${TMP}/ip-free.html
    116108<html>
    117109<head>
     
    131123  <li><a href="index.html">IP detected</a></li>
    132124  <li id="selected"><a href="ip-free.html">IP available</a></li>
    133   <li><a href="bad-vlan-id.html">Bad VLAN ID</a></li>
     125  <li><a href="bad-vlan-id.html">VLAN mismatch</a></li>
    134126 </ul>
    135127</div>
     
    138130<p>
    139131The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment:
    140 <a href="hostname-db.txt">Computers</a>,
    141 <a href="switch-db.txt">Switches</a>,
     132<a href="hostname-db.txt">Computers DB</a>,
     133<a href="switch-db.txt">Switches DB</a>,
    142134<a href="ipfree-db.txt">IP available</a>,
    143 <a href="bad-vlan-id-db.txt">Bad VLAN ID</a>,
    144 <a href="switch-map.txt">Map</a>.
    145 </p>
    146 END
    147 
    148 $KLASK ip-free --format html >> ${TMP}/ip-free.html
    149 
    150 $CAT <<END >> ${TMP}/ip-free.html
     135<a href="bad-vlan-id-db.txt">VLAN mismatch</a>,
     136<a href="switch-map.txt">Map dot source</a>.
     137</p>
     138END
     139
     140klask ip-free --format html >> ${TMP}/ip-free.html
     141
     142cat <<END >> ${TMP}/ip-free.html
    151143</div>
    152144<p class="copyright">
     
    158150
    159151
    160 $CAT <<END > ${TMP}/bad-vlan-id.html
     152cat <<END > ${TMP}/bad-vlan-id.html
    161153<html>
    162154<head>
     
    176168  <li><a href="index.html">IP detected</a></li>
    177169  <li><a href="ip-free.html">IP available</a></li>
    178   <li id="selected"><a href="bad-vlan-id.html">Bad VLAN ID</a></li>
     170  <li id="selected"><a href="bad-vlan-id.html">VLAN mismatch</a></li>
    179171 </ul>
    180172</div>
     
    183175<p>
    184176The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment:
    185 <a href="hostname-db.txt">Computers</a>,
    186 <a href="switch-db.txt">Switches</a>,
     177<a href="hostname-db.txt">Computers DB</a>,
     178<a href="switch-db.txt">Switches DB</a>,
    187179<a href="ipfree-db.txt">IP available</a>,
    188 <a href="bad-vlan-id-db.txt">Bad VLAN ID</a>,
    189 <a href="switch-map.txt">Map</a>.
    190 </p>
    191 END
    192 
    193 $KLASK bad-vlan-id --format html >> ${TMP}/bad-vlan-id.html
    194 
    195 $CAT <<END >> ${TMP}/bad-vlan-id.html
     180<a href="bad-vlan-id-db.txt">VLAN mismatch</a>,
     181<a href="switch-map.txt">Map dot source</a>.
     182</p>
     183END
     184
     185klask bad-vlan-id --format html >> ${TMP}/bad-vlan-id.html
     186
     187cat <<END >> ${TMP}/bad-vlan-id.html
    196188</div>
    197189<p class="copyright">
     
    205197if [ "${REMOTE_SERVER}" = "localhost" ]
    206198then
    207    $RSYNC \
     199   rsync \
    208200      /usr/share/klask/sorttable-klask.js \
    209201      /usr/share/klask/style-klask.css \
     
    218210
    219211else
    220    $RSYNC \
     212   rsync \
    221213      /usr/share/klask/sorttable-klask.js \
    222214      /usr/share/klask/style-klask.css \
     
    229221
    230222
    231    $SSH ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)"
     223   ssh ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)"
    232224fi
  • trunk/sorttable-klask.js

    r85 r344  
    101101            sortrevind = document.createElement('span');
    102102            sortrevind.id = "sorttable_sortrevind";
    103             sortrevind.innerHTML = stIsIE ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;';
     103            sortrevind.innerHTML = stIsIE ? '&nbsp;<font face="webdings">5</font>' : '&nbsp;&#x25B4;';
    104104            this.appendChild(sortrevind);
    105105            return;
     
    114114            sortfwdind = document.createElement('span');
    115115            sortfwdind.id = "sorttable_sortfwdind";
    116             sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
     116            sortfwdind.innerHTML = stIsIE ? '&nbsp;<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
    117117            this.appendChild(sortfwdind);
    118118            return;
     
    135135          sortfwdind = document.createElement('span');
    136136          sortfwdind.id = "sorttable_sortfwdind";
    137           sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
     137          sortfwdind.innerHTML = stIsIE ? '&nbsp;<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
    138138          this.appendChild(sortfwdind);
    139139
Note: See TracChangeset for help on using the changeset viewer.