From: Dirk H Bartley Date: Sat, 30 May 2009 18:51:09 +0000 (+0000) Subject: Add columns to the tree to show read/write time, scratch pool, recycle count. X-Git-Tag: Release-3.0.2~190 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6cf228fb0bfbdce0dfda808b8aa382ec067ad38d;p=bacula%2Fbacula Add columns to the tree to show read/write time, scratch pool, recycle count. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8876 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index e5904dc98f..f43b35b0c4 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -86,7 +86,8 @@ void MediaList::populateTree() << tr("Volume Name") << tr("Id") << tr("Status") << tr("Enabled") << tr("Bytes") << tr("Files") << tr("Jobs") << tr("Retention") << tr("Media Type") << tr("Slot") << tr("Use Duration") << tr("Max Jobs") << tr("Max Files") << tr("Max Bytes") << tr("Recycle") - << tr("RecyclePool") << tr("Last Written")); + << tr("Last Written") << tr("First Written") << tr("Read Time") + << tr("Write Time") << tr("Recycle Count") << tr("Recycle Pool") << tr("Scratch Pool")); m_checkcurwidget = false; mp_treeWidget->clear(); @@ -128,10 +129,15 @@ void MediaList::populateTree() " Media.VolUseDuration AS UseDuration," " Media.MaxVolJobs AS MaxJobs, Media.MaxVolFiles AS MaxFiles," " Media.MaxVolBytes AS MaxBytes, Media.Recycle AS Recycle," - " Pol.Name AS RecyclePool, Media.LastWritten AS LastWritten" + " Media.LastWritten AS LastWritten," + " Media.FirstWritten AS FirstWritten," + " (VolReadTime/1000000) AS ReadTime, (VolWriteTime/1000000) AS WriteTime," + " RecycleCount AS ReCyCount," + " RecPool.Name AS RecyclePool, ScrPool.Name AS ScratchPool" " FROM Media" " JOIN Pool ON (Media.PoolId=Pool.PoolId)" - " LEFT OUTER JOIN Pool AS Pol ON (Media.RecyclePoolId=Pol.PoolId)" + " LEFT OUTER JOIN Pool AS RecPool ON (Media.RecyclePoolId=RecPool.PoolId)" + " LEFT OUTER JOIN Pool AS ScrPool ON (Media.ScratchPoolId=ScrPool.PoolId)" " WHERE "; query += " Pool.Name IN (" + pool_comsep + ")"; query += " ORDER BY Pool.Name, Media"; @@ -224,10 +230,25 @@ void MediaList::populateTree() /* recycle */ mediaitem.setBoolFld(index++, fld.next()); + /* last written */ + mediaitem.setTextFld(index++, fld.next()); + + /* first written */ + mediaitem.setTextFld(index++, fld.next()); + + /* read time */ + mediaitem.setDurationFld(index++, fld.next()); + + /* write time */ + mediaitem.setDurationFld(index++, fld.next()); + + /* Recycle Count */ + mediaitem.setNumericFld(index++, fld.next()); + /* recycle pool */ mediaitem.setTextFld(index++, fld.next()); - /* last written */ + /* Scratch pool */ mediaitem.setTextFld(index++, fld.next()); } /* foreach resultline */