.cargo
debian
docs
etc
examples
pbs-api-types
pbs-buildcfg
pbs-client
pbs-config
pbs-datastore
pbs-fuse-loop
pbs-runtime
pbs-tape
pbs-tools
proxmox-backup-banner
proxmox-backup-client
proxmox-file-restore
proxmox-rest-server
proxmox-restore-daemon
proxmox-rrd
proxmox-systemd
pxar-bin
src
tests
www
button
config
css
dashboard
data
datastore
form
images
panel
tape
window
ACLEdit.js
AddTfaRecovery.js
AddTotp.js
AddWebauthn.js
BackupFileDownloader.js
BackupGroupChangeOwner.js
CreateDirectory.js
DataStoreEdit.js
NotesEdit.js
NotifyOptions.js
RemoteEdit.js
Settings.js
SyncJobEdit.js
TfaEdit.js
TokenEdit.js
UserEdit.js
UserPassword.js
VerifyJobEdit.js
ZFSCreate.js
Application.js
Dashboard.js
DirectoryList.js
LoginView.js
MainView.js
Makefile
NavigationTree.js
OnlineHelpInfo.js
ServerAdministration.js
ServerStatus.js
Subscription.js
SystemConfiguration.js
Utils.js
VersionInfo.js
ZFSList.js
index.hbs
zsh-completions
.gitignore
Cargo.toml
Makefile
README.rst
TODO.rst
defines.mk
rustfmt.toml
117 lines
2.3 KiB
JavaScript
117 lines
2.3 KiB
JavaScript
Ext.define('PBS.window.VerifyJobEdit', {
|
|
extend: 'Proxmox.window.Edit',
|
|
alias: 'widget.pbsVerifyJobEdit',
|
|
mixins: ['Proxmox.Mixin.CBind'],
|
|
|
|
userid: undefined,
|
|
|
|
onlineHelp: 'maintenance-verification',
|
|
|
|
isAdd: true,
|
|
|
|
subject: gettext('Verification Job'),
|
|
|
|
fieldDefaults: { labelWidth: 120 },
|
|
defaultFocus: 'field[name="ignore-verified"]',
|
|
|
|
cbindData: function(initialConfig) {
|
|
let me = this;
|
|
|
|
let baseurl = '/api2/extjs/config/verify';
|
|
let id = initialConfig.id;
|
|
|
|
me.isCreate = !id;
|
|
me.url = id ? `${baseurl}/${id}` : baseurl;
|
|
me.method = id ? 'PUT' : 'POST';
|
|
me.scheduleValue = id ? null : 'daily';
|
|
me.autoLoad = !!id;
|
|
me.editDatastore = me.datastore === undefined && me.isCreate;
|
|
return { };
|
|
},
|
|
|
|
viewModel: {
|
|
data: {
|
|
'ignore-verified': true,
|
|
},
|
|
},
|
|
|
|
items: {
|
|
xtype: 'inputpanel',
|
|
onGetValues: function(values) {
|
|
let me = this;
|
|
|
|
if (!values.id && me.up('pbsVerifyJobEdit').isCreate) {
|
|
values.id = 'v-' + Ext.data.identifier.Uuid.Global.generate().slice(0, 13);
|
|
}
|
|
return values;
|
|
},
|
|
column1: [
|
|
{
|
|
xtype: 'pmxDisplayEditField',
|
|
fieldLabel: gettext('Local Datastore'),
|
|
name: 'store',
|
|
submitValue: true,
|
|
cbind: {
|
|
editable: '{editDatastore}',
|
|
value: '{datastore}',
|
|
},
|
|
editConfig: {
|
|
xtype: 'pbsDataStoreSelector',
|
|
allowBlank: false,
|
|
},
|
|
},
|
|
{
|
|
xtype: 'pbsCalendarEvent',
|
|
name: 'schedule',
|
|
fieldLabel: gettext('Schedule'),
|
|
emptyText: gettext('none (disabled)'),
|
|
cbind: {
|
|
value: '{scheduleValue}',
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
|
|
column2: [
|
|
{
|
|
xtype: 'proxmoxcheckbox',
|
|
name: 'ignore-verified',
|
|
fieldLabel: gettext('Skip verified snapshots'),
|
|
labelWidth: 150,
|
|
uncheckedValue: false,
|
|
value: true,
|
|
bind: {
|
|
value: '{ignore-verified}',
|
|
},
|
|
},
|
|
{
|
|
xtype: 'proxmoxintegerfield',
|
|
name: 'outdated-after',
|
|
fieldLabel: gettext('Re-Verify After (days)'),
|
|
labelWidth: 150,
|
|
minValue: 1,
|
|
value: 30,
|
|
allowBlank: true,
|
|
emptyText: gettext('Never'),
|
|
bind: {
|
|
disabled: '{!ignore-verified}',
|
|
},
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
|
|
columnB: [
|
|
{
|
|
fieldLabel: gettext('Comment'),
|
|
xtype: 'proxmoxtextfield',
|
|
name: 'comment',
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|