Code cleanup in Backup

Whitespace removal and consolidating VZDump's job id format into a
local variable.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2019-08-12 14:50:08 +02:00 committed by Thomas Lamprecht
parent 389d3cf19b
commit 43b2494b79
2 changed files with 14 additions and 21 deletions

View File

@ -31,6 +31,11 @@ sub verify_day_of_week {
die "invalid day '$value'\n";
}
my $vzdump_job_id_prop = {
type => 'string',
description => "The job ID.",
maxLength => 50
};
my $dowhash_to_dow = sub {
my ($d, $num) = @_;
@ -207,7 +212,7 @@ __PACKAGE__->register_method({
items => {
type => "object",
properties => {
id => { type => 'string' },
id => $vzdump_job_id_prop
},
},
links => [ { rel => 'child', href => "{id}" } ],
@ -304,11 +309,7 @@ __PACKAGE__->register_method({
parameters => {
additionalProperties => 0,
properties => {
id => {
type => 'string',
description => "The job ID.",
maxLength => 50,
}
id => $vzdump_job_id_prop
},
},
returns => {
@ -344,11 +345,7 @@ __PACKAGE__->register_method({
parameters => {
additionalProperties => 0,
properties => {
id => {
type => 'string',
description => "The job ID.",
maxLength => 50,
},
id => $vzdump_job_id_prop
},
},
returns => { type => 'null' },
@ -397,11 +394,7 @@ __PACKAGE__->register_method({
parameters => {
additionalProperties => 0,
properties => PVE::VZDump::json_config_properties({
id => {
type => 'string',
description => "The job ID.",
maxLength => 50,
},
id => $vzdump_job_id_prop,
starttime => {
type => 'string',
description => "Job Start time.",

View File

@ -410,11 +410,11 @@ Ext.define('PVE.dc.BackupView', {
return;
}
var win = Ext.create('PVE.dc.BackupEdit',{
jobid: rec.data.id
});
win.on('destroy', reload);
win.show();
var win = Ext.create('PVE.dc.BackupEdit', {
jobid: rec.data.id
});
win.on('destroy', reload);
win.show();
};
var run_backup_now = function(job) {