IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40094 for trunk/ippMonitor


Ignore:
Timestamp:
Jul 11, 2017, 3:44:01 PM (9 years ago)
Author:
eugene
Message:

sort order for labels in list by priority DESC, label

Location:
trunk/ippMonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czartool/CzarDb.pm

    r40087 r40094  
    9191    SELECT label
    9292        FROM current_labels
    93         WHERE server LIKE '$server';
     93        WHERE server LIKE '$server'
     94        ORDER BY priority DESC, label;
    9495SQL
    9596
  • trunk/ippMonitor/raw/czartool_labels.php

    r40017 r40094  
    395395
    396396    # order by descending priority as set in project database
    397     $sql = "SELECT label FROM current_labels WHERE server LIKE '$server' ORDER BY priority DESC";
     397    $sql = "SELECT label FROM current_labels WHERE server LIKE '$server' ORDER BY priority DESC, label";
    398398    if ($debug) {echo "$sql<br>";}
    399399
     
    949949
    950950    }
     951
     952    # note: mysql user must have either SUPER or REPLICATION CLIENT privileges on the database
    951953    $res = $dbRepl->query('SHOW SLAVE STATUS');
     954    if (dberror($res)) {
     955        echo "<tr><td>$replDatabaseName</td><td bgcolor=\"red\">MySQL query error - invalid user? check configuration</td></tr>";
     956        //die("MySQL DB connection error: Check the configuration for $replDatabaseName");
     957        //die("");
     958        return -1;
     959    }
     960
    952961    while ($res->fetchInto($row)) {
    953962        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
Note: See TracChangeset for help on using the changeset viewer.