From 077f9eceb0d719afd4e06f77e7383525a5e0c2f3 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Thu, 18 Jun 2009 23:25:21 +0000 Subject: [PATCH] Add job type and first volume of the job to the 4th pane the version table. This is so that when looking at what version to restore with copy jobs the user can make a better decision as to which job to restore from git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8912 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/restore/restoretree.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/restore/restoretree.cpp b/bacula/src/qt-console/restore/restoretree.cpp index 25624fbfa1..a3bca8c8c2 100644 --- a/bacula/src/qt-console/restore/restoretree.cpp +++ b/bacula/src/qt-console/restore/restoretree.cpp @@ -617,7 +617,7 @@ void restoreTree::fileCurrentItemChanged(QTableWidgetItem *currentFileTableItem, QBrush blackBrush(Qt::black); QStringList headerlist = (QStringList() - << tr("Job Id") << tr("Type") << tr("End Time") << tr("Hash") << tr("FileId")); + << tr("Job Id") << tr("Type") << tr("End Time") << tr("Hash") << tr("FileId") << tr("Job Type") << tr("First Volume")); versionTable->clear(); versionTable->setColumnCount(headerlist.size()); versionTable->setHorizontalHeaderLabels(headerlist); @@ -626,7 +626,10 @@ void restoreTree::fileCurrentItemChanged(QTableWidgetItem *currentFileTableItem, int pathid = m_directoryPathIdHash.value(directory, -1); if ((pathid != -1) && (fileNameId != -1)) { QString cmd = - "SELECT Job.JobId AS JobId,Job.Level AS Type,Job.EndTime AS EndTime,File.MD5 AS MD5,File.FileId AS FileId" + "SELECT Job.JobId AS JobId, Job.Level AS Type," + " Job.EndTime AS EndTime, File.MD5 AS MD5," + " File.FileId AS FileId, Job.Type AS JobType," + " (SELECT Media.VolumeName FROM JobMedia JOIN Media ON JobMedia.MediaId=Media.MediaId WHERE JobMedia.JobId=Job.JobId ORDER BY JobMediaId LIMIT 1) AS FirstVolume" " FROM File" " INNER JOIN Filename on (Filename.FilenameId=File.FilenameId)" " INNER JOIN Path ON (Path.PathId=File.PathId)" @@ -657,6 +660,12 @@ void restoreTree::fileCurrentItemChanged(QTableWidgetItem *currentFileTableItem, /* Iterate through fields in the record */ foreach (field, fieldlist) { field = field.trimmed(); /* strip leading & trailing spaces */ + if (column == 5 ) { + QByteArray jtype(field.trimmed().toAscii()); + if (jtype.size()) { + field = job_type_to_str(jtype[0]); + } + } tableItem = new QTableWidgetItem(field, 1); tableItem->setFlags(0); tableItem->setForeground(blackBrush); -- 2.39.5