# there will be only one jobid in the array of jobids...
sub get_all_file_versions
{
- my ($self,$pathid,$fileid,$client,$see_all)=@_;
+ my ($self,$pathid,$fileid,$client,$see_all,$see_copies)=@_;
defined $see_all or $see_all=0;
+ my $backup_type=" AND Job.Type = 'B' ";
+ if ($see_copies) {
+ $backup_type=" AND Job.Type IN ('C', 'B') ";
+ }
my @versions;
my $query;
AND File.FileIndex >= JobMedia.FirstIndex
AND File.FileIndex <= JobMedia.LastIndex
AND JobMedia.MediaId = Media.MediaId
- AND Client.Name = '$client'";
+ AND Client.Name = '$client'
+ $backup_type
+";
$self->debug($query);
my $result = $self->dbh_selectall_arrayref($query);
my $vafv = CGI::param('vafv') || 'false'; # view all file versions
$vafv = ($vafv eq 'false')?0:1;
+ my $vcopies = CGI::param('vcopies') || 'false'; # view copies file versions
+ $vcopies = ($vcopies eq 'false')?0:1;
+
print "[";
# 0 1 2 3 4 5 6 7 8
#($pathid,$fileid,$jobid, $fid, $mtime, $size, $inchanger, $md5, $volname);
- my $files = $bvfs->get_all_file_versions($args->{pathid}, $args->{filenameid}, $args->{client}, $vafv);
+ my $files = $bvfs->get_all_file_versions($args->{pathid}, $args->{filenameid}, $args->{client}, $vafv, $vcopies);
print join(',',
map { "[ $_->[3], $_->[1], $_->[0], $_->[2], '$_->[8]', $_->[6], '$_->[7]', $_->[5],'" . strftime('%Y-%m-%d %H:%m:%S', localtime($_->[4])) . "']" }
@$files);
Ext.brestore.media_store; // media store
Ext.brestore.option_vosb = false;
Ext.brestore.option_vafv = false;
+Ext.brestore.option_vcopies = false;
Ext.brestore.dlglaunch;
Ext.brestore.fpattern;
Ext.brestore.use_filerelocation=false;
file_versions_store.load({
params:init_params({action: 'list_versions',
vafv: Ext.brestore.option_vafv,
+ vcopies: Ext.brestore.option_vcopies,
pathid: r.json[2],
filenameid: r.json[1]
})
if (item.id == 'id_vafv') {
Ext.brestore.option_vafv = check;
}
+ if (item.id == 'id_vcopies') {
+ Ext.brestore.option_vcopies = check;
+ }
}
var menu = new Ext.menu.Menu({
checked: Ext.brestore.option_vafv,
checkHandler: sel_option
})
+ new Ext.menu.CheckItem({
+ id: 'id_vafv',
+ text: 'View copies version',
+ checked: Ext.brestore.option_vcopies,
+ checkHandler: sel_option
+ })
]
});
+<TMPL_UNLESS nohead>
<br/>
<div class='titlediv'>
- <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name></h1>
+ <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name> </h1>
</div>
<div class='bodydiv'>
- <pre id='log' style='font-size: 10px'>
+ <label onclick="toggle_display('log', 'arrow')"><img src="/bweb/right.gif" id='arrow' title="See output" > Command output</label><br>
+ <pre id='log' style='font-size: 10px;display:none'></TMPL_UNLESS>
<TMPL_VAR content>
- </pre>
- </div>
+ <TMPL_UNLESS notail></pre>
+ </div></TMPL_UNLESS>
+<TMPL_UNLESS nohead>
<br/>
<div class='titlediv'>
- <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name></h1>
+ <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name> </h1>
</div>
<div class='bodydiv'>
- <pre id='log' style='font-size: 10px'>
+ <label onclick="toggle_display('log', 'arrow')"><img src="/bweb/right.gif" id='arrow' title="See output" > Command output</label><br>
+ <pre id='log' style='font-size: 10px;display:none'></TMPL_UNLESS>
<TMPL_VAR content>
- </pre>
- </div>
+ <TMPL_UNLESS notail></pre>
+ </div></TMPL_UNLESS>
+<TMPL_UNLESS nohead>
<br/>
<div class='titlediv'>
- <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name></h1>
+ <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name> </h1>
</div>
<div class='bodydiv'>
- <pre id='log' style='font-size: 10px'>
+ <label onclick="toggle_display('log', 'arrow')"><img src="/bweb/right.gif" id='arrow' title="See output" > Command output</label><br>
+ <pre id='log' style='font-size: 10px;display:none'></TMPL_UNLESS>
<TMPL_VAR content>
- </pre>
- </div>
+ <TMPL_UNLESS notail></pre>
+ </div></TMPL_UNLESS>
{
my ($self, $drive, $slot, $tag) = @_;
$self->{drive}->[$drive] = $tag || $slot;
+ $self->{drive_slot}->[$drive] = $slot;
$self->{slot}->[$slot] = $tag || 'loaded';
return $self->error("Bad autochanger name");
}
- print "<pre>";
+ $self->display({
+ title => "Scanning autochanger content ",
+ name => "update slots",
+ notail => 1,
+ }, "command.tpl");
my $b = new Bconsole(pref => $self->{info},timeout => 60,log_stdout => 1);
$b->update_slots($ach->{name});
- print "</pre>\n"
+
+ $self->display({
+ nohead => 1,
+ }, "command.tpl");
}
sub get_job_log
+04Apr05
+ebl Add View copies option to bresto
+ebl Tweak command output to add hide/display button
29Mar09
ebl add bypool option to btime
09Mar09
<button type="submit" class="bp" name='action' value='eject'
title='__put selected media on i/o__'><img src='/bweb/extern.png' alt=''>__Eject__</button>
<button type="submit" class="bp" name='action' value='clear_io'
- title='__Clear I/O__'> <img src='/bweb/intern.png' alt=''>__Clear I/O__</button>
+ title='__clear I/O__'> <img src='/bweb/intern.png' alt=''>__Clear I/O__</button>
</TMPL_IF>
<button type="submit" class="bp" name='action' value='update_slots'
title='__run update slots__'> <img src='/bweb/update.png' alt=''>__Update__</button>
+<TMPL_UNLESS nohead>
<br/>
<div class='titlediv'>
- <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name></h1>
+ <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name> </h1>
</div>
<div class='bodydiv'>
- <pre id='log' style='font-size: 10px'>
+ <label onclick="toggle_display('log', 'arrow')"><img src="/bweb/right.gif" id='arrow' title="See output" > Command output</label><br>
+ <pre id='log' style='font-size: 10px;display:none'></TMPL_UNLESS>
<TMPL_VAR content>
- </pre>
- </div>
+ <TMPL_UNLESS notail></pre>
+ </div></TMPL_UNLESS>