tazpanel annotate styles/default/header.html @ rev 629

powersaving.cgi: add cpu governor update support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 07 19:59:19 2019 +0200 (2019-07-07)
parents a15373a181ff
children
rev   line source
al@525 1 # Header of TazPanel html page
al@525 2
al@538 3 rootclass='user'; [ $(id -u) -eq 0 ] && rootclass='root'
pascal@509 4 TEXTDOMAIN_original="${TEXTDOMAIN:-tazpanel}"
al@448 5 export TEXTDOMAIN='tazpanel'
al@437 6
pascal@478 7 extra_menu() {
pascal@480 8 local x
pascal@480 9 case "$1" in
al@498 10 */*) filter="s/data-icon=\\\"[^\\\"]*\\\"/data-icon=\\\"\\\"/" ;;
al@498 11 *) filter='' ;;
pascal@480 12 esac
al@498 13 for x in menu.d/$1/*; do
pascal@480 14 [ -f $x ] && sh $x menu $x | sed "$filter"
pascal@480 15 [ -d $x ] || continue
pascal@480 16 icon="$(sed '/data-icon/!d;s/.*data-icon="\([^"]*\).*/\1/;q' $x/*)"
al@558 17 echo -e "<li><a data-icon=\"${icon:-@add@}\">$(_ "$(basename $x)")</a>\n<menu>"
pascal@480 18 extra_menu ${x#menu.d/}
pascal@478 19 echo -e "</menu>\n</li>"
pascal@478 20 done
pascal@478 21 }
pascal@478 22
al@498 23 cat <<EOT
domcox@300 24 <!DOCTYPE html>
al@406 25 <html lang="${LANG%%_*}">
domcox@300 26 <head>
al@519 27 <title>TazPanel</title>
al@419 28 <link rel="shortcut icon" href="/styles/$STYLE/favicon.ico"/>
al@443 29 <meta name="viewport" content="width=device-width,initial-scale=1"/>
al@525 30 $(printf '\t<link rel="stylesheet" type="text/css" href="/%s"/>\n' $(cd /var/www/tazpanel; ls styles/$STYLE/*.css* | sed 's|.gz||'))
al@525 31 $(printf '\t<script type="text/javascript" src="/%s"></script>\n' $(cd /var/www/tazpanel; ls lib/*.js* | sed 's|.gz||'))
domcox@300 32 </head>
al@437 33 <body class="$rootclass">
al@419 34 <script type="text/javascript">setColorTheme(); setBaseFont();</script>
al@462 35 <div id="confirmBreak" style="display:none">$(_ 'Confirm break')</div>
domcox@300 36
psychomaniak@409 37 <header>
al@539 38 <h1 data-icon="tazpanel">@@TITLE@@ </h1>
al@539 39 <div>@@SUBTITLE@@</div>
psychomaniak@409 40 </header>
pankso@384 41
al@419 42 <nav id="toolbar">
al@419 43 <menu type="toolbar" id="toolbarMenu">
al@419 44 <li tabindex="1">
al@443 45 <span>$(_ 'Panel')</span>
al@419 46 <menu>
al@558 47 <li><a data-icon="@info@" href="index.cgi">$(_ 'Summary')</a></li>
al@558 48 <li><a data-icon="@proc@" href="index.cgi?top">$(_ 'Processes')</a></li>
al@558 49 <li><a data-icon="@terminal@" href="index.cgi?cmd=help">$(_ 'Terminal')</a></li>
al@558 50 <li><a data-icon="@report@" href="index.cgi?report" data-root>$(_ 'Create Report')</a></li>
pascal@478 51 $(extra_menu panel)
al@419 52 </menu>
al@419 53 </li>
al@419 54 <li tabindex="2">
al@443 55 <span>$(_ 'Network')</span>
al@419 56 <menu>
al@558 57 <li><a data-icon="@info@" href="network.cgi">$(_ 'Summary')</a></li>
al@558 58 <li><a data-icon="@conf@" href="index.cgi?file=/etc/network.conf&amp;action=edit">$(_ 'Config file')</a></li>
al@558 59 <li><a data-icon="@eth@" href="network.cgi?eth">$(_ 'Ethernet')</a></li>
al@558 60 <li><a data-icon="@wifi@" href="network.cgi?wifi">$(_ 'Wireless')</a></li>
pascal@478 61 $(extra_menu network)
al@419 62 </menu>
al@419 63 </li>
al@419 64 <li tabindex="3">
al@443 65 <span>$(_ 'Boot')</span>
al@419 66 <menu>
al@558 67 <li><a data-icon="@info@" href="boot.cgi">$(_ 'Summary')</a></li>
pascal@434 68 EOT
al@498 69
al@498 70 [ -w /boot/grub/menu.lst ] && cat <<EOT
al@558 71 <li><a data-icon="@grub@" href="boot.cgi?grub">$(_ 'Boot loader')</a></li>
pascal@434 72 EOT
al@498 73
al@498 74 cat <<EOT
al@558 75 <li><a data-icon="@logs@" href="boot.cgi?log">$(_ 'Boot logs')</a>
al@419 76 <menu>
al@443 77 <li><a data-icon="" href="boot.cgi?log=kernel">$(_ 'Kernel messages')</a></li>
al@443 78 <li><a data-icon="" href="boot.cgi?log=boot">$(_ 'Boot scripts')</a></li>
al@443 79 <li><a data-icon="" href="boot.cgi?log=xlog">$(_ 'X server')</a></li>
al@443 80 <li><a data-icon="" href="boot.cgi?log=slim">$(_ 'X session')</a></li>
al@419 81 </menu>
al@419 82 </li>
al@558 83 <li><a data-icon="@logs@" href="boot.cgi?syslog">$(_ 'System logs')</a>
al@558 84 <li><a data-icon="@daemons@" href="boot.cgi?daemons" data-root>$(_ 'Manage daemons')</a></li>
pascal@461 85 $([ -x /usr/bin/taziso ] &&
al@558 86 echo "<li><a data-icon=\"@cd@\" href=\"boot.cgi?iso\" data-root>$(_ 'ISO mine')</a>")
pascal@478 87 $(extra_menu boot)
al@419 88 </menu>
al@419 89 </li>
pascal@433 90 <li tabindex="4">
al@443 91 <span>$(_ 'Hardware')</span>
al@419 92 <menu>
al@558 93 <li><a data-icon="@info@" href="hardware.cgi">$(_ 'Summary')</a></li>
al@558 94 <li><a data-icon="@modules@" href="hardware.cgi?modules">$(_ 'Kernel modules')</a></li>
al@558 95 <li><a data-icon="@detect@" href="hardware.cgi?detect" data-root>$(_ 'Detect PCI/USB')</a></li>
al@558 96 <li><a data-icon="@hdd@" href="hardware.cgi#disk">$(_ 'Disks')</a></li>
pascal@478 97 $(extra_menu hardware)
al@419 98 </menu>
al@419 99 </li>
pascal@433 100 <li tabindex="5">
al@443 101 <span>$(_ 'Settings')</span>
pascal@433 102 <menu>
al@558 103 <li><a data-icon="@info@" href="settings.cgi" data-root>$(_ 'Summary')</a></li>
al@558 104 <li><a data-icon="@user@" href="settings.cgi?users" data-root>$(_ 'Users')</a></li>
al@558 105 <li><a data-icon="@group@" href="settings.cgi?groups" data-root>$(_ 'Groups')</a></li>
al@558 106 <li><a data-icon="@settings@" href="settings.cgi?tweaks">$(_ 'Tweaks')</a></li>
pascal@478 107 $(extra_menu settings)
pascal@433 108 </menu>
pascal@433 109 </li>
pascal@433 110 EOT
al@498 111
al@498 112 cat <<EOT
al@419 113 $(for i in menu.d/* ; do [ -f $i ] && sh $i menu $i ; done)
al@419 114 </menu>
al@419 115 <span id="icons">
al@437 116 EOT
al@437 117
al@437 118 username="${REMOTE_USER:-root}"
al@437 119 case "$username" in
al@558 120 root) icon='data-img="@slitaz@"'; warn=''
al@443 121 toggle_url="http://$HTTP_HOST/";;
al@558 122 *) icon='data-img="@user@"'; warn="$(_ 'Some features are disabled.')"$'\n'
al@526 123 toggle_url="http://$RANDOM:*@$HTTP_HOST/user/";;
al@437 124 esac
al@437 125
al@498 126 cat <<EOT
al@525 127 <a $icon title="$(_ 'You are logged in to the TazPanel as user %s.' $username)
pascal@442 128 $warn$(_ 'Click to re-login.')" href="$toggle_url$(basename $REQUEST_URI)"></a>
al@558 129 <a data-img="@help@" href="help.cgi"></a>
al@419 130 </span>
al@419 131 </nav>
al@498 132
al@419 133 <div id="noMenu"></div>
al@419 134 <script type="text/javascript">addMenuHandlers();</script>
domcox@300 135
al@498 136 <footer>
al@498 137 <span id="defaultStatus">
al@498 138 $(gettext 'Copyright') &copy; $(date +%Y)
pascal@606 139 <a href="http://www.slitaz.org/" target="_blank" rel="noopener">SliTaz GNU/Linux</a>
al@498 140 - <a href="index.cgi?file=/usr/share/licenses/bsd.txt">$(gettext 'BSD License')</a>
al@498 141 </span>
al@498 142 <span id="statusBar"></span>
al@498 143 <span id="ajaxStatus"></span>
al@498 144 </footer>
al@498 145
domcox@300 146 <!-- Page content -->
domcox@300 147 <div id="content">
domcox@300 148 EOT
pascal@509 149 export TEXTDOMAIN="$TEXTDOMAIN_original"