From: Dave Page Date: Wed, 27 Aug 2008 12:40:21 +0000 (+0100) Subject: Use much shorter class names for CSS. Some were potentially used on hundreds or thous... X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f93f21d4d0797281b77c5a591fb47b68aa5d5a82;p=pgphonehome.git Use much shorter class names for CSS. Some were potentially used on hundreds or thousands of rows so a few bytes here and there adds up. --- diff --git a/connections.php b/connections.php index 3a2a055..0cdd5de 100644 --- a/connections.php +++ b/connections.php @@ -58,22 +58,22 @@ while ($row = pg_fetch_assoc($res)) { $subpanel = $panel . "row" . $rownum++; - $list .= "
  • PID: " . www_clean($row['procpid']) . " Source: " . www_clean($row['client_addr']) . ":" . www_clean($row['client_port']) . "
    User: " . www_clean($row['usename']) . " DB: " . www_clean($row['datname']) . "
  • \n"; + $list .= "
  • PID: " . www_clean($row['procpid']) . " Source: " . www_clean($row['client_addr']) . ":" . www_clean($row['client_port']) . "
    User: " . www_clean($row['usename']) . " DB: " . www_clean($row['datname']) . "
  • \n"; $divs .= "
    "; - $divs .= "
    $message2
    "; - $divs .= "

    Process ID

    " . www_clean($row['procpid']) . "
    "; - $divs .= "

    Source address

    " . www_clean($row['client_addr']) . "
    "; - $divs .= "

    Source port

    " . www_clean($row['port']) . "
    "; - $divs .= "

    Database

    " . www_clean($row['datname']) . "
    "; - $divs .= "

    Username

    " . www_clean($row['usename']) . "
    "; - $divs .= "

    Connection start

    " . www_clean($row['backend_start']) . "
    "; + $divs .= "
    $message2
    "; + $divs .= "

    Process ID

    " . www_clean($row['procpid']) . "
    "; + $divs .= "

    Source address

    " . www_clean($row['client_addr']) . "
    "; + $divs .= "

    Source port

    " . www_clean($row['port']) . "
    "; + $divs .= "

    Database

    " . www_clean($row['datname']) . "
    "; + $divs .= "

    Username

    " . www_clean($row['usename']) . "
    "; + $divs .= "

    Connection start

    " . www_clean($row['backend_start']) . "
    "; if (array_key_exists("xact_start", $row)) - $divs .= "

    Transaction start

    " . www_clean($row['xact_start']) . "
    "; + $divs .= "

    Transaction start

    " . www_clean($row['xact_start']) . "
    "; - $divs .= "

    Query start

    " . www_clean($row['query_start']) . "
    "; - $divs .= "

    Current query

    " . www_clean($row['current_query']) . "
    "; + $divs .= "

    Query start

    " . www_clean($row['query_start']) . "
    "; + $divs .= "

    Current query

    " . www_clean($row['current_query']) . "
    "; $divs .= "
    "; } diff --git a/css/iui-ext.css b/css/iui-ext.css index e844927..2ba8b7f 100644 --- a/css/iui-ext.css +++ b/css/iui-ext.css @@ -4,7 +4,7 @@ h2 { } /* A box for displaying values */ -.valueBox { +.vb { position: relative; margin: 0 0 10px 0; padding: 7px 10px 7px 10px; @@ -16,25 +16,25 @@ h2 { } /* Smaller li's for double-lined display */ -li.double { +li.d { font-size: 14px !important; font-weight: normal !important; } /* Notes for li's */ -span.note { +span.n { font-size: 14px !important; font-weight: normal !important; color: gray !important; } /* Colored values */ -.coloredValue { +.cv { color: #333399; } /* A group header on a dialogue */ -.dialogHeader { +.dh { position: relative; display: block; width: 100%; @@ -53,7 +53,7 @@ span.note { } /* li image */ -.menuImage { +.mi { margin-top: -4px; padding-right: 5px; float: left; diff --git a/gucs.php b/gucs.php index af2c8a4..f7c44e9 100644 --- a/gucs.php +++ b/gucs.php @@ -45,7 +45,7 @@ for ($x=0; $x < $rows; $x++) { $guc_name = www_clean(pg_fetch_result($res, $x, "name")); $guc_value = www_clean(pg_fetch_result($res, $x, "setting")); - $gucs .= "

    " . $guc_name . "

    " . $guc_value . "
    "; + $gucs .= "

    " . $guc_name . "

    " . $guc_value . "
    "; } pg_free_result($res); @@ -55,7 +55,7 @@ $message = "Server: " . $servers[$server]["description"]; // Echo the HTML snippet $text = << -
    $message
    +
    $message
    $gucs EOT; diff --git a/index.php b/index.php index e37b9f5..ce617f6 100644 --- a/index.php +++ b/index.php @@ -20,25 +20,25 @@ foreach ($servers as $key=>$server) { // Get the image if there is one if (array_key_exists("icon", $server) && $server["icon"] != "") - $icon = ""; + $icon = ""; // Connect the database $db = @pg_connect($server["connstr"]); // Can we connect? if ($db === false) { - $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    " . html_entity_decode($php_errormsg, ENT_QUOTES) . "
  • "; + $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    " . html_entity_decode($php_errormsg, ENT_QUOTES) . "
  • "; } else { // Valid server version? $res = @pg_query($db, "SHOW server_version_num;"); if (@pg_fetch_result($res, 0, 0) < 80200) { - $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    Server version is less than 8.2
  • "; + $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    Server version is less than 8.2
  • "; } else { // Have we got superuser privs? @pg_free_result($res); $res = @pg_query($db, "SELECT usesuper FROM pg_shadow WHERE usename = current_user;"); if (pg_fetch_result($res, 0, 0) != "t") { - $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    The connecting user is not a superuser
  • "; + $svrlist .= "
  • " . $icon . "" . $server["description"] . "
    The connecting user is not a superuser
  • "; } else { // Looks good - let's go! $svrlist .= "
  • " . $icon . "" . $server["description"] . "
  • "; @@ -75,7 +75,7 @@ $text = <<
  • $message
  • $svrlist -
  • About
  • +
  • About
  • $APP_NAME v$APP_VERSION

    diff --git a/info.php b/info.php index e0b3b6e..40c66ec 100644 --- a/info.php +++ b/info.php @@ -57,14 +57,14 @@ $message = "Server: " . $servers[$server]["description"]; // Echo the HTML snippet $text = << -
    $message
    -

    Server version

    $version
    -

    Server host

    $host
    -

    Server port

    $port
    -

    Active connections

    $connections
    -

    Current database

    $database
    -

    Current username

    $username
    -

    Current backend PID

    $pid
    +
    $message
    +

    Server version

    $version
    +

    Server host

    $host
    +

    Server port

    $port
    +

    Active connections

    $connections
    +

    Current database

    $database
    +

    Current username

    $username
    +

    Current backend PID

    $pid
    EOT; diff --git a/locks.php b/locks.php index 62bcdb8..fa8d2db 100644 --- a/locks.php +++ b/locks.php @@ -97,21 +97,21 @@ while ($row = pg_fetch_assoc($res)) { // Set the sub-panel ID $subpanel = $panel . "row" . $rownum++; - $list .= "
  • Class: " . www_clean($row['class']) . "
    Mode: " . www_clean($row['mode']) . "
    DB: " . www_clean($row['dbname']) . "
  • \n"; + $list .= "
  • Class: " . www_clean($row['class']) . "
    Mode: " . www_clean($row['mode']) . "
    DB: " . www_clean($row['dbname']) . "
  • \n"; $divs .= "
    "; - $divs .= "
    $message2
    "; - $divs .= "

    PID

    " . www_clean($row['pid']) . "
    "; - $divs .= "

    Database

    " . www_clean($row['dbname']) . "
    "; - $divs .= "

    Class

    " . www_clean($row['class']) . "
    "; - $divs .= "

    Username

    " . www_clean($row['user']) . "
    "; + $divs .= "
    $message2
    "; + $divs .= "

    PID

    " . www_clean($row['pid']) . "
    "; + $divs .= "

    Database

    " . www_clean($row['dbname']) . "
    "; + $divs .= "

    Class

    " . www_clean($row['class']) . "
    "; + $divs .= "

    Username

    " . www_clean($row['user']) . "
    "; if ($version >= 80300) - $divs .= "

    Virtual XID

    " . www_clean($row['virtualxid']) . "
    "; - $divs .= "

    Transaction

    " . www_clean($row['transaction']) . "
    "; - $divs .= "

    Mode

    " . www_clean($row['mode']) . "
    "; - $divs .= "

    Granted?

    " . ($row['granted'] == "t" ? "Yes" : "No") . "
    "; - $divs .= "

    Query

    " . www_clean($row['current_query']) . "
    "; - $divs .= "

    Query start

    " . www_clean($row['query_start']) . "
    "; + $divs .= "

    Virtual XID

    " . www_clean($row['virtualxid']) . "
    "; + $divs .= "

    Transaction

    " . www_clean($row['transaction']) . "
    "; + $divs .= "

    Mode

    " . www_clean($row['mode']) . "
    "; + $divs .= "

    Granted?

    " . ($row['granted'] == "t" ? "Yes" : "No") . "
    "; + $divs .= "

    Query

    " . www_clean($row['current_query']) . "
    "; + $divs .= "

    Query start

    " . www_clean($row['query_start']) . "
    "; $divs .= "
    "; } diff --git a/query.php b/query.php index 13f9558..64b385f 100644 --- a/query.php +++ b/query.php @@ -51,11 +51,11 @@ while ($row = pg_fetch_assoc($res)) { // Generate a query ID to stop queries stomping on each other $id = md5(uniqid(rand(), true)); - $list .= "
  • " . www_clean($row['datname']) . "
  • "; + $list .= "
  • " . www_clean($row['datname']) . "
  • "; $divs .= "
    "; $divs .= "
    "; - $divs .= "
    Database: " . www_clean($row['datname']) . "
    "; + $divs .= "
    Database: " . www_clean($row['datname']) . "
    "; $divs .= "

    SQL query

    "; $divs .= "
    "; $divs .= "
    "; diff --git a/results.php b/results.php index 4f1d900..3330fb1 100644 --- a/results.php +++ b/results.php @@ -144,15 +144,15 @@ function get_block($offset, $id) for ($x = $offset; $x < $last_row; $x++) { // Build the row preview list. - $data .= "
  • "; + $data .= "
  • "; - $data .= $_SESSION[$id]['columns'][0] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][0])) . ""; + $data .= $_SESSION[$id]['columns'][0] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][0])) . ""; if ($_SESSION[$id]['column_count'] >= 2) - $data .= "
    " . $_SESSION[$id]['columns'][1] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][1])) . ""; + $data .= "
    " . $_SESSION[$id]['columns'][1] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][1])) . ""; if ($_SESSION[$id]['column_count'] >= 3) - $data .= "
    " . $_SESSION[$id]['columns'][2] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][2])) . ""; + $data .= "
    " . $_SESSION[$id]['columns'][2] . ": " . www_clean(truncate_title($_SESSION[$id]['rows'][$x][2])) . ""; $data .= "
  • "; } @@ -185,10 +185,10 @@ function get_row($row, $id) // Build the panel for this row $data .= "
    "; - $data .= "
    Row: " . ($row + 1) . "
    "; + $data .= "
    Row: " . ($row + 1) . "
    "; for ($col = 0; $col < $_SESSION[$id]['column_count']; $col++) { - $data .= "

    " . $_SESSION[$id]['columns'][$col] . "

    " . www_clean(truncate_value($_SESSION[$id]['rows'][$row][$col])) . "
    "; + $data .= "

    " . $_SESSION[$id]['columns'][$col] . "

    " . www_clean(truncate_value($_SESSION[$id]['rows'][$row][$col])) . "
    "; } $data .= "
    "; diff --git a/server.php b/server.php index f5094c6..c5e2827 100644 --- a/server.php +++ b/server.php @@ -28,12 +28,12 @@ $description = $servers[$server]["description"]; $text = <<
  • Server: $description
  • -
  • Info
  • -
  • Connections
  • -
  • GUCs
  • -
  • Locks
  • -
  • Prepared transactions
  • -
  • SQL query
  • +
  • Info
  • +
  • Connections
  • +
  • GUCs
  • +
  • Locks
  • +
  • Prepared transactions
  • +
  • SQL query
  • EOT; diff --git a/transactions.php b/transactions.php index c7ce4a2..c155caf 100644 --- a/transactions.php +++ b/transactions.php @@ -57,15 +57,15 @@ while ($row = pg_fetch_assoc($res)) { // Set the sub-panel ID $subpanel = $panel . "row" . $rownum++; - $list .= "
  • XID: " . www_clean($row['transaction']) . "
    User: " . www_clean($row['owner']) . " DB: " . www_clean($row['database']) . "
  • "; + $list .= "
  • XID: " . www_clean($row['transaction']) . "
    User: " . www_clean($row['owner']) . " DB: " . www_clean($row['database']) . "
  • "; $divs .= "
    "; - $divs .= "
    $message2
    "; - $divs .= "

    XID

    " . www_clean($row['transaction']) . "
    "; - $divs .= "

    Global ID

    " . www_clean($row['gid']) . "
    "; - $divs .= "

    Time

    " . www_clean($row['prepared']) . "
    "; - $divs .= "

    Owner

    " . www_clean($row['owner']) . "
    "; - $divs .= "

    Database

    " . www_clean($row['database']) . "
    "; + $divs .= "
    $message2
    "; + $divs .= "

    XID

    " . www_clean($row['transaction']) . "
    "; + $divs .= "

    Global ID

    " . www_clean($row['gid']) . "
    "; + $divs .= "

    Time

    " . www_clean($row['prepared']) . "
    "; + $divs .= "

    Owner

    " . www_clean($row['owner']) . "
    "; + $divs .= "

    Database

    " . www_clean($row['database']) . "
    "; $divs .= "
    "; }