opt
/
kaspersky
/
kav4fs
/
share
/
wmconsole
/
html
/
pages
➕ New
📤 Upload
✎ Editing:
settings.html
← Back
<div id="settingsPageMarker" /> <div class="taskDescription" id="description" ic_height="30" style="display:none;"> <span class="res:DESCR_SETTINGS">DESCR_SETTINGS</span> <div class="er"><a href="javascript:hideDescr()" class="link res:LABEL_HIDE_DESCRIPTION">LABEL_HIDE_DESCRIPTION</a></div> </div> <DIV id="settings_view" class="test1 test2 res:CONTENT_LOADING"></DIV> <script type="text/javascript"> var AVBasesPathSettings = {"MainPath":"","BkpPath":""}; var MAX_QSIZE_S = '18446744073709551615'; // See TT54606 var MAX_QSIZE = parseInt(MAX_QSIZE_S); var MAX_QSIZE_MB = misc_megabyteTransform(MAX_QSIZE, true); function setupQuaSizeCorrector( $elem ) { misc_setupSizeCorrector( $elem, { parseFunc : parseFloat, min : 0, max : MAX_QSIZE_MB }) } function onSettingsModified() { setButtonSaveEnabled(true); } function setupProductSettings() { if(ProductSettings['TraceLevel']==0){ //Unknown replacing ProductSettings['TraceLevel']=1; } var ctrlMap = [ ['user' ,'StartWithUser' ], ['group' ,'StartWithGroup' ], ['nfs_path' ,'NfsExportPath' ], ['smb_cfg_path' ,'SambaConfigPath' ], ['trace_path' ,'TraceFolder' ], ['trace_level' ,'TraceLevel' ], ['trace_enable' ,'TraceEnable' ] ]; bindChangeValuesById('#settings_view', ProductSettings, ctrlMap, onSettingsModified); } function setupAVBasesPathSettings() { var updateFolder = ProductSettings["UpdateFolder"]; if(updateFolder[updateFolder.length-1] != '/') updateFolder += '/'; AVBasesPathSettings['MainPath'] = updateFolder + ProductSettings["AVBasesFolderName"]; AVBasesPathSettings['BkpPath'] = updateFolder + ProductSettings["AVBasesBackupFolderName"]; avpath_map=[ ['av_bases_path', 'MainPath' ], ['av_bases_bkp_path', 'BkpPath' ] ]; bindChangeValuesById('#settings_view', AVBasesPathSettings, avpath_map, onSettingsModified); } function setupChangePasswordDlg() { function __getInputLen( $input ) { if($input.length > 0) return $input.get(0).value.replace(/\s/g, '').length; return 0; } function __enableSubmitButton( flg ) { if(flg) $('#ic_changePasswordSubmit').enable(); else $('#ic_changePasswordSubmit').disable(); } function __setStatus(text) { $('#changePasswordStatus').html(text); } function __setError(error) { __setStatus('<b style="color:#e00a41">' + error + '</b>'); __enableSubmitButton(true); } function __onChangePassword(response) { __enableSubmitButton(false); if(response.errorMsg == 'Invalid password') __setError(_res('CHANGEPASS_DLG_INVALID_PASSWORD')) else if((response.errorMsg == "Couldn't open temp file") || (response.errorMsg == "Couldn't write temp file") || (response.errorMsg == "Couldn't write password file")) __setError(_res('CHANGEPASS_DLG_WRITE_ERROR')); else if(!ic.ajaxError(response)) __setStatus(_res('CHANGEPASS_DLG_SUCCESS')); else __setStatus(''); window.passwordIsChanging = false; } function __changePassword() { if (window.passwordIsChanging == true){ return; } if( $('#ic_newPassword').val() != $('#ic_newPassword_confirm').val() ) { __setError(_res('CHANGEPASS_DLG_PASSWORD_MISTYPED')); return; } __setStatus(_res('CHANGEPASS_DLG_CHANGING')); window.passwordIsChanging = true; $('#ic_changePasswordSubmit').disable(); ic.changePassword( $('#ic_currentPassword').val(), $('#ic_newPassword').val(), __onChangePassword); } window.passwordIsChanging = false; __enableSubmitButton(false); $('#ic_changePasswordSubmit').bind('setupActivity', function(){ var len1 = __getInputLen( $('#ic_newPassword')); var len2 = __getInputLen( $('#ic_currentPassword')); var len3 = __getInputLen( $('#ic_newPassword_confirm')); __enableSubmitButton((0 == settingsConnLostId) && (len1 > 0) && (len2 > 0) && (len3 > 0)); }) $('#ic_newPassword,#ic_currentPassword,#ic_newPassword_confirm') .fastChange(function(){ $('#ic_changePasswordSubmit').trigger('setupActivity') }); $('#ic_changePasswordSubmit').click(__changePassword); } function setupQuarantineSettings() { var qctrlMap = [ ['q_folder' ,'QuarantineFolder' ], ['q_soft_size_limit' ,'QuarantineSoftSizeLimit', misc_megabyteTransform ], ['q_size_limit' ,'QuarantineSizeLimit', misc_megabyteTransform ] ]; bindChangeValuesById('#settings_view', QSettings, qctrlMap, onSettingsModified); setupQuaSizeCorrector( $('#q_size_limit' ) ); setupQuaSizeCorrector( $('#q_soft_size_limit') ); } function setupEventStorageSettings() { var esmap = [ ['es_folder' , 'EventStorageFolder'], ['es_maxsize' , 'EventStorageMaxSize', misc_megabyteTransform ], ['es_rotateMethod' , 'RotateMethod' ], ['es_rotateMoveFolder', 'RotateMoveFolder'], ['es_rotatePeriod' , 'RotatePeriod'] ]; bindChangeValuesById('#settings_view', ESSettings, esmap, onSettingsModified); setupQuaSizeCorrector($('#es_maxsize')); function processMoveFolderVisibility() { if( $('#es_rotateMethod').val() == ic.EventStorageRotateMethod.Move ) $('#tr_es_rotateMoveFolder').show(); else $('#tr_es_rotateMoveFolder').hide(); } processMoveFolderVisibility(); $('#es_rotateMethod').change(processMoveFolderVisibility); } function onProductSettingsGot(response) { if(ic.ajaxError(response)) return; ProductSettings = response.product; QSettings = response.qnb; ESSettings = response.eventStorage; $('#settings_view').loadCache('pages/settingsTask/product.html', function(){ setupChangePasswordDlg(); setupProductSettings(); setupAVBasesPathSettings(); setupQuarantineSettings(); setupEventStorageSettings(); setButtonSaveEnabled(false); }); } function correctBigInt(val) { // Javascript has limitation on big numbers // As it stores numbers with floating point // this means that normal uint64_t 18446744073709551615 // rounds to 18446744073709552000 because JS need some bits for degree. // If value == MAX_QSIZE this means that such a roundation occurs // because MAX_QSIZE itself stores rounded. if(val == MAX_QSIZE) return MAX_QSIZE_S; return val; } function saveSettings(skipCtimeCheck) { QSettings.QuarantineSizeLimit = correctBigInt(QSettings.QuarantineSizeLimit); QSettings.QuarantineSoftSizeLimit = correctBigInt(QSettings.QuarantineSoftSizeLimit); setButtonSaveEnabled(false); $('#settingsErrorBox,#settingsStatusBox').html(''); $('#settingsStatusBox').html(_res('PRODUCT_SETTINGS_SAVING')); processingSaveProductSettings = true; function handleResponse(response) { if(response.errorMsg == 'ALREADY_MODIFIED') { if(confirm(_res('PRODUCT_SETTINGS_MODIFIED'))) { saveSettings(true); return; } else { $('#b_SaveSettings,#b_RevertSettings').enable(); $('#settingsStatusBox').html(_res('PRODUCT_SETTINGS_CANCELED')); } } else if(!ic.ajaxError(response)) { $('#settingsStatusBox').html(_res('PRODUCT_SETTINGS_SAVED')); ProductSettings.ctime = response.time; } processingSaveProductSettings = false; } ic.setProductSettings( ProductSettings, QSettings, ESSettings, handleResponse, skipCtimeCheck); } function onload() { setButtonSaveEnabled(false) ic.getProductSettings(onProductSettingsGot); } function revertSettings() { onload(); } function setButtonSaveEnabled(f) { if(f) $('#b_SaveSettings,#b_RevertSettings').removeAttr("disabled") else $('#b_SaveSettings,#b_RevertSettings').attr("disabled","true") } onload(); if(ic.storage.get('show_'+window.location.hash.split('/',2)[0].substr(1)+'_descr') === 'true' || ic.storage.get('show_'+window.location.hash.split('/',2)[0].substr(1)+'_descr') == null) $('#description').css('display',''); </script>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel