Changeset 65fd31b2


Ignore:
Timestamp:
10/01/13 12:42:17 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
490345a
Parents:
01bbf9d
Message:

Clean up the system error messages, and make sure there are multiple tooltips instead of one long message if there are multiple errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/LPWatcher.cpp

    r01bbf9d r65fd31b2  
    114114  if(LOGS.contains(12) && LOGS.contains(14)){ output << LOGS[14]+" -- "+LOGS[12]; } 
    115115  if(LOGS.contains(22) && LOGS.contains(24)){ output << LOGS[24]+" -- "+LOGS[22]; } 
    116   if(LOGS.contains(32) && LOGS.contains(34)){ output << LOGS[34]+" -- "+LOGS[32]; } 
     116  if(LOGS.contains(32) && LOGS.contains(34)){  
     117    //There can be multiple system errors at a time 
     118    QStringList errors = LOGS[32].split(":::"); 
     119    for(int i=0; i<errors.length(); i++){ 
     120      output << LOGS[34]+" -- "+errors[i];  
     121    } 
     122  } 
    117123  if(LOGS.contains(42) && LOGS.contains(44)){ output << LOGS[44]+" -- "+LOGS[42]; } 
    118124  if(LOGS.contains(52) && LOGS.contains(54)){ output << LOGS[54]+" -- "+LOGS[52]; } 
     
    446452        else if(zstat[i].contains("DEGRADED")){  
    447453          cStat << "DEGRADED"; 
    448           cMsg << tr("The device is in a degraded state, and should be replaced soon."); 
     454          cMsg << tr("The pool is in a degraded state. See additional device error(s)."); 
    449455          cSummary << QString(tr("%1 is degraded.")).arg(device); 
    450456          cDev << device; 
     
    469475     
    470476  //Add the critical messages to the hash 
    471   if(cStat.isEmpty()){ 
     477  if(cStat.isEmpty() || (cStat.join(" ").simplified() == "DEGRADED") ){ 
     478    //No errors, or the pool is degraded without any additional errors (usually because of a resilver going on) 
    472479    if(LOGS.contains(30)){ 
    473480      LOGS.remove(30); 
Note: See TracChangeset for help on using the changeset viewer.