[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bacula-devel] patch: backport of some fixes for bat on branch 2.2


Hello,
the attached patch backports some fixes from trunk and adds a column "In Changer" to the media list.
Detail of changes:
 - fix column resizing for fileset view
 - fix column resizing for storage view
 - fix duplicate record in joblist when using the media filter
 - remove duplicate column from media list
- adds "In Changer" column so people with a changer can at least have an idea of which volumes are available (according to bacula, at least)

Ciao,
Riccardo
Index: bacula/src/qt-console/fileset/fileset.cpp
===================================================================
--- bacula/src/qt-console/fileset/fileset.cpp	(revision 6918)
+++ bacula/src/qt-console/fileset/fileset.cpp	(working copy)
@@ -132,7 +132,7 @@
       }
    }
    /* Resize the columns */
-   for (int cnter=1; cnter<headerlist.size(); cnter++) {
+   for (int cnter=0; cnter<headerlist.size(); cnter++) {
       mp_treeWidget->resizeColumnToContents(cnter);
    }
 
Index: bacula/src/qt-console/storage/storage.cpp
===================================================================
--- bacula/src/qt-console/storage/storage.cpp	(revision 6918)
+++ bacula/src/qt-console/storage/storage.cpp	(working copy)
@@ -132,7 +132,7 @@
       }
    }
    /* Resize the columns */
-   for(int cnter=1; cnter<headerlist.size(); cnter++) {
+   for(int cnter=0; cnter<headerlist.size(); cnter++) {
       mp_treeWidget->resizeColumnToContents(cnter);
    }
 }
Index: bacula/src/qt-console/medialist/medialist.cpp
===================================================================
--- bacula/src/qt-console/medialist/medialist.cpp	(revision 6918)
+++ bacula/src/qt-console/medialist/medialist.cpp	(working copy)
@@ -79,8 +79,8 @@
 
    QStringList headerlist = (QStringList()
       << "Volume Name" << "Id" << "Status" << "Enabled" << "Bytes" << "Files"
-      << "Jobs" << "Retention" << "Media Type" << "Slot" << "Use Duration"
-      << "Max Jobs" << "Max Files" << "Max Bytes" << "Recycle" << "Enabled"
+      << "Jobs" << "Retention" << "Media Type" << "Slot" << "In Changer" << "Use Duration"
+      << "Max Jobs" << "Max Files" << "Max Bytes" << "Recycle"
       << "RecyclePool" << "Last Written");
    int statusIndex = headerlist.indexOf("Status");
 
@@ -108,10 +108,11 @@
          " Media.Enabled AS Enabled, Media.VolBytes AS Bytes,"
          " Media.VolFiles AS FileCount, Media.VolJobs AS JobCount,"
          " Media.VolRetention AS VolumeRetention, Media.MediaType AS MediaType,"
-         " Media.Slot AS Slot, Media.VolUseDuration AS UseDuration,"
+         " Media.Slot AS Slot, Media.InChanger AS InChanger,"
+	 " Media.VolUseDuration AS UseDuration,"
          " Media.MaxVolJobs AS MaxJobs, Media.MaxVolFiles AS MaxFiles,"
          " Media.MaxVolBytes AS MaxBytes, Media.Recycle AS Recycle,"
-         " Media.Enabled AS enabled, Pol.Name AS RecyclePool,"
+         " Pol.Name AS RecyclePool,"
          " Media.LastWritten AS LastWritten"
          " FROM Media"
          " JOIN Pool ON (Media.PoolId=Pool.PoolId)"
Index: bacula/src/qt-console/joblist/joblist.cpp
===================================================================
--- bacula/src/qt-console/joblist/joblist.cpp	(revision 6918)
+++ bacula/src/qt-console/joblist/joblist.cpp	(working copy)
@@ -154,7 +154,7 @@
    int volumeIndex = volumeComboBox->currentIndex();
    if (volumeIndex != -1)
       m_mediaName = volumeComboBox->itemText(volumeIndex);
-   query += "SELECT Job.Jobid AS Id, Job.Name AS JobName, " 
+   query += "SELECT DISTINCT Job.Jobid AS Id, Job.Name AS JobName, " 
             " Client.Name AS Client,"
             " Job.Starttime AS JobStart, Job.Type AS JobType,"
             " Job.Level AS BackupLevel, Job.Jobfiles AS FileCount,"
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.