]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Adapt code to use PSR-4 autoloader
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 3 Aug 2022 07:31:27 +0000 (09:31 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 3 Aug 2022 07:31:27 +0000 (09:31 +0200)
411 files changed:
gui/baculum/Makefile
gui/baculum/protected/API/Layouts/Main.php
gui/baculum/protected/API/Layouts/Main.tpl
gui/baculum/protected/API/Layouts/Wizard.php
gui/baculum/protected/API/Modules/APIConfig.php [moved from gui/baculum/protected/API/Class/APIConfig.php with 98% similarity]
gui/baculum/protected/API/Modules/APIDbModule.php [moved from gui/baculum/protected/API/Class/APIDbModule.php with 92% similarity]
gui/baculum/protected/API/Modules/APIModule.php [moved from gui/baculum/protected/API/Class/APIModule.php with 95% similarity]
gui/baculum/protected/API/Modules/APIServer.php [moved from gui/baculum/protected/API/Class/APIServer.php with 97% similarity]
gui/baculum/protected/API/Modules/APIServerV1.php [moved from gui/baculum/protected/API/Class/APIServerV1.php with 95% similarity]
gui/baculum/protected/API/Modules/APIServerV2.php [moved from gui/baculum/protected/API/Class/APIServerV2.php with 92% similarity]
gui/baculum/protected/API/Modules/APIUrlMapping.php [moved from gui/baculum/protected/API/Class/APIUrlMapping.php with 93% similarity]
gui/baculum/protected/API/Modules/BAPIException.php [moved from gui/baculum/protected/API/Class/BAPIException.php with 70% similarity]
gui/baculum/protected/API/Modules/BCatalogException.php [new file with mode: 0644]
gui/baculum/protected/API/Modules/BConfigException.php [new file with mode: 0644]
gui/baculum/protected/API/Modules/BConsoleException.php [new file with mode: 0644]
gui/baculum/protected/API/Modules/BLStat.php [moved from gui/baculum/protected/API/Class/BLStat.php with 99% similarity]
gui/baculum/protected/API/Modules/BList.php [moved from gui/baculum/protected/API/Class/BList.php with 97% similarity]
gui/baculum/protected/API/Modules/BVFS.php [moved from gui/baculum/protected/API/Class/BVFS.php with 83% similarity]
gui/baculum/protected/API/Modules/BaculaConfig.php [moved from gui/baculum/protected/API/Class/BaculaConfig.php with 96% similarity]
gui/baculum/protected/API/Modules/BaculaSetting.php [moved from gui/baculum/protected/API/Class/BaculaSetting.php with 96% similarity]
gui/baculum/protected/API/Modules/BaculumAPIPage.php [moved from gui/baculum/protected/API/Class/BaculumAPIPage.php with 90% similarity]
gui/baculum/protected/API/Modules/BaculumAPIServer.php [moved from gui/baculum/protected/API/Class/BaculumAPIServer.php with 93% similarity]
gui/baculum/protected/API/Modules/BasicAPIUserConfig.php [moved from gui/baculum/protected/API/Class/BasicAPIUserConfig.php with 89% similarity]
gui/baculum/protected/API/Modules/BasicConfig.php [moved from gui/baculum/protected/API/Class/BasicConfig.php with 97% similarity]
gui/baculum/protected/API/Modules/Bconsole.php [moved from gui/baculum/protected/API/Class/Bconsole.php with 97% similarity]
gui/baculum/protected/API/Modules/ChangerCommand.php [moved from gui/baculum/protected/API/Class/ChangerCommand.php with 97% similarity]
gui/baculum/protected/API/Modules/ClientManager.php [moved from gui/baculum/protected/API/Class/ClientManager.php with 92% similarity]
gui/baculum/protected/API/Modules/ClientRecord.php [moved from gui/baculum/protected/API/Class/ClientRecord.php with 95% similarity]
gui/baculum/protected/API/Modules/ComponentActions.php [moved from gui/baculum/protected/API/Class/ComponentActions.php with 96% similarity]
gui/baculum/protected/API/Modules/ComponentStatusModule.php [moved from gui/baculum/protected/API/Class/ComponentStatusModule.php with 97% similarity]
gui/baculum/protected/API/Modules/ConsoleOutputPage.php [moved from gui/baculum/protected/API/Class/ConsoleOutputPage.php with 97% similarity]
gui/baculum/protected/API/Modules/ConsoleOutputShowPage.php [moved from gui/baculum/protected/API/Class/ConsoleOutputShowPage.php with 97% similarity]
gui/baculum/protected/API/Modules/Database.php [moved from gui/baculum/protected/API/Class/Database.php with 95% similarity]
gui/baculum/protected/API/Modules/DeviceConfig.php [moved from gui/baculum/protected/API/Class/DeviceConfig.php with 96% similarity]
gui/baculum/protected/API/Modules/FileSetManager.php [moved from gui/baculum/protected/API/Class/FileSetManager.php with 92% similarity]
gui/baculum/protected/API/Modules/FileSetRecord.php [moved from gui/baculum/protected/API/Class/FileSetRecord.php with 95% similarity]
gui/baculum/protected/API/Modules/IAPIServer.php [moved from gui/baculum/protected/API/Class/APIInterfaces.php with 93% similarity]
gui/baculum/protected/API/Modules/JSONTools.php [moved from gui/baculum/protected/API/Class/JSONTools.php with 97% similarity]
gui/baculum/protected/API/Modules/JobManager.php [moved from gui/baculum/protected/API/Class/JobManager.php with 98% similarity]
gui/baculum/protected/API/Modules/JobRecord.php [moved from gui/baculum/protected/API/Class/JobRecord.php with 97% similarity]
gui/baculum/protected/API/Modules/LogManager.php [moved from gui/baculum/protected/API/Class/LogManager.php with 93% similarity]
gui/baculum/protected/API/Modules/LogRecord.php [moved from gui/baculum/protected/API/Class/LogRecord.php with 95% similarity]
gui/baculum/protected/API/Modules/Ls.php [moved from gui/baculum/protected/API/Class/Ls.php with 97% similarity]
gui/baculum/protected/API/Modules/OAuth2/AuthIdManager.php [moved from gui/baculum/protected/API/Class/OAuth2/AuthIdManager.php with 95% similarity]
gui/baculum/protected/API/Modules/OAuth2/AuthIdRecord.php [moved from gui/baculum/protected/API/Class/OAuth2/AuthIdRecord.php with 80% similarity]
gui/baculum/protected/API/Modules/OAuth2/BaculumOAuth2.php [moved from gui/baculum/protected/API/Class/OAuth2/BaculumOAuth2.php with 97% similarity]
gui/baculum/protected/API/Modules/OAuth2/OAuth2Config.php [moved from gui/baculum/protected/API/Class/OAuth2/OAuth2Config.php with 95% similarity]
gui/baculum/protected/API/Modules/OAuth2/TokenManager.php [moved from gui/baculum/protected/API/Class/OAuth2/TokenManager.php with 96% similarity]
gui/baculum/protected/API/Modules/OAuth2/TokenRecord.php [moved from gui/baculum/protected/API/Class/OAuth2/TokenRecord.php with 81% similarity]
gui/baculum/protected/API/Modules/OAuthUrlMapping.php [moved from gui/baculum/protected/API/Class/OAuthUrlMapping.php with 93% similarity]
gui/baculum/protected/API/Modules/PanelUrlMapping.php [moved from gui/baculum/protected/API/Class/PanelUrlMapping.php with 93% similarity]
gui/baculum/protected/API/Modules/PoolManager.php [moved from gui/baculum/protected/API/Class/PoolManager.php with 91% similarity]
gui/baculum/protected/API/Modules/PoolRecord.php [moved from gui/baculum/protected/API/Class/PoolRecord.php with 96% similarity]
gui/baculum/protected/API/Modules/StatusClient.php [moved from gui/baculum/protected/API/Class/StatusClient.php with 97% similarity]
gui/baculum/protected/API/Modules/StatusDirector.php [moved from gui/baculum/protected/API/Class/StatusDirector.php with 97% similarity]
gui/baculum/protected/API/Modules/StatusStorage.php [moved from gui/baculum/protected/API/Class/StatusStorage.php with 98% similarity]
gui/baculum/protected/API/Modules/StorageManager.php [moved from gui/baculum/protected/API/Class/StorageManager.php with 92% similarity]
gui/baculum/protected/API/Modules/StorageRecord.php [moved from gui/baculum/protected/API/Class/StorageRecord.php with 95% similarity]
gui/baculum/protected/API/Modules/VersionManager.php [moved from gui/baculum/protected/API/Class/VersionManager.php with 91% similarity]
gui/baculum/protected/API/Modules/VersionRecord.php [moved from gui/baculum/protected/API/Class/VersionRecord.php with 95% similarity]
gui/baculum/protected/API/Modules/VolumeManager.php [moved from gui/baculum/protected/API/Class/VolumeManager.php with 97% similarity]
gui/baculum/protected/API/Modules/VolumeRecord.php [moved from gui/baculum/protected/API/Class/VolumeRecord.php with 97% similarity]
gui/baculum/protected/API/Pages/API/Actions.php
gui/baculum/protected/API/Pages/API/Authorize.php
gui/baculum/protected/API/Pages/API/BVFSCleanUp.php
gui/baculum/protected/API/Pages/API/BVFSClearCache.php
gui/baculum/protected/API/Pages/API/BVFSGetJobids.php
gui/baculum/protected/API/Pages/API/BVFSLsDirs.php
gui/baculum/protected/API/Pages/API/BVFSLsFiles.php
gui/baculum/protected/API/Pages/API/BVFSRestore.php
gui/baculum/protected/API/Pages/API/BVFSUpdate.php
gui/baculum/protected/API/Pages/API/BVFSVersions.php
gui/baculum/protected/API/Pages/API/BasicUser.php
gui/baculum/protected/API/Pages/API/BasicUsers.php
gui/baculum/protected/API/Pages/API/Catalog.php
gui/baculum/protected/API/Pages/API/ChangerDriveLoad.php
gui/baculum/protected/API/Pages/API/ChangerDriveLoaded.php
gui/baculum/protected/API/Pages/API/ChangerDriveUnload.php
gui/baculum/protected/API/Pages/API/ChangerList.php
gui/baculum/protected/API/Pages/API/ChangerListAll.php
gui/baculum/protected/API/Pages/API/ChangerSlots.php
gui/baculum/protected/API/Pages/API/ChangerSlotsTransfer.php
gui/baculum/protected/API/Pages/API/Client.php
gui/baculum/protected/API/Pages/API/ClientBandwidthLimit.php
gui/baculum/protected/API/Pages/API/ClientLs.php
gui/baculum/protected/API/Pages/API/ClientShow.php
gui/baculum/protected/API/Pages/API/ClientStatus.php
gui/baculum/protected/API/Pages/API/Clients.php
gui/baculum/protected/API/Pages/API/ClientsShow.php
gui/baculum/protected/API/Pages/API/ComponentStatus.php
gui/baculum/protected/API/Pages/API/Config.php
gui/baculum/protected/API/Pages/API/ConsoleCommand.php
gui/baculum/protected/API/Pages/API/DbSize.php
gui/baculum/protected/API/Pages/API/DirectorShow.php
gui/baculum/protected/API/Pages/API/DirectorStatus.php
gui/baculum/protected/API/Pages/API/Directors.php
gui/baculum/protected/API/Pages/API/FileSet.php
gui/baculum/protected/API/Pages/API/FileSetResNames.php
gui/baculum/protected/API/Pages/API/FileSets.php
gui/baculum/protected/API/Pages/API/Job.php
gui/baculum/protected/API/Pages/API/JobBandwidthLimit.php
gui/baculum/protected/API/Pages/API/JobCancel.php
gui/baculum/protected/API/Pages/API/JobEstimate.php
gui/baculum/protected/API/Pages/API/JobFiles.php
gui/baculum/protected/API/Pages/API/JobListFiles.php
gui/baculum/protected/API/Pages/API/JobLog.php
gui/baculum/protected/API/Pages/API/JobResNames.php
gui/baculum/protected/API/Pages/API/JobRun.php
gui/baculum/protected/API/Pages/API/JobShow.php
gui/baculum/protected/API/Pages/API/JobTotals.php
gui/baculum/protected/API/Pages/API/Jobs.php
gui/baculum/protected/API/Pages/API/JobsForClient.php
gui/baculum/protected/API/Pages/API/JobsOnVolume.php
gui/baculum/protected/API/Pages/API/JobsRecent.php
gui/baculum/protected/API/Pages/API/JobsShow.php
gui/baculum/protected/API/Pages/API/Messages.php
gui/baculum/protected/API/Pages/API/OAuth2Client.php
gui/baculum/protected/API/Pages/API/OAuth2Clients.php
gui/baculum/protected/API/Pages/API/Pool.php
gui/baculum/protected/API/Pages/API/PoolShow.php
gui/baculum/protected/API/Pages/API/PoolUpdate.php
gui/baculum/protected/API/Pages/API/PoolUpdateVolumes.php
gui/baculum/protected/API/Pages/API/Pools.php
gui/baculum/protected/API/Pages/API/PoolsShow.php
gui/baculum/protected/API/Pages/API/RequestToken.php
gui/baculum/protected/API/Pages/API/RestoreRun.php
gui/baculum/protected/API/Pages/API/ScheduleStatus.php
gui/baculum/protected/API/Pages/API/Schedules.php
gui/baculum/protected/API/Pages/API/SlotsUpdate.php
gui/baculum/protected/API/Pages/API/Storage.php
gui/baculum/protected/API/Pages/API/StorageMount.php
gui/baculum/protected/API/Pages/API/StorageMountV1.php
gui/baculum/protected/API/Pages/API/StorageRelease.php
gui/baculum/protected/API/Pages/API/StorageReleaseV1.php
gui/baculum/protected/API/Pages/API/StorageShow.php
gui/baculum/protected/API/Pages/API/StorageStatus.php
gui/baculum/protected/API/Pages/API/StorageUmount.php
gui/baculum/protected/API/Pages/API/StorageUmountV1.php
gui/baculum/protected/API/Pages/API/Storages.php
gui/baculum/protected/API/Pages/API/StoragesShow.php
gui/baculum/protected/API/Pages/API/Volume.php
gui/baculum/protected/API/Pages/API/VolumeLabel.php
gui/baculum/protected/API/Pages/API/VolumeLabelBarcodes.php
gui/baculum/protected/API/Pages/API/VolumePrune.php
gui/baculum/protected/API/Pages/API/VolumePurge.php
gui/baculum/protected/API/Pages/API/Volumes.php
gui/baculum/protected/API/Pages/API/VolumesInPool.php
gui/baculum/protected/API/Pages/API/VolumesRequired.php
gui/baculum/protected/API/Pages/API/Welcome.php
gui/baculum/protected/API/Pages/API/config.xml
gui/baculum/protected/API/Pages/OAuth2/Authorize.php
gui/baculum/protected/API/Pages/OAuth2/RequestToken.php
gui/baculum/protected/API/Pages/OAuth2/config.xml
gui/baculum/protected/API/Pages/Panel/APIBasicUsers.php
gui/baculum/protected/API/Pages/Panel/APIBasicUsers.tpl
gui/baculum/protected/API/Pages/Panel/APIDevices.page
gui/baculum/protected/API/Pages/Panel/APIDevices.php
gui/baculum/protected/API/Pages/Panel/APIHome.page
gui/baculum/protected/API/Pages/Panel/APIHome.php
gui/baculum/protected/API/Pages/Panel/APIInstallWizard.page
gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php
gui/baculum/protected/API/Pages/Panel/APIOAuth2Clients.php
gui/baculum/protected/API/Pages/Panel/APIOAuth2Clients.tpl
gui/baculum/protected/API/Pages/Panel/APISettings.page
gui/baculum/protected/API/Pages/Panel/APISettings.php
gui/baculum/protected/API/Pages/Panel/config.xml
gui/baculum/protected/API/Pages/Requirements.php
gui/baculum/protected/API/Portlets/APISideBar.php
gui/baculum/protected/API/Portlets/SudoConfig.php
gui/baculum/protected/Common/Class/Errors.php [deleted file]
gui/baculum/protected/Common/Modules/Apr1Md5.php [moved from gui/baculum/protected/Common/Class/Apr1Md5.php with 98% similarity]
gui/baculum/protected/Common/Modules/AuthBase.php [moved from gui/baculum/protected/Common/Class/AuthBase.php with 94% similarity]
gui/baculum/protected/Common/Modules/AuthBasic.php [moved from gui/baculum/protected/Common/Class/AuthBasic.php with 93% similarity]
gui/baculum/protected/Common/Modules/AuthOAuth2.php [moved from gui/baculum/protected/Common/Class/AuthOAuth2.php with 94% similarity]
gui/baculum/protected/Common/Modules/BAssetManager.php [moved from gui/baculum/protected/Common/Class/BAssetManager.php with 95% similarity]
gui/baculum/protected/Common/Modules/BClientScript.php [moved from gui/baculum/protected/Common/Class/BClientScript.php with 91% similarity]
gui/baculum/protected/Common/Modules/BCrypt.php [moved from gui/baculum/protected/Common/Class/BCrypt.php with 97% similarity]
gui/baculum/protected/Common/Modules/BException.php [moved from gui/baculum/protected/Common/Class/BException.php with 92% similarity]
gui/baculum/protected/Common/Modules/BStyleSheet.php [moved from gui/baculum/protected/Common/Class/BStyleSheet.php with 91% similarity]
gui/baculum/protected/Common/Modules/BaculumPage.php [moved from gui/baculum/protected/Common/Class/BaculumPage.php with 95% similarity]
gui/baculum/protected/Common/Modules/BaculumUrlMapping.php [moved from gui/baculum/protected/Common/Class/BaculumUrlMapping.php with 82% similarity]
gui/baculum/protected/Common/Modules/BasicUserConfig.php [moved from gui/baculum/protected/Common/Class/BasicUserConfig.php with 98% similarity]
gui/baculum/protected/Common/Modules/CommonModule.php [moved from gui/baculum/protected/Common/Class/CommonModule.php with 95% similarity]
gui/baculum/protected/Common/Modules/ConfigBacula.php [moved from gui/baculum/protected/Common/Class/ConfigBacula.php with 96% similarity]
gui/baculum/protected/Common/Modules/ConfigFileModule.php [moved from gui/baculum/protected/Common/Class/ConfigFileModule.php with 98% similarity]
gui/baculum/protected/Common/Modules/ConfigIni.php [moved from gui/baculum/protected/Common/Class/ConfigIni.php with 96% similarity]
gui/baculum/protected/Common/Modules/Crypto.php [moved from gui/baculum/protected/Common/Class/Crypto.php with 98% similarity]
gui/baculum/protected/Common/Modules/Errors/ActionsError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/AuthenticationError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/AuthorizationError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/BVFSError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/BaculaConfigError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/BasicUserError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/BconsoleError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/ClientError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/ConnectionError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/DatabaseError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/DeviceError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/FileSetError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/GenericError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/JSONToolsError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/JobError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/OAuth2Error.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/PoolError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/StorageError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Errors/VolumeError.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/GeneralRequirements.php [moved from gui/baculum/protected/Common/Class/GeneralRequirements.php with 98% similarity]
gui/baculum/protected/Common/Modules/IAuthModule.php [moved from gui/baculum/protected/Common/Class/Interfaces.php with 64% similarity]
gui/baculum/protected/Common/Modules/IBUserManager.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/IConfigFormat.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/ISessionItem.php [new file with mode: 0644]
gui/baculum/protected/Common/Modules/Ldap.php [moved from gui/baculum/protected/Common/Class/Ldap.php with 98% similarity]
gui/baculum/protected/Common/Modules/Logging.php [moved from gui/baculum/protected/Common/Class/Logging.php with 97% similarity]
gui/baculum/protected/Common/Modules/Miscellaneous.php [moved from gui/baculum/protected/Common/Class/Miscellaneous.php with 99% similarity]
gui/baculum/protected/Common/Modules/OAuth2.php [moved from gui/baculum/protected/Common/Class/OAuth2.php with 99% similarity]
gui/baculum/protected/Common/Modules/Params.php [moved from gui/baculum/protected/Common/Class/Params.php with 99% similarity]
gui/baculum/protected/Common/Modules/SessionRecord.php [moved from gui/baculum/protected/Common/Class/SessionRecord.php with 96% similarity]
gui/baculum/protected/Common/Modules/Sha1.php [moved from gui/baculum/protected/Common/Class/Sha1.php with 96% similarity]
gui/baculum/protected/Common/Modules/Sha256.php [moved from gui/baculum/protected/Common/Class/Sha256.php with 97% similarity]
gui/baculum/protected/Common/Modules/Sha512.php [moved from gui/baculum/protected/Common/Class/Sha512.php with 97% similarity]
gui/baculum/protected/Common/Modules/Ssha1.php [moved from gui/baculum/protected/Common/Class/Ssha1.php with 97% similarity]
gui/baculum/protected/Common/Pages/CommonPage.php
gui/baculum/protected/Common/Portlets/BActiveButton.php
gui/baculum/protected/Common/Portlets/BButton.php
gui/baculum/protected/Common/Portlets/BSimpleRepeater.php
gui/baculum/protected/Common/Portlets/BSimpleRepeaterItem.php
gui/baculum/protected/Common/Portlets/NewAuthClient.php
gui/baculum/protected/Common/Portlets/NewHost.php
gui/baculum/protected/Common/Portlets/PortletTemplate.php
gui/baculum/protected/Common/Portlets/TableDefaults.php
gui/baculum/protected/Web/Layouts/Main.php
gui/baculum/protected/Web/Layouts/Main.tpl
gui/baculum/protected/Web/Layouts/MessageBox.php
gui/baculum/protected/Web/Layouts/Simple.php
gui/baculum/protected/Web/Layouts/Wizard.php
gui/baculum/protected/Web/Layouts/Wizard.tpl
gui/baculum/protected/Web/Modules/BaculumAPIClient.php [moved from gui/baculum/protected/Web/Class/BaculumAPIClient.php with 98% similarity]
gui/baculum/protected/Web/Modules/BaculumWebPage.php [moved from gui/baculum/protected/Web/Class/BaculumWebPage.php with 94% similarity]
gui/baculum/protected/Web/Modules/BasicWebUserConfig.php [moved from gui/baculum/protected/Web/Class/BasicWebUserConfig.php with 89% similarity]
gui/baculum/protected/Web/Modules/DataDependencies.php [moved from gui/baculum/protected/Web/Class/DataDependencies.php with 95% similarity]
gui/baculum/protected/Web/Modules/DataDescription.php [moved from gui/baculum/protected/Web/Class/DataDescription.php with 96% similarity]
gui/baculum/protected/Web/Modules/DirectiveDoc.php [moved from gui/baculum/protected/Web/Class/DirectiveDoc.php with 95% similarity]
gui/baculum/protected/Web/Modules/HostConfig.php [moved from gui/baculum/protected/Web/Class/HostConfig.php with 96% similarity]
gui/baculum/protected/Web/Modules/HostRecord.php [moved from gui/baculum/protected/Web/Class/HostRecord.php with 91% similarity]
gui/baculum/protected/Web/Modules/JobInfo.php [moved from gui/baculum/protected/Web/Class/JobInfo.php with 97% similarity]
gui/baculum/protected/Web/Modules/LogParser.php [moved from gui/baculum/protected/Web/Class/LogParser.php with 99% similarity]
gui/baculum/protected/Web/Modules/MessagesLog.php [moved from gui/baculum/protected/Web/Class/MessagesLog.php with 96% similarity]
gui/baculum/protected/Web/Modules/OAuth2Record.php [moved from gui/baculum/protected/Web/Class/OAuth2Record.php with 80% similarity]
gui/baculum/protected/Web/Modules/PageCategory.php [moved from gui/baculum/protected/Web/Class/PageCategory.php with 96% similarity]
gui/baculum/protected/Web/Modules/WebBasicUserManager.php [moved from gui/baculum/protected/Web/Class/WebBasicUserManager.php with 89% similarity]
gui/baculum/protected/Web/Modules/WebConfig.php [moved from gui/baculum/protected/Web/Class/WebConfig.php with 97% similarity]
gui/baculum/protected/Web/Modules/WebLdapUserManager.php [moved from gui/baculum/protected/Web/Class/WebLdapUserManager.php with 90% similarity]
gui/baculum/protected/Web/Modules/WebLocalUserManager.php [moved from gui/baculum/protected/Web/Class/WebLocalUserManager.php with 90% similarity]
gui/baculum/protected/Web/Modules/WebModule.php [moved from gui/baculum/protected/Web/Class/WebModule.php with 95% similarity]
gui/baculum/protected/Web/Modules/WebRoleConfig.php [moved from gui/baculum/protected/Web/Class/WebRoleConfig.php with 96% similarity]
gui/baculum/protected/Web/Modules/WebUrlMapping.php [moved from gui/baculum/protected/Web/Class/WebUrlMapping.php with 93% similarity]
gui/baculum/protected/Web/Modules/WebUser.php [moved from gui/baculum/protected/Web/Class/WebUser.php with 98% similarity]
gui/baculum/protected/Web/Modules/WebUserConfig.php [moved from gui/baculum/protected/Web/Class/WebUserConfig.php with 98% similarity]
gui/baculum/protected/Web/Modules/WebUserManager.php [moved from gui/baculum/protected/Web/Class/WebUserManager.php with 95% similarity]
gui/baculum/protected/Web/Modules/WebUserRoles.php [moved from gui/baculum/protected/Web/Class/WebUserRoles.php with 97% similarity]
gui/baculum/protected/Web/Pages/ApplicationSettings.page
gui/baculum/protected/Web/Pages/ApplicationSettings.php
gui/baculum/protected/Web/Pages/BaculumError.page
gui/baculum/protected/Web/Pages/BaculumError.php
gui/baculum/protected/Web/Pages/ClientList.page
gui/baculum/protected/Web/Pages/ClientList.php
gui/baculum/protected/Web/Pages/ClientView.page
gui/baculum/protected/Web/Pages/ClientView.php
gui/baculum/protected/Web/Pages/Console.page
gui/baculum/protected/Web/Pages/Console.php
gui/baculum/protected/Web/Pages/ConsoleView.page
gui/baculum/protected/Web/Pages/ConsoleView.php
gui/baculum/protected/Web/Pages/Dashboard.page
gui/baculum/protected/Web/Pages/Dashboard.php
gui/baculum/protected/Web/Pages/DeviceView.page
gui/baculum/protected/Web/Pages/DeviceView.php
gui/baculum/protected/Web/Pages/DirectorView.page
gui/baculum/protected/Web/Pages/DirectorView.php
gui/baculum/protected/Web/Pages/FileSetList.page
gui/baculum/protected/Web/Pages/FileSetList.php
gui/baculum/protected/Web/Pages/FileSetView.page
gui/baculum/protected/Web/Pages/FileSetView.php
gui/baculum/protected/Web/Pages/Graphs.page
gui/baculum/protected/Web/Pages/Graphs.php
gui/baculum/protected/Web/Pages/JobHistoryList.page
gui/baculum/protected/Web/Pages/JobHistoryList.php
gui/baculum/protected/Web/Pages/JobHistoryView.page
gui/baculum/protected/Web/Pages/JobHistoryView.php
gui/baculum/protected/Web/Pages/JobList.page
gui/baculum/protected/Web/Pages/JobList.php
gui/baculum/protected/Web/Pages/JobView.page
gui/baculum/protected/Web/Pages/JobView.php
gui/baculum/protected/Web/Pages/LoginPage.page
gui/baculum/protected/Web/Pages/LoginPage.php
gui/baculum/protected/Web/Pages/Monitor.php
gui/baculum/protected/Web/Pages/NewBackupJobWizard.page
gui/baculum/protected/Web/Pages/NewBackupJobWizard.php
gui/baculum/protected/Web/Pages/NewCopyJobWizard.page
gui/baculum/protected/Web/Pages/NewCopyJobWizard.php
gui/baculum/protected/Web/Pages/NewMigrateJobWizard.page
gui/baculum/protected/Web/Pages/NewMigrateJobWizard.php
gui/baculum/protected/Web/Pages/NewResource.page
gui/baculum/protected/Web/Pages/NewResource.php
gui/baculum/protected/Web/Pages/OAuth2Redirect.php
gui/baculum/protected/Web/Pages/PoolList.page
gui/baculum/protected/Web/Pages/PoolList.php
gui/baculum/protected/Web/Pages/PoolView.page
gui/baculum/protected/Web/Pages/PoolView.php
gui/baculum/protected/Web/Pages/Requirements.php
gui/baculum/protected/Web/Pages/RestoreWizard.page
gui/baculum/protected/Web/Pages/RestoreWizard.php
gui/baculum/protected/Web/Pages/ScheduleList.page
gui/baculum/protected/Web/Pages/ScheduleList.php
gui/baculum/protected/Web/Pages/ScheduleStatusList.php
gui/baculum/protected/Web/Pages/ScheduleStatusList.tpl
gui/baculum/protected/Web/Pages/ScheduleView.page
gui/baculum/protected/Web/Pages/ScheduleView.php
gui/baculum/protected/Web/Pages/Security.page
gui/baculum/protected/Web/Pages/Security.php
gui/baculum/protected/Web/Pages/SelectAPIHost.page
gui/baculum/protected/Web/Pages/SelectAPIHost.php
gui/baculum/protected/Web/Pages/StorageList.page
gui/baculum/protected/Web/Pages/StorageList.php
gui/baculum/protected/Web/Pages/StorageView.page
gui/baculum/protected/Web/Pages/StorageView.php
gui/baculum/protected/Web/Pages/VolumeList.page
gui/baculum/protected/Web/Pages/VolumeList.php
gui/baculum/protected/Web/Pages/VolumeView.page
gui/baculum/protected/Web/Pages/VolumeView.php
gui/baculum/protected/Web/Pages/WebConfigWizard.page
gui/baculum/protected/Web/Pages/WebConfigWizard.php
gui/baculum/protected/Web/Pages/config.xml
gui/baculum/protected/Web/Portlets/AssignVolumesToPool.php
gui/baculum/protected/Web/Portlets/BConditional.php
gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php
gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl
gui/baculum/protected/Web/Portlets/BaculaConfigDirectives.php
gui/baculum/protected/Web/Portlets/BaculaConfigDirectives.tpl
gui/baculum/protected/Web/Portlets/BaculaConfigResourceList.php
gui/baculum/protected/Web/Portlets/BaculaConfigResourceList.tpl
gui/baculum/protected/Web/Portlets/BaculaConfigResources.php
gui/baculum/protected/Web/Portlets/BaculaConfigResources.tpl
gui/baculum/protected/Web/Portlets/BaculaHosts.php
gui/baculum/protected/Web/Portlets/BaculaHosts.tpl
gui/baculum/protected/Web/Portlets/Bconsole.php
gui/baculum/protected/Web/Portlets/BulkActionsModal.php
gui/baculum/protected/Web/Portlets/ClientBandwidthLimit.php
gui/baculum/protected/Web/Portlets/ClientBandwidthLimit.tpl
gui/baculum/protected/Web/Portlets/ComponentActionsMenu.php
gui/baculum/protected/Web/Portlets/ComponentListTemplate.php
gui/baculum/protected/Web/Portlets/ConfigListTemplate.php
gui/baculum/protected/Web/Portlets/DirectiveCheckBox.php
gui/baculum/protected/Web/Portlets/DirectiveComboBox.php
gui/baculum/protected/Web/Portlets/DirectiveControlTemplate.php
gui/baculum/protected/Web/Portlets/DirectiveDaysOfMonth.php
gui/baculum/protected/Web/Portlets/DirectiveDaysOfWeek.php
gui/baculum/protected/Web/Portlets/DirectiveFileSet.php
gui/baculum/protected/Web/Portlets/DirectiveFileSet.tpl
gui/baculum/protected/Web/Portlets/DirectiveInteger.php
gui/baculum/protected/Web/Portlets/DirectiveListBox.php
gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php
gui/baculum/protected/Web/Portlets/DirectiveMessages.php
gui/baculum/protected/Web/Portlets/DirectiveMessages.tpl
gui/baculum/protected/Web/Portlets/DirectiveMonthsOfYear.php
gui/baculum/protected/Web/Portlets/DirectiveMultiComboBox.php
gui/baculum/protected/Web/Portlets/DirectiveMultiTextBox.php
gui/baculum/protected/Web/Portlets/DirectivePassword.php
gui/baculum/protected/Web/Portlets/DirectiveRenderer.php
gui/baculum/protected/Web/Portlets/DirectiveRunscript.php
gui/baculum/protected/Web/Portlets/DirectiveRunscript.tpl
gui/baculum/protected/Web/Portlets/DirectiveSchedule.php
gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl
gui/baculum/protected/Web/Portlets/DirectiveSetting.php
gui/baculum/protected/Web/Portlets/DirectiveSize.php
gui/baculum/protected/Web/Portlets/DirectiveSpeed.php
gui/baculum/protected/Web/Portlets/DirectiveTemplate.php
gui/baculum/protected/Web/Portlets/DirectiveTextBox.php
gui/baculum/protected/Web/Portlets/DirectiveTime.php
gui/baculum/protected/Web/Portlets/DirectiveTimePeriod.php
gui/baculum/protected/Web/Portlets/DirectiveWeeksOfMonth.php
gui/baculum/protected/Web/Portlets/DirectiveWeeksOfYear.php
gui/baculum/protected/Web/Portlets/ErrorMessageBox.php
gui/baculum/protected/Web/Portlets/FileSetBrowser.php
gui/baculum/protected/Web/Portlets/FileSetOptionRenderer.php
gui/baculum/protected/Web/Portlets/HostListTemplate.php
gui/baculum/protected/Web/Portlets/IDirectiveField.php
gui/baculum/protected/Web/Portlets/JobBandwidthLimit.php
gui/baculum/protected/Web/Portlets/JobBandwidthLimit.tpl
gui/baculum/protected/Web/Portlets/JobGraphs.php
gui/baculum/protected/Web/Portlets/JobListFiles.php
gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php
gui/baculum/protected/Web/Portlets/LabelVolume.php
gui/baculum/protected/Web/Portlets/MainSideBar.php
gui/baculum/protected/Web/Portlets/MessageTypes.php
gui/baculum/protected/Web/Portlets/MessageTypes.tpl
gui/baculum/protected/Web/Portlets/MsgEnvelope.php
gui/baculum/protected/Web/Portlets/NewFileSetExcMenu.php
gui/baculum/protected/Web/Portlets/NewFileSetFileOptMenu.php
gui/baculum/protected/Web/Portlets/NewFileSetIncExcMenu.php
gui/baculum/protected/Web/Portlets/NewMessagesMenu.php
gui/baculum/protected/Web/Portlets/NewResourceMenu.php
gui/baculum/protected/Web/Portlets/NewRunscriptMenu.php
gui/baculum/protected/Web/Portlets/NewScheduleMenu.php
gui/baculum/protected/Web/Portlets/Portlets.php
gui/baculum/protected/Web/Portlets/ResourceListTemplate.php
gui/baculum/protected/Web/Portlets/ResourceMonitor.php
gui/baculum/protected/Web/Portlets/RunJob.php
gui/baculum/protected/Web/Portlets/StatusSchedule.php
gui/baculum/protected/Web/Portlets/UpdateSlots.php
gui/baculum/protected/application.xml
gui/baculum/protected/autoload.php

index 7d1f3196c8ba8fd8e711ed940c006cc63889bcba..af889576dcfe22de98989545cc23b23594a5016c 100644 (file)
@@ -37,7 +37,7 @@ examples = examples
 configcachedir = $(datadir)/runtime
 samplesdir = $(examples)/$(SAMPLETYPE)
 
-webdatadirsrc = $(datadir)/$(webdir)/Class \
+webdatadirsrc = $(datadir)/$(webdir)/Modules \
        $(datadir)/$(webdir)/Config \
        $(datadir)/$(webdir)/JavaScript \
        $(datadir)/$(webdir)/Data \
@@ -46,14 +46,14 @@ webdatadirsrc = $(datadir)/$(webdir)/Class \
        $(datadir)/$(webdir)/Pages \
        $(datadir)/$(webdir)/Portlets
 
-apidatadirsrc = $(datadir)/$(apidir)/Class \
+apidatadirsrc = $(datadir)/$(apidir)/Modules \
        $(datadir)/$(apidir)/Config \
        $(datadir)/$(apidir)/Layouts \
        $(datadir)/$(apidir)/Logs \
        $(datadir)/$(apidir)/Pages \
        $(datadir)/$(apidir)/Portlets
 
-commondatadirsrc = $(datadir)/$(commondir)/Class \
+commondatadirsrc = $(datadir)/$(commondir)/Modules \
        $(datadir)/$(commondir)/JavaScript \
        $(datadir)/$(commondir)/Pages \
        $(datadir)/$(commondir)/Portlets
index f18c9b4b6a6db46da73030d3620c1cf2cae7a8e5..b8703f0ed040f5b3609db3159135e0bddec277c1 100644 (file)
@@ -19,8 +19,8 @@
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.Common.Class.Params');
+
+use Prado\Web\UI\TTemplateControl;
 
 /**
  * Main layout.
index b826c083a4cb1ef1fb85bcdad365700a9cbb4888..0310e5b20105b684b107c16661c5db6956e78393 100644 (file)
@@ -20,7 +20,7 @@
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/datatables.net-responsive-dt/css/responsive.dataTables.min.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/datatables.net-buttons-dt/css/buttons.dataTables.min.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../../themes/Baculum-v2/css/baculum.css %> />
-                       <com:Application.Common.Portlets.TableDefaults />
+                       <com:Baculum.Common.Portlets.TableDefaults />
                        <!-- Top container -->
                        <div class="w3-bar w3-top w3-black w3-large" style="z-index: 4">
                                <button type="button" class="w3-bar-item w3-button w3-hover-none w3-hover-text-light-grey" onclick="W3SideBar.open();"><i class="fa fa-bars"></i> Â Menu</button>
@@ -28,7 +28,7 @@
                                        <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logo.png" alt="" />
                                </span>
                        </div>
-                       <com:Application.API.Portlets.APISideBar />
+                       <com:Baculum.API.Portlets.APISideBar />
                        <div class="w3-main page_main_el" id="page_main" style="margin-left: 250px; margin-top: 43px;">
                                <com:TContentPlaceHolder ID="Main" />
                                <footer class="w3-container w3-right-align w3-small"><%[ Version: ]%> <%=Params::BACULUM_VERSION%></footer>
index 4ce694a3aa757b561c7828d95197ef6e01d5380f..88b4f3e0a9d5bc6188cc1657e738f2902c5b5dfd 100644 (file)
@@ -19,7 +19,9 @@
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Prado\Web\UI\TTemplateControl;
+
 /**
  * Wizard layout.
  *
similarity index 98%
rename from gui/baculum/protected/API/Class/APIConfig.php
rename to gui/baculum/protected/API/Modules/APIConfig.php
index 014ac2c592462a322046c27c1dc28cd0bed46574..24090973c30f492fbff078728699d7ac02e36561 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
 
 /**
  * Manage API configuration.
@@ -40,7 +42,7 @@ class APIConfig extends ConfigFileModule {
        /**
         * API config file path
         */
-       const CONFIG_FILE_PATH = 'Application.API.Config.api';
+       const CONFIG_FILE_PATH = 'Baculum.API.Config.api';
 
        /**
         * API config file format
similarity index 92%
rename from gui/baculum/protected/API/Class/APIDbModule.php
rename to gui/baculum/protected/API/Modules/APIDbModule.php
index 8c191f7fd17daaa0f121515092109f93df797e71..3a683c896d8182935a45e4a51e1af47a395b50ab 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.API.Class.APIConfig');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.Database');
-Prado::using('System.Data.ActiveRecord.TActiveRecord');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Errors\DatabaseError;
+use PDO;
+use Prado\Data\ActiveRecord\TActiveRecord;
+use Prado\Data\TDbConnection;
 
 /**
  * Base API database module.
@@ -83,7 +84,7 @@ class APIDbModule extends TActiveRecord {
         * @param array database parameters from api config
         * @param bool force connection try (used when db_params are not saved yet)
         * @return object TDbConnection instance or null if errors occured during connecting
-        * @throws BCatalogExcemption if cataloga access is not supported
+        * @throws BCatalogException if cataloga access is not supported
         */
        public static function getAPIDbConnection(array $db_params, $force = false) {
                $db_connection = null;
similarity index 95%
rename from gui/baculum/protected/API/Class/APIModule.php
rename to gui/baculum/protected/API/Modules/APIModule.php
index 4a9d3300d9ef6a2b93860b0969452a59f9abb065..2972db93a1eb0597e18f2b2b36c9d19df7ebb961 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.TModule');
+namespace Baculum\API\Modules;
+
+use Prado\TModule;
 
 /**
  * Abstract API module.
similarity index 97%
rename from gui/baculum/protected/API/Class/APIServer.php
rename to gui/baculum/protected/API/Modules/APIServer.php
index e3e1508024b16caf9dd03525766be1bd77af2398..93e08001f434053531da0f4f3c31495511c0ce59 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
+use Prado\Prado;
+
 /**
  * API Server layer.
  * Introduces main method inherited by particular API server versions.
@@ -46,7 +50,6 @@ class APIServer extends APIModule {
         * Set API server instance.
         *
         * @param BaculumAPIServer $obj server object
-        * @return none
         */
        public function setServerObj($obj) {
                $this->server = $obj;
similarity index 95%
rename from gui/baculum/protected/API/Class/APIServerV1.php
rename to gui/baculum/protected/API/Modules/APIServerV1.php
index 35be0af34a135d77d4d7ef42ba4f2b321822104f..34815016da6a6fd46667348fab52f7d39f0ca5f2 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIServer');
-Prado::using('Application.API.Class.APIInterfaces');
+namespace Baculum\API\Modules;
+
+use stdClass;
 
 /**
  * API Server version 1.
@@ -36,7 +37,6 @@ class APIServerV1 extends APIServer implements IAPIServer {
        /**
         * Support for API GET method request.
         *
-        * @return none;
         */
        public function get() {
                $this->getServerObj()->get();
@@ -45,7 +45,6 @@ class APIServerV1 extends APIServer implements IAPIServer {
        /**
         * Support for API PUT method request.
         *
-        * @return none
         */
        public function put() {
                $id = $this->Request->contains('id') ? intval($this->Request['id']) : 0;
@@ -92,7 +91,6 @@ class APIServerV1 extends APIServer implements IAPIServer {
        /**
         * Support for API POST method request.
         *
-        * @return none
         */
        public function post() {
                $params = new StdClass;
@@ -105,7 +103,6 @@ class APIServerV1 extends APIServer implements IAPIServer {
        /**
         * Support for API DELETE method request.
         *
-        * @return none
         */
        public function delete() {
                $id = null;
similarity index 92%
rename from gui/baculum/protected/API/Class/APIServerV2.php
rename to gui/baculum/protected/API/Modules/APIServerV2.php
index ba9b86dbbf8a1107181587f8aee0978cbbc6e0a0..f8a38018b4e6010fc59a0012a1a2c6b2b2e061eb 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIServer');
-Prado::using('Application.API.Class.APIInterfaces');
+namespace Baculum\API\Modules;
+
+use stdClass;
 
 /**
  * API Server version 2.
@@ -39,7 +40,6 @@ class APIServerV2 extends APIServer implements IAPIServer {
        /**
         * Support for API GET method request.
         *
-        * @return none;
         */
        public function get() {
                $this->getServerObj()->get();
@@ -48,7 +48,6 @@ class APIServerV2 extends APIServer implements IAPIServer {
        /**
         * Support for API PUT method request.
         *
-        * @return none
         */
        public function put() {
                $id = $this->Request->contains('id') ? intval($this->Request['id']) : 0;
@@ -63,7 +62,6 @@ class APIServerV2 extends APIServer implements IAPIServer {
        /**
         * Support for API POST method request.
         *
-        * @return none
         */
        public function post() {
                $inputstr = file_get_contents("php://input");
@@ -77,7 +75,6 @@ class APIServerV2 extends APIServer implements IAPIServer {
        /**
         * Support for API DELETE method request.
         *
-        * @return none
         */
        public function delete() {
                $id = null;
similarity index 93%
rename from gui/baculum/protected/API/Class/APIUrlMapping.php
rename to gui/baculum/protected/API/Modules/APIUrlMapping.php
index a33ffec7f13e5827ab507dca278f3175c9ef5191..4f1ce43c79fcfc8116488002b655af5c81bde6ae 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TUrlMapping');
+use Baculum\Common\Modules\BaculumUrlMapping;
+use Prado\Web\TUrlMappingPattern;
 
 /**
  * Extension default URL mapper for API.
similarity index 70%
rename from gui/baculum/protected/API/Class/BAPIException.php
rename to gui/baculum/protected/API/Modules/BAPIException.php
index 8ec63d348abed733c94d5f6a116d48b335c38cfa..b598b30519e9db41a100c80d565c456f7668c818 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BException');
+namespace Baculum\API\Modules;
 
-/**
- * API exceptions.
- *
- * @author Marcin Haba <marcin.haba@bacula.pl>
- * @category Exception
- * @package Baculum API
- */
-class BAPIException extends BException {
-}
+use Baculum\Common\Modules\BException;
 
-class BCatalogException extends BAPIException {
-}
-
-class BConsoleException extends BAPIException {
-}
-
-class BConfigException extends BAPIException {
+class BAPIException extends BException {
 }
-?>
diff --git a/gui/baculum/protected/API/Modules/BCatalogException.php b/gui/baculum/protected/API/Modules/BCatalogException.php
new file mode 100644 (file)
index 0000000..ae672cd
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\API\Modules;
+
+class BCatalogException extends BAPIException {
+}
diff --git a/gui/baculum/protected/API/Modules/BConfigException.php b/gui/baculum/protected/API/Modules/BConfigException.php
new file mode 100644 (file)
index 0000000..5642301
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\API\Modules;
+
+class BConfigException extends BAPIException {
+}
diff --git a/gui/baculum/protected/API/Modules/BConsoleException.php b/gui/baculum/protected/API/Modules/BConsoleException.php
new file mode 100644 (file)
index 0000000..5366976
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\API\Modules;
+
+class BConsoleException extends BAPIException {
+}
+
similarity index 99%
rename from gui/baculum/protected/API/Class/BLStat.php
rename to gui/baculum/protected/API/Modules/BLStat.php
index c66d2ab85e69641249ec4c8394bf47622fd608d8..0a894eb09bf0e74bb6cd584d7c637d4142df69e1 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
 /**
  * Bacula LStat value support.
  *
similarity index 97%
rename from gui/baculum/protected/API/Class/BList.php
rename to gui/baculum/protected/API/Modules/BList.php
index cd102cff2e6bae8eb8f8ef30626fb99aa8601f77..3a1f7338d4f7c2acd74b6015302db6fd165ab070 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules;
 
 /**
  * Tools used to show list files command output.
similarity index 83%
rename from gui/baculum/protected/API/Class/BVFS.php
rename to gui/baculum/protected/API/Modules/BVFS.php
index 4290b3922944f0af36aea0bb6e408c827f92ac5a..07374340a35af8de90669b88149a6a6cca73964d 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
 /**
  * BVFS module class.
  * It provides tools to work with BVFS outputs.
@@ -66,7 +68,7 @@ class BVFS extends APIModule {
                                );
                        }
                }
-               usort($elements, 'sortFilesListByName');
+               usort($elements, ['BVFS', 'sortFilesListByName']);
                return $elements;
        }
 
@@ -90,21 +92,19 @@ class BVFS extends APIModule {
                return $elements;
        }
 
-}
-
-/*
* Small sorting callback function to sort files and directories by name.
- * Function keeps '.' and '..' names always in the beginning of array.
- * Used to sort files and directories from Bvfs.
- */
-function sortFilesListByName($a, $b) {
-       $firstLeft = substr($a['name'], 0, 1);
-       $firstRight = substr($b['name'], 0, 1);
-       if ($firstLeft == '.' && $firstRight != '.') {
-               return -1;
-       } else if ($firstRight == '.' && $firstLeft != '.') {
-               return 1;
+       /*
+     * Small sorting callback function to sort files and directories by name.
+     * Function keeps '.' and '..' names always in the beginning of array.
    * Used to sort files and directories from Bvfs.
+     */
+       public static function sortFilesListByName($a, $b) {
+               $firstLeft = substr($a['name'], 0, 1);
+               $firstRight = substr($b['name'], 0, 1);
+               if ($firstLeft == '.' && $firstRight != '.') {
+                       return -1;
+               } else if ($firstRight == '.' && $firstLeft != '.') {
+                       return 1;
+               }
+               return strcmp($a['name'], $b['name']);
        }
-       return strcmp($a['name'], $b['name']);
-}
-?>
+}
\ No newline at end of file
similarity index 96%
rename from gui/baculum/protected/API/Class/BaculaConfig.php
rename to gui/baculum/protected/API/Modules/BaculaConfig.php
index b083469a1952019b6991fa203c4b7e1e8f0b431b..c815f2bb495ab778d3fa4ccf8664c52f1377c8c6 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\ConfigFileModule;
 
 /**
  * Manage Bacula configuration.
similarity index 96%
rename from gui/baculum/protected/API/Class/BaculaSetting.php
rename to gui/baculum/protected/API/Modules/BaculaSetting.php
index e5a656de4a35e0a1f6a41aa2cba97df4968a11d2..5c8936d8990c16918d6fa05dedc67eaca2528903 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.APIConfig');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\Errors\BaculaConfigError;
+use Baculum\Common\Modules\Errors\JSONToolsError;
+use Baculum\Common\Modules\Params;
 
 /**
  * Read/write Bacula configuration.
@@ -301,7 +302,7 @@ class BaculaSetting extends APIModule {
                                                                        );
                                                                }
                                                                $overwrite_directive = array_map(
-                                                                       'overwrite_directives_callback',
+                                                                       ['BaculaSetting', 'overwrite_directives_callback'],
                                                                        array_keys($directive_value[$i]),
                                                                        $values
                                                                );
@@ -572,27 +573,28 @@ class BaculaSetting extends APIModule {
                }
                return $tool_type;
        }
-}
-function overwrite_directives_callback($directive_name, $directive_value) {
-       $directive = '';
-       $overwrite_directives = array(
-               'Level',
-               'Pool',
-               'Storage',
-               'Messages',
-               'FullPool',
-               'DifferentialPool',
-               'IncrementalPool',
-               'Accurate',
-               'Priority',
-               'SpoolData',
-               'MaxRunSchedTime',
-               'NextPool',
-               'MaxConnectTime'
-       );
-       if (in_array($directive_name, $overwrite_directives)) {
-               $directive = "{$directive_name}={$directive_value}";
+
+       public static function overwrite_directives_callback($directive_name, $directive_value) {
+               $directive = '';
+               $overwrite_directives = array(
+                       'Level',
+                       'Pool',
+                       'Storage',
+                       'Messages',
+                       'FullPool',
+                       'DifferentialPool',
+                       'IncrementalPool',
+                       'Accurate',
+                       'Priority',
+                       'SpoolData',
+                       'MaxRunSchedTime',
+                       'NextPool',
+                       'MaxConnectTime'
+               );
+               if (in_array($directive_name, $overwrite_directives)) {
+                       $directive = "{$directive_name}={$directive_value}";
+               }
+               return $directive;
        }
-       return $directive;
 }
 ?>
similarity index 90%
rename from gui/baculum/protected/API/Class/BaculumAPIPage.php
rename to gui/baculum/protected/API/Modules/BaculumAPIPage.php
index 432e319db435cfc1e0ddbf134b138c651675a7fe..cbad987daca7703a71bdbd0eea1830e9cf8a7f37 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
 session_start();
 
-Prado::using('Application.API.Pages.Requirements');
-Prado::using('Application.Common.Class.BaculumPage');
-Prado::using('Application.API.Class.APIConfig');
+use Baculum\Common\Modules\BaculumPage;
 
 /**
  * Main API pages class.
similarity index 93%
rename from gui/baculum/protected/API/Class/BaculumAPIServer.php
rename to gui/baculum/protected/API/Modules/BaculumAPIServer.php
index d4acd0462b73a4433a9371d6cc623fd68c3ef434..ba8d5b5df0c44a71fc2620f907ab84765e18c33d 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('System.Web.UI.TPage');
-Prado::using('System.Exceptions.TException');
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.Common.Class.OAuth2');
-Prado::using('Application.Common.Class.Logging');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.APIDbModule');
-Prado::using('Application.API.Class.Bconsole');
-Prado::using('Application.API.Class.OAuth2.TokenRecord');
-Prado::using('Application.API.Class.APIServer');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Errors\AuthenticationError;
+use Baculum\Common\Modules\Errors\AuthorizationError;
+use Baculum\Common\Modules\Errors\GenericError;
+use Prado\Web\UI\TPage;
+use Prado\Exceptions\TException;
+use Baculum\Common\Modules\OAuth2;
+use Baculum\Common\Modules\Logging;
+use Baculum\API\Modules\OAuth2\TokenRecord;
 
 /**
  * Abstract module from which inherits each of API module.
@@ -161,7 +161,6 @@ abstract class BaculumAPIServer extends TPage {
         *
         * @access public
         * @param mixed $params onInit action params
-        * @return none
         */
        public function onInit($params) {
                parent::onInit($params);
@@ -188,7 +187,6 @@ abstract class BaculumAPIServer extends TPage {
         * Run requested resource.
         * It sets output and error values.
         *
-        * @return none
         */
        private function runResource() {
                $version = APIServer::getVersion();
@@ -214,7 +212,7 @@ abstract class BaculumAPIServer extends TPage {
                                        break;
                                }
                        }
-               } catch(Prado\Exceptions\TException $e) {
+               } catch(TException $e) {
                        $this->getModule('logging')->log(
                                __FUNCTION__,
                                "Method: {$_SERVER['REQUEST_METHOD']} $e",
@@ -236,7 +234,6 @@ abstract class BaculumAPIServer extends TPage {
         * Initialize auth parameters.
         *
         * @param array $auth token params stored in TokenRecord session
-        * @return none
         */
        private function initAuthParams(array $auth) {
                // if client has own bconsole config, assign it here
@@ -282,7 +279,6 @@ abstract class BaculumAPIServer extends TPage {
         *
         * @access public
         * @param mixed $params onInit action params
-        * @return none
         */
        public function onLoad($params) {
                parent::onLoad($params);
similarity index 89%
rename from gui/baculum/protected/API/Class/BasicAPIUserConfig.php
rename to gui/baculum/protected/API/Modules/BasicAPIUserConfig.php
index cbe630f44a8bdd088c087a65694e90bc5a5e4a8d..841fd2be1d09aa3fdac25cee2bf28c682cb5a930 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BasicUserConfig');
+namespace Baculum\API\Modules;
+
+use Prado\Prado;
+use Baculum\Common\Modules\BasicUserConfig;
 
 /**
  * Manage HTTP Basic auth method users.
@@ -34,7 +37,7 @@ class BasicAPIUserConfig extends BasicUserConfig {
        /**
         * Users login and password file for HTTP Basic auth.
         */
-       const USERS_FILE_NAME = 'Application.API.Config.baculum';
+       const USERS_FILE_NAME = 'Baculum.API.Config.baculum';
        const USERS_FILE_EXTENSION = '.users';
 
        public function getConfigPath() {
similarity index 97%
rename from gui/baculum/protected/API/Class/BasicConfig.php
rename to gui/baculum/protected/API/Modules/BasicConfig.php
index 84e4fd58456e4360ff417762229cfde406d3b468..d98ebc9a881e484dfac6345e5cfd858092cf964c 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\ConfigFileModule;
 
 /**
  * Manage Basic user configuration.
@@ -35,7 +38,7 @@ class BasicConfig extends ConfigFileModule {
        /**
         * Basic user config file path
         */
-       const CONFIG_FILE_PATH = 'Application.API.Config.basic';
+       const CONFIG_FILE_PATH = 'Baculum.API.Config.basic';
 
        /**
         * Basic user config file format
similarity index 97%
rename from gui/baculum/protected/API/Class/Bconsole.php
rename to gui/baculum/protected/API/Modules/Bconsole.php
index b4cfcc90273ea255029d5135c3eec5287d0a9e5a..1111c75f447de8dfa6cdfb2e707f4ad43f6b0f86 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\Errors\BconsoleError;
+use Prado\Prado;
 
 /**
  * Execute bconsole module.
@@ -309,14 +311,14 @@ class Bconsole extends APIModule {
        }
 
        private function prepareOutputFile() {
-               $dir = Prado::getPathOfNamespace('Application.API.Config');
+               $dir = Prado::getPathOfNamespace('Baculum.API.Config');
                $fname = tempnam($dir, self::OUTPUT_FILE_PREFIX);
                return $fname;
        }
 
        public static function readOutputFile($out_id) {
                $output = array();
-               $dir = Prado::getPathOfNamespace('Application.API.Config');
+               $dir = Prado::getPathOfNamespace('Baculum.API.Config');
                if (preg_match('/^[a-z0-9]+$/i', $out_id) === 1) {
                        $file = $dir . '/' . self::OUTPUT_FILE_PREFIX . $out_id;
                        if (file_exists($file)) {
similarity index 97%
rename from gui/baculum/protected/API/Class/ChangerCommand.php
rename to gui/baculum/protected/API/Modules/ChangerCommand.php
index 490f3e137739695718f1d7607871cedfc04b0e53..dae10bcd4ad4dea752273979b6dc22f773327cb8 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.API.Class.DeviceConfig');
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\Errors\DeviceError;
+use Prado\Prado;
+use stdClass;
 
 /**
  * Execute changer command module.
@@ -251,7 +254,7 @@ class ChangerCommand extends APIModule {
         * @return string|boolean new temporary filename (with path), or false on failure.
         */
        private function prepareOutputFile() {
-               $dir = Prado::getPathOfNamespace('Application.API.Config');
+               $dir = Prado::getPathOfNamespace('Baculum.API.Config');
                $fname = tempnam($dir, self::OUTPUT_FILE_PREFIX);
                return $fname;
        }
@@ -265,7 +268,7 @@ class ChangerCommand extends APIModule {
         */
        public static function readOutputFile($out_id) {
                $output = [];
-               $dir = Prado::getPathOfNamespace('Application.API.Config');
+               $dir = Prado::getPathOfNamespace('Baculum.API.Config');
                if (preg_match('/^[a-z0-9]+$/i', $out_id) === 1) {
                        $file = $dir . '/' . self::OUTPUT_FILE_PREFIX . $out_id;
                        if (file_exists($file)) {
similarity index 92%
rename from gui/baculum/protected/API/Class/ClientManager.php
rename to gui/baculum/protected/API/Modules/ClientManager.php
index dac65d94ee02de8c1100db5fa8d9c1a0b554a656..88f8d7d30c3e8367000ef85a149ae7032a567646 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.ClientRecord');
+namespace Baculum\API\Modules;
+
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * Client manager module.
similarity index 95%
rename from gui/baculum/protected/API/Class/ClientRecord.php
rename to gui/baculum/protected/API/Modules/ClientRecord.php
index a3d6aab235f4ddd375a6b6168c7e0115c068b484..da8cc4e26ae30c3b1cf02578283a551184256c7e 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Client active record module.
similarity index 96%
rename from gui/baculum/protected/API/Class/ComponentActions.php
rename to gui/baculum/protected/API/Modules/ComponentActions.php
index f7ff0257aba95202a52d461292893b6ff16ffb20..6dc008034302590336f04e5f7c36ad286b55790b 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.Common.Class.Errors');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\Errors\ActionsError;
 
 /**
  * Module responsible for executing action commands.
similarity index 97%
rename from gui/baculum/protected/API/Class/ComponentStatusModule.php
rename to gui/baculum/protected/API/Modules/ComponentStatusModule.php
index 19cc3d4ba2aa609ec2af7ee11777bf7a3241e436..70e760f409e81efac731dfa86501fa02b2298efc 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules;
 
 /**
  * Base abstract class to inherit commonly used method
similarity index 97%
rename from gui/baculum/protected/API/Class/ConsoleOutputPage.php
rename to gui/baculum/protected/API/Modules/ConsoleOutputPage.php
index ad196c66ce11c0a3f5b7aa7edbb8b6d90ac862c2..4f09e818167e3fd4d6dc99e5cc5410d6c303446a 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
 /**
  * Get console output page.
  *
similarity index 97%
rename from gui/baculum/protected/API/Class/ConsoleOutputShowPage.php
rename to gui/baculum/protected/API/Modules/ConsoleOutputShowPage.php
index c0f26e403787623fbe1d31ec3be0d2e7d87edf4f..fe2526d6fcda27fd8876829dc50a4af71b55ae94 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
+namespace Baculum\API\Modules;
 
 /**
  * Get console output for 'show' type commands.
similarity index 95%
rename from gui/baculum/protected/API/Class/Database.php
rename to gui/baculum/protected/API/Modules/Database.php
index 62d2cae1aab81e1088ea41e690d29be682b65050..329827bb300325f9e36711740a5f19ccdf4ab8e9 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.APIDbModule');
+
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\Errors\DatabaseError;
+use Prado\Data\TDbConnection;
+use Prado\Exceptions\TDbException;
 
 /**
  * Database module.
@@ -60,7 +62,7 @@ class Database extends APIModule {
                        $connection->setActive(true);
                        $tables_format = $this->getTablesFormat($connection);
                        $is_connection = (is_numeric($tables_format) === true && $tables_format > 0);
-               } catch (Prado\Exceptions\TDbException $e) {
+               } catch (TDbException $e) {
                        throw new BCatalogException(
                                DatabaseError::MSG_ERROR_DB_CONNECTION_PROBLEM . ' ' . $e->getErrorMessage(),
                                DatabaseError::ERROR_DB_CONNECTION_PROBLEM
similarity index 96%
rename from gui/baculum/protected/API/Class/DeviceConfig.php
rename to gui/baculum/protected/API/Modules/DeviceConfig.php
index cdc92be7cf843f7a189155494a7890e2462f5cb9..47808446b467c1f9a8d4beac2518435e3e164878 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
 
 /**
  * Manage devices configuration.
@@ -46,7 +48,7 @@ class DeviceConfig extends ConfigFileModule {
        /**
         * Device config file path
         */
-       const CONFIG_FILE_PATH = 'Application.API.Config.devices';
+       const CONFIG_FILE_PATH = 'Baculum.API.Config.devices';
 
        /**
         * Device config file format
similarity index 92%
rename from gui/baculum/protected/API/Class/FileSetManager.php
rename to gui/baculum/protected/API/Modules/FileSetManager.php
index 337317c1768e78c24782df1cadd94b88d0a31060..9b61dbc6a015b56b70d6ea1ead5fca813f09b512 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.FileSetRecord');
+namespace Baculum\API\Modules;
+
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * FileSet manager module.
similarity index 95%
rename from gui/baculum/protected/API/Class/FileSetRecord.php
rename to gui/baculum/protected/API/Modules/FileSetRecord.php
index 52dc2310c112440802077e222c33c3ae6d95e777..545923458f6d048d3c50348b9d3a52d803ce2417 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * FileSet record module.
similarity index 93%
rename from gui/baculum/protected/API/Class/APIInterfaces.php
rename to gui/baculum/protected/API/Modules/IAPIServer.php
index 8c581306d4723d67132ac098390e084133c89674..efe42f003a1c8dd028373a344b4329e2a3a608de 100644 (file)
@@ -3,7 +3,7 @@
  * Bacula(R) - The Network Backup Solution
  * Baculum   - Bacula web interface
  *
- * Copyright (C) 2013-2021 Kern Sibbald
+ * Copyright (C) 2013-2022 Kern Sibbald
  *
  * The main author of Baculum is Marcin Haba.
  * The original author of Bacula is Kern Sibbald, with contributions
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\API\Modules;
+
 /**
  * API interfaces.
  *
similarity index 97%
rename from gui/baculum/protected/API/Class/JSONTools.php
rename to gui/baculum/protected/API/Modules/JSONTools.php
index ac7311922d440e1aff95d5dc1dd67a284500d0d8..5accfefe03c77dd62791458e4b8d261bf4077a79 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.Common.Class.Errors');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Errors\JSONToolsError;
+use Baculum\Common\Modules\Logging;
 
 /**
  * Bacula JSON tools manager.
similarity index 98%
rename from gui/baculum/protected/API/Class/JobManager.php
rename to gui/baculum/protected/API/Modules/JobManager.php
index 14162576c7161c59b4d249a957f9beeffb9b2ade..ba13111f22f660718deceee4a8f223609cf75a3e 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.JobRecord');
-Prado::using('Application.API.Class.Database');
+namespace Baculum\API\Modules;
+
+use PDO;
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * Job manager module.
similarity index 97%
rename from gui/baculum/protected/API/Class/JobRecord.php
rename to gui/baculum/protected/API/Modules/JobRecord.php
index 977cd391981d9180662a829c414a004392da1a33..0798cec1206cb4d3e70497ff62947e391b592a6b 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Job record module.
similarity index 93%
rename from gui/baculum/protected/API/Class/LogManager.php
rename to gui/baculum/protected/API/Modules/LogManager.php
index 4d3ef1766854df080d9e18ccf68fc5fe60265c48..54ca89d2ed9947feb36117680a6aad0ca8d610ed 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.LogRecord');
+namespace Baculum\API\Modules;
 
 /**
  * Log manager module.
similarity index 95%
rename from gui/baculum/protected/API/Class/LogRecord.php
rename to gui/baculum/protected/API/Modules/LogRecord.php
index bf113b0f79f3a414342667cb13c8c91aa16feef6..1657ee320e79c7c223da1c3af4a493182e328c68 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Log record module.
similarity index 97%
rename from gui/baculum/protected/API/Class/Ls.php
rename to gui/baculum/protected/API/Modules/Ls.php
index af431e6b5cf18ee6cdb5613c0c78d3b7aa69bcae..42b3e30285ea0614f6686f5f0e16e5c7478b5112 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules;
 
 /**
  * Ls command module.
similarity index 95%
rename from gui/baculum/protected/API/Class/OAuth2/AuthIdManager.php
rename to gui/baculum/protected/API/Modules/OAuth2/AuthIdManager.php
index 0ca7705e4749a7eb7ce05bcce084c0be43c179c8..c9215572c46b8c301b58a215a41ec7ea42327160 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.OAuth2.AuthIdRecord');
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules\OAuth2;
+
+use Baculum\API\Modules\APIModule;
 
 /**
  * Manager for authorization identifiers (authorization codes).
@@ -47,7 +48,6 @@ class AuthIdManager extends APIModule {
         * Delete expired authorization identifiers from database.
         * 
         * @access public
-        * @return none
         */
        public function deleteExpiredAuthIds() {
                $current_time = time();
similarity index 80%
rename from gui/baculum/protected/API/Class/OAuth2/AuthIdRecord.php
rename to gui/baculum/protected/API/Modules/OAuth2/AuthIdRecord.php
index 7c402d4b1c308c6db001c093d8046a6a83959d17..6c8cebf5b27e337104a1bb92c79cc115e8da7a99 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.SessionRecord');
+namespace Baculum\API\Modules\OAuth2;
+
+use Prado\Prado;
+use Baculum\Common\Modules\ISessionItem;
+use Baculum\Common\Modules\SessionRecord;
  
 /**
  * Get/set OAuth2 auth identifier.
@@ -30,7 +33,7 @@ Prado::using('Application.Common.Class.SessionRecord');
  * @category Authorization
  * @package Baculum API
  */
-class AuthIdRecord extends SessionRecord implements SessionItem {
+class AuthIdRecord extends SessionRecord implements ISessionItem {
 
        public $auth_id;
        public $client_id;
@@ -47,7 +50,7 @@ class AuthIdRecord extends SessionRecord implements SessionItem {
        }
 
        public static function getSessionFile() {
-               return Prado::getPathOfNamespace('Application.API.Config.session', '.dump');
+               return Prado::getPathOfNamespace('Baculum.API.Config.session', '.dump');
        }
 }
 ?>
similarity index 97%
rename from gui/baculum/protected/API/Class/OAuth2/BaculumOAuth2.php
rename to gui/baculum/protected/API/Modules/OAuth2/BaculumOAuth2.php
index 2b739a801ab3c6c925b0938c1521508eca936454..931093d13b845806877a534e4c28db82cead93dd 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.OAuth2');
+namespace Baculum\API\Modules\OAuth2;
+
+use Baculum\Common\Modules\OAuth2;
 
 /**
  * Baculum API specific module with generic methods to support OAuth2.
@@ -87,7 +89,6 @@ class BaculumOAuth2 extends OAuth2 {
         * @param string $error_name error name
         * @param string $error_description human-readable error description
         * @param string $error_uri page location where client is able to get help for returned error
-        * @return none 
         */
        public function authorizationError($header, $error_name, $error_description = null, $error_uri = null, $state = null) {
                $error = array('error' => $error_name);
@@ -117,7 +118,6 @@ class BaculumOAuth2 extends OAuth2 {
         * @access public
         * @param string $redirect_uri uniform resource identifier (URI)
         * @param array $params GET parameters for redirect_uri contained in associative array
-        * @return none
         */
        public function authorizationRedirect($redirect_uri, $params = array()) {
                header(parent::HEADER_HTTP_FOUND);
similarity index 95%
rename from gui/baculum/protected/API/Class/OAuth2/OAuth2Config.php
rename to gui/baculum/protected/API/Modules/OAuth2/OAuth2Config.php
index ccafc8d5264a23dd4ddf8e8cc3ad291399758ed6..05f2ee6ea44fbd698ee7cd2ea103a7b211b63778 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\API\Modules\OAuth2;
+
+use Baculum\Common\Modules\Logging;
+use Baculum\Common\Modules\ConfigFileModule;
 
 /**
  * Manage OAuth2 client configuration.
@@ -35,7 +38,7 @@ class OAuth2Config extends ConfigFileModule {
        /**
         * OAuth2 client config file path
         */
-       const CONFIG_FILE_PATH = 'Application.API.Config.oauth2';
+       const CONFIG_FILE_PATH = 'Baculum.API.Config.oauth2';
 
        /**
         * OAuth2 client config file format
@@ -135,7 +138,6 @@ class OAuth2Config extends ConfigFileModule {
         *
         * @param array reference $config config to set added options.
         * @param mixed $section determines if passed all config or only section
-        * @return none
         */
        private function setAddedOptions(&$config, $section = null) {
                foreach ($this->added_options as $added_opt => $defval) {
similarity index 96%
rename from gui/baculum/protected/API/Class/OAuth2/TokenManager.php
rename to gui/baculum/protected/API/Modules/OAuth2/TokenManager.php
index cb939fdbc7eb04ace3d6c518961427c1a49c29b9..affc1b3eccd55c8a6342e4a6eaa81e4f043fb37a 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.OAuth2.TokenRecord');
-Prado::using('Application.API.Class.APIModule');
+namespace Baculum\API\Modules\OAuth2;
+
+use Baculum\API\Modules\APIModule;
 
 /**
  * Manager for tokens.
@@ -66,7 +67,6 @@ class TokenManager extends APIModule {
         * Delete expired tokens from database.
         * 
         * @access public
-        * @return none
         */
        public function deleteExpiredTokens() {
                $current_time = time();
similarity index 81%
rename from gui/baculum/protected/API/Class/OAuth2/TokenRecord.php
rename to gui/baculum/protected/API/Modules/OAuth2/TokenRecord.php
index 7f5dd08864f1b25ebd9d045a02e6f8e8b8936040..187d506d71e94443cf8c8603ba3e6d996e6d2e12 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.SessionRecord');
+namespace Baculum\API\Modules\OAuth2;
+
+use Prado\Prado;
+use Baculum\Common\Modules\ISessionItem;
+use Baculum\Common\Modules\SessionRecord;
 
 /** 
  * Module to store tokens as session record.
@@ -30,7 +33,7 @@ Prado::using('Application.Common.Class.SessionRecord');
  * @category Authorization
  * @package Baculum
  */
-class TokenRecord extends SessionRecord implements SessionItem  {
+class TokenRecord extends SessionRecord implements ISessionItem  {
 
        public $access_token;
        public $refresh_token;
@@ -48,7 +51,7 @@ class TokenRecord extends SessionRecord implements SessionItem  {
        }
 
        public static function getSessionFile() {
-               return Prado::getPathOfNamespace('Application.API.Config.session', '.dump');
+               return Prado::getPathOfNamespace('Baculum.API.Config.session', '.dump');
        }
 }
 ?>
similarity index 93%
rename from gui/baculum/protected/API/Class/OAuthUrlMapping.php
rename to gui/baculum/protected/API/Modules/OAuthUrlMapping.php
index e294763cc2b96cd891a2411000cfa5afa60c37a9..330132a7bd1edbc0faf44174ec11fb83103c064a 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TUrlMapping');
+use Baculum\Common\Modules\BaculumUrlMapping;
+use Prado\Web\TUrlMappingPattern;
 
 /**
  * Extension default URL mapper for OAuth2.
similarity index 93%
rename from gui/baculum/protected/API/Class/PanelUrlMapping.php
rename to gui/baculum/protected/API/Modules/PanelUrlMapping.php
index 6a874d9ba64ec6f9774a46724aa12a67d83beeca..881be6cbdf85bf25741776cc24433ee784e3468f 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TUrlMapping');
+use Baculum\Common\Modules\BaculumUrlMapping;
+use Prado\Web\TUrlMappingPattern;
 
 /**
  * Extension default URL mapper for Panel.
similarity index 91%
rename from gui/baculum/protected/API/Class/PoolManager.php
rename to gui/baculum/protected/API/Modules/PoolManager.php
index b53c2a22de517704c882e97bcf510208d73dd7ed..2a97fc3fd21919e495823aff51968da772721e1a 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.PoolRecord');
-Prado::using('Application.API.Class.Database');
+namespace Baculum\API\Modules;
+
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * Pool manager module.
similarity index 96%
rename from gui/baculum/protected/API/Class/PoolRecord.php
rename to gui/baculum/protected/API/Modules/PoolRecord.php
index 511264ec7e682134e986bbef6425c525cf3246e7..07693f78ad67c6aebd9782cfbb14883828e1ad38 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Pool record module.
similarity index 97%
rename from gui/baculum/protected/API/Class/StatusClient.php
rename to gui/baculum/protected/API/Modules/StatusClient.php
index 3a48fc00be78939a3871ac4dc42d3c926849b2d6..210f3d2c98ec386e79c171756834d80e17886cd9 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ComponentStatusModule');
+namespace Baculum\API\Modules;
+
+use Baculum\Common\Modules\Errors\GenericError;
 
 /**
  * Module used to get and parse client status output.
similarity index 97%
rename from gui/baculum/protected/API/Class/StatusDirector.php
rename to gui/baculum/protected/API/Modules/StatusDirector.php
index b2bcd1343b98c0423ea296e2a4f10a6683df748c..c24ebad769f082c8296fe67e78af724e44fcefda 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
-Prado::using('Application.API.Class.ComponentStatusModule');
+namespace Baculum\API\Modules;
 
 /**
  * Module used to parse and prepare director status output.
similarity index 98%
rename from gui/baculum/protected/API/Class/StatusStorage.php
rename to gui/baculum/protected/API/Modules/StatusStorage.php
index 4a74b1e1cd98cb62a15248626e2d3de25c44bdfa..d8690f88da1ce8d39db73188ff76eb2de238026e 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ComponentStatusModule');
+namespace Baculum\API\Modules;
 
 /**
  * Module used to get and parse storage status output.
similarity index 92%
rename from gui/baculum/protected/API/Class/StorageManager.php
rename to gui/baculum/protected/API/Modules/StorageManager.php
index b7bd43cbc64e02241cb907d0cbeb64661da2dd37..217073afb24bdfc07ab6fb3d2999801d51eb7e23 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.StorageRecord');
+namespace Baculum\API\Modules;
+
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * Storage manager module.
similarity index 95%
rename from gui/baculum/protected/API/Class/StorageRecord.php
rename to gui/baculum/protected/API/Modules/StorageRecord.php
index 08f2127d350a76063f0eae02e18150e673b74169..bd9f72780d854c08bf0a5818d31633a276414192 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Storage record module.
similarity index 91%
rename from gui/baculum/protected/API/Class/VersionManager.php
rename to gui/baculum/protected/API/Modules/VersionManager.php
index c4f0eda973cf808f24a8f6d3451e89dc3ce1bf81..67943944b26a06306883460f210b6c00c27d51c2 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.VersionRecord');
+namespace Baculum\API\Modules;
+
+use Prado\Data\ActiveRecord\TActiveRecordCriteria;
 
 /**
  * Version manager module.
similarity index 95%
rename from gui/baculum/protected/API/Class/VersionRecord.php
rename to gui/baculum/protected/API/Modules/VersionRecord.php
index 5247f34c31e99488abfaf0752aae3deec0d7b23b..b0c2379c79e0c6062e45d7566c866e897c5a8094 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Version record module.
similarity index 97%
rename from gui/baculum/protected/API/Class/VolumeManager.php
rename to gui/baculum/protected/API/Modules/VolumeManager.php
index 69dcf599e78f5e414da2de977dc5524c6a37b0e3..138d4ba4b2d0cda8c03c527bd5cd95ea98ae715c 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIModule');
-Prado::using('Application.API.Class.VolumeRecord');
-Prado::using('Application.API.Class.Database');
+namespace Baculum\API\Modules;
 
 /**
  * Volume manager module.
similarity index 97%
rename from gui/baculum/protected/API/Class/VolumeRecord.php
rename to gui/baculum/protected/API/Modules/VolumeRecord.php
index 80430bd65def57a7f5e0eb8de17a57181393a174..459699dd0d72709ef3b5579d59faf5d3e7e915ce 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+namespace Baculum\API\Modules;
 
 /**
  * Volume record module.
index c3a8a0f54ad64fb5f83ea5207346b754b815bd17..04eaa427ba0e783460eaa2b09f427af94f15f740 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIConfig');
+use Baculum\API\Modules\APIConfig;
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ActionsError;
+
 /**
  * API actions support.
  *
index cecdcf1d767405d23e743887526a7a73cc90ae08..488688905b156375679301e6c7bc94421af57e79 100644 (file)
@@ -20,5 +20,5 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Pages.OAuth2.Authorize');
+use Baculum\API\Pages\OAuth2\Authorize;
 ?>
index bd306858508825230dcd1b60ba2f48134f232c64..2c9daa6ea399ab8885a5ffa77b9e6a80464f7d57 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BVFSError;
+
 /**
  * BVFS cleanup.
  *
index e26fc5db3f13f5bc6d434b2c831aeee9b286711b..f9de302134621642621261ca335061baf4fc4d3a 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+
 /**
  * BVFS clear cache.
  *
index c59e7420333a2853b11cca233931005319720bf9..fae578d8afe4c42244936acea2e44dfb6053699e 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BVFSError;
+
 /**
  * BVFS get jobids to do restore.
  *
index 04684470addf043b991284faabadd83a92dc2caa..c54ba002db400a3ebf9ad193ecf0d5e3d70443d5 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\BVFSError;
+
 /**
  * BVFS list directories.
  *
index 743e650b121543141ac1983c08e15fba2f953402..be01ccc6a9f06c2c9e99bc458302f004b3f7cca8 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\BVFSError;
 
 /**
  * BVFS list files.
index 1451f326de57fe4eaeb8eb559e484cf81374bd40..ec24046ca45a96a058e5c220c95238ceeebc1462 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BVFSError;
+
 /**
  * BVFS restore.
  *
index 5ad4089d9f22c653e93134f691ac32824a9566d7..0c9abf6556c330c20ff37453a871a4c247a3f381 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BVFSError;
+
 /**
  * BVFS update.
  *
index 9131ce46164b8e4f6b0d71e5c21f2023b0f92e30..0e7e2c3268063700ceb0bf123b5437c27dd68d19 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\BVFSError;
 
 /**
  * BVFS versions.
index 3d0afe0f169523484901e600757ce49a554aaf0c..dd271adbca40e016e4742555c593e2df37cb894f 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BasicUserError;
+
 /**
  * Basic user endpoint.
  *
index 7c676f23455a5097e822526e8d135d404c30f524..cccab70358070635816ce64a7fa568f048c691d5 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+
 /**
  * Basic users endpoint.
  *
index e190c5832124834b5081e45028e190d22ec77cba..846406916188238fb5abbd753f38b7b272308998 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\DatabaseError;
+
 /**
  * Catalog test.
  *
index 7c5e0731e8bb18606ad405010a89e5e4d1d3b31f..2ae4815e81a25aef291e66858cc1f4d4c2ba5390 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ChangerCommand');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\ChangerCommand;
+use Baculum\Common\Modules\Errors\DeviceError;
 
 /**
  * Load a given slot to autochanger drive.
index 25d476081974921afd1935ba67619c4232fe7133..62f0f892c63598a7e1c2ef49c0c44a2bd702bb99 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\DeviceError;
+
 /**
  * Which slot is loaded in autochanger drive.
  *
@@ -35,8 +38,8 @@ class ChangerDriveLoaded extends BaculumAPIServer {
                $drive = $this->Request->contains('drive') && $misc->isValidName($this->Request['drive']) ? $this->Request['drive'] : null;
 
                if (is_null($drive)) {
-                       $this->output = ChangerCommandError::MSG_ERROR_CHANGER_COMMAND_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
-                       $this->error = ChangerCommandError::ERROR_CHANGER_COMMAND_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
+                       $this->output = DeviceError::MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
+                       $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
                        return;
                }
 
index 84e9749b685b01b2441623d2cc2f34ab2291ba1f..438d4cc86ab89cee3db57b7b769bf71d5ba1f3ba 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ChangerCommand');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\ChangerCommand;
+use Baculum\Common\Modules\Errors\DeviceError;
 
 /**
  * Unload a given slot from autochanger drive.
@@ -49,14 +51,14 @@ class ChangerDriveUnload extends BaculumAPIServer {
                $slot = $this->Request->contains('slot') && $misc->isValidInteger($this->Request['slot']) ? intval($this->Request['slot']) : null;
 
                if (is_null($drive)) {
-                       $this->output = ChangerCommandError::MSG_ERROR_CHANGER_COMMAND_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
-                       $this->error = ChangerCommandError::ERROR_CHANGER_COMMAND_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
+                       $this->output = DeviceError::MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
+                       $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
                        return;
                }
 
                if (is_null($slot)) {
-                       $this->output = ChangerCommandError::MSG_ERROR_CHANGER_COMMAND_WRONG_SLOT_NUMBER;
-                       $this->error = ChangerCommandError::ERROR_CHANGER_COMMAND_WRONG_SLOT_NUMBER;
+                       $this->output = DeviceError::MSG_ERROR_DEVICE_WRONG_SLOT_NUMBER;
+                       $this->error = DeviceError::ERROR_DEVICE_WRONG_SLOT_NUMBER;
                        return;
                }
 
index 74c9b9193f257a5233578cc8192df009dca66051..3a8d1de976260d44d831a83b46d6b7f0290ab180 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\DeviceError;
+
 /**
  * List autochanger volume names (requires barcode reader).
  *
index c7b1a19aec98b4e2ea08600c5d14171824e26246..2c8f10503998c0a54b292d2ccde39876d3e4de29 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\DeviceError;
+
 /**
  * Autochanger list all slots.
  *
index ba741d34f8a5fb2f101022c303a65ad949420533..9b56e6341516708b0260f9721ff9b5f4e15a4820 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+
 /**
  * How many slots has autochanger.
  *
index 5c0d7c6efa9253bded75f39c4925dbfc23598a5e..e7e5027bca43f53cfd2369b301d44bc19120761e 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ChangerCommand');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\ChangerCommand;
+use Baculum\Common\Modules\Errors\DeviceError;
 
 /**
  * Transfer autochanger tape from slot to slot.
index 6229638adaa27032b043d177ed5875cd4d61b32c..56a39529bdbaca75a98d343f030e3ca6cee3b20e 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+
 /**
  * Client endpoint.
  *
index 436a722d2a58e53c7522c5f3d87b42d01edac5c3..e9eeb12c6ec4fe7dddc0203b87045b31560bebb1 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+use Baculum\Common\Modules\Errors\GenericError;
+
 /**
  * Client bandwidth limit endpoint.
  *
index 6c7925d59fcbfcdbf1e170642169a38eac79e0d6..f0244b89827b296c083f594a4e396bf1d75b9ff2 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+use Baculum\Common\Modules\Errors\GenericError;
+
 /**
  * Client list directories.
  *
index cbc99e58fb0f9d373e4caa4515b9aec8f1a9a25e..4f117c5630e1dd635017c52c8ec4a10b51ee6eb1 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\ClientError;
 
 /**
  * Client show command endpoint.
index 46a40d2e03cfe62d520dd02b32f8f2cf1fd8e618..ba6bc3449097828219a1bede09be4fd4c00365aa 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\ClientError;
+use Baculum\Common\Modules\Errors\GenericError;
 
 /**
  * Client status.
index d7e85ea83d9c01939f5ad092e6b5b62946f618d1..fe65726e97a378947a19266f95dbf3d06d4ccd53 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+
 /**
  * Clients endpoint.
  *
index 28cd618f4bbcb6daa907b087a85b3e47f8328c24..e34fc2ce10bf6a22af64840d002dae7dda4703d0 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\ClientError;
 
 /**
  * Clients show command endpoint.
index 5bf558a1a7a00a892b4ba452f3cfed97169cccac..a7d28373889bc1af863dc66a6e3f65574a964554 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\GenericError;
 
 /**
  * Component status module.
index c74a6e78ec1592a922206485212ea8085451b276..0a99a08c6283cba8a1df090bea232ed744270c5c 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Errors');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BaculaConfigError;
 
 /**
  * Config endpoint.
index c06f93e9c51c8e62d05e63cde417728cb909c359..0b0396939f3bffb07b0796da7fdd81a67a77e17b 100644 (file)
@@ -19,7 +19,9 @@
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+
 /**
  * Console command endpoint.
  *
index 0a88e50454f3371de0e65bb73836e1258b8834a4..4e4714deae51b7a1201847f2c9a0734279bbcd5a 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Database size endpoint.
  *
index 70cd305c70d40c73c45aeb6abf4ab60e60b6b759..4c49ba8469af1864bb2f69ebb812a8494526a346 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\BconsoleError;
 
 /**
  * Director show command endpoint.
index c2f755eb44a346972c115ee30c2c8053a19f9fb4..d055f45af02f93dac97eed13d54c274db5347593 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\BconsoleError;
+use Baculum\Common\Modules\Errors\GenericError;
 
 /**
  * Director status command endpoint.
index a10ab7c559aff72e6e7954e65ba313120f976afb..34c8f50bd3112a9a633f94d4c386778a4161a8aa 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BconsoleError;
+
 /**
  * Directors endpoint.
  *
index cc884804d35f64dcc1bf00f64dbd3e35dd584978..2d1b5956c194c7f072ec58b268eec22111bdf667 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\FileSetError;
+
 /**
  * FileSet endpoint.
  *
index 5174a657e3ab4e4a0850e31716b778f4439141a5..adff1ca56f46bb1b9429f2b54d7d3c5ca4c3b4f3 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BconsoleError;
+
 /**
  * FileSet resource names endpoint.
  *
index 79610cd48011c5f551ca8c0879ff778c50127bdc..4e2ab538e30633828409e654d784794ece5bb2d2 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\FileSetError;
+
 /**
  * FileSets endpoint.
  *
index f8d5958b78eed2a201fd3e7c9b3f205b3f75d251..7b352594a7d3bef617756a12012892de22dc7f85 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job endpoint.
  *
index a175f8ff703abd7f8f01b07cec6d8c3c5bb9af83..6dce69054186f7465a0b1a2cf988a2a1b685fcf5 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\GenericError;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job bandwidth limit endpoint.
  *
index 0aa8e9e65ee22227f3589a69adb8a0a820b25b86..72cff28d42f28c6621316648bf5b88caced39729 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Cancel job endpoint.
  *
index a6743505506d9f57a994d0705409c312e0ec4aa8..3e8970a76d23dbb22679239fd4dd1c545004c087 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.API.Class.Bconsole');
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\JobError;
+use Baculum\Common\Modules\Errors\VolumeError;
 
 /**
  * Estimate job endpoint.
index a9d9ce1529e1fa777bfa99c93ff7cca94d782246..09d5243a9c1b5b2df6285e474ed29b38b0ba653b 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job files endpoint.
  * It finds job by file criteria.
index a01cfe3d5ce7043a7e73b70a5ba2634656469673..547b6db3c8d47cacbf71d9c79190442544142a34 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\APIServer;
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\GenericError;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * List files from 'list files jobid=xx' bconsole command.
  *
index 4e6c1fe60b60630159c6469a19ce74fe0a0ffe42..eb70c26c59dc1fa6fc609d337aa08fdcffd95a06 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job log endpoint.
  *
index 38e08f78d037c0f52aaa41eed4796a844d9d8270..fa81ec01060354ade1ec0a59b033409b3ea6db21 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\BconsoleError;
+
 /**
  * Job resource names endpoint.
  *
index 86c781e503e5445816b54d2188921401ed039035..cc1c55ab2f4c0c6a7a77c23b7e162095050bcd61 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job run endpoint.
  *
index 0750431edcb9dc1bc48f0e6037817cccbd0a8359..8a8bbe137e834a5e0365084784ed42da2d2de20e 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\JobError;
 
 /**
  * Job show endpoint.
index daf3f075452c4832a81b71209e39bf8983ea266a..d824ddb6d5920978c750faa5bf2e0b4d86d1fe53 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Job totals endpoint.
  *
index 9639e4c4e54ce47054822f10696e1c74241633d1..a4f392f35bdc8d5602b3c7bd38942d728267758f 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Jobs endpoint.
  *
index 043982135d5e1793e2a380bb1084bde770836d73..9af52e30aa9eed2a5ceed05bd1a5184662c856e9 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Jobs for client endpoint.
  *
index 62b08643eda20f7af6f128d4f485df15535a6519..a4c56644377367270ff45a55a5e126f63cb4a6d4 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Jobs on volume endpoint.
  *
index c42915a739ed6c967578b91d2e05807f4831c48b..26492e2e5ac3b4befa20127843fcd233a0eba167 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+use Baculum\Common\Modules\Errors\FileSetError;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Recent jobs endpoint.
  *
index f2ee23a96d2b282ec0f95372b17f2ee87c1082ca..6da2755632d4909bd175618d948a0cdff8e7ff35 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\JobError;
 
 /**
  * Show jobs command endpoint.
index 64407725470d811888b3c39374179d7dfaa859d6..704fd15ebfaab170d3dde37d15b9afc153ca9f02 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\GenericError;
+
 /**
  * Console messages.
  *
index ab291bba4b36006437e5fcbaefc103e305d6e806..9a50fdecb7fa0f35cfb14c4158054aa79d20bef5 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\OAuth2Error;
+
 /**
  * OAuth2 client endpoint.
  *
index 08d07c03b68df88e0087b963447b4ede2950e44a..364723a46bbe09f83409aecb7e6e2655d4e358b4 100644 (file)
@@ -20,6 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\ClientError;
+
 /**
  * OAuth2 clients endpoint.
  *
index 03648de6188dc9b2d31fccd2d0eb4c43663289cc..b8363ddd2c39113e8fc2354bb52c5dd7aaaf8c07 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+
 /**
  * Pool endpoint.
  *
index 7ec1171b5eddede17722edb69bbec282932f8956..0560e1b3497adfaf8df7e291ebf1e1007ec0969d 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\PoolError;
 
 /**
  * Show pool command endpoint.
index d58599812b74c63c0694b538e791c8e2e111c0bc..85a85b0294dda51033354b79efc49f226fb2c301 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+
 /**
  * Update pool command endpoint.
  *
index 5d3c3f9131a469e37236725b23a5e9cc4083309f..00031ede9f4436e236aeb7ae268369e407a034e7 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+
 /**
  * Update pool volumes command endpoint.
  *
index 86da3c0e88e1120ebb839b3222695f885c2f0599..bc6041cfce82d8b6fff276d181bfbea935ccc77b 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+
 /**
  * Pools endpoint.
  *
index a7ed29d4cdfa19183d33dcced6740bd7fb5436fa..70c86ef21b674f8902a7e443141ee7b00e7731d1 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\PoolError;
 
 /**
  * Show pools command endpoint.
index b4a56fc12a48c42a3c23efb7c6d1bedcc7963488..faad9e0b884742d9bc117eb8f38abcd7fdb89d98 100644 (file)
@@ -20,5 +20,5 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Pages.OAuth2.RequestToken');
+use Baculum\API\Pages\OAuth2\RequestToken;
 ?>
index 446c5975ec12f3ee856d031175c8bf75393d4929..d4c0cb2b4b37903c4fd3eb20463799945e359610 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.APIDbModule');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+
 /**
  * Run restore command endpoint.
  *
index b96a4e45ab6ed0e616ee1acba31d96e01754c7cf..c2a415a2b5da25b445803d7558c52602ab26cb7f 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\PoolError;
 
 /**
  * Status schedune endpoint.
index 487e182e13939d96b6b4bf63dec9dc86328ec697..1e1745a59f998640632f6ecae9a41f2aead142bc 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+
 /**
  * Schedules command endpoint
  *
index 1967c55b65611a87d1f7bdf81496bbe70bc37d71..6e58d8fd2a77ae0a07066d5d7282141295b4a0cb 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\StorageError;
+use Baculum\Common\Modules\Errors\VolumeError;
 
 /**
  * Update slots command endpoint.
index 05cdc7f7c9a2dfcce9c5fc43afa010922581b473..c6bc300b807ed5b9ca9f761272b66caae2a562ae 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Storage endpoint.
  *
index 8a04dc8623ab2d80396df8a5336295f8f93a9588..5624d7e99db35b22b990baf52f0c76232c7f7e23 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.API.Class.Bconsole');
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\StorageError;
 
 /**
  * Mount storage command endpoint.
index f98f3fa261a4124bc87d001b9d996139983dfbfb..79c66267e9ed7f9c8f0eaf2aaa9670c1a5fd54ac 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Mount storage command endpoint.
  *
index 965aa5f6d48dc46c3db756d71117208252726080..a00e6a177d98248a4665603b7ae261d8941945f2 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.API.Class.Bconsole');
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\StorageError;
 
 /**
  * Release storage command endpoint.
index e319f758abb706c8cfc4ef869fd1dff32b77c89f..f5efd8b10726710e95e26ffdb7dd38fec394d3e1 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Release storage command endpoint.
  *
index ed45c969a0ba79434e7fa297da42654d78d8d67b..4c6bfb20328ca2b169a309505455018c825b6404 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\StorageError;
 
 /**
  * Show storage command endpoint.
index 8874e44f413f4dd5b756786c78882cdae4be79bc..a2f97423fc62e51f1064b0f2ad5720fce7f4c6eb 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.ConsoleOutputPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\Common\Modules\Errors\GenericError;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Storage status command endpoint.
  *
index e89f6a176a3f2698db645eb1c42f52fedde71906..e016e461a0efd609ecb2b1a2c7909c093a804f59 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Storage umount command endpoint.
  *
index 705094b640c9f97aa8547d7b0c7e6c39913ecdab..5245cba0e2198d841f6a936f86222df611e0175a 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Storage umount command endpoint.
  *
index e4ca533ab587fb510b2ba5bfb0fae406d14484d5..5ea64692a79f62f309d19d8b2542f3ad5973578f 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\StorageError;
+
 /**
  * Storages endpoint.
  *
index c963a984bfa960117bbc6ea60c9a3b607881dae7..1801faa688a940b700011ef1feefd93eb4131c49 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.API.Class.ConsoleOutputPage');
-Prado::using('Application.API.Class.ConsoleOutputShowPage');
+use Baculum\API\Modules\ConsoleOutputPage;
+use Baculum\API\Modules\ConsoleOutputShowPage;
+use Baculum\Common\Modules\Errors\StorageError;
 
 /**
  * Show storages command endpoint.
index 5ce86db5043648f9a8fabdbaada0eb6cb2f4324e..1eecb2e1a813da852b0812950853fe2283b8333a 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Volume endpoint.
  *
index 988f47f8a9ca706f8c6646d4e444b5c4c10f369f..5339f9bde82ab6e2da3a5ac0a152e64d46088013 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\PoolError;
+use Baculum\Common\Modules\Errors\StorageError;
+use Baculum\Common\Modules\Errors\VolumeError;
 
 /**
  * Label volume endpoint.
index d46ffcd87cfcbb405f2b576c2b468b5986e8c534..4c5eca5329f3944391ab62c8c7be95397644fca9 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.Bconsole');
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\API\Modules\Bconsole;
+use Baculum\Common\Modules\Errors\PoolError;
+use Baculum\Common\Modules\Errors\StorageError;
+use Baculum\Common\Modules\Errors\VolumeError;
 
 /**
  * Label barcodes command endpoint.
index 6044abe14af5fe3141e955afb8e54603a2af66d7..ed5108728985fa98fd62a50cebc20541e4bb9f28 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Volume prune command endpoint.
  *
index ac294a90aba167ee4cf094768fa9eeafa172d85d..24d5b6036c8d8ad35988eb5088b1b35b8b1f9330 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Volume purge command endpoint.
  *
index e161c14ccf7fc7e5fd3a41b66a7fa6cabca16aa7..433e79e2d24859ee74a6a23de645b2a7d5687896 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Volumes endpoint.
  *
index 27b3e90030380f7ff7df2d5d05d5150f12a78b61..712158e5eaeea9bf16c8ba886249b36502c4fdee 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\PoolError;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Volumes in pool endpoint.
  *
index 1bbeab11fa10a5d463766b63ddfacbfbcd7ddc5f..b4ffc0a70259bfef06c2f78b482567022dd10f21 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\JobError;
+use Baculum\Common\Modules\Errors\VolumeError;
+
 /**
  * Required volumes endpoint.
  *
index afa63dd616cb5970f54568b58b4918b585107e32..9e33b61936126ab61cbd762c70f143d7e9382d5a 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+use Baculum\API\Modules\BaculumAPIServer;
+use Baculum\Common\Modules\Errors\GenericError;
+
 /**
  * Welcome endpoint.
  *
index c5cc3731fc46e8da58e86a3aa64a7fcadfb6b5a6..4df7cbc0c794517128d977e8e3186a09dff2d343 100644 (file)
@@ -1,57 +1,57 @@
 <configuration>
        <paths>
-               <using namespace="Application.API.Class.BaculumAPIServer" />
+               <using namespace="Baculum.API.Modules.BaculumAPIServer" />
        </paths>
        <modules>
                <!-- OAuth2 - only to be compatible with old OAuth2 endpoints -->
                <!-- Remove it in the future but keep oauth2_token (it is used in this service to remove old tokens) -->
-               <module id="oauth2" class="Application.API.Class.OAuth2.BaculumOAuth2" />
-               <module id="oauth2_config" class="Application.API.Class.OAuth2.OAuth2Config" />
-               <module id="oauth2_authid" class="Application.API.Class.OAuth2.AuthIdManager" />
-               <module id="oauth2_token" class="Application.API.Class.OAuth2.TokenManager" />
+               <module id="oauth2" class="Baculum\API\Modules\OAuth2\BaculumOAuth2" />
+               <module id="oauth2_config" class="Baculum\API\Modules\OAuth2\OAuth2Config" />
+               <module id="oauth2_authid" class="Baculum\API\Modules\OAuth2\AuthIdManager" />
+               <module id="oauth2_token" class="Baculum\API\Modules\OAuth2\TokenManager" />
 
                <!-- Basic user config -->
-               <module id="basic_apiuser" class="Application.API.Class.BasicAPIUserConfig" />
-               <module id="basic_config" class="Application.API.Class.BasicConfig" />
+               <module id="basic_apiuser" class="Baculum\API\Modules\BasicAPIUserConfig" />
+               <module id="basic_config" class="Baculum\API\Modules\BasicConfig" />
 
                <!-- API Server modules -->
-               <module id="api_server_v1" class="Application.API.Class.APIServerV1" />
-               <module id="api_server_v2" class="Application.API.Class.APIServerV2" />
+               <module id="api_server_v1" class="Baculum\API\Modules\APIServerV1" />
+               <module id="api_server_v2" class="Baculum\API\Modules\APIServerV2" />
 
                <!-- database modules -->
-               <module id="db" class="Application.API.Class.Database" />
-               <module id="client" class="Application.API.Class.ClientManager" />
-               <module id="fileset" class="Application.API.Class.FileSetManager" />
-               <module id="job" class="Application.API.Class.JobManager" />
-               <module id="joblog" class="Application.API.Class.LogManager" />
-               <module id="pool" class="Application.API.Class.PoolManager" />
-               <module id="storage" class="Application.API.Class.StorageManager" />
-               <module id="version" class="Application.API.Class.VersionManager" />
-               <module id="volume" class="Application.API.Class.VolumeManager" />
+               <module id="db" class="Baculum\API\Modules\Database" />
+               <module id="client" class="Baculum\API\Modules\ClientManager" />
+               <module id="fileset" class="Baculum\API\Modules\FileSetManager" />
+               <module id="job" class="Baculum\API\Modules\JobManager" />
+               <module id="joblog" class="Baculum\API\Modules\LogManager" />
+               <module id="pool" class="Baculum\API\Modules\PoolManager" />
+               <module id="storage" class="Baculum\API\Modules\StorageManager" />
+               <module id="version" class="Baculum\API\Modules\VersionManager" />
+               <module id="volume" class="Baculum\API\Modules\VolumeManager" />
                <!-- tools modules -->
-               <module id="bconsole" class="Application.API.Class.Bconsole" />
-               <module id="json_tools" class="Application.API.Class.JSONTools" />
-               <module id="bvfs" class="Application.API.Class.BVFS" />
-               <module id="blstat" class="Application.API.Class.BLStat" />
+               <module id="bconsole" class="Baculum\API\Modules\Bconsole" />
+               <module id="json_tools" class="Baculum\API\Modules\JSONTools" />
+               <module id="bvfs" class="Baculum\API\Modules\BVFS" />
+               <module id="blstat" class="Baculum\API\Modules\BLStat" />
                <!-- config modules -->
-               <module id="api_config" class="Application.API.Class.APIConfig" />
-               <module id="bacula_config" class="Application.API.Class.BaculaConfig" />
-               <module id="bacula_setting" class="Application.API.Class.BaculaSetting" />
-               <module id="device_config" class="Application.API.Class.DeviceConfig" />
+               <module id="api_config" class="Baculum\API\Modules\APIConfig" />
+               <module id="bacula_config" class="Baculum\API\Modules\BaculaConfig" />
+               <module id="bacula_setting" class="Baculum\API\Modules\BaculaSetting" />
+               <module id="device_config" class="Baculum\API\Modules\DeviceConfig" />
                <!-- logging modules -->
-               <module id="log" class="System.Util.TLogRouter">
-                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Application.API.Logs" LogFile="baculum-api.log" MaxFileSize="1000" MaxLogFiles="5" />
+               <module id="log" class="System\Util\TLogRouter">
+                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Baculum\API\Logs" LogFile="baculum-api.log" MaxFileSize="1000" MaxLogFiles="5" />
                </module>
                <!-- component status modules -->
-               <module id="status_dir" class="Application.API.Class.StatusDirector" />
-               <module id="status_sd" class="Application.API.Class.StatusStorage" />
-               <module id="status_fd" class="Application.API.Class.StatusClient" />
+               <module id="status_dir" class="Baculum\API\Modules\StatusDirector" />
+               <module id="status_sd" class="Baculum\API\Modules\StatusStorage" />
+               <module id="status_fd" class="Baculum\API\Modules\StatusClient" />
                <!-- component actions modules -->
-               <module id="comp_actions" class="Application.API.Class.ComponentActions" />
+               <module id="comp_actions" class="Baculum\API\Modules\ComponentActions" />
                <!-- bconsole command modules -->
-               <module id="ls" class="Application.API.Class.Ls" />
-               <module id="list" class="Application.API.Class.BList" />
+               <module id="ls" class="Baculum\API\Modules\Ls" />
+               <module id="list" class="Baculum\API\Modules\BList" />
                <!-- changer command modules -->
-               <module id="changer_command" class="Application.API.Class.ChangerCommand" />
+               <module id="changer_command" class="Baculum\API\Modules\ChangerCommand" />
        </modules>
 </configuration>
index 5aa9a0b1861f7d54d9c47e647b3ff4983ae9ea43..edb55ef4ef5b8cb760f64a2147ff3bb6c87db387 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * OAuth2 authorization server.
index 82b8fc28ecf51015ea30ba5d5a4f739af08876a2..73ce2791f5e509c4c5d97fa265bd47177dde0965 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * OAuth2 authorization server - request token part.
index 7351d9e0a0c97714eb794233fcfbf84b274caf67..d502acb1e75ef88872d0edde27fe593b40fa386a 100644 (file)
@@ -1,14 +1,14 @@
 <configuration>
        <paths>
-               <using namespace="Application.API.Class.BaculumAPIServer" />
+               <using namespace="Baculum\API\Modules\BaculumAPIServer" />
        </paths>
        <modules>
                <!-- auth modules -->
-               <module id="oauth2" class="Application.API.Class.OAuth2.BaculumOAuth2" />
-               <module id="oauth2_config" class="Application.API.Class.OAuth2.OAuth2Config" />
-               <module id="oauth2_authid" class="Application.API.Class.OAuth2.AuthIdManager" />
-               <module id="oauth2_token" class="Application.API.Class.OAuth2.TokenManager" />
+               <module id="oauth2" class="Baculum\API\Modules\OAuth2\BaculumOAuth2" />
+               <module id="oauth2_config" class="Baculum\API\Modules\OAuth2\OAuth2Config" />
+               <module id="oauth2_authid" class="Baculum\API\Modules\OAuth2\AuthIdManager" />
+               <module id="oauth2_token" class="Baculum\API\Modules\OAuth2\TokenManager" />
                <!-- config modules -->
-               <module id="api_config" class="Application.API.Class.APIConfig" />
+               <module id="api_config" class="Baculum\API\Modules\APIConfig" />
        </modules>
 </configuration>
index ea93bc0fe1a84106c06d88fbe0c036643c0dbd10..6ecd9bb5fe1541c5045841a385cfa1f78e57d5ad 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * API Basic users page.
index 5ecbba64db68049518f3640818685a59986f0b8a..ce14859670c243611c47be715c2068afaa594e63 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <header class="w3-container w3-block">
                <h5>
@@ -153,7 +153,7 @@ var oBasicUserList = {
                                <h2><%[ Add user ]%></h2>
                        </header>
                        <div class="w3-container w3-margin-left w3-margin-right w3-text-teal">
-                               <com:Application.Common.Portlets.NewAuthClient
+                               <com:Baculum.Common.Portlets.NewAuthClient
                                        ID="NewBasicClient"
                                        Mode="add"
                                        AuthType="basic"
@@ -170,7 +170,7 @@ var oBasicUserList = {
                                <h2><%[ Edit user ]%></h2>
                        </header>
                        <div class="w3-container w3-margin-left w3-margin-right w3-text-teal">
-                               <com:Application.Common.Portlets.NewAuthClient
+                               <com:Baculum.Common.Portlets.NewAuthClient
                                        ID="EditBasicClient"
                                        Mode="edit"
                                        AuthType="basic"
index eb1d4e3a274c4d495f7b22f98ed3bc50a3b035ad..9540401063906888c35a2be93c54da4ba3f19bf7 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <header class="w3-container w3-block">
                <h5>
@@ -33,7 +33,7 @@
                        </tfoot>
                </table>
        </div>
-       <com:Application.API.Portlets.SudoConfig ID="SudoConfig" />
+       <com:Baculum.API.Portlets.SudoConfig ID="SudoConfig" />
 <script>
 var oAutochangerList = {
        ids: {
index 895850209b1688bde1ba36203be35dab4feeff8e..21c7a1ed16d47fb9f5c064feefb9d11810e7872a 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.DeviceConfig');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BConfigException;
+use Baculum\API\Modules\DeviceConfig;
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * API devices page.
index 31f7cd4df77a4fa9d799cbf61dace0fcfc9564ce..73834b07f5d17521f5018fbe9e38ef4d8352d974 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <div class="w3-container">
                <h3><%[ Welcome on the Baculum API default page ]%></h3>
index d9d6844868a1e2de3250cdf6a1f89f7259d68a34..388118906aab6c6028e74de9854e4b3b2a134d79 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.JuiControls.TJuiProgressbar');
-Prado::using('System.Web.UI.ActiveControls.TActiveDataGrid');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * API main page.
index 31585fb920bd0ec38cb978f68b28c47337bf16d7..1fae0889f15f749bf1077691a08a049310386a0e 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:TWizard ID="InstallWizard"
                CssClass="wizard"
@@ -1328,7 +1328,7 @@ var oConfigWizardStep4 = {
                        </fieldset>
                </com:TWizardStep>
        </com:TWizard>
-       <com:Application.API.Portlets.SudoConfig ID="SudoConfig" />
+       <com:Baculum.API.Portlets.SudoConfig ID="SudoConfig" />
 <script type="text/javascript">
 var bjsontools_fields = {
        General: {
index dfe8720f032c86bdbdc325a451b782916587214f..cc038205a7d09ffd7c200b756efa380d33fb24f7 100644 (file)
  */
 
 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveRadioButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveCustomValidator');
-Prado::using('Application.Common.Class.OAuth2');
-Prado::using('Application.API.Class.APIConfig');
-Prado::using('Application.API.Class.BAPIException');
-Prado::using('Application.API.Class.BaculumAPIPage');
-Prado::using('Application.API.Class.Database');
-Prado::using('Application.API.Class.BasicAPIUserConfig');
+use Baculum\API\Modules\APIConfig;
+use Baculum\API\Modules\BAPIException;
+use Baculum\API\Modules\BaculumAPIPage;
+use Baculum\API\Modules\Database;
 
 /**
  * API install wizard.
index 15357773877490e6354e16edc87713415d3cfe6b..ad921674844bd95397e5b014d9fdc5c9c98515b0 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.API.Class.BaculumAPIPage');
+use Baculum\API\Modules\BaculumAPIPage;
 
 /**
  * API OAuth2 clients page.
index 4a7e5a87ec5d4022b2d37d9a2eafaa0e96726bd0..cb5b13a3f3be921caf12d04cd7415820697cc1ee 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <header class="w3-container w3-block">
                <h5>
@@ -128,7 +128,7 @@ var oOAuth2ClientList = {
                                <h2><%[ Add client ]%></h2>
                        </header>
                        <div class="w3-container w3-margin-left w3-margin-right w3-text-teal">
-                               <com:Application.Common.Portlets.NewAuthClient
+                               <com:Baculum.Common.Portlets.NewAuthClient
                                        ID="NewOAuth2Client"
                                        Mode="add"
                                        AuthType="oauth2"
@@ -145,7 +145,7 @@ var oOAuth2ClientList = {
                                <h2><%[ Edit client ]%></h2>
                        </header>
                        <div class="w3-container w3-margin-left w3-margin-right w3-text-teal">
-                               <com:Application.Common.Portlets.NewAuthClient
+                               <com:Baculum.Common.Portlets.NewAuthClient
                                        ID="EditOAuth2Client"
                                        Mode="edit"
                                        AuthType="oauth2"
index 5c9380b2e1fa6ecb4b5de3af09a9a1f8f7afe613..9e44cc3b1cdcab9b73db0d21b0462ba14f0d379a 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.API.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum.API.Layouts.Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <header class="w3-container w3-block">
                <h5>
                        </div>
                </div>
        </div>
-       <com:Application.API.Portlets.SudoConfig ID="SudoConfig" />
+       <com:Baculum.API.Portlets.SudoConfig ID="SudoConfig" />
 <script>
 var bin_fields = {
        bconsole: [
index 5516ffd60aed1a528108778b29c05348921cd6e3..780974bbbc24317aede1a2f909b7f37f07dee441 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.AuthBasic');
-Prado::using('Application.Common.Class.AuthOAuth2');
-Prado::using('Application.API.Class.BaculumAPIPage');
-Prado::using('Application.API.Class.BAPIException');
+use Baculum\API\Modules\Database;
+use Baculum\Common\Modules\AuthBasic;
+use Baculum\Common\Modules\AuthOAuth2;
+use Baculum\API\Modules\BaculumAPIPage;
+use Baculum\API\Modules\BAPIException;
 
 /**
  * API settings page.
index 44cd6f41d183b4cbfcd4aff68c08437ae24bdbcc..66e21ad5e25ce516d8f7a2da1250f9f27da310e9 100644 (file)
@@ -4,29 +4,29 @@
        </paths>
        <modules>
                <!-- database modules -->
-               <module id="db" class="Application.API.Class.Database" />
+               <module id="db" class="Baculum\API\Modules\Database" />
                <!-- tools modules -->
-               <module id="bconsole" class="Application.API.Class.Bconsole" />
-               <module id="json_tools" class="Application.API.Class.JSONTools" />
+               <module id="bconsole" class="Baculum\API\Modules\Bconsole" />
+               <module id="json_tools" class="Baculum\API\Modules\JSONTools" />
                <!-- config modules -->
-               <module id="api_config" class="Application.API.Class.APIConfig" />
-               <module id="device_config" class="Application.API.Class.DeviceConfig" />
-               <module id="bacula_setting" class="Application.API.Class.BaculaSetting" />
+               <module id="api_config" class="Baculum\API\Modules\APIConfig" />
+               <module id="device_config" class="Baculum\API\Modules\DeviceConfig" />
+               <module id="bacula_setting" class="Baculum\API\Modules\BaculaSetting" />
                <!-- internalization modules -->
                <module id="globalization" class="TGlobalization">
-                       <translation type="gettext" source="Application.API.Lang" marker="@@" autosave="false" cache="false" DefaultCulture="en" />
+                       <translation type="gettext" source="Baculum\API\Lang" marker="@@" autosave="false" cache="false" DefaultCulture="en" />
                </module>
                <!-- logging modules -->
-               <module id="log" class="System.Util.TLogRouter">
-                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Application.API.Logs" LogFile="baculum-api.log" MaxFileSize="1000" MaxLogFiles="5" />
+               <module id="log" class="System\Util\TLogRouter">
+                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Baculum\API\Logs" LogFile="baculum-api.log" MaxFileSize="1000" MaxLogFiles="5" />
                </module>
                <!-- auth modules -->
-               <module id="basic_apiuser" class="Application.API.Class.BasicAPIUserConfig" />
-               <module id="basic_config" class="Application.API.Class.BasicConfig" />
-               <module id="oauth2_config" class="Application.API.Class.OAuth2.OAuth2Config" />
+               <module id="basic_apiuser" class="Baculum\API\Modules\BasicAPIUserConfig" />
+               <module id="basic_config" class="Baculum\API\Modules\BasicConfig" />
+               <module id="oauth2_config" class="Baculum\API\Modules\OAuth2\OAuth2Config" />
                <!-- component actions modules -->
-               <module id="comp_actions" class="Application.API.Class.ComponentActions" />
+               <module id="comp_actions" class="Baculum\API\Modules\ComponentActions" />
                <!-- changer command modules -->
-               <module id="changer_command" class="Application.API.Class.ChangerCommand" />
+               <module id="changer_command" class="Baculum\API\Modules\ChangerCommand" />
        </modules>
 </configuration>
index fda8e8ff3676fe71fe13e0661b63f3b783fb30a9..e0327c601ac13516e3fa59b8af84782cb68f7b82 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.GeneralRequirements');
+namespace Baculum\API\Pages;
+
+use Baculum\Common\Modules\GeneralRequirements;
 
 /**
  * API part requirements class.
@@ -54,7 +56,6 @@ class Requirements extends GeneralRequirements {
        /**
         * Validate all API environment depenencies.
         *
-        * @return none
         */
        public function validateEnvironment() {
                parent::validateExtensions($this->req_exts);
index cafc4206fb01313cea2964b483f059bc8693edd8..d45903a053719a299601ffda67f492e34601351e 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Common.Portlets.PortletTemplate');
+use Baculum\Common\Portlets\PortletTemplate;
 
 /**
  * Main side-bar control.
index 2cb287d973e4febd5cebce788970a3f3dff4f48d..81c863fad63404a9884f4ae14d9231f70335e93e 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.JuiControls.TJuiDialog');
-Prado::using('Application.Common.Portlets.PortletTemplate');
+use Baculum\Common\Portlets\PortletTemplate;
 
 /**
  * Sudo config control.
diff --git a/gui/baculum/protected/Common/Class/Errors.php b/gui/baculum/protected/Common/Class/Errors.php
deleted file mode 100644 (file)
index 3ed0823..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-<?php
-/*
- * Bacula(R) - The Network Backup Solution
- * Baculum   - Bacula web interface
- *
- * Copyright (C) 2013-2021 Kern Sibbald
- *
- * The main author of Baculum is Marcin Haba.
- * The original author of Bacula is Kern Sibbald, with contributions
- * from many others, a complete list can be found in the file AUTHORS.
- *
- * You may use this file and others of this release according to the
- * license defined in the LICENSE file, which includes the Affero General
- * Public License, v3.0 ("AGPLv3") and some additional permissions and
- * terms pursuant to its AGPLv3 Section 7.
- *
- * This notice must be preserved when any source code is
- * conveyed and/or propagated.
- *
- * Bacula(R) is a registered trademark of Kern Sibbald.
- */
-/**
- * Error classes.
- *
- * @author Marcin Haba <marcin.haba@bacula.pl>
- * @category Errors
- * @package Baculum Common
- */
-class GenericError {
-       const ERROR_NO_ERRORS = 0;
-       const ERROR_INVALID_COMMAND = 1;
-       const ERROR_INTERNAL_ERROR = 1000;
-       const ERROR_INVALID_PATH = 8;
-       const ERROR_WRONG_EXITCODE = 9;
-
-       const MSG_ERROR_NO_ERRORS = '';
-       const MSG_ERROR_INVALID_COMMAND = 'Invalid command.';
-       const MSG_ERROR_INTERNAL_ERROR = 'Internal error.';
-       const MSG_ERROR_INVALID_PATH = 'Invalid path.';
-       const MSG_ERROR_WRONG_EXITCODE = 'Wrong exitcode.';
-}
-
-class DatabaseError extends GenericError {
-       const ERROR_DB_CONNECTION_PROBLEM = 2;
-       const ERROR_DATABASE_ACCESS_NOT_SUPPORTED = 3;
-       
-       const MSG_ERROR_DB_CONNECTION_PROBLEM = 'Problem with connection to database.';
-       const MSG_ERROR_DATABASE_ACCESS_NOT_SUPPORTED = 'Database access is not supported by this API instance.';
-}
-
-class BconsoleError extends GenericError {
-
-       const ERROR_BCONSOLE_CONNECTION_PROBLEM = 4;
-       const ERROR_INVALID_DIRECTOR = 5;
-       const ERROR_BCONSOLE_DISABLED = 11;
-
-       const MSG_ERROR_BCONSOLE_CONNECTION_PROBLEM = 'Problem with connection to bconsole.';
-       const MSG_ERROR_INVALID_DIRECTOR = 'Invalid director.';
-       const MSG_ERROR_BCONSOLE_DISABLED = 'Bconsole support is disabled.';
-}
-
-class AuthenticationError extends GenericError {
-
-       const ERROR_AUTHENTICATION_TO_API_PROBLEM = 6;
-
-       const MSG_ERROR_AUTHENTICATION_TO_API_PROBLEM = 'Problem with authentication to Baculum API.';
-}
-
-class AuthorizationError extends GenericError {
-
-       const ERROR_ACCESS_ATTEMPT_TO_NOT_ALLOWED_RESOURCE = 7;
-
-       const MSG_ERROR_ACCESS_ATTEMPT_TO_NOT_ALLOWED_RESOURCE = 'Access attempt to not allowed resource. Permission denied.';
-}
-
-class ClientError extends GenericError {
-       const ERROR_CLIENT_DOES_NOT_EXISTS = 10;
-
-       const MSG_ERROR_CLIENT_DOES_NOT_EXISTS = 'Client does not exist.';
-}
-
-class StorageError extends GenericError {
-       const ERROR_STORAGE_DOES_NOT_EXISTS = 20;
-
-       const MSG_ERROR_STORAGE_DOES_NOT_EXISTS = 'Storage does not exist.';
-}
-
-class VolumeError extends GenericError {
-       const ERROR_VOLUME_DOES_NOT_EXISTS = 30;
-       const ERROR_INVALID_VOLUME = 31;
-       const ERROR_INVALID_SLOT = 32;
-       const ERROR_VOLUME_ALREADY_EXISTS = 33;
-
-       const MSG_ERROR_VOLUME_DOES_NOT_EXISTS = 'Volume does not exist.';
-       const MSG_ERROR_INVALID_VOLUME = 'Invalid volume.';
-       const MSG_ERROR_INVALID_SLOT = 'Invalid slot.';
-       const MSG_ERROR_VOLUME_ALREADY_EXISTS = 'Volume already exists.';
-}
-
-class PoolError extends GenericError {
-       const ERROR_POOL_DOES_NOT_EXISTS = 40;
-       const ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE = 41;
-
-       const MSG_ERROR_POOL_DOES_NOT_EXISTS = 'Pool does not exist.';
-       const MSG_ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE= 'Pool with inputted poolid does not contain any volume to update.';
-}
-
-class JobError extends GenericError {
-       const ERROR_JOB_DOES_NOT_EXISTS = 50;
-       const ERROR_INVALID_JOBLEVEL = 51;
-       const ERROR_FILESET_DOES_NOT_EXISTS = 52;
-       const ERROR_CLIENT_DOES_NOT_EXISTS = 53;
-       const ERROR_STORAGE_DOES_NOT_EXISTS = 54;
-       const ERROR_POOL_DOES_NOT_EXISTS = 55;
-       const ERROR_INVALID_RPATH = 56;
-       const ERROR_INVALID_WHERE_OPTION = 57;
-       const ERROR_INVALID_REPLACE_OPTION = 58;
-       const ERROR_INVALID_FILENAME = 59;
-
-       const MSG_ERROR_JOB_DOES_NOT_EXISTS = 'Job does not exist.';
-       const MSG_ERROR_INVALID_JOBLEVEL = 'Inputted job level is invalid.';
-       const MSG_ERROR_FILESET_DOES_NOT_EXISTS = 'FileSet resource does not exist.';
-       const MSG_ERROR_CLIENT_DOES_NOT_EXISTS = 'Client does not exist.';
-       const MSG_ERROR_STORAGE_DOES_NOT_EXISTS = 'Storage does not exist.';
-       const MSG_ERROR_POOL_DOES_NOT_EXISTS = 'Pool does not exist.';
-       const MSG_ERROR_INVALID_RPATH = 'Inputted rpath for restore is invalid. Proper format is b2[0-9]+.';
-       const MSG_ERROR_INVALID_WHERE_OPTION = 'Inputted "where" option is invalid.';
-       const MSG_ERROR_INVALID_REPLACE_OPTION = 'Inputted "replace" option is invalid.';
-       const MSG_ERROR_INVALID_FILENAME = 'Inputted "filename" option is invalid.';
-}
-
-class FileSetError extends GenericError {
-       const ERROR_FILESET_DOES_NOT_EXISTS = 60;
-
-       const MSG_ERROR_FILESET_DOES_NOT_EXISTS = 'FileSet does not exist.';
-}
-
-class BVFSError extends GenericError {
-       const ERROR_INVALID_RPATH = 71;
-       const ERROR_INVALID_RESTORE_PATH = 72;
-       const ERROR_INVALID_JOBID_LIST = 73;
-       const ERROR_INVALID_FILEID_LIST = 74;
-       const ERROR_INVALID_FILEINDEX_LIST = 75;
-       const ERROR_INVALID_DIRID_LIST = 76;
-       const ERROR_INVALID_CLIENT = 77;
-       const ERROR_INVALID_JOBID = 78;
-
-       const MSG_ERROR_INVALID_RPATH = 'Inputted path for restore is invalid. Proper format is b2[0-9]+.';
-       const MSG_ERROR_INVALID_RESTORE_PATH = 'Inputted BVFS path param is invalid.';
-       const MSG_ERROR_INVALID_JOBID_LIST = 'Invalid jobid list.';
-       const MSG_ERROR_INVALID_FILEID_LIST = 'Invalid fileid list.';
-       const MSG_ERROR_INVALID_FILEINDEX_LIST = 'Invalid file index list.';
-       const MSG_ERROR_INVALID_DIRID_LIST = 'Invalid dirid list.';
-       const MSG_ERROR_INVALID_CLIENT = 'Invalid client name.';
-       const MSG_ERROR_INVALID_JOBID = 'Invalid jobid.';
-}
-
-class JSONToolsError extends GenericError {
-
-       const ERROR_JSON_TOOLS_DISABLED = 80;
-       const ERROR_JSON_TOOLS_CONNECTION_PROBLEM = 81;
-       const ERROR_JSON_TOOLS_WRONG_EXITCODE = 82;
-       const ERROR_JSON_TOOLS_UNABLE_TO_PARSE_OUTPUT = 83;
-       const ERROR_JSON_TOOL_NOT_CONFIGURED = 84;
-
-       const MSG_ERROR_JSON_TOOLS_DISABLED = 'JSON tools support is disabled.';
-       const MSG_ERROR_JSON_TOOLS_CONNECTION_PROBLEM = 'Problem with connection to a JSON tool.';
-       const MSG_ERROR_JSON_TOOLS_WRONG_EXITCODE = 'JSON tool returned wrong exitcode.';
-       const MSG_ERROR_JSON_TOOLS_UNABLE_TO_PARSE_OUTPUT = 'JSON tool output was unable to parse.';
-       const MSG_ERROR_JSON_TOOL_NOT_CONFIGURED = 'JSON tool not configured.';
-}
-
-class BaculaConfigError extends GenericError {
-
-       const ERROR_CONFIG_DIR_NOT_WRITABLE = 90;
-       const ERROR_UNEXPECTED_BACULA_CONFIG_VALUE = 91;
-       const ERROR_CONFIG_NO_JSONTOOL_READY = 92;
-       const ERROR_WRITE_TO_CONFIG_ERROR = 93;
-       const ERROR_CONFIG_VALIDATION_ERROR = 94;
-
-       const MSG_ERROR_CONFIG_DIR_NOT_WRITABLE = 'Config directory is not writable.';
-       const MSG_ERROR_UNEXPECTED_BACULA_CONFIG_VALUE = 'Unexpected Bacula config value.';
-       const MSG_ERROR_CONFIG_NO_JSONTOOL_READY = 'No JSON tool ready.';
-       const MSG_ERROR_WRITE_TO_CONFIG_ERROR = 'Write to config file error.';
-       const MSG_ERROR_CONFIG_VALIDATION_ERROR = 'Config validation error.';
-}
-
-class ConnectionError extends GenericError {
-
-       const ERROR_CONNECTION_TO_HOST_PROBLEM = 100;
-
-       const MSG_ERROR_CONNECTION_TO_HOST_PROBLEM = 'Problem with connection to remote host.';
-}
-
-class ActionsError extends GenericError {
-
-       const ERROR_ACTIONS_ACTION_DOES_NOT_EXIST = 110;
-       const ERROR_ACTIONS_DISABLED = 111;
-       const ERROR_ACTIONS_WRONG_EXITCODE = 112;
-       const ERROR_ACTIONS_NOT_CONFIGURED = 113;
-
-       const MSG_ERROR_ACTIONS_ACTION_DOES_NOT_EXIST = 'Action does not exist.';
-       const MSG_ERROR_ACTIONS_DISABLED = 'Actions support is disabled.';
-       const MSG_ERROR_ACTIONS_WRONG_EXITCODE = 'Action command returned wrong exitcode.';
-       const MSG_ERROR_ACTIONS_NOT_CONFIGURED = 'Action is not configured.';
-}
-
-class OAuth2Error extends GenericError {
-
-       const ERROR_OAUTH2_CLIENT_DOES_NOT_EXIST = 120;
-       const ERROR_OAUTH2_CLIENT_ALREADY_EXISTS = 121;
-       const ERROR_OAUTH2_CLIENT_INVALID_CLIENT_ID = 122;
-       const ERROR_OAUTH2_CLIENT_INVALID_CLIENT_SECRET = 123;
-       const ERROR_OAUTH2_CLIENT_INVALID_REDIRECT_URI = 124;
-       const ERROR_OAUTH2_CLIENT_INVALID_SCOPE = 125;
-       const ERROR_OAUTH2_CLIENT_INVALID_BCONSOLE_CFG_PATH = 126;
-       const ERROR_OAUTH2_CLIENT_INVALID_NAME = 127;
-       const ERROR_OAUTH2_CLIENT_INVALID_CONSOLE = 128;
-       const ERROR_OAUTH2_CLIENT_INVALID_DIRECTOR = 129;
-
-       const MSG_ERROR_OAUTH2_CLIENT_DOES_NOT_EXIST = 'OAuth2 client does not exist.';
-       const MSG_ERROR_OAUTH2_CLIENT_ALREADY_EXISTS = 'OAuth2 client already exists.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CLIENT_ID = 'Invalid OAuth2 client ID.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CLIENT_SECRET = 'Invalid OAuth2 client secret.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_REDIRECT_URI = 'Invalid OAuth2 redirect URI.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_SCOPE = 'Invalid OAuth2 scope.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_BCONSOLE_CFG_PATH = 'Invalid Bconsole config path.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_NAME = 'Invalid OAuth2 client name.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CONSOLE = 'Invalid Console name.';
-       const MSG_ERROR_OAUTH2_CLIENT_INVALID_DIRECTOR = 'Invalid Director name.';
-}
-class DeviceError extends GenericError {
-
-       const ERROR_DEVICE_DEVICE_CONFIG_DOES_NOT_EXIST = 130;
-       const ERROR_DEVICE_INVALID_COMMAND = 131;
-       const ERROR_DEVICE_AUTOCHANGER_DOES_NOT_EXIST = 132;
-       const ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST = 133;
-       const ERROR_DEVICE_WRONG_SLOT_NUMBER = 134;
-       const ERROR_DEVICE_DRIVE_DOES_NOT_BELONG_TO_AUTOCHANGER = 135;
-
-       const MSG_ERROR_DEVICE_DEVICE_CONFIG_DOES_NOT_EXIST = 'Device config does not exist.';
-       const MSG_ERROR_DEVICE_INVALID_COMMAND = 'Invalid changer command.';
-       const MSG_ERROR_DEVICE_AUTOCHANGER_DOES_NOT_EXIST = 'Autochanger does not exist.';
-       const MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST = 'Autochanger drive does not exist.';
-       const MSG_ERROR_DEVICE_WRONG_SLOT_NUMBER = 'Wrong slot number.';
-       const MSG_ERROR_DEVICE_DRIVE_DOES_NOT_BELONG_TO_AUTOCHANGER = 'Drive does not belong to selected autochanger.';
-}
-
-class BasicUserError extends GenericError {
-
-       const ERROR_BASIC_USER_DOES_NOT_EXIST = 140;
-       const ERROR_BASIC_USER_ALREADY_EXISTS = 141;
-       const ERROR_BASIC_USER_INVALID_USERNAME = 142;
-       const ERROR_BASIC_USER_INVALID_BCONSOLE_CFG_PATH = 143;
-       const ERROR_BASIC_USER_INVALID_CONSOLE = 144;
-       const ERROR_BASIC_USER_INVALID_DIRECTOR = 145;
-       const ERROR_BASIC_USER_INVALID_PASSWORD= 146;
-
-       const MSG_ERROR_BASIC_USER_DOES_NOT_EXIST = 'Basic user does not exist.';
-       const MSG_ERROR_BASIC_USER_ALREADY_EXISTS = 'Basic user already exists.';
-       const MSG_ERROR_BASIC_USER_INVALID_USERNAME = 'Invalid basic user username';
-       const MSG_ERROR_BASIC_USER_INVALID_BCONSOLE_CFG_PATH = 'Invalid bconsole config path.';
-       const MSG_ERROR_BASIC_USER_INVALID_CONSOLE = 'Invalid Console name.';
-       const MSG_ERROR_BASIC_USER_INVALID_DIRECTOR = 'Invalid Director name.';
-       const MSG_ERROR_BASIC_USER_INVALID_PASSWORD = 'Invalid password.';
-}
-?>
similarity index 98%
rename from gui/baculum/protected/Common/Class/Apr1Md5.php
rename to gui/baculum/protected/Common/Modules/Apr1Md5.php
index 4f29828151e13be7d139a133d8c4491a57dda22d..66ad5f254988b0af093470150b867a89f10a8b80 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic APR1-MD5 hashing function module.
similarity index 94%
rename from gui/baculum/protected/Common/Class/AuthBase.php
rename to gui/baculum/protected/Common/Modules/AuthBase.php
index 9bbaf466c34a1f75e00f93de05b30de0e7c0026e..ddf0326d7e05c0e69416ab763d1c76a0f447f4c8 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
+
+use Prado\Web\THttpRequest;
 
 /**
  * Abstraction that defines common methods to inheirt by auth modules.
  * Descendant classes can implement auth module interface.
- * @see Application.Common.Class.Interfaces.AuthModule
+ * @see Baculum\Common\Modules\IAuthModule
  *
  * @author Marcin Haba <marcin.haba@bacula.pl>
  * @category Module
@@ -42,7 +44,6 @@ abstract class AuthBase extends CommonModule {
         * Public constructor.
         *
         * @param THttpRequest $request HTTP request object.
-        * @return none
         */
        public function initialize(THttpRequest $request) {
                self::$req = $request;
similarity index 93%
rename from gui/baculum/protected/Common/Class/AuthBasic.php
rename to gui/baculum/protected/Common/Modules/AuthBasic.php
index 0c5988c298a1342b7efcc571a12f50b5e0d9057a..8763ac8a69564c7116335795453ab9667e972beb 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.AuthBase');
-Prado::using('Application.Common.Class.Interfaces');
+namespace Baculum\Common\Modules;
 
 /**
  * Basic authentication auth module.
@@ -30,7 +29,7 @@ Prado::using('Application.Common.Class.Interfaces');
  * @category Module
  * @package Baculum Common
  */
-class AuthBasic extends AuthBase implements AuthModule {
+class AuthBasic extends AuthBase implements IAuthModule {
 
        /**
         * Generic name (used e.g. in config files).
similarity index 94%
rename from gui/baculum/protected/Common/Class/AuthOAuth2.php
rename to gui/baculum/protected/Common/Modules/AuthOAuth2.php
index d77ac5094d077e8bc802af3076a1504c4c00762c..e7e059181284f6bf454c0dbb6f93d024d180628d 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.AuthBase');
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.OAuth2');
+namespace Baculum\Common\Modules;
 
 /**
  * OAuth2 authorization auth module.
@@ -31,7 +29,7 @@ Prado::using('Application.Common.Class.OAuth2');
  * @category Module
  * @package Baculum Common
  */
-class AuthOAuth2 extends AuthBase implements AuthModule {
+class AuthOAuth2 extends AuthBase implements IAuthModule {
 
        /**
         * Generic name (used e.g. in config files).
similarity index 95%
rename from gui/baculum/protected/Common/Class/BAssetManager.php
rename to gui/baculum/protected/Common/Modules/BAssetManager.php
index 1457771cb04367762ba53644741245c2c03ca760..5fa07f25b0b5e3697a88632ad02b2d6727a97fd4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TAssetManager');
+namespace Baculum\Common\Modules;
+
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Web\TAssetManager;
 
 /**
  * Baculum asset manager.
similarity index 91%
rename from gui/baculum/protected/Common/Class/BClientScript.php
rename to gui/baculum/protected/Common/Modules/BClientScript.php
index 804866b43711b521a032e3085bdc1fc13db9c4db..d79dd38cfb0114435e09afef323cbc1e9c31292b 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.WebControls.TClientScript');
-Prado::using('Application.Common.Class.Params');
+namespace Baculum\Common\Modules;
+
+use Prado\Web\UI\WebControls\TClientScript;
 
 /**
  * Baculum client script class.
similarity index 97%
rename from gui/baculum/protected/Common/Class/BCrypt.php
rename to gui/baculum/protected/Common/Modules/BCrypt.php
index ca5f347ee930b92dd68c64eaf6f5bdf742ccf6f7..4d08a35c19eb29851438c02770f5e74cf0449b1f 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic BCrypt hashing function module
similarity index 92%
rename from gui/baculum/protected/Common/Class/BException.php
rename to gui/baculum/protected/Common/Modules/BException.php
index 50d96f3b7af40ff86bd1fa42902922c4c70baafb..de06073970649b06fdf81894d697337737d9a631 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-use Prado\Exceptions;
+namespace Baculum\Common\Modules;
+
+use \Prado\Exceptions\TException;
 
 /**
  * Main common Baculum exceptions class.
@@ -29,7 +31,7 @@ use Prado\Exceptions;
  * @category Exception
  * @package Baculum Common
  */
-class BException extends \Prado\Exceptions\TException {
+class BException extends TException {
 
        private $error_code;
        private $error_message;
@@ -63,8 +65,4 @@ class BException extends \Prado\Exceptions\TException {
                        $this->getErrorMessage()
                );
        }
-}
-
-class AuthException extends BException {
-}
-?>
+}
\ No newline at end of file
similarity index 91%
rename from gui/baculum/protected/Common/Class/BStyleSheet.php
rename to gui/baculum/protected/Common/Modules/BStyleSheet.php
index 0f79fec54aa952c090960668ba7b89bb0ae2ad95..6166272646b0ed15b1221776b06ccad065fdc3c2 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.WebControls.TStyleSheet');
-Prado::using('Application.Common.Class.Params');
+namespace Baculum\Common\Modules;
+
+use Prado\Web\UI\WebControls\TStyleSheet;
 
 /**
  * Baculum loading stylesheel class.
similarity index 95%
rename from gui/baculum/protected/Common/Class/BaculumPage.php
rename to gui/baculum/protected/Common/Modules/BaculumPage.php
index 7c5f2465d7fcce73d6d17cf0240f96f40a658373..5d64821678561de4dfe2ccda91f74e514402611c 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.TPage');
-Prado::using('Application.Common.Class.BClientScript');
-Prado::using('Application.Common.Class.Params');
+namespace Baculum\Common\Modules;
+
+use Prado\Web\UI\TPage;
 
 /**
  * Base pages module.
@@ -64,7 +64,6 @@ class BaculumPage extends TPage {
         * @access public
         * @param string $page_name page name to redirect
         * @param array $params HTTP GET method parameters in associative array
-         * @return none
         */
        public function goToPage($page_name, $params = null) {
                $url = $this->Service->constructUrl($page_name, $params, false);
@@ -78,7 +77,6 @@ class BaculumPage extends TPage {
         *
         * @access public
         * @param array $params HTTP GET method parameters in associative array
-        * @return none
         */
        public function goToDefaultPage($params = null) {
                $this->goToPage($this->Service->DefaultPage, $params);
@@ -94,7 +92,6 @@ class BaculumPage extends TPage {
         * http://localhost:9095/baculum/
         *
         * @access private
-        * @return none
         */
        private function setURLPrefixForSubdir() {
                $full_document_root = preg_replace('#(\/)$#', '', $this->getFullDocumentRoot());
@@ -165,7 +162,7 @@ class BaculumPage extends TPage {
                if (!is_dir($css_dir)) {
                        return;
                }
-               $files = new FilesystemIterator($css_dir);
+               $files = new \FilesystemIterator($css_dir);
                foreach ($files as $file) {
                        $filename = $file->getFilename();
                        if (!is_file($css_dir . $filename)) {
similarity index 82%
rename from gui/baculum/protected/Common/Class/BaculumUrlMapping.php
rename to gui/baculum/protected/Common/Modules/BaculumUrlMapping.php
index af774c75a79eb605c8a9804b2839e12013110b9a..0442d0e6215d129f7ae487d2da8dbcd0d071bc37 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TUrlMapping');
+namespace Baculum\Common\Modules;
+
+use Prado\Exceptions\THttpException;
+use Prado\Prado;
+use Prado\Web\TUrlMapping;
 
 /**
  * Baculum URL mapping class.
@@ -33,24 +37,24 @@ class BaculumUrlMapping extends TUrlMapping {
 
        private $services = array(
                'web' => array(
-                       'url_manager' => 'Application.Web.Class.WebUrlMapping',
+                       'url_manager' => 'Baculum.Web.Modules.WebUrlMapping',
                        'url_pattern' => '!^(/index\.php)?/web([/,].*)?$!',
-                       'endpoints' => 'Application.Web.endpoints'
+                       'endpoints' => 'Baculum.Web.endpoints'
                ),
                'api' => array(
-                       'url_manager' => 'Application.API.Class.APIUrlMapping',
+                       'url_manager' => 'Baculum.API.Modules.APIUrlMapping',
                        'url_pattern' => '!^(/index\.php)?/api([/,].*)?$!',
-                       'endpoints' => 'Application.API.Pages.API.endpoints'
+                       'endpoints' => 'Baculum.API.Pages.API.endpoints'
                ),
                'oauth' => array(
-                       'url_manager' => 'Application.API.Class.OAuthUrlMapping',
+                       'url_manager' => 'Baculum.API.Modules.OAuthUrlMapping',
                        'url_pattern' => '!^(/index\.php)?/oauth([/,].*)?$!',
-                       'endpoints' => 'Application.API.Pages.OAuth2.endpoints'
+                       'endpoints' => 'Baculum.API.Pages.OAuth2.endpoints'
                ),
                'panel' => array(
-                       'url_manager' => 'Application.API.Class.PanelUrlMapping',
+                       'url_manager' => 'Baculum.API.Modules.PanelUrlMapping',
                        'url_pattern' => '!^(/index\.php)?/panel([/,].*)?$!',
-                       'endpoints' => 'Application.API.Pages.Panel.endpoints'
+                       'endpoints' => 'Baculum.API.Pages.Panel.endpoints'
                )
        );
 
similarity index 98%
rename from gui/baculum/protected/Common/Class/BasicUserConfig.php
rename to gui/baculum/protected/Common/Modules/BasicUserConfig.php
index 0b5d891a6746de105ecdad1172967cb8b8ddd5b2..860482f2bd0524d56239767e15b1394a765a7699 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Manage basic auth method users.
@@ -58,7 +58,6 @@ class BasicUserConfig extends CommonModule {
         * Set config file path.
         *
         * @param string $path path to config file
-        * @return none
         */
        public function setConfigPath($path) {
                $this->config_path = $path;
similarity index 95%
rename from gui/baculum/protected/Common/Class/CommonModule.php
rename to gui/baculum/protected/Common/Modules/CommonModule.php
index 8d79b8ee94eada8d712fda039c20fccc291fb3b5..b65d234bf3c6f46b9570d371e48a8e9e1a77f70d 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.TModule');
+namespace Baculum\Common\Modules;
+
+use Prado\TModule;
 
 /**
  * Abstract common module.
similarity index 96%
rename from gui/baculum/protected/Common/Class/ConfigBacula.php
rename to gui/baculum/protected/Common/Modules/ConfigBacula.php
index 8f223671dfdfba3abff008db4062a05b3b2cfa18..22a896799c2ca14986917bb6b943d29c755bfe65 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Module to read/write Bacula-style config.
@@ -31,7 +30,7 @@ Prado::using('Application.Common.Class.CommonModule');
  * @category Module
  * @package Baculum Common
  */
-class ConfigBacula extends CommonModule implements ConfigFormat {
+class ConfigBacula extends CommonModule implements IConfigFormat {
 
        /**
         * Whitespace character used as indent.
@@ -65,7 +64,6 @@ class ConfigBacula extends CommonModule implements ConfigFormat {
         *
         * @access public
         * @param string $source config file path
-        * @return none
         */
        public function read($source) {
                // reading Bacula config files is done by Bacula JSON tools.
similarity index 98%
rename from gui/baculum/protected/Common/Class/ConfigFileModule.php
rename to gui/baculum/protected/Common/Modules/ConfigFileModule.php
index 44cf4d23e5843106d67185cf911365f9d135613a..eef1ceb0d43cc8588792fc8e125154591fe18569 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
+
+use Prado\Prado;
 
 /**
  * Generic config file module.
similarity index 96%
rename from gui/baculum/protected/Common/Class/ConfigIni.php
rename to gui/baculum/protected/Common/Modules/ConfigIni.php
index 82b6456bc2b1e20097f2cabbc5ccf7da846712fd..d0168c016ade09f07acc58eef28dd95787bcbc1d 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Module to read/write INI-style config.
@@ -30,7 +29,7 @@ Prado::using('Application.Common.Class.CommonModule');
  * @category Module
  * @package Baculum Common
  */
-class ConfigIni extends CommonModule implements ConfigFormat {
+class ConfigIni extends CommonModule implements IConfigFormat {
 
        /**
         * Write config data to file in INI format.
similarity index 98%
rename from gui/baculum/protected/Common/Class/Crypto.php
rename to gui/baculum/protected/Common/Modules/Crypto.php
index 14d51189789047aeb1a4d894a7f2321322b4afe1..3ebf647e53cf0f004d7acb273b0f5148fd347a9b 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
+
+use ReflectionClass;
 
 /**
  * Cryptographic tools.
diff --git a/gui/baculum/protected/Common/Modules/Errors/ActionsError.php b/gui/baculum/protected/Common/Modules/Errors/ActionsError.php
new file mode 100644 (file)
index 0000000..ebabc32
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Actions error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class ActionsError extends GenericError {
+
+       const ERROR_ACTIONS_ACTION_DOES_NOT_EXIST = 110;
+       const ERROR_ACTIONS_DISABLED = 111;
+       const ERROR_ACTIONS_WRONG_EXITCODE = 112;
+       const ERROR_ACTIONS_NOT_CONFIGURED = 113;
+
+       const MSG_ERROR_ACTIONS_ACTION_DOES_NOT_EXIST = 'Action does not exist.';
+       const MSG_ERROR_ACTIONS_DISABLED = 'Actions support is disabled.';
+       const MSG_ERROR_ACTIONS_WRONG_EXITCODE = 'Action command returned wrong exitcode.';
+       const MSG_ERROR_ACTIONS_NOT_CONFIGURED = 'Action is not configured.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/AuthenticationError.php b/gui/baculum/protected/Common/Modules/Errors/AuthenticationError.php
new file mode 100644 (file)
index 0000000..e89e970
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Authentication error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class AuthenticationError extends GenericError {
+
+       const ERROR_AUTHENTICATION_TO_API_PROBLEM = 6;
+
+       const MSG_ERROR_AUTHENTICATION_TO_API_PROBLEM = 'Problem with authentication to Baculum API.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/AuthorizationError.php b/gui/baculum/protected/Common/Modules/Errors/AuthorizationError.php
new file mode 100644 (file)
index 0000000..7b728c5
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Authorization error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class AuthorizationError extends GenericError {
+
+       const ERROR_ACCESS_ATTEMPT_TO_NOT_ALLOWED_RESOURCE = 7;
+
+       const MSG_ERROR_ACCESS_ATTEMPT_TO_NOT_ALLOWED_RESOURCE = 'Access attempt to not allowed resource. Permission denied.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/BVFSError.php b/gui/baculum/protected/Common/Modules/Errors/BVFSError.php
new file mode 100644 (file)
index 0000000..3969ed8
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * BVFS error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class BVFSError extends GenericError {
+       const ERROR_INVALID_RPATH = 71;
+       const ERROR_INVALID_RESTORE_PATH = 72;
+       const ERROR_INVALID_JOBID_LIST = 73;
+       const ERROR_INVALID_FILEID_LIST = 74;
+       const ERROR_INVALID_FILEINDEX_LIST = 75;
+       const ERROR_INVALID_DIRID_LIST = 76;
+       const ERROR_INVALID_CLIENT = 77;
+       const ERROR_INVALID_JOBID = 78;
+
+       const MSG_ERROR_INVALID_RPATH = 'Inputted path for restore is invalid. Proper format is b2[0-9]+.';
+       const MSG_ERROR_INVALID_RESTORE_PATH = 'Inputted BVFS path param is invalid.';
+       const MSG_ERROR_INVALID_JOBID_LIST = 'Invalid jobid list.';
+       const MSG_ERROR_INVALID_FILEID_LIST = 'Invalid fileid list.';
+       const MSG_ERROR_INVALID_FILEINDEX_LIST = 'Invalid file index list.';
+       const MSG_ERROR_INVALID_DIRID_LIST = 'Invalid dirid list.';
+       const MSG_ERROR_INVALID_CLIENT = 'Invalid client name.';
+       const MSG_ERROR_INVALID_JOBID = 'Invalid jobid.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/BaculaConfigError.php b/gui/baculum/protected/Common/Modules/Errors/BaculaConfigError.php
new file mode 100644 (file)
index 0000000..3e22416
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Bacula config error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class BaculaConfigError extends GenericError {
+
+       const ERROR_CONFIG_DIR_NOT_WRITABLE = 90;
+       const ERROR_UNEXPECTED_BACULA_CONFIG_VALUE = 91;
+       const ERROR_CONFIG_NO_JSONTOOL_READY = 92;
+       const ERROR_WRITE_TO_CONFIG_ERROR = 93;
+       const ERROR_CONFIG_VALIDATION_ERROR = 94;
+
+       const MSG_ERROR_CONFIG_DIR_NOT_WRITABLE = 'Config directory is not writable.';
+       const MSG_ERROR_UNEXPECTED_BACULA_CONFIG_VALUE = 'Unexpected Bacula config value.';
+       const MSG_ERROR_CONFIG_NO_JSONTOOL_READY = 'No JSON tool ready.';
+       const MSG_ERROR_WRITE_TO_CONFIG_ERROR = 'Write to config file error.';
+       const MSG_ERROR_CONFIG_VALIDATION_ERROR = 'Config validation error.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/BasicUserError.php b/gui/baculum/protected/Common/Modules/Errors/BasicUserError.php
new file mode 100644 (file)
index 0000000..e182389
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Basic user error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class BasicUserError extends GenericError {
+
+       const ERROR_BASIC_USER_DOES_NOT_EXIST = 140;
+       const ERROR_BASIC_USER_ALREADY_EXISTS = 141;
+       const ERROR_BASIC_USER_INVALID_USERNAME = 142;
+       const ERROR_BASIC_USER_INVALID_BCONSOLE_CFG_PATH = 143;
+       const ERROR_BASIC_USER_INVALID_CONSOLE = 144;
+       const ERROR_BASIC_USER_INVALID_DIRECTOR = 145;
+       const ERROR_BASIC_USER_INVALID_PASSWORD= 146;
+
+       const MSG_ERROR_BASIC_USER_DOES_NOT_EXIST = 'Basic user does not exist.';
+       const MSG_ERROR_BASIC_USER_ALREADY_EXISTS = 'Basic user already exists.';
+       const MSG_ERROR_BASIC_USER_INVALID_USERNAME = 'Invalid basic user username';
+       const MSG_ERROR_BASIC_USER_INVALID_BCONSOLE_CFG_PATH = 'Invalid bconsole config path.';
+       const MSG_ERROR_BASIC_USER_INVALID_CONSOLE = 'Invalid Console name.';
+       const MSG_ERROR_BASIC_USER_INVALID_DIRECTOR = 'Invalid Director name.';
+       const MSG_ERROR_BASIC_USER_INVALID_PASSWORD = 'Invalid password.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/BconsoleError.php b/gui/baculum/protected/Common/Modules/Errors/BconsoleError.php
new file mode 100644 (file)
index 0000000..a47c822
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Bconsole error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class BconsoleError extends GenericError {
+
+       const ERROR_BCONSOLE_CONNECTION_PROBLEM = 4;
+       const ERROR_INVALID_DIRECTOR = 5;
+       const ERROR_BCONSOLE_DISABLED = 11;
+
+       const MSG_ERROR_BCONSOLE_CONNECTION_PROBLEM = 'Problem with connection to bconsole.';
+       const MSG_ERROR_INVALID_DIRECTOR = 'Invalid director.';
+       const MSG_ERROR_BCONSOLE_DISABLED = 'Bconsole support is disabled.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/ClientError.php b/gui/baculum/protected/Common/Modules/Errors/ClientError.php
new file mode 100644 (file)
index 0000000..7c8987e
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Client error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class ClientError extends GenericError {
+       const ERROR_CLIENT_DOES_NOT_EXISTS = 10;
+
+       const MSG_ERROR_CLIENT_DOES_NOT_EXISTS = 'Client does not exist.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/ConnectionError.php b/gui/baculum/protected/Common/Modules/Errors/ConnectionError.php
new file mode 100644 (file)
index 0000000..70dddad
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Connection error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class ConnectionError extends GenericError {
+
+       const ERROR_CONNECTION_TO_HOST_PROBLEM = 100;
+
+       const MSG_ERROR_CONNECTION_TO_HOST_PROBLEM = 'Problem with connection to remote host.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/DatabaseError.php b/gui/baculum/protected/Common/Modules/Errors/DatabaseError.php
new file mode 100644 (file)
index 0000000..fa7f934
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Database error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class DatabaseError extends GenericError {
+       const ERROR_DB_CONNECTION_PROBLEM = 2;
+       const ERROR_DATABASE_ACCESS_NOT_SUPPORTED = 3;
+       
+       const MSG_ERROR_DB_CONNECTION_PROBLEM = 'Problem with connection to database.';
+       const MSG_ERROR_DATABASE_ACCESS_NOT_SUPPORTED = 'Database access is not supported by this API instance.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/DeviceError.php b/gui/baculum/protected/Common/Modules/Errors/DeviceError.php
new file mode 100644 (file)
index 0000000..7934d8b
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Device error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class DeviceError extends GenericError {
+
+       const ERROR_DEVICE_DEVICE_CONFIG_DOES_NOT_EXIST = 130;
+       const ERROR_DEVICE_INVALID_COMMAND = 131;
+       const ERROR_DEVICE_AUTOCHANGER_DOES_NOT_EXIST = 132;
+       const ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST = 133;
+       const ERROR_DEVICE_WRONG_SLOT_NUMBER = 134;
+       const ERROR_DEVICE_DRIVE_DOES_NOT_BELONG_TO_AUTOCHANGER = 135;
+
+       const MSG_ERROR_DEVICE_DEVICE_CONFIG_DOES_NOT_EXIST = 'Device config does not exist.';
+       const MSG_ERROR_DEVICE_INVALID_COMMAND = 'Invalid changer command.';
+       const MSG_ERROR_DEVICE_AUTOCHANGER_DOES_NOT_EXIST = 'Autochanger does not exist.';
+       const MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST = 'Autochanger drive does not exist.';
+       const MSG_ERROR_DEVICE_WRONG_SLOT_NUMBER = 'Wrong slot number.';
+       const MSG_ERROR_DEVICE_DRIVE_DOES_NOT_BELONG_TO_AUTOCHANGER = 'Drive does not belong to selected autochanger.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/FileSetError.php b/gui/baculum/protected/Common/Modules/Errors/FileSetError.php
new file mode 100644 (file)
index 0000000..deeae31
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * FileSet error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class FileSetError extends GenericError {
+       const ERROR_FILESET_DOES_NOT_EXISTS = 60;
+
+       const MSG_ERROR_FILESET_DOES_NOT_EXISTS = 'FileSet does not exist.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/GenericError.php b/gui/baculum/protected/Common/Modules/Errors/GenericError.php
new file mode 100644 (file)
index 0000000..3cf4eaa
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Generic error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class GenericError {
+       const ERROR_NO_ERRORS = 0;
+       const ERROR_INVALID_COMMAND = 1;
+       const ERROR_INTERNAL_ERROR = 1000;
+       const ERROR_INVALID_PATH = 8;
+       const ERROR_WRONG_EXITCODE = 9;
+
+       const MSG_ERROR_NO_ERRORS = '';
+       const MSG_ERROR_INVALID_COMMAND = 'Invalid command.';
+       const MSG_ERROR_INTERNAL_ERROR = 'Internal error.';
+       const MSG_ERROR_INVALID_PATH = 'Invalid path.';
+       const MSG_ERROR_WRONG_EXITCODE = 'Wrong exitcode.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/JSONToolsError.php b/gui/baculum/protected/Common/Modules/Errors/JSONToolsError.php
new file mode 100644 (file)
index 0000000..ffd49ba
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * JSON tools error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class JSONToolsError extends GenericError {
+
+       const ERROR_JSON_TOOLS_DISABLED = 80;
+       const ERROR_JSON_TOOLS_CONNECTION_PROBLEM = 81;
+       const ERROR_JSON_TOOLS_WRONG_EXITCODE = 82;
+       const ERROR_JSON_TOOLS_UNABLE_TO_PARSE_OUTPUT = 83;
+       const ERROR_JSON_TOOL_NOT_CONFIGURED = 84;
+
+       const MSG_ERROR_JSON_TOOLS_DISABLED = 'JSON tools support is disabled.';
+       const MSG_ERROR_JSON_TOOLS_CONNECTION_PROBLEM = 'Problem with connection to a JSON tool.';
+       const MSG_ERROR_JSON_TOOLS_WRONG_EXITCODE = 'JSON tool returned wrong exitcode.';
+       const MSG_ERROR_JSON_TOOLS_UNABLE_TO_PARSE_OUTPUT = 'JSON tool output was unable to parse.';
+       const MSG_ERROR_JSON_TOOL_NOT_CONFIGURED = 'JSON tool not configured.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/JobError.php b/gui/baculum/protected/Common/Modules/Errors/JobError.php
new file mode 100644 (file)
index 0000000..b093db2
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Job error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class JobError extends GenericError {
+       const ERROR_JOB_DOES_NOT_EXISTS = 50;
+       const ERROR_INVALID_JOBLEVEL = 51;
+       const ERROR_FILESET_DOES_NOT_EXISTS = 52;
+       const ERROR_CLIENT_DOES_NOT_EXISTS = 53;
+       const ERROR_STORAGE_DOES_NOT_EXISTS = 54;
+       const ERROR_POOL_DOES_NOT_EXISTS = 55;
+       const ERROR_INVALID_RPATH = 56;
+       const ERROR_INVALID_WHERE_OPTION = 57;
+       const ERROR_INVALID_REPLACE_OPTION = 58;
+       const ERROR_INVALID_FILENAME = 59;
+
+       const MSG_ERROR_JOB_DOES_NOT_EXISTS = 'Job does not exist.';
+       const MSG_ERROR_INVALID_JOBLEVEL = 'Inputted job level is invalid.';
+       const MSG_ERROR_FILESET_DOES_NOT_EXISTS = 'FileSet resource does not exist.';
+       const MSG_ERROR_CLIENT_DOES_NOT_EXISTS = 'Client does not exist.';
+       const MSG_ERROR_STORAGE_DOES_NOT_EXISTS = 'Storage does not exist.';
+       const MSG_ERROR_POOL_DOES_NOT_EXISTS = 'Pool does not exist.';
+       const MSG_ERROR_INVALID_RPATH = 'Inputted rpath for restore is invalid. Proper format is b2[0-9]+.';
+       const MSG_ERROR_INVALID_WHERE_OPTION = 'Inputted "where" option is invalid.';
+       const MSG_ERROR_INVALID_REPLACE_OPTION = 'Inputted "replace" option is invalid.';
+       const MSG_ERROR_INVALID_FILENAME = 'Inputted "filename" option is invalid.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/OAuth2Error.php b/gui/baculum/protected/Common/Modules/Errors/OAuth2Error.php
new file mode 100644 (file)
index 0000000..9feca01
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * OAuth2 error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class OAuth2Error extends GenericError {
+
+       const ERROR_OAUTH2_CLIENT_DOES_NOT_EXIST = 120;
+       const ERROR_OAUTH2_CLIENT_ALREADY_EXISTS = 121;
+       const ERROR_OAUTH2_CLIENT_INVALID_CLIENT_ID = 122;
+       const ERROR_OAUTH2_CLIENT_INVALID_CLIENT_SECRET = 123;
+       const ERROR_OAUTH2_CLIENT_INVALID_REDIRECT_URI = 124;
+       const ERROR_OAUTH2_CLIENT_INVALID_SCOPE = 125;
+       const ERROR_OAUTH2_CLIENT_INVALID_BCONSOLE_CFG_PATH = 126;
+       const ERROR_OAUTH2_CLIENT_INVALID_NAME = 127;
+       const ERROR_OAUTH2_CLIENT_INVALID_CONSOLE = 128;
+       const ERROR_OAUTH2_CLIENT_INVALID_DIRECTOR = 129;
+
+       const MSG_ERROR_OAUTH2_CLIENT_DOES_NOT_EXIST = 'OAuth2 client does not exist.';
+       const MSG_ERROR_OAUTH2_CLIENT_ALREADY_EXISTS = 'OAuth2 client already exists.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CLIENT_ID = 'Invalid OAuth2 client ID.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CLIENT_SECRET = 'Invalid OAuth2 client secret.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_REDIRECT_URI = 'Invalid OAuth2 redirect URI.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_SCOPE = 'Invalid OAuth2 scope.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_BCONSOLE_CFG_PATH = 'Invalid Bconsole config path.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_NAME = 'Invalid OAuth2 client name.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_CONSOLE = 'Invalid Console name.';
+       const MSG_ERROR_OAUTH2_CLIENT_INVALID_DIRECTOR = 'Invalid Director name.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/PoolError.php b/gui/baculum/protected/Common/Modules/Errors/PoolError.php
new file mode 100644 (file)
index 0000000..552ece7
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Pool error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class PoolError extends GenericError {
+       const ERROR_POOL_DOES_NOT_EXISTS = 40;
+       const ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE = 41;
+
+       const MSG_ERROR_POOL_DOES_NOT_EXISTS = 'Pool does not exist.';
+       const MSG_ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE= 'Pool with inputted poolid does not contain any volume to update.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/StorageError.php b/gui/baculum/protected/Common/Modules/Errors/StorageError.php
new file mode 100644 (file)
index 0000000..9dd435b
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Storage error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class StorageError extends GenericError {
+       const ERROR_STORAGE_DOES_NOT_EXISTS = 20;
+
+       const MSG_ERROR_STORAGE_DOES_NOT_EXISTS = 'Storage does not exist.';
+}
diff --git a/gui/baculum/protected/Common/Modules/Errors/VolumeError.php b/gui/baculum/protected/Common/Modules/Errors/VolumeError.php
new file mode 100644 (file)
index 0000000..7713273
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2022 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules\Errors;
+
+/**
+ * Volume error class.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Errors
+ * @package Baculum Common
+ */
+class VolumeError extends GenericError {
+       const ERROR_VOLUME_DOES_NOT_EXISTS = 30;
+       const ERROR_INVALID_VOLUME = 31;
+       const ERROR_INVALID_SLOT = 32;
+       const ERROR_VOLUME_ALREADY_EXISTS = 33;
+
+       const MSG_ERROR_VOLUME_DOES_NOT_EXISTS = 'Volume does not exist.';
+       const MSG_ERROR_INVALID_VOLUME = 'Invalid volume.';
+       const MSG_ERROR_INVALID_SLOT = 'Invalid slot.';
+       const MSG_ERROR_VOLUME_ALREADY_EXISTS = 'Volume already exists.';
+}
similarity index 98%
rename from gui/baculum/protected/Common/Class/GeneralRequirements.php
rename to gui/baculum/protected/Common/Modules/GeneralRequirements.php
index 8229d9a87e293a1fdf51fd987beba4177d6791d5..a6808b3c938bf316da089bd1bc52291a70983916 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Common\Modules;
+
 /**
  * General requirement class with common dependencies both for API and Web.
  *
@@ -81,7 +83,6 @@ abstract class GeneralRequirements {
         *
         * @param string $app_dir full path to main application directory
         * @param string $base_dir full path to service specific base directory
-        * @return none
         */
        private function validateEnvironment($app_dir, $base_dir) {
                $this->validateDirectories($app_dir, $base_dir);
@@ -93,7 +94,6 @@ abstract class GeneralRequirements {
         *
         * @param string $app_dir full path to main application directory
         * @param string $base_dir full path to service specific base directory
-        * @return none
         */
        private function validateDirectories($app_dir, $base_dir) {
                for ($i = 0; $i < count($this->req_app_rw_dirs); $i++) {
@@ -118,7 +118,6 @@ abstract class GeneralRequirements {
         * Validate PHP extensions.
         *
         * @param array $req_exts extension list
-        * @return none
         */
        protected static function validateExtensions($req_exts) {
                for ($i = 0; $i < count($req_exts); $i++) {
@@ -132,7 +131,6 @@ abstract class GeneralRequirements {
         * Simple method to show results.
         *
         * @param string $product product name ('Baculum Web' or 'Baculum API'...etc.)
-        * @return none
         */
        protected static function showResult($product) {
                if (count(self::$requirements) > 0) {
similarity index 64%
rename from gui/baculum/protected/Common/Class/Interfaces.php
rename to gui/baculum/protected/Common/Modules/IAuthModule.php
index 62dfa9002719318e9fdea99ad9559d77fcb4fcf6..afdf212b2784b04afb6554b035e7fb0b768f2a65 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Common\Modules;
+
 /**
- * Common interfaces.
+ * Auth module interface.
  *
  * @author Marcin Haba <marcin.haba@bacula.pl>
  * @category Interfaces
  * @package Baculum Common
  */
 
-/**
- * Defines methods to work on config data.
- */
-interface ConfigFormat {
-
-       public function write($source, $config);
-
-       public function read($source);
-
-       public function prepareConfig($config);
-}
-
-/**
- * Defines single session item.
- */
-interface SessionItem {
-
-       public static function getRecordId();
-
-       public static function getPrimaryKey();
-
-       public static function getSessionFile();
-}
-
 /**
  * Defines auth module methods.
  */
-interface AuthModule {
+interface IAuthModule {
 
        public function getAuthType();
 
@@ -65,14 +43,3 @@ interface AuthModule {
 
        public function getRequestHeaderValue($header);
 }
-
-/**
- * Defined user manager methods.
- */
-interface UserManager {
-
-       public function init($config);
-
-       public function validateUser($username, $password);
-}
-?>
diff --git a/gui/baculum/protected/Common/Modules/IBUserManager.php b/gui/baculum/protected/Common/Modules/IBUserManager.php
new file mode 100644 (file)
index 0000000..7418bda
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2020 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules;
+
+/**
+ * User manager interface.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Interfaces
+ * @package Baculum Common
+ */
+
+/**
+ * Defined user manager methods.
+ */
+interface IBUserManager {
+
+       public function init($config);
+
+       public function validateUser($username, $password);
+}
diff --git a/gui/baculum/protected/Common/Modules/IConfigFormat.php b/gui/baculum/protected/Common/Modules/IConfigFormat.php
new file mode 100644 (file)
index 0000000..5bf9454
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2020 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules;
+
+/**
+ * Config format interface.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Interfaces
+ * @package Baculum Common
+ */
+
+/**
+ * Defines methods to work on config data.
+ */
+interface IConfigFormat {
+
+       public function write($source, $config);
+
+       public function read($source);
+
+       public function prepareConfig($config);
+}
diff --git a/gui/baculum/protected/Common/Modules/ISessionItem.php b/gui/baculum/protected/Common/Modules/ISessionItem.php
new file mode 100644 (file)
index 0000000..98b2e39
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2020 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+namespace Baculum\Common\Modules;
+
+/**
+ * Session item interface.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @category Interfaces
+ * @package Baculum Common
+ */
+
+/**
+ * Defines single session item.
+ */
+interface ISessionItem {
+
+       public static function getRecordId();
+
+       public static function getPrimaryKey();
+
+       public static function getSessionFile();
+}
similarity index 98%
rename from gui/baculum/protected/Common/Class/Ldap.php
rename to gui/baculum/protected/Common/Modules/Ldap.php
index d9ebf947510ff2567c99547eb58d796dd44f4168..cd64eeb9846a5043e9d89410f26e577f5dfda71d 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * The module supports basic operations on LDAP server.
@@ -120,7 +120,6 @@ class Ldap extends CommonModule {
         * Parameters are set after successful validation.
         *
         * @param array $param parameters to work with LDAP
-        * @return none
         */
        public function setParams(array $params) {
                if ($this->validateConnectionParams($params)) {
@@ -131,7 +130,6 @@ class Ldap extends CommonModule {
        /**
         * Set LDAP connection specific options.
         *
-        * @return none
         */
        public function setConnectionOpts() {
                ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, $this->params['protocol_ver']);
@@ -243,7 +241,6 @@ class Ldap extends CommonModule {
         * Set LDAP errors in error property.
         * Used to get the most information from LDAP server.
         *
-        * @return none
         */
        public function setLdapError() {
                ldap_get_option($this->conn, LDAP_OPT_DIAGNOSTIC_MESSAGE, $error);
similarity index 97%
rename from gui/baculum/protected/Common/Class/Logging.php
rename to gui/baculum/protected/Common/Modules/Logging.php
index 8638d30c205185ac5935befb7df957990c23bc30..cfaa6535dd4511653a2edc77d0834d321e681aa6 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
+
+use Prado\Prado;
 
 /**
  * Logger class.
similarity index 99%
rename from gui/baculum/protected/Common/Class/Miscellaneous.php
rename to gui/baculum/protected/Common/Modules/Miscellaneous.php
index dd77d92775757cb45369162ab961ec326f539034..6521a08bbdb1034d0d773811280b165cd230b007 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+namespace Baculum\Common\Modules;
+
+use Prado\TModule;
 
 /**
  * Module with miscellaneous tools.
@@ -130,7 +133,7 @@ class Miscellaneous extends TModule {
        }
 
        public function getJobState($jobStateLetter = null) {
-               $state;
+               $state = '';
                if(is_null($jobStateLetter)) {
                        $state = $this->jobStates;
                } else {
similarity index 99%
rename from gui/baculum/protected/Common/Class/OAuth2.php
rename to gui/baculum/protected/Common/Modules/OAuth2.php
index c4da2cfed4ec792f18f8d34edbc012089c819c84..1ff6ec338c4f8d21af60ab4edd077df62093ec47 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Generic OAuth2 abstraction.
similarity index 99%
rename from gui/baculum/protected/Common/Class/Params.php
rename to gui/baculum/protected/Common/Modules/Params.php
index a5177937760953e4c7616a6719c7ab707733f61d..c5d746a265ccc17e0d542eb1dea13982ac1858f2 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Params class.
similarity index 96%
rename from gui/baculum/protected/Common/Class/SessionRecord.php
rename to gui/baculum/protected/Common/Modules/SessionRecord.php
index 4074538fb81cb0c6e596e414431c0e88c12f8ee6..58faaa7a4b19d1901f0267b15846334385c044ba 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
-Prado::using('Application.Common.Class.CommonModule');
-Prado::using('Application.Common.Class.Interfaces');
+namespace Baculum\Common\Modules;
 
 /**
  * Store data in session.
@@ -30,7 +29,7 @@ Prado::using('Application.Common.Class.Interfaces');
  * @category Module
  * @package Baculum Common
  */
-class SessionRecord extends CommonModule implements SessionItem {
+class SessionRecord extends CommonModule implements ISessionItem {
 
        const SESS_FILE_PERM = 0600;
 
similarity index 96%
rename from gui/baculum/protected/Common/Class/Sha1.php
rename to gui/baculum/protected/Common/Modules/Sha1.php
index b14ed7d93e1c472f6d520ae994fa2387bb7d14c8..68bce965cde02c777349ad49d3a29f6be9f4047c 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic SHA-1 hashing function module
similarity index 97%
rename from gui/baculum/protected/Common/Class/Sha256.php
rename to gui/baculum/protected/Common/Modules/Sha256.php
index 9177cc3f39fd1975de3e12bcbebab157f4b00571..bcdc2459770860ff18b3337050915bfbd476a44a 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic SHA-256 hashing function module
similarity index 97%
rename from gui/baculum/protected/Common/Class/Sha512.php
rename to gui/baculum/protected/Common/Modules/Sha512.php
index b010d5bc43657c08a120ece2466e4094d3ce878c..30eb3e262c175a62fa6fc428e03da02b4a837939 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic SHA-512 hashing function module
similarity index 97%
rename from gui/baculum/protected/Common/Class/Ssha1.php
rename to gui/baculum/protected/Common/Modules/Ssha1.php
index 9ded33b6ec57a54e64a385f2ffab21684810fbb2..92b862f208f5b978d4580b780dfa14a8c5fc4a84 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.CommonModule');
+namespace Baculum\Common\Modules;
 
 /**
  * Cryptographic SHA-1 hashing function module.
index a52152e4594e205d5a6ce9c7ac3e9d711806c909..d2de4456161a76a16445c57e04ab34f095e7f2c3 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BaculumPage');
+use Baculum\Common\Modules\BaculumPage;
 
 /**
  * Common page class.
index fa2436a812d952efae5aefa999c5d9ae56850f1d..5d5a08df309e792e171de8476606d55bc42a32b9 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
+
+namespace Baculum\Common\Portlets;
+
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\WebControls\TButton;
 
 /**
  * Baculum Active Button control.
index 6ce1c303ba2709039dd8fef1308683237834bdf0..6ede178f5e01f40ed3e40b088f8e4614b4655baa 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+namespace Baculum\Common\Portlets;
+
+use Prado\Web\UI\WebControls\TButton;
+
 /**
  * Baculum Button control.
  *
index bd8e40eff825e6ec48da4151107d9d5f09d1fb4f..7bd420b6d38a6e5f6055836f0789c1f9993df47a 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.WebControls.TDataBoundControl');
-Prado::using('Application.Common.Portlets.BSimpleRepeaterItem');
+namespace Baculum\Common\Portlets;
+
+use Prado\Web\UI\ITemplate;
+use Prado\Web\UI\WebControls\TDataBoundControl;
 
 /**
  * Baculum simple repeater control.
@@ -50,7 +52,6 @@ class BSimpleRepeater extends TDataBoundControl {
         * Set template for items.
         *
         * @param ITemplate $tpl template
-        * @return none
         */
        public function setItemTemplate($tpl) {
                if ($tpl instanceof \Prado\Web\UI\ITemplate) {
@@ -62,7 +63,6 @@ class BSimpleRepeater extends TDataBoundControl {
         * Data binding.
         *
         * @param $data data from data source
-        * @return none
         */
        protected function performDataBinding($data) {
                for ($i = 0; $i < count($data); $i++) {
index 9a7299792f1bc7746e939fde43df9ba8ed31af48..8ea3c0378e9cd56d3d5daf904ec8d9cc56e0d542 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.TControl');
+namespace Baculum\Common\Portlets;
 
 /**
  * Baculum simple repeater item control.
index 961138f43b5b2f267bc98f890173de57d9fda18c..6963fac5193f9f722d2250c25b2c87d386ca2d49 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveHiddenField');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.TTemplateControl');
-Prado::using('Application.Common.Class.OAuth2');
-Prado::using('Application.Common.Class.BasicUserConfig');
-Prado::using('Application.Common.Portlets.PortletTemplate');
+use Prado\TPropertyValue;
+use Prado\Web\UI\TCommandEventParameter;
+use Baculum\Common\Portlets\PortletTemplate;
 
 /**
  * New auth client control.
index 57292de85f627693746ff696fa76bad0c7e9fe72..d9c12562778e6305b84d9db66ae0274ed3520d8c 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.TTemplateControl');
-Prado::using('Application.Common.Class.OAuth2');
-Prado::using('Application.Common.Portlets.PortletTemplate');
+use Prado\TPropertyValue;
+use Prado\Web\UI\TCommandEventParameter;
+use Baculum\Common\Portlets\PortletTemplate;
 
 /**
  * New host control.
index 5adfca102fb46caecea73fa360cc2e43b596809b..6404bca3ebdaf2995c00554c35fb2b928097e48f 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
  
+namespace Baculum\Common\Portlets;
+
+use Prado\Web\UI\TTemplateControl;
+
 /**
  * Portlet template control.
  *
index e045c3330820b44c23ee1b500deabd231cbde535..d1d27ca7c1e042ffec4e664bd0e4a7f8510f8690 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Portlets.PortletTemplate');
+namespace Baculum\Common\Portlets;
 
 /**
  * Table default options control.
index 15fd1d7336c024634b3deebd5ad34a9d10f1974d..f68c9a4b9869534bbc3c7e7c3d2683da92e59071 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Class.WebUserRoles');
+
+namespace Baculum\Web\Layouts;
+
+use Prado\Web\UI\TTemplateControl;
 
 /**
  * Main layout class.
index 11dc3d732a90e521b9247e047f4c969894c3ea20..174928ff0e11ccd42accfd0c34cc547500b791e3 100644 (file)
@@ -26,7 +26,7 @@
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/datatables.net-responsive-dt/css/responsive.dataTables.min.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/datatables.net-buttons-dt/css/buttons.dataTables.min.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../../themes/Baculum-v2/css/baculum.css %> />
-                       <com:Application.Common.Portlets.TableDefaults />
+                       <com:Baculum.Common.Portlets.TableDefaults />
                        <!-- Top container -->
                        <div class="w3-bar w3-top w3-black w3-large" style="z-index:4">
                                <button type="button" class="w3-bar-item w3-button w3-hover-none w3-hover-text-light-grey" onclick="W3SideBar.open();"><i class="fa fa-bars"></i> Â Menu</button>
@@ -34,7 +34,7 @@
                                        <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logo.png" alt="" />
                                </span>
                        </div>
-                       <com:Application.Web.Portlets.MainSideBar />
+                       <com:Baculum.Web.Portlets.MainSideBar />
                        <!-- !PAGE CONTENT! -->
                        <div class="w3-main page_main_el" id="page_main" style="margin-left: 250px; margin-top: 43px;">
                                <span class="w3-tag w3-large w3-purple w3-right w3-padding-small w3-margin-top w3-margin-right">
@@ -64,9 +64,9 @@
                        </div>
                </com:TForm>
                <div id="small" class="w3-hide-large"></div>
-<com:Application.Web.Portlets.ErrorMessageBox />
-<com:Application.Web.Portlets.ResourceMonitor />
-<com:Application.Web.Portlets.MsgEnvelope Visible="<%=($this->Application->getModule('web_config')->isMessagesLogEnabled() && $this->User->isInRole(WebUserRoles::ADMIN))%>" />
+<com:Baculum.Web.Portlets.ErrorMessageBox />
+<com:Baculum.Web.Portlets.ResourceMonitor />
+<com:Baculum.Web.Portlets.MsgEnvelope Visible="<%=($this->Application->getModule('web_config')->isMessagesLogEnabled() && $this->User->isInRole(WebUserRoles::ADMIN))%>" />
 <script>
 var is_small = $('#small').is(':visible');
 $(function() {
index 4e584f881bd7d5bed5889becf69a552f90e088e8..9d53769328700e4d5408405dafd20ea5a9ced6d4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Web\Layouts;
+
+use Prado\Web\UI\TTemplateControl;
+
 /**
  * Message box class.
  *
index f4eeb8891433da8b8efa6b1aaa554ffd90188800..fde65947bcd85b543d0e9198dadb91d018886c5c 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Params');
+namespace Baculum\Web\Layouts;
+
+use Prado\Web\UI\TTemplateControl;
 
 /**
  * Simple layout class.
index 6aee10a70dc65fbef54c723fd989bfda5a8d4813..255a9d8672e848bfd4dd74ad7b1e2a99813fdfa3 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
+
+namespace Baculum\Web\Layouts;
+
+use Prado\Web\UI\TTemplateControl;
+
 /**
  * Wizard layout.
  *
index 80c4e4563085539f6969dc1bca55baec4655d560..6fc3c64fd360268f3838fd581043b757d77483e1 100644 (file)
@@ -27,7 +27,7 @@
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/datatables.net-buttons-dt/css/buttons.dataTables.min.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/opentip/css/opentip.css %> />
                        <com:BStyleSheet StyleSheetUrl=<%~ ../../../themes/Baculum-v2/css/baculum.css %> />
-                       <com:Application.Common.Portlets.TableDefaults />
+                       <com:Baculum.Common.Portlets.TableDefaults />
                        <!-- Top container -->
                                <com:TContentPlaceHolder ID="Wizard" />
                </com:TForm>
similarity index 98%
rename from gui/baculum/protected/Web/Class/BaculumAPIClient.php
rename to gui/baculum/protected/Web/Modules/BaculumAPIClient.php
index c4602f35754948a46f653d08bc30b83860b02596..885e0619d923852bf13a06ada9893c71f61f0f05 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.Common.Class.Miscellaneous');
-Prado::using('Application.Web.Class.WebModule');
-Prado::using('Application.Web.Class.HostConfig');
-Prado::using('Application.Web.Class.OAuth2Record');
-Prado::using('Application.Web.Class.HostRecord');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\Errors\ConnectionError;
+use Baculum\Common\Modules\Logging;
+use Prado\Xml\TXmlElement;
 
 /**
  * Internal API client module.
@@ -233,7 +232,6 @@ class BaculumAPIClient extends WebModule {
         * @access public
         * @param string $host host name
         * @param array $params host parameters
-        * @return none
         */
        public function setHostParams($host, $params) {
                new HostRecord($host, $params);
@@ -478,7 +476,6 @@ class BaculumAPIClient extends WebModule {
         * Parse and set response headers.
         * Note, header names are lower case.
         *
-        * @return none
         */
        public function parseHeader($header) {
                $headers = array();
@@ -496,7 +493,6 @@ class BaculumAPIClient extends WebModule {
         *
         * @access public
         * @param bool $force if true then cache is force initialized
-        * @return none
         */
        public function initSessionCache($force = false) {
                if (!isset($_SESSION) || !array_key_exists('cache', $_SESSION) || !is_array($_SESSION['cache']) || $force === true) {
@@ -528,7 +524,6 @@ class BaculumAPIClient extends WebModule {
         * @param string $host host name
         * @param array $params command parameters as numeric array
         * @param mixed $value value to save in cache
-        * @return none
         */
        private function setSessionCache($host, array $params, $value) {
                $key = $this->getSessionKey($host, $params);
similarity index 94%
rename from gui/baculum/protected/Web/Class/BaculumWebPage.php
rename to gui/baculum/protected/Web/Modules/BaculumWebPage.php
index 95d6fdc9d3c7be7fe91be9ee8f65d658014fd3a9..1ed11c499b2b96dbe8188b608cda495eb0753a70 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Pages.Requirements');
-Prado::using('Application.Common.Class.BaculumPage');
-Prado::using('Application.Web.Init');
-Prado::using('Application.Web.Class.WebConfig');
-Prado::using('Application.Web.Class.PageCategory');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\BaculumPage;
+use Baculum\Common\Modules\Logging;
 
 /**
  * Baculum Web page module.
@@ -75,7 +74,6 @@ class BaculumWebPage extends BaculumPage {
         * Check if default API host is set.
         * If it isn't direct to API host selection page.
         *
-        * @return none
         */
        private function isDefaultAPIHost() {
                $def_api_host = $this->User->getDefaultAPIHost();
@@ -88,7 +86,6 @@ class BaculumWebPage extends BaculumPage {
        /**
         * Set page session values.
         *
-        * @return none
         */
        private function setSessionUserVars() {
                // Set director
@@ -121,7 +118,6 @@ class BaculumWebPage extends BaculumPage {
         *
         * @access public
         * @param array $params HTTP GET method parameters in associative array
-        * @return none
         */
        public function goToDefaultPage($params = null) {
                $def_page = $this->Service->DefaultPage;
@@ -169,7 +165,6 @@ class BaculumWebPage extends BaculumPage {
         * Common actions which has to be done for each web page just after
         * page pre-loading.
         *
-        * @return none
         */
        private function postInitActions() {
                /**
similarity index 89%
rename from gui/baculum/protected/Web/Class/BasicWebUserConfig.php
rename to gui/baculum/protected/Web/Modules/BasicWebUserConfig.php
index 52ff2d630a8038a59e94b4c8df02a9cc108586ef..d27301d9b0483c00b67d6b6ab390c7e8926326a3 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BasicUserConfig');
+namespace Baculum\Web\Modules;
+
+use Prado\Prado;
+use Baculum\Common\Modules\BasicUserConfig;
 
 /**
  * Manage HTTP Basic auth method users.
@@ -34,7 +37,7 @@ class BasicWebUserConfig extends BasicUserConfig {
        /**
         * Users login and password file for HTTP Basic auth.
         */
-       const USERS_FILE_NAME = 'Application.Web.Config.baculum';
+       const USERS_FILE_NAME = 'Baculum.Web.Config.baculum';
        const USERS_FILE_EXTENSION = '.users';
 
        public function getConfigPath() {
similarity index 95%
rename from gui/baculum/protected/Web/Class/DataDependencies.php
rename to gui/baculum/protected/Web/Modules/DataDependencies.php
index 8d6bcf81ad6a01f46eaa319c860b0da9914eaee4..be4df0f42baee66ea98b05daad00b0c3ac80d244 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.:Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Prado\Prado;
 
 /**
  * Module responsible for checking and keeping Bacula config dependencies.
@@ -34,7 +37,7 @@ class DataDependencies extends WebModule {
        /**
         * Data dependencies file
         */
-       const DATA_DEPS_FILE = 'Application.Web.Data.data_deps';
+       const DATA_DEPS_FILE = 'Baculum.Web.Data.data_deps';
 
        private static $data_deps = null;
 
@@ -58,13 +61,7 @@ class DataDependencies extends WebModule {
                        $data_deps = json_decode($deps_file);
                } else {
                        $emsg = "Data dependencies file '$deps_file' does not exist or is not readable.";
-                       $this->Application->getModule('logging')->log(
-                               __FUNCTION__,
-                               $emsg,
-                               Logging::CATEGORY_APPLICATION,
-                               __FILE__,
-                               __LINE__
-                       );
+                       $this->Application->getModule('logging')->log(__FUNCTION__, $emsg, Logging::CATEGORY_APPLICATION, __FILE__, __LINE__);
                }
                return $data_deps;
        }
similarity index 96%
rename from gui/baculum/protected/Web/Class/DataDescription.php
rename to gui/baculum/protected/Web/Modules/DataDescription.php
index 47b5e67d9590ba839289978d7d571dfcb3a39d14..680083237dad881db93347b8030dd84aa5005a78 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Prado\Prado;
 
 /**
  * Data description module.
@@ -34,7 +36,7 @@ class DataDescription extends WebModule {
        /**
         * Data description file
         */
-       const DATA_DESC_FILE = 'Application.Web.Data.data_desc';
+       const DATA_DESC_FILE = 'Baculum.Web.Data.data_desc';
 
        private static $data_desc = null;
 
similarity index 95%
rename from gui/baculum/protected/Web/Class/DirectiveDoc.php
rename to gui/baculum/protected/Web/Modules/DirectiveDoc.php
index 82fcca36aba9a2f9fdce0d4b103b1b8e394be253..1c4fc87cfd567aacd395092427d82e25fcde2d95 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use DOMDocument;
+use Prado\Prado;
 
 /**
  * Directive documentation module.
@@ -34,7 +37,7 @@ class DirectiveDoc extends WebModule {
        /**
         * Directive documentation file path.
         */
-       const DOC_PATH = 'Application.Web.Data.dir_docs';
+       const DOC_PATH = 'Baculum.Web.Data.dir_docs';
 
        /**
         * Documentation file extension.
similarity index 96%
rename from gui/baculum/protected/Web/Class/HostConfig.php
rename to gui/baculum/protected/Web/Modules/HostConfig.php
index 4ce133d1a2b7b6e2102a6a657b11680fc39f3c6c..48630a57ca8cc901e6eecb01039e68e5be58ed0a 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
+use Baculum\Common\Modules\Logging;
 
 /**
  * Manage hosts configuration.
@@ -35,7 +38,7 @@ class HostConfig extends ConfigFileModule {
        /**
         * Host config file path
         */
-       const CONFIG_FILE_PATH = 'Application.Web.Config.hosts';
+       const CONFIG_FILE_PATH = 'Baculum.Web.Config.hosts';
 
        /**
         * Host config file format
similarity index 91%
rename from gui/baculum/protected/Web/Class/HostRecord.php
rename to gui/baculum/protected/Web/Modules/HostRecord.php
index 8e5059ba855b56bdcc328aae13a69ba0be381c18..274e9a594693b557442a59c53c84011bbd87fdf1 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.SessionRecord');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ISessionItem;
+use Baculum\Common\Modules\SessionRecord;
+use Prado\Prado;
 
 /**
  * Host session record class.
@@ -30,7 +33,7 @@ Prado::using('Application.Common.Class.SessionRecord');
  * @category Database
  * @package Baculum Web
  */
-class HostRecord extends SessionRecord implements SessionItem {
+class HostRecord extends SessionRecord implements ISessionItem {
 
        public $host;
        public $protocol;
@@ -61,7 +64,7 @@ class HostRecord extends SessionRecord implements SessionItem {
        }
 
        public static function getSessionFile() {
-               return Prado::getPathOfNamespace('Application.Web.Config.session', '.dump');
+               return Prado::getPathOfNamespace('Baculum.Web.Config.session', '.dump');
        }
 
        /**
@@ -70,7 +73,6 @@ class HostRecord extends SessionRecord implements SessionItem {
         * @public
         * @param string $host host name in config
         * @param array $params host parameters in associative array
-        * @return none
         */
        public function setHost($host, array $params) {
                $this->host = $host;
similarity index 97%
rename from gui/baculum/protected/Web/Class/JobInfo.php
rename to gui/baculum/protected/Web/Modules/JobInfo.php
index 5da6ba8d45811daa2d00b9db57d5fb8d583c94f6..b2ed4c3d9e5046f4de10758ea690d9f426391d7b 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.:Web.Class.WebModule');
+namespace Baculum\Web\Modules;
 
 /**
  * Module responsible for providing information about job.
similarity index 99%
rename from gui/baculum/protected/Web/Class/LogParser.php
rename to gui/baculum/protected/Web/Modules/LogParser.php
index 9221f3d8a1c37c7fae0a0adc8c4bd04a69984937..7c4f2a60400f3a98cc6828cca11185a561b287ca 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
 
 /**
  * Bacula logs parser module.
similarity index 96%
rename from gui/baculum/protected/Web/Class/MessagesLog.php
rename to gui/baculum/protected/Web/Modules/MessagesLog.php
index 24facd65a12b2d4836ba89cc6e3a2c4aae0c9837..312f74b1e173a6ddb3f90ed7b29ce4d9f69f3949 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.:Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Prado\Prado;
 
 /**
  * Module responsible for managing messages log.
@@ -34,7 +37,7 @@ class MessagesLog extends WebModule {
        /**
         * Messages log file path.
         */
-       const LOG_FILE_PATH = 'Application.Web.Logs.messages';
+       const LOG_FILE_PATH = 'Baculum.Web.Logs.messages';
 
        /**
         * Messages log file extension.
@@ -90,7 +93,6 @@ class MessagesLog extends WebModule {
        /**
         * Truncate messages log.
         *
-        * @return none
         */
        public function truncate() {
                $f = Prado::getPathOfNamespace(self::LOG_FILE_PATH, self::LOG_FILE_EXT);
@@ -115,7 +117,6 @@ class MessagesLog extends WebModule {
         * Save logs to file.
         *
         * @param array $logs log messages
-        * @return none
         */
        public function save(array $logs) {
                $f = Prado::getPathOfNamespace(self::LOG_FILE_PATH, self::LOG_FILE_EXT);
similarity index 80%
rename from gui/baculum/protected/Web/Class/OAuth2Record.php
rename to gui/baculum/protected/Web/Modules/OAuth2Record.php
index 7f9e73b0ddd69c6d3e58c9d37e7015328bf0edbf..aa3dd84712ec3a9521800173bf5cc65f5334057b 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.Interfaces');
-Prado::using('Application.Common.Class.SessionRecord');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ISessionItem;
+use Baculum\Common\Modules\SessionRecord;
+use Prado\Prado;
 
 /**
  * OAuth2 session record module.
@@ -30,7 +33,7 @@ Prado::using('Application.Common.Class.SessionRecord');
  * @category Module
  * @package Baculum Web
  */
-class OAuth2Record extends SessionRecord implements SessionItem {
+class OAuth2Record extends SessionRecord implements ISessionItem {
 
        public $host;
        public $state;
@@ -46,6 +49,6 @@ class OAuth2Record extends SessionRecord implements SessionItem {
        }
 
        public static function getSessionFile() {
-               return Prado::getPathOfNamespace('Application.Web.Config.session', '.dump');
+               return Prado::getPathOfNamespace('Baculum.Web.Config.session', '.dump');
        }
 }
similarity index 96%
rename from gui/baculum/protected/Web/Class/PageCategory.php
rename to gui/baculum/protected/Web/Modules/PageCategory.php
index f15c0949508d62d3eb24f0a72230a92daad079b6..ae7d722328f1adb78a4f7c9cd8fa0aef5bc1bbc3 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.:Web.Class.HostConfig');
-Prado::using('Application.:Web.Class.WebModule');
+namespace Baculum\Web\Modules;
 
 /**
  * Page category module.
similarity index 89%
rename from gui/baculum/protected/Web/Class/WebBasicUserManager.php
rename to gui/baculum/protected/Web/Modules/WebBasicUserManager.php
index 52de9253727818ec9dfdc0a4491e34b90e21f3d6..df007f9a9f44e799969c07bbd43d6b39d22167c3 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\IBUserManager;
+use Prado\Xml\TXmlElement;
 
 /**
  * Web HTTP Basic user manager module.
@@ -29,7 +32,7 @@ Prado::using('Application.Web.Class.WebModule');
  * @category Module
  * @package Baculum Web
  */
-class WebBasicUserManager extends WebModule implements UserManager {
+class WebBasicUserManager extends WebModule implements IBUserManager {
 
        /**
         * Module initialization.
similarity index 97%
rename from gui/baculum/protected/Web/Class/WebConfig.php
rename to gui/baculum/protected/Web/Modules/WebConfig.php
index 8d9cd0557688b65ce228e8f96cab451d321f9228..b84c044b280d595a0a230c75c442712a859c33f3 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
-Prado::using('Application.Common.Class.Crypto');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
+use Baculum\Common\Modules\Crypto;
+use Baculum\Common\Modules\Logging;
+use Prado\Xml\TXmlElement;
 
 /**
  * Manage webGUI configuration.
@@ -36,7 +40,7 @@ class WebConfig extends ConfigFileModule {
        /**
         * Web config file path
         */
-       const CONFIG_FILE_PATH = 'Application.Web.Config.settings';
+       const CONFIG_FILE_PATH = 'Baculum.Web.Config.settings';
 
        /**
         * Web config file format
@@ -102,7 +106,6 @@ class WebConfig extends ConfigFileModule {
         * Initialize module configuration.
         *
         * @param TXmlElement $config module configuration
-        * @return none
         */
        public function init($config) {
                // add event handler to set page language
@@ -319,7 +322,6 @@ class WebConfig extends ConfigFileModule {
         * Set culture for whole page.
         * Uses currently set language settings.
         *
-        * @return none
         */
        public function setCulture() {
                $this->Application->getGlobalization()->Culture = $this->getLanguage();
@@ -355,7 +357,6 @@ class WebConfig extends ConfigFileModule {
         * Set language for current page.
         * Note, it is done in session only.
         *
-        * @return none
         */
        public function setLanguage($lang) {
                $_SESSION['language'] = $lang;
similarity index 90%
rename from gui/baculum/protected/Web/Class/WebLdapUserManager.php
rename to gui/baculum/protected/Web/Modules/WebLdapUserManager.php
index 4e6d4c9a361e8031260b1155e0785e59abefbf00..f883dd3d544ddf25f05673cd1419e3cb23218d4c 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\IBUserManager;
+use Prado\Xml\TXmlElement;
 
 /**
  * Web LDAP user manager module.
@@ -29,7 +32,7 @@ Prado::using('Application.Web.Class.WebModule');
  * @category Module
  * @package Baculum Web
  */
-class WebLdapUserManager extends WebModule implements UserManager {
+class WebLdapUserManager extends WebModule implements IBUserManager {
 
        /**
         * LDAP module object.
similarity index 90%
rename from gui/baculum/protected/Web/Class/WebLocalUserManager.php
rename to gui/baculum/protected/Web/Modules/WebLocalUserManager.php
index a69a4fb2c16df4f3e8d5339e263eb2a833d53af9..31f9434b9ef83453bb51b7945fc15bfd6d95bd30 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\IBUserManager;
+use Prado\Xml\TXmlElement;
 
 /**
  * Web local user manager module.
@@ -29,7 +32,7 @@ Prado::using('Application.Web.Class.WebModule');
  * @category Module
  * @package Baculum Web
  */
-class WebLocalUserManager extends WebModule implements UserManager {
+class WebLocalUserManager extends WebModule implements IBUserManager {
 
        /**
         * Module initialization.
similarity index 95%
rename from gui/baculum/protected/Web/Class/WebModule.php
rename to gui/baculum/protected/Web/Modules/WebModule.php
index dfad7f4632717b694221c675b2f5e09aa1d1a407..64d3652fd0d1410c9406e87c230a2a5768f5ea83 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.TModule');
+namespace Baculum\Web\Modules;
+
+use Prado\TModule;
 
 /**
  * Abstract Web module.
similarity index 96%
rename from gui/baculum/protected/Web/Class/WebRoleConfig.php
rename to gui/baculum/protected/Web/Modules/WebRoleConfig.php
index f6d49d34216ab0920a0892a9e838dec32a1e5b18..247bdf1648fdecc4770b416b2be5e8e11558b587 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
+use Baculum\Common\Modules\Logging;
+use Couchbase\Role;
 
 /**
  * Manage web role configuration.
@@ -40,7 +44,7 @@ class WebRoleConfig extends ConfigFileModule {
        /**
         * Web role config file path
         */
-       const CONFIG_FILE_PATH = 'Application.Web.Config.roles';
+       const CONFIG_FILE_PATH = 'Baculum.Web.Config.roles';
 
        /**
         * Web role config file format
similarity index 93%
rename from gui/baculum/protected/Web/Class/WebUrlMapping.php
rename to gui/baculum/protected/Web/Modules/WebUrlMapping.php
index 02f196e2084761a746056a31e4521c83374c7df8..0c147c610f250ef46382698606969ebb562e8da4 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.TUrlMapping');
+use Baculum\Common\Modules\BaculumUrlMapping;
+use Prado\Web\TUrlMappingPattern;
 
 /**
  * Web URL mapper class.
similarity index 98%
rename from gui/baculum/protected/Web/Class/WebUser.php
rename to gui/baculum/protected/Web/Modules/WebUser.php
index 78e0b2fe7782f6d33666248a29cee6f7357db8e9..72a20fa9a448e027f2092ba9686efd1f146973f5 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Web\Modules;
+
+use Prado\Prado;
+use Prado\Security\IUser;
+use Prado\Security\TUser;
+use Prado\TPropertyValue;
 
 /**
  * Web user module.
@@ -99,7 +105,6 @@ class WebUser extends TUser {
         * Username setter.
         *
         * @param string $username user name
-        * @return none
         */
        public function setUsername($username) {
                $this->setName($username);
@@ -118,7 +123,6 @@ class WebUser extends TUser {
         * Long name setter.
         *
         * @param string $long_name long name
-        * @return none
         */
        public function setLongName($long_name) {
                $this->setCurrentState(self::LONG_NAME, $long_name);
@@ -137,7 +141,6 @@ class WebUser extends TUser {
         * E-mail address setter.
         *
         * @param string $email e-mail address
-        * @return none
         */
        public function setEmail($email) {
                $this->setCurrentState(self::EMAIL, $email);
@@ -156,7 +159,6 @@ class WebUser extends TUser {
         * Description setter.
         *
         * @param string $desc description
-        * @return none
         */
        public function setDescription($desc) {
                $this->setCurrentState(self::DESCRIPTION, $desc);
@@ -184,7 +186,6 @@ class WebUser extends TUser {
         * Set user roles.
         *
         * @param mixed $value roles assigned to user
-        * @return none
         */
        public function setRoles($value) {
                if (is_array($value)) {
@@ -204,7 +205,6 @@ class WebUser extends TUser {
         * Set API hosts.
         *
         * @param array $api_hosts user API hosts
-        * @return none
         */
        public function setAPIHosts($api_hosts) {
                $this->setCurrentState(self::API_HOSTS, $api_hosts);
@@ -248,7 +248,6 @@ class WebUser extends TUser {
         * and the console capabilities.
         *
         * @param string $api_host default API host
-        * @return none
         */
        public function setDefaultAPIHost($api_host) {
                $this->setState(self::DEFAULT_API_HOST, $api_host);
@@ -296,7 +295,6 @@ class WebUser extends TUser {
         * IP address restriction setter.
         *
         * @param string $ips comma separated IP addresses
-        * @return none
         */
        public function setIps($ips) {
                $this->setCurrentState(self::IPS, $ips);
@@ -315,7 +313,6 @@ class WebUser extends TUser {
         * Enabled setter
         *
         * @param boolean $enabled enabled flag state
-        * @return none
         */
        public function setEnabled($enabled) {
                $enabled = TPropertyValue::ensureBoolean($enabled);
@@ -335,7 +332,6 @@ class WebUser extends TUser {
         * Set if user exists in configuration file.
         *
         * @param boolean $in_config in config state value
-        * @return none
         */
        public function setInConfig($in_config) {
                $in_config = TPropertyValue::ensureBoolean($in_config);
@@ -358,7 +354,6 @@ class WebUser extends TUser {
         *
         * @param string $key state key
         * @param mixed $value value to set
-        * @return none
         */
        private function setCurrentState($key, $value) {
                $this->current_state[$key] = $value;
similarity index 98%
rename from gui/baculum/protected/Web/Class/WebUserConfig.php
rename to gui/baculum/protected/Web/Modules/WebUserConfig.php
index d7eb33adee579e0a77ef7981525aa06c342636ce..d2825ee9d2a644fa2febe03aacd7ecf8187da773 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.ConfigFileModule');
-Prado::using('Application.Web.Class.WebUserRoles');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\ConfigFileModule;
+use Baculum\Common\Modules\Logging;
 
 /**
  * Manage web user configuration.
@@ -50,7 +52,7 @@ class WebUserConfig extends ConfigFileModule {
        /**
         * Web user config file path
         */
-       const CONFIG_FILE_PATH = 'Application.Web.Config.users';
+       const CONFIG_FILE_PATH = 'Baculum.Web.Config.users';
 
        /**
         * Web user config file format
similarity index 95%
rename from gui/baculum/protected/Web/Class/WebUserManager.php
rename to gui/baculum/protected/Web/Modules/WebUserManager.php
index 6a9d341b598aeb84efb95d051c664cf6c0d1070b..82d11cfc0d967a2f559c0f7d40043ad6f58159c7 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebUser');
-Prado::using('Application.Web.Class.WebModule');
+namespace Baculum\Web\Modules;
+
+use Baculum\Common\Modules\Logging;
+use Prado\Prado;
+use Prado\Security\IUserManager;
+use Prado\Security\TAuthorizationRule;
+use Prado\TApplication;
+use Prado\Web\Services\TPageService;
+use Prado\Web\THttpCookie;
+use Prado\Xml\TXmlElement;
 
 /**
  * Web user manager module.
@@ -57,7 +65,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * Initialize module configuration.
         *
         * @param TXmlElement $config module configuration
-        * @return none
         */
        public function init($config) {
                $this->user_factory = Prado::createComponent($this->user_class, $this);
@@ -125,7 +132,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * User class setter.
         *
         * @param string $cls user class name
-        * @return none
         */
        public function setUserClass($cls) {
                $this->user_class = $cls;
@@ -144,7 +150,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * Guest name setter.
         *
         * @param string guest name
-        * @return none
         */
        public function setGuestName($name) {
                $this->guest_name = $name;
@@ -155,7 +160,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * Useful to keep login between sessions.
         *
         * @param THttpCookie $cookie cookie object
-        * @return none
         */
        public function getUserFromCookie($cookie) {
                // not implemented
@@ -166,7 +170,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * Useful to keep login between sessions.
         *
         * @param THttpCookie $cookie cookie object
-        * @return none
         */
        public function saveUserToCookie($cookie) {
                // not implemented
@@ -203,16 +206,16 @@ class WebUserManager extends WebModule implements IUserManager {
 
                switch ($auth_method) {
                        case WebConfig::AUTH_METHOD_LOCAL:
-                               $cls = 'Application.Web.Class.WebLocalUserManager';
+                               $cls = 'Baculum.Web.Modules.WebLocalUserManager';
                                break;
                        case WebConfig::AUTH_METHOD_BASIC:
-                               $cls = 'Application.Web.Class.WebBasicUserManager';
+                               $cls = 'Baculum.Web.Modules.WebBasicUserManager';
                                break;
                        case WebConfig::AUTH_METHOD_LDAP:
-                               $cls = 'Application.Web.Class.WebLdapUserManager';
+                               $cls = 'Baculum.Web.Modules.WebLdapUserManager';
                                break;
                        default:
-                               $cls = 'Application.Web.Class.WebBasicUserManager';
+                               $cls = 'Baculum.Web.Modules.WebBasicUserManager';
                }
                return $cls;
        }
@@ -223,7 +226,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * authorization rules before they are used in authorization phase.
         *
         * @param TApplication $application application object
-        * @return none
         */
        public function doAuthentication($application) {
                if ($this->getModule('web_config')->isAuthMethodBasic() && $application->getUser()->IsGuest) {
@@ -343,7 +345,6 @@ class WebUserManager extends WebModule implements IUserManager {
         * done by the framework.
         *
         * @param string|null $state flag state
-        * @return none
         */
        public function setAuthorizedFlag($state) {
                $this->Application->getSession()->add(self::SET_AUTHROIZED_FLAG, $state);
similarity index 97%
rename from gui/baculum/protected/Web/Class/WebUserRoles.php
rename to gui/baculum/protected/Web/Modules/WebUserRoles.php
index 7af51e0ec7cf943841a1b5e7a2d4174056ebde99..6343e042c4cd1b438430e02556136b5cfaf20245 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.WebModule');
-Prado::using('Application.Web.Class.PageCategory');
+namespace Baculum\Web\Modules;
 
 /**
  * Web user roles module.
index 7bf4aed33241809d597638034756b4cb94ff788f..7c29bc0ee1b2d523be4b0f4f994db5b8b7d5c8fe 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <com:BClientScript ScriptUrl=<%~ ../../vendor/bower-asset/opentip/downloads/opentip-jquery.min.js %> />
        <com:BStyleSheet StyleSheetUrl=<%~ ../../vendor/bower-asset/opentip/css/opentip.css %> />
                </div>
        </div>
        <div class="w3-container w3-row w3-padding">
-               <com:Application.Web.Portlets.DirectiveTimePeriod
+               <com:Baculum.Web.Portlets.DirectiveTimePeriod
                        ID="JobAgeOnJobStatusGraph"
                        DirectiveName="Age"
                        Label="<%[ Job age on the job status graph ]%>"
index 133267b4ec6afcba3e1051093fc684c89b254a5b..c7f100c8e4d43ada06886679f68163a4987db1b2 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
-Prado::using('Application.Web.Pages.Monitor');
+use Baculum\Web\Modules\WebConfig;
+use Baculum\Web\Modules\BaculumWebPage;
+
 
 /**
  * Application settings class.
@@ -38,7 +38,7 @@ class ApplicationSettings extends BaculumWebPage {
                $this->DecimalBytes->Checked = true;
                if(count($this->web_config) > 0) {
                        $this->Debug->Checked = ($this->web_config['baculum']['debug'] == 1);
-                       $this->MaxJobs->Text = (key_exists('max_jobs', $this->web_config['baculum']) ? intval($this->web_config['baculum']['max_jobs']) : Monitor::DEFAULT_MAX_JOBS);
+                       $this->MaxJobs->Text = (key_exists('max_jobs', $this->web_config['baculum']) ? intval($this->web_config['baculum']['max_jobs']) : WebConfig::DEF_MAX_JOBS);
                        if (key_exists('size_values_unit', $this->web_config['baculum'])) {
                                $this->DecimalBytes->Checked = ($this->web_config['baculum']['size_values_unit'] === 'decimal');
                                $this->BinaryBytes->Checked = ($this->web_config['baculum']['size_values_unit'] === 'binary');
index cd8185a5a390321607f0d9bb2faf4278bb768f48..6fb04f6fbdb6ab15e504d23a90a7fc58404ca1ee 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.MessageBox" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\MessageBox" Theme="Baculum-v2"%>
 <com:TContent ID="Message">
 <div class="w3-container w3-red">
        <h2><%[ Baculum problem ]%></h2>
index 0041978bce8b4c4b203a30b19cd82aa9fa064f45..e4d57b4e68ac5770ac2550463b48f3b89eed836c 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BaculumPage');
+use Baculum\Common\Modules\BaculumPage;
 
 /**
  * Baculum error page.
index 2d9e95ec55ce6dd7f31206819e033d4e51aafd4f..5383bf57e75d397d76fd965221118be515d3c657 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index e67a55f96d718b927a04287791c55fa84962db92..422516c52498c7d102727a1e94fe324165f37da4 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Client list page.
index 599cb8e0444f0e759ac5d3af61990bf13dd14d64..3f39af40834c76dc6d4eae6ca0d3d100f16543c5 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -42,7 +42,7 @@
                >
                        <i class="fa fa-file-medical-alt"></i> &nbsp;<%[ Status client ]%>
                </com:TActiveLinkButton>
-               <com:Application.Web.Portlets.ComponentActionsMenu
+               <com:Baculum.Web.Portlets.ComponentActionsMenu
                        ID="CompActions"
                        BigButtons="true"
                />
                                                        </tr>
                                                        <tr>
                                                                <td><%[ Bandwidth limit: ]%></td>
-                                                               <td><span id="status_client_bwlimit"></span><com:Application.Web.Portlets.ClientBandwidthLimit ID="BWLimit" OnCallback="status" /></td>
+                                                               <td><span id="status_client_bwlimit"></span><com:Baculum.Web.Portlets.ClientBandwidthLimit ID="BWLimit" OnCallback="status" /></td>
                                                        </tr>
                                                        <tr>
                                                                <td><%[ Debug: ]%></td>
                                                <h5 id="status_client_no_jobs_running" style="display: none"><%[ No jobs running ]%></h5>
                                                <div id="status_client_running_jobs"></div>
                                        </div>
-<com:Application.Web.Portlets.JobBandwidthLimit
+<com:Baculum.Web.Portlets.JobBandwidthLimit
        ID="JobBandwidth"
        OnCallback="status"
 />
@@ -894,7 +894,7 @@ $(function() {
 });
 </script>
        <div class="w3-container tab_item" id="client_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="DIRClientConfig"
                        ComponentType="dir"
                        ResourceType="Client"
@@ -944,7 +944,7 @@ function load_fd_res_config(resource) {
                                CssClass="w3-text-red"
                                Display="None"
                        />
-                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                ID="FDFileDaemonConfig"
                                ComponentType="fd"
                                ResourceType="FileDaemon"
@@ -952,7 +952,7 @@ function load_fd_res_config(resource) {
                        />
                </div>
                <div id="filedaemon_resources_config_form" class="subtab_item" style="display: none">
-                       <com:Application.Web.Portlets.BaculaConfigResourceList
+                       <com:Baculum.Web.Portlets.BaculaConfigResourceList
                                ID="FileDaemonResourcesConfig"
                                ComponentType="fd"
                                ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
index 087b8100e7f8e48a5776a63325d2a0e635950047..23205ee6734f7a4886f9949ff40edc1d1cfe2380 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.JuiControls.TJuiProgressbar');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Common\Modules\Params;
+use Baculum\Web\Modules\BaculumWebPage; 
 
 /**
  * Client view page.
@@ -205,7 +200,6 @@ class ClientView extends BaculumWebPage {
        /**
         * Set client clientid.
         *
-        * @return none;
         */
        public function setClientId($clientid) {
                $clientid = intval($clientid);
@@ -225,7 +219,6 @@ class ClientView extends BaculumWebPage {
        /**
         * Set client name.
         *
-        * @return none;
         */
        public function setClientName($client_name) {
                $this->BWLimit->setClientName($client_name);
@@ -244,7 +237,6 @@ class ClientView extends BaculumWebPage {
        /**
         * Set client address.
         *
-        * @return none;
         */
        public function setClientAddress($address) {
                $this->setViewState(self::CLIENT_ADDRESS, $address);
index d0ec8bfacf366170638bd766d8fc87b581da073a..44413e22b46b6864ff29491e2935a074d4b6995a 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -6,5 +6,5 @@
                        <b><i class="fa fa-terminal"></i> <%[ Console ]%></b>
                </h5>
        </header>
-       <com:Application.Web.Portlets.Bconsole ID="Bconsole" />
+       <com:Baculum.Web.Portlets.Bconsole ID="Bconsole" />
 </com:TContent>
index 752800498ffccd383ce105873c846c0c025ce168..7cfb55c5ebca4f521e3eeab6c6acf0e211c99981 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Bacula console page.
index 5141717a558359b106e9d40eb1881564d7cb7900..8ba8c07cfd3f5d728c0eb268618adc58cb07ad97 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -30,7 +30,7 @@ function load_cons_res_config(resource) {
                        </a>
                </div>
                <div id="console_resources_config_form" class="subtab_item"<%=empty($_SESSION['bcons']) ? ' style="display: none"': ''%>>
-                       <com:Application.Web.Portlets.BaculaConfigResourceList
+                       <com:Baculum.Web.Portlets.BaculaConfigResourceList
                                ID="ConsoleResourcesConfig"
                                ComponentType="bcons"
                                ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
index dbb66763c9f10b9968eee4e3a5c810ec547a9581..099994c412a4ce684e6e31bc536553bc17c30484 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Class.BaculumWebPage');
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Console view page.
index 4d10c8e077be35f2a0d7766465d57c6c470f3d64..909857edfc49513875f1ffd48a20ed7d2cbaff94 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -91,7 +91,7 @@
                                                <p style="margin: 3px 0"><%[ Perform restore ]%> &nbsp;<i class="fa fa-reply w3-small"></i></p>
                                        </div>
                                </a>
-                               <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
+                               <com:Baculum.Web.Portlets.RunJob ID="RunJobModal" />
                        </div>
                        <div class="w3-threequarter">
                                <table id="last_jobs_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom" style="width: 100%">
index cfa681a52da9ec075f0cde8e09314a0e0ff15af4..885ca6f935952115546487388db4e97db6751d26 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Main dashboard page.
index f0a1c57fa8f03d2d051bb0cba8aded5b00364562..5fc63cdb4ef3683ed00dfb9f9cde5556983637ce 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -76,7 +76,7 @@
                
        </div>
        <div class="w3-container tab_item" id="configure_device" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="DeviceConfig"
                        ComponentType="sd"
                        ResourceType="Device"
index 10b987296968c321486dd52a54f0942ce3d27f08..3e56dd170da2400d71d3b8c728e20ebbf6070060 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Device view page.
@@ -68,7 +65,6 @@ class DeviceView extends BaculumWebPage {
        /**
         * Set storage storageid.
         *
-        * @return none;
         */
        public function setStorageId($storageid) {
                $storageid = intval($storageid);
@@ -87,7 +83,6 @@ class DeviceView extends BaculumWebPage {
        /**
         * Set storage name.
         *
-        * @return none;
         */
        public function setStorageName($storage_name) {
                $this->setViewState(self::STORAGE_NAME, $storage_name);
@@ -106,7 +101,6 @@ class DeviceView extends BaculumWebPage {
        /**
         * Set device name.
         *
-        * @return none;
         */
        public function setDeviceName($device_name) {
                $this->setViewState(self::DEVICE_NAME, $device_name);
index 0ab97292fb3db484569abe0a3ab36c4947a55b93..b86e60300331acda14c9cca4830ff909f2a180b6 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -25,7 +25,7 @@
                >
                        <i class="fa fa-file-medical-alt"></i> <%[ Status director ]%>
                </com:TActiveLinkButton>
-               <com:Application.Web.Portlets.ComponentActionsMenu
+               <com:Baculum.Web.Portlets.ComponentActionsMenu
                        ID="CompActions"
                        BigButtons="true"
                        ComponentType="dir"
@@ -983,7 +983,7 @@ function load_dir_res_config(resource) {
                        </a>
                </div>
                <div id="director_director_config_form" class="subtab_item">
-                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                ID="DirDirectorConfig"
                                ComponentType="dir"
                                ResourceType="Director"
@@ -995,7 +995,7 @@ function load_dir_res_config(resource) {
                        <p><%[ The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU &#10148; Pools &#10148; [NEW POOL] &#10148; Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool. ]%></p>
                </div>
                <div id="director_resources_config_form" class="subtab_item" style="display: none">
-                       <com:Application.Web.Portlets.BaculaConfigResourceList
+                       <com:Baculum.Web.Portlets.BaculaConfigResourceList
                                ID="DirectorResourcesConfig"
                                ComponentType="dir"
                                ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
index 0281fd6464fde377ffdd71b8649642572875057a..a601ad87e5d44832906c6f6f7a0be7622a19c741 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.TCommandEventParameter');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Class.BaculumWebPage');
+use Baculum\Common\Modules\Params;
+use Prado\Web\UI\TCommandEventParameter;
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Director view page.
@@ -71,7 +71,6 @@ class DirectorView extends BaculumWebPage {
        /**
         * Set director name.
         *
-        * @return none;
         */
        public function setDirectorName($client_name) {
                $this->setViewState(self::DIRECTOR_NAME, $client_name);
index 72dbdddea05956d7219308aba2b54d757515fffa..59c64eb5982709b83c5fd25142465d95a92874ac 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index 5ea186f886796d44bded05fa34a308133dd6d6d7..394f031bf322595e7bb0a6b7641fa4c72db9cd8a 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * FileSet list page.
index 2689a75946be421e6e5eb5ed13e95e15ada98524..31349f76091a35c887eb31c8aec9843f3dbc7617 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -11,7 +11,7 @@
                <a class="w3-button w3-bar-item" href="<%=$this->Service->constructUrl('FileSetList')%>"><i class="fa fa-angle-left"></i></a>
        </div>
        <div class="w3-container">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="FileSetConfig"
                        ComponentType="dir"
                        ResourceType="Fileset"
index cf657cc60a8ffbe3441f6823b238e284419e959a..25a42cbaa0711a93e27b392cc9bd22a463d5330b 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * FileSet view page.
@@ -61,7 +61,6 @@ class FileSetView extends BaculumWebPage {
        /**
         * Set fileset name.
         *
-        * @return none;
         */
        public function setFileSetName($fileset_name) {
                $this->setViewState(self::FILESET_NAME, $fileset_name);
index 9610b41d0f273b0fe9d301f2dae845e334033a3e..e4551486fc7e7eed9a83db2b6aa973aae6ecbc0f 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -7,5 +7,5 @@
                </h5>
        </header>
        <div style="clear: both"></div>
-       <com:Application.Web.Portlets.JobGraphs ID="Graphs" />
+       <com:Baculum.Web.Portlets.JobGraphs ID="Graphs" />
 </com:TContent>
index 1f041e9bc0413afc017d076f739edb20e36deeac..55ff38e7639c5357d2c62bb143940bc8cce2428c 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Graphs page.
index 257f5c75f63a680b1639a4a46237f69b461aac7d..9cf93c8e74bfaec13913e69d6be693508c63cdf0 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -95,7 +95,7 @@
                </table>
                <p class="info w3-hide-medium w3-hide-small"><%[ Tip: Use left-click to select table row. Use CTRL + left-click to multiple row selection. Use SHIFT + left-click to add a range of rows to selection. ]%></p>
        </div>
-       <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
+       <com:Baculum.Web.Portlets.RunJob ID="RunJobModal" />
        <com:TCallback ID="RunJobCb" OnCallback="runJobAgain">
                <prop:ClientSide.OnLoading>
                        show_btn_loader(sender.options.CallbackParameter);
@@ -688,5 +688,5 @@ var bulk_actions_output_id = '<%=$this->SourceTemplateControl->BulkActions->Bulk
                oMonitor();
        </prop:ClientSide.OnComplete>
 </com:TCallback>
-<com:Application.Web.Portlets.BulkActionsModal ID="BulkActions" />
+<com:Baculum.Web.Portlets.BulkActionsModal ID="BulkActions" />
 </com:TContent>
index 6fba287fbf043679d3633e3d4e4bd2e4f1fb28af..dce5d043e7efbec5dfc653eea7699f8a0a080249 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
-Prado::using('Application.Web.Portlets.RunJob');
+use Prado\Web\UI\ActiveControls\TCallback;
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Job history list page.
@@ -113,7 +111,6 @@ class JobHistoryList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function cancelJobs($sender, $param) {
                $result = [];
@@ -137,7 +134,6 @@ class JobHistoryList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function deleteJobs($sender, $param) {
                $result = [];
index 8225e97a75188939819c3164791532d586a52028..4d2c494255082ed815571906ee4d83d45f08d6df 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -80,7 +80,7 @@
                                        <h3><%[ Warning ]%></h3>
                                        <p id="status_running_job_warning_msg"></p>
                                        <div id="status_running_job_warning_label_btn" class="w3-section" style="display: none">
-                                               <com:Application.Web.Portlets.LabelVolume ID="LabelMedia" />
+                                               <com:Baculum.Web.Portlets.LabelVolume ID="LabelMedia" />
                                        </div>
                                </div>
                                <a href="javascript:void(0)" onclick="W3SubTabs.open('status_running_job_subtab_graphical', 'status_running_job_graphical_output');"<%=!$this->allow_graph_mode ? ' style="display: none"' : ''%>>
                                                <span style="line-height: 41px"><%[ Refresh interval (sec.): ]%></span> <input type="text" id="status_running_job_refresh_interval" class="w3-input w3-border w3-right w3-margin-left" value="5" style="width: 50px"/>
                                        </div>
                                        <div id="status_running_job"><table></table></div>
-                                       <com:Application.Web.Portlets.JobBandwidthLimit
+                                       <com:Baculum.Web.Portlets.JobBandwidthLimit
                                                ID="JobBandwidth"
                                                OnCallback="runningJobStatus"
                                                JobId="<%=$this->SourceTemplateControl->getJobId()%>"
@@ -487,7 +487,7 @@ $(function() {
                                </div>
                        </div>
                        <div id="jobfiles_list" class="subtab_item" style="display: none">
-                               <com:Application.Web.Portlets.JobListFiles
+                               <com:Baculum.Web.Portlets.JobListFiles
                                        ID="FileList"
                                />
                        </div>
@@ -532,10 +532,10 @@ $(function() {
                                }
                        }, 3000);
                </script>
-               <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
+               <com:Baculum.Web.Portlets.RunJob ID="RunJobModal" />
        </div>
        <div class="w3-container tab_item" id="job_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="JobConfig"
                        ComponentType="dir"
                        ResourceType="Job"
@@ -545,7 +545,7 @@ $(function() {
                />
        </div>
        <div class="w3-container tab_item" id="fileset_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="FileSetConfig"
                        ComponentType="dir"
                        ResourceType="Fileset"
@@ -555,7 +555,7 @@ $(function() {
                />
        </div>
        <div class="w3-container tab_item" id="schedule_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="ScheduleConfig"
                        ComponentType="dir"
                        ResourceType="Schedule"
index 0ede0534eb7f8a9247044ccbcd23ba4d49588211..9af4f4d0f00ea65af22954f633f98d50c081b8a4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.JuiControls.TJuiProgressbar');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\TActiveLabel;
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Job history view page.
@@ -163,7 +161,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set jobid to run job again.
         *
-        * @return none
         */
        public function setJobId($jobid) {
                $jobid = intval($jobid);
@@ -182,7 +179,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job clientid
         *
-        * @return none
         */
        public function setClientId($clientid) {
                $clientid = intval($clientid);
@@ -201,7 +197,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job name to run job again.
         *
-        * @return none;
         */
        public function setJobName($job_name) {
                $this->setViewState(self::JOB_NAME, $job_name);
@@ -219,7 +214,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job uname.
         *
-        * @return none;
         */
        public function setJobUname($job_uname) {
                $this->setViewState(self::JOB_UNAME, $job_uname);
@@ -237,7 +231,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job type.
         *
-        * @return none;
         */
        public function setJobType($job_type) {
                $this->setViewState(self::JOB_TYPE, $job_type);
@@ -255,7 +248,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job level.
         *
-        * @return none;
         */
        public function setJobLevel($job_level) {
                $this->setViewState(self::JOB_LEVEL, $job_level);
@@ -273,7 +265,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set job information from show job output.
         *
-        * @return none
         */
        public function setJobInfo($job_name) {
                $job_show = $this->getModule('api')->get(
@@ -300,7 +291,6 @@ class JobHistoryView extends BaculumWebPage {
        /**
         * Set all storage information.
         *
-        * @return none
         */
        public function setStorageInfo() {
                $storages_show = $this->getModule('api')->get(
@@ -328,7 +318,6 @@ class JobHistoryView extends BaculumWebPage {
         *
         * @param BaculaConfigDirectives $sender sender object
         * @param mixed $param save event parameter
-        * @return none
         */
        public function reloadJobInfo($sender, $param) {
                $job_name = $this->getJobName();
index 1900d16cdcf0aa4f6e33f9fca968c58f4c98efa5..6bf2a395fb42c4da2d1e989b075a17dd44ead689 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -48,7 +48,7 @@
                        </tfoot>
                </table>
        </div>
-       <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
+       <com:Baculum.Web.Portlets.RunJob ID="RunJobModal" />
 <script type="text/javascript">
 var oJobList = {
        ids: {
index f32cab5b561140a7c79b956950e70e83ab32ae19..716b89344885d7f75003b564f3d6ef28c5884196 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Job list page.
index ff29b07f7b6a67cb20aa0721f9017ddad9d62efe..c132ee130b5cc7c96519c999e354ef2caa85d4f8 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -47,7 +47,7 @@
                >
                        <i class="fa fa-undo"></i> &nbsp;<%[ Run job ]%>
                </com:TActiveLinkButton>
-               <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
+               <com:Baculum.Web.Portlets.RunJob ID="RunJobModal" />
                <div id="job_graph_container">
                        <div>
                                <div id="jobs_summary_graph"></div>
@@ -361,7 +361,7 @@ var oJobGraphs = {
                </script>
        </div>
        <div class="w3-container tab_item" id="job_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="JobConfig"
                        ComponentType="dir"
                        ResourceType="Job"
@@ -371,7 +371,7 @@ var oJobGraphs = {
                />
        </div>
        <div class="w3-container tab_item" id="fileset_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="FileSetConfig"
                        ComponentType="dir"
                        ResourceType="Fileset"
@@ -381,7 +381,7 @@ var oJobGraphs = {
                />
        </div>
        <div class="w3-container tab_item" id="schedule_config" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="ScheduleConfig"
                        ComponentType="dir"
                        ResourceType="Schedule"
@@ -703,7 +703,7 @@ $(function() {
 </script>
        </div>
        <div class="w3-container tab_item" id="job_schedules" style="display: none">
-               <com:Application.Web.Portlets.StatusSchedule
+               <com:Baculum.Web.Portlets.StatusSchedule
                        ID="Schedules"
                />
        </div>
index 98a98a3c13b47ed4b278be0ee89868dd3ff22ef8..babeaf91d2e6e9c67f8c605ae4d635f19d5543a9 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Job view page.
@@ -56,7 +53,6 @@ class JobView extends BaculumWebPage {
        /**
         * Set job name to run job again.
         *
-        * @return none;
         */
        public function setJobName($job_name) {
                $this->setViewState(self::JOB_NAME, $job_name);
@@ -74,7 +70,6 @@ class JobView extends BaculumWebPage {
        /**
         * Set job information from show job output.
         *
-        * @return none
         */
        public function setJobInfo($job_name) {
                $job_show = $this->getModule('api')->get(
@@ -103,7 +98,6 @@ class JobView extends BaculumWebPage {
         *
         * @param BaculaConfigDirectives $sender sender object
         * @param mixed $param save event parameter
-        * @return none
         */
        public function reloadJobInfo($sender, $param) {
                if ($this->Request->contains('job')) {
index 12f3f96e1322d9816ab3b07ada98edf5baa32b77..24d937c154b49464420d05cdc2928dfa62029d67 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Simple" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Simple" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <div style="width: 100%; height: 100%;">
                <com:TPanel ID="LoginForm" CssClass="w3-display-middle w3-center" Style="width: 100%; max-width: 440px" DefaultButton="LoginBtn">
index 12ea78e06931943bd93a4f3821e850155be5963d..8df7024a6931a2228183b79f62fd78dc0ec2331a 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage');
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\Web\UI\WebControls\TLinkButton;
 
 /**
  * User login page.
index 374ccec656c7bcb663c020ddcccda1a8cc681f6e..27362f1f1189f31b0cf7bb42d6d910051788c36b 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.Web.Class.BaculumWebPage');
-Prado::using('Application.Web.Class.WebUserRoles');
+
+use Baculum\Common\Modules\BaculumPage;
+use Baculum\Common\Modules\Errors\GenericError;
+use Baculum\Web\Modules\WebConfig;
+use Baculum\Web\Modules\WebUserRoles;
 
 /**
  * Monitor class.
@@ -35,8 +37,6 @@ Prado::using('Application.Web.Class.WebUserRoles');
  */
 class Monitor extends BaculumPage {
 
-       const DEFAULT_MAX_JOBS = 10000;
-
        public function onInit($param) {
                parent::onInit($param);
                $monitor_data = [
@@ -55,7 +55,7 @@ class Monitor extends BaculumPage {
                $this->getModule('api')->initSessionCache(true);
 
                $web_config = $this->getModule('web_config')->getConfig();
-               $job_limit = self::DEFAULT_MAX_JOBS;
+               $job_limit = WebConfig::DEF_MAX_JOBS;
                if (count($web_config) > 0 && key_exists('max_jobs', $web_config['baculum'])) {
                        $job_limit = $web_config['baculum']['max_jobs'];
                }
index 178fc1a1b2ebca26528f82dfe5589241b22b3a3c..31e015c2b5a96a81ea080fdf01df9f02086cae04 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:TWizard ID="NewJobWizard"
                CssClass="wizard"
                                        <p><%[ This wizard enables you to create in easy way a new backup job. ]%></p>
                                        <!--p><%[ To start please select job type that you wish to create. ]%></p-->
                                </div>
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Name"
                                        DirectiveName="Name"
                                        Label="Job Name"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Description"
                                        DirectiveName="Description"
                                        Label="Description"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="JobDefs"
                                        DirectiveName="JobDefs"
                                        Label="JobDefs"
                                        <p><%[ Please select Client from which you want to backup data and please select FileSet with files/directories definition to backup. ]%></p>
                                        <p><%[ If your FileSet for this backup does not exist yet, you can create it. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Client"
                                        DirectiveName="Client"
                                        Label="Client"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Fileset"
                                        DirectiveName="Fileset"
                                        Label="FileSet"
                                </div>
                                <div id="job_wizard_new_fileset" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ New FileSet ]%></h3>
-                                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                                ID="FilesetConfig"
                                                ComponentType="dir"
                                                ResourceType="Fileset"
                                        <h2><%[ Storage and Pool ]%></h2>
                                        <p><%[ Please select Storage where you want to backup data and please select Pool with volumes which Storage will use to store backup data. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Storage"
                                        DirectiveName="Storage"
                                        Label="Storage"
                                <span><a href="javascript:void(0)" onclick="$('#job_wizard_storage_directives').slideToggle();" class="w3-button w3-green w3-margin-top w3-margin-bottom"><i class="fa fa-angle-down"></i> &nbsp;<%[ Show Storage directives for Job ]%></a></span>
                                <div id="job_wizard_storage_directives" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ Spool setting ]%></h3>
-                                       <com:Application.Web.Portlets.DirectiveCheckBox
+                                       <com:Baculum.Web.Portlets.DirectiveCheckBox
                                                ID="SpoolData"
                                                DirectiveName="SpoolData"
                                                Label="Spool Data"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                 />
-                                       <com:Application.Web.Portlets.DirectiveCheckBox
+                                       <com:Baculum.Web.Portlets.DirectiveCheckBox
                                                ID="SpoolAttributes"
                                                DirectiveName="SpoolAttributes"
                                                Label="Spool Attributes"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                 />
-                                       <com:Application.Web.Portlets.DirectiveSize
+                                       <com:Baculum.Web.Portlets.DirectiveSize
                                                ID="SpoolSize"
                                                DirectiveName="SpoolSize"
                                                Label="Spool Size"
                                                ShowRemoveButton="false"
                                                />
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Pool"
                                        DirectiveName="Pool"
                                        Label="Pool"
                                </div>
                                <div id="job_wizard_new_pool" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ New Pool ]%></h3>
-                                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                                ID="PoolConfig"
                                                ComponentType="dir"
                                                ResourceType="Pool"
                                </div>
                                <div id="job_wizard_pool_directives" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ Pool setting ]%></h3>
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="FullBackupPool"
                                                DirectiveName="FullBackupPool"
                                                Label="Full Backup Pool"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="IncrementalBackupPool"
                                                DirectiveName="IncrementalBackupPool"
                                                Label="Incremental Backup Pool"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="DifferentialBackupPool"
                                                DirectiveName="DifferentialBackupPool"
                                                Label="Differential Backup Pool"
                                <div class="w3-container">
                                        <h2><%[ Job directives ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Level"
                                        DirectiveName="Level"
                                        Label="Level"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveCheckBox
+                               <com:Baculum.Web.Portlets.DirectiveCheckBox
                                        ID="Accurate"
                                        DirectiveName="Accurate"
                                        DefaultValue="0"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                         />
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="MaximumConcurrentJobs"
                                        DirectiveName="MaximumConcurrentJobs"
                                        DefaultValue="1"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                         />
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Priority"
                                        DirectiveName="Priority"
                                        DefaultValue="10"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                         />
-                               <com:Application.Web.Portlets.DirectiveCheckBox
+                               <com:Baculum.Web.Portlets.DirectiveCheckBox
                                        ID="ReRunFailedLevels"
                                        DirectiveName="ReRunFailedLevels"
                                        DefaultValue="0"
                                <div class="w3-container">
                                        <h2><%[ Other directives ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Messages"
                                        DirectiveName="Messages"
                                        Label="Messages"
                                <div class="w3-container">
                                        <h2><%[ Schedule ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Schedule"
                                        DirectiveName="Schedule"
                                        Label="Schedule"
                                </div>
                                <div id="job_wizard_new_schedule" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ New Schedule ]%></h3>
-                                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                                ID="ScheduleConfig"
                                                ComponentType="dir"
                                                ResourceType="Schedule"
                                </div>
                                <div id="job_wizard_reschedule_directives" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
                                        <h3><%[ Reschedule setting ]%></h3>
-                                       <com:Application.Web.Portlets.DirectiveCheckBox
+                                       <com:Baculum.Web.Portlets.DirectiveCheckBox
                                                ID="RescheduleOnError"
                                                DirectiveName="RescheduleOnError"
                                                DefaultValue="0"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                 />
-                                       <com:Application.Web.Portlets.DirectiveCheckBox
+                                       <com:Baculum.Web.Portlets.DirectiveCheckBox
                                                ID="RescheduleIncompleteJobs"
                                                DirectiveName="RescheduleIncompleteJobs"
                                                DefaultValue="0"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                 />
-                                       <com:Application.Web.Portlets.DirectiveTimePeriod
+                                       <com:Baculum.Web.Portlets.DirectiveTimePeriod
                                                ID="RescheduleInterval"
                                                DirectiveName="RescheduleInterval"
                                                DefaultValue="1800"
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                 />
-                                       <com:Application.Web.Portlets.DirectiveInteger
+                                       <com:Baculum.Web.Portlets.DirectiveInteger
                                                ID="RescheduleTimes"
                                                DirectiveName="RescheduleTimes"
                                                Label="Reschedule Times"
index 2421031be92acbd1be65a5360a456524cb1980c1..16d13f17944323196bb8d48d80a306b96688e409 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage'); 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.WebControls.TWizard');
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\Web\UI\WebControls\TWizard;
+use Prado\Web\UI\WebControls\TWizardNavigationEventParameter;
 
 /**
  * New backup job wizard page.
@@ -85,7 +85,6 @@ class NewBackupJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardPrev($sender, $param) {
        }
@@ -95,7 +94,6 @@ class NewBackupJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardNext($sender, $param) {
        }
@@ -104,7 +102,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load JobDefs (step 1).
         *
-        * @return none
         */
        public function loadJobDefs() {
                $jobdefs_list = array();
@@ -122,7 +119,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Setup and remember selected JobDefs values to use in next wizard steps.
         *
-        * @return none
         */
        public function setupJobDefs() {
                $directive_value = $this->JobDefs->getDirectiveValue();
@@ -153,7 +149,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load client list (step 2).
         *
-        * @return none
         */
        public function loadClients() {
                $client_list = array();
@@ -173,7 +168,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load fileset list (step 2).
         *
-        * @return none
         */
        public function loadFilesets() {
                $this->loadFilesetList(null, null);
@@ -197,7 +191,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load new fileset form.
         *
-        * @return none
         */
        public function loadNewFilesetForm() {
                if ($this->IsCallBack) {
@@ -213,7 +206,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load new pool form.
         *
-        * @return none
         */
        public function loadNewPoolForm() {
                if ($this->IsCallBack) {
@@ -229,7 +221,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load new schedule form.
         *
-        * @return none
         */
        public function loadNewScheduleForm() {
                if ($this->IsCallBack) {
@@ -245,7 +236,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load storage list (step 2).
         *
-        * @return none
         */
        public function loadStorages() {
                $storage_list = array();
@@ -277,7 +267,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load pool list (step 2).
         *
-        * @return none
         */
        public function loadPools() {
                $pool_list = $this->loadPoolList(null, null);
@@ -359,7 +348,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load job levels.
         *
-        * @return none
         */
        public function loadLevels() {
                // so far backup job levels only
@@ -376,7 +364,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load messages.
         *
-        * @return none
         */
        public function loadMessages() {
                $message_list = array();
@@ -396,7 +383,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Load schedule.
         *
-        * @return none
         */
        public function loadSchedules() {
                $this->loadScheduleList(null, null);
@@ -465,7 +451,6 @@ class NewBackupJobWizard extends BaculumWebPage {
        /**
         * Cancel wizard.
         *
-        * @return none
         */
        public function wizardStop($sender, $param) {
                $this->goToDefaultPage();
@@ -475,7 +460,6 @@ class NewBackupJobWizard extends BaculumWebPage {
         * Set selected JobDefs values.
         *
         * @param $jobdefs selected JobDefs values
-        * @return none
         */
        public function setJobDefs($jobdefs) {
                $this->setViewState(self::JOBDEFS, $jobdefs);
@@ -494,7 +478,6 @@ class NewBackupJobWizard extends BaculumWebPage {
         * Set previous wizard step.
         *
         * @param integer $step previous step number
-        * @return none
         */
        public function setPrevStep($step) {
                $step = intval($step);
index a59c6d3c5a65a5b243924c73c1412e22aa68598b..94623cf2bbe33d655218ef996d95f0aeae583a57 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:TWizard ID="NewJobWizard"
                CssClass="wizard"
                                        <h2><%[ New copy job wizard ]%></h2>
                                        <p><%[ Copy jobs run copying backup jobs data from one volume to another. It is done by reading the previously backed up data from volume and writing it to another volume in a different pool. All process runs without using file daemon. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Name"
                                        DirectiveName="Name"
                                        Label="Job Name"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Description"
                                        DirectiveName="Description"
                                        Label="Description"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="JobDefs"
                                        DirectiveName="JobDefs"
                                        Label="JobDefs"
                                        <p><%[ Please select a pool from which you want to copy data. ]%></p>
                                        <p><%[ The source pool will be examined for finding backup jobs to copy. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Pool"
                                        DirectiveName="Pool"
                                        Label="Source Pool"
                                        <h2><%[ Source Storage ]%></h2>
                                        <p><%[ Please select a storage using which you want to read copy data. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="SourceStorage"
                                        DirectiveName="Storage"
                                        Label="Source Storage"
@@ -687,7 +687,7 @@ var oVolumeList = {
                                        <h2><%[ Backup jobs selection criteria ]%></h2>
                                        <p><%[ Please select the criteria that will be used for selecting backup jobs to copy. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="SelectionType"
                                        DirectiveName="SelectionType"
                                        Label="Selection Type"
@@ -699,7 +699,7 @@ var oVolumeList = {
                                        Attributes.onchange="oSelectionType.show_opts(this.value);"
                                        />
                                <div id="selection_type_job" style="float: none; display: none; margin: auto;">
-                                       <com:Application.Web.Portlets.DirectiveTextBox
+                                       <com:Baculum.Web.Portlets.DirectiveTextBox
                                                ID="SelectionPatternJob"
                                                DirectiveName="SelectionPattern"
                                                Label="Selection Pattern Job"
@@ -712,7 +712,7 @@ var oVolumeList = {
                                        <a id="selection_type_jobs_btn" href="javascript:void(0)" onclick="oJobList.load_data();" style="display: block; width: 300px; margin: 0 auto;"><%[ See backup jobs ]%></a>
                                </div>
                                <div id="selection_type_client" style="float: none; display: none; margin: auto;">
-                                       <com:Application.Web.Portlets.DirectiveTextBox
+                                       <com:Baculum.Web.Portlets.DirectiveTextBox
                                                ID="SelectionPatternClient"
                                                DirectiveName="SelectionPattern"
                                                Label="Selection Pattern Client"
@@ -725,7 +725,7 @@ var oVolumeList = {
                                        <a id="selection_type_clients_btn" href="javascript:void(0)" onclick="oClientList.load_data();" style="display: block; width: 300px; margin: 0 auto;"><%[ See clients ]%></a>
                                </div>
                                <div id="selection_type_volume" style="float: none; display: none; margin: auto;">
-                                       <com:Application.Web.Portlets.DirectiveTextBox
+                                       <com:Baculum.Web.Portlets.DirectiveTextBox
                                                ID="SelectionPatternVolume"
                                                DirectiveName="SelectionPattern"
                                                Label="Selection Pattern Volume"
@@ -742,7 +742,7 @@ var oVolumeList = {
                                <div id="selection_type_oldest_volume" style="display: none">
                                </div>
                                <div id="selection_type_sql_query" style="float: none; display: none; margin: auto;">
-                                       <com:Application.Web.Portlets.DirectiveTextBox
+                                       <com:Baculum.Web.Portlets.DirectiveTextBox
                                                ID="SelectionPatternSQLQuery"
                                                DirectiveName="SelectionPattern"
                                                Label="Selection Pattern SQL Query"
@@ -1604,7 +1604,7 @@ oSelectionType.init();
                                        <p><%[ Please select destination pool to which will be stored data. ]%></p>
                                </div>
                                <div style="float: none; margin: auto">
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="NextPool"
                                                DirectiveName="NextPool"
                                                Label="Destination Pool (NextPool)"
@@ -1704,7 +1704,7 @@ function show_storage_warning(storage, pool, jobs) {
                                        <p><%[ Please select a storage using which you want to write copied data. ]%></p>
                                </div>
                                <div style="float: none; margin: auto">
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="DestinationStorage"
                                                DirectiveName="Storage"
                                                Label="Destination Storage"
@@ -1723,7 +1723,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <div>
                                        <h2><%[ Limits ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="MaximumSpawnedJobs"
                                        DirectiveName="MaximumSpawnedJobs"
                                        DefaultValue="600"
@@ -1735,7 +1735,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <div>
                                        <h2><%[ Schedule ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Schedule"
                                        DirectiveName="Schedule"
                                        Label="Schedule"
@@ -1746,7 +1746,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <div>
                                        <h2><%[ Messages ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Messages"
                                        DirectiveName="Messages"
                                        Label="Messages"
@@ -1761,7 +1761,7 @@ function show_storage_warning(storage, pool, jobs) {
                                </div>
                                <div id="copy_job_wizard_other_options" style="float: none; margin: auto; display: none;">
                                        <p><%[ Level, Client and FileSet are not used during copy jobs running but they are required to define in copy job resource as the standard Job directives. ]%></p>
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="Level"
                                                DirectiveName="Level"
                                                Label="Level"
@@ -1771,7 +1771,7 @@ function show_storage_warning(storage, pool, jobs) {
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="Client"
                                                DirectiveName="Client"
                                                Label="Client"
@@ -1781,7 +1781,7 @@ function show_storage_warning(storage, pool, jobs) {
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="FileSet"
                                                DirectiveName="Fileset"
                                                Label="FileSet"
index e928782245961463e516e2a60992d747ad5cfbad..aef3462c62991295a04dbf6cb806fb99eddafa7a 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.WebControls.TWizard');
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\Web\UI\ActiveControls\TCallback;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
+use Prado\Web\UI\WebControls\TWizard;
+use Prado\Web\UI\WebControls\TWizardNavigationEventParameter;
 
 /**
  * New copy job wizard page.
@@ -103,7 +105,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardPrev($sender, $param) {
        }
@@ -113,7 +114,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardNext($sender, $param) {
        }
@@ -121,7 +121,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load JobDefs (step 1).
         *
-        * @return none
         */
        public function loadJobDefs() {
                $jobdefs_list = [];
@@ -143,7 +142,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Setup and remember selected JobDefs values to use in next wizard steps.
         *
-        * @return none
         */
        public function setupJobDefs() {
                $directive_value = $this->JobDefs->getDirectiveValue();
@@ -186,7 +184,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param string $name pool type directive name
         * @param object $control different type of controls (usually DirectiveComboBox)
-        * @return none
         */
        public function setPools($name, $control) {
                $pool_list = [];
@@ -206,7 +203,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load pool list (step 2).
         *
-        * @return none
         */
        public function loadPools() {
                $this->setPools('Pool', $this->Pool);
@@ -217,7 +213,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadVolumes($sender, $param) {
                $pool = $param->getCallbackParameter();
@@ -260,7 +255,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load source storage list (step 2).
         *
-        * @return none
         */
        public function loadSourceStorages() {
                $this->setStorages($this->SourceStorage);
@@ -271,7 +265,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setSourceStorageByPool($sender, $param) {
                $pool = $this->Pool->getDirectiveValue();
@@ -284,7 +277,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load selection types (step 3).
         *
-        * @return none
         */
        public function loadSelectionTypes() {
                $this->SelectionType->setData($this->sel_types);
@@ -296,7 +288,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadJobList($sender, $param) {
                $result = $this->getModule('api')->get([
@@ -330,7 +321,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadClientList($sender, $param) {
                $result = $this->getModule('api')->get(
@@ -349,7 +339,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load pool list (step 4).
         *
-        * @return none
         */
        public function loadNextPools() {
                $this->setPools('NextPool', $this->NextPool);
@@ -379,7 +368,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load destination storage list (step 4).
         *
-        * @return none
         */
        public function loadDestinationStorages() {
                $this->setStorages($this->DestinationStorage);
@@ -390,7 +378,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setStorageByPool($pool, $cb) {
                $pool = $this->getModule('api')->get([
@@ -413,7 +400,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setDestinationStorageByPool($sender, $param) {
                $nextpool = $this->NextPool->getDirectiveValue();
@@ -428,7 +414,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function getJobsUsingPool($sender, $param) {
                $values = $param->getCallbackParameter();
@@ -459,7 +444,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load messages (step 5).
         *
-        * @return none
         */
        public function loadMessages() {
                $message_list = [];
@@ -485,7 +469,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load schedule (step 5).
         *
-        * @return none
         */
        public function loadSchedules() {
                $schedule_list = [];
@@ -511,7 +494,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load job levels (step 5).
         *
-        * @return none
         */
        public function loadLevels() {
                // so far backup job levels only
@@ -531,7 +513,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load clients (step 5).
         *
-        * @return none
         */
        public function loadClients() {
                $clients = $this->getModule('api')->get([
@@ -558,7 +539,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Load filesets (step 5).
         *
-        * @return none
         */
        public function loadFileSets() {
                $filesets = $this->getModule('api')->get([
@@ -704,7 +684,6 @@ class NewCopyJobWizard extends BaculumWebPage {
        /**
         * Cancel wizard.
         *
-        * @return none
         */
        public function wizardStop($sender, $param) {
                $this->goToDefaultPage();
@@ -714,7 +693,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         * Set selected JobDefs values.
         *
         * @param $jobdefs selected JobDefs values
-        * @return none
         */
        public function setJobDefs($jobdefs) {
                $this->setViewState(self::JOBDEFS, $jobdefs);
@@ -733,7 +711,6 @@ class NewCopyJobWizard extends BaculumWebPage {
         * Set previous wizard step.
         *
         * @param integer $step previous step number
-        * @return none
         */
        public function setPrevStep($step) {
                $step = intval($step);
index 2930ff731d22e1e629e4e92871c3ac180170546e..6bddac047808cd1da9c88978a12c0985a98e3850 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:TWizard ID="NewJobWizard"
                CssClass="wizard"
                                        <h2><%[ New migrate job wizard ]%></h2>
                                        <p><%[ Migrate jobs run moving backup jobs data from one volume to another. It is done by reading the previously backed up data from volume and writing it to another volume in a different pool. The file catalog records associated with the original backup jobs are purged. All process runs without using file daemon. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Name"
                                        DirectiveName="Name"
                                        Label="Job Name"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="Description"
                                        DirectiveName="Description"
                                        Label="Description"
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="JobDefs"
                                        DirectiveName="JobDefs"
                                        Label="JobDefs"
                                        <p><%[ Please select a pool from which you want to migrate data. ]%></p>
                                        <p><%[ The source pool will be examined for finding backup jobs to migrate. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Pool"
                                        DirectiveName="Pool"
                                        Label="Source Pool"
                                        <h2><%[ Source Storage ]%></h2>
                                        <p><%[ Please select a storage using which you want to read migrate data. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="SourceStorage"
                                        DirectiveName="Storage"
                                        Label="Source Storage"
@@ -687,7 +687,7 @@ var oVolumeList = {
                                        <h2><%[ Backup jobs selection criteria ]%></h2>
                                        <p><%[ Please select the criteria that will be used for selecting backup jobs to migrate. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="SelectionType"
                                        DirectiveName="SelectionType"
                                        Label="Selection Type"
@@ -700,7 +700,7 @@ var oVolumeList = {
                                        />
                        </div>
                        <div id="selection_type_job" class="w3-half" style="float: none; display: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="SelectionPatternJob"
                                        DirectiveName="SelectionPattern"
                                        Label="Selection Pattern Job"
@@ -713,7 +713,7 @@ var oVolumeList = {
                                <a id="selection_type_jobs_btn" href="javascript:void(0)" onclick="oJobList.load_data();" style="display: block; width: 300px; margin: 0 auto;"><%[ See backup jobs ]%></a>
                        </div>
                        <div id="selection_type_client" class="w3-half" style="float: none; display: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="SelectionPatternClient"
                                        DirectiveName="SelectionPattern"
                                        Label="Selection Pattern Client"
@@ -726,7 +726,7 @@ var oVolumeList = {
                                <a id="selection_type_clients_btn" href="javascript:void(0)" onclick="oClientList.load_data();" style="display: block; width: 300px; margin: 0 auto;"><%[ See clients ]%></a>
                        </div>
                        <div id="selection_type_volume" class="w3-half" style="float: none; display: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="SelectionPatternVolume"
                                        DirectiveName="SelectionPattern"
                                        Label="Selection Pattern Volume"
@@ -743,7 +743,7 @@ var oVolumeList = {
                        <div id="selection_type_oldest_volume" style="display: none">
                        </div>
                        <div id="selection_type_sql_query" class="w3-half" style="float: none; display: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="SelectionPatternSQLQuery"
                                        DirectiveName="SelectionPattern"
                                        Label="Selection Pattern SQL Query"
@@ -1515,7 +1515,7 @@ var oVolumeList = {
 </script>
                        </div>
                        <div id="selection_type_pool_occupancy" class="w3-half" style="display: none; float: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveSize
+                               <com:Baculum.Web.Portlets.DirectiveSize
                                        ID="MigrationHighBytes"
                                        DirectiveName="MigrationHighBytes"
                                        Label="Migration High Bytes"
@@ -1525,7 +1525,7 @@ var oVolumeList = {
                                        ShowResetButton="false"
                                        ShowRemoveButton="false"
                                        />
-                               <com:Application.Web.Portlets.DirectiveSize
+                               <com:Baculum.Web.Portlets.DirectiveSize
                                        ID="MigrationLowBytes"
                                        DirectiveName="MigrationLowBytes"
                                        Label="Migration Low Bytes"
@@ -1537,7 +1537,7 @@ var oVolumeList = {
                                        />
                        </div>
                        <div id="selection_type_pool_time" class="w3-half" style="display: none; float: none; margin: auto;">
-                               <com:Application.Web.Portlets.DirectiveTimePeriod
+                               <com:Baculum.Web.Portlets.DirectiveTimePeriod
                                        ID="MigrationTime"
                                        DirectiveName="MigrationTime"
                                        Label="Migration Time"
@@ -1677,7 +1677,7 @@ $(function() {
                                        <h2><%[ Destination Pool ]%></h2>
                                        <p><%[ Please select destination pool to which will be stored data. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="NextPool"
                                        DirectiveName="NextPool"
                                        Label="Destination Pool (NextPool)"
@@ -1776,7 +1776,7 @@ function show_storage_warning(storage, pool, jobs) {
                                        <h2><%[ Destination Storage ]%></h2>
                                        <p><%[ Please select a storage using which you want to write migrated data. ]%></p>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="DestinationStorage"
                                        DirectiveName="Storage"
                                        Label="Destination Storage"
@@ -1794,7 +1794,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <div>
                                        <h2><%[ Purge jobs ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveCheckBox
+                               <com:Baculum.Web.Portlets.DirectiveCheckBox
                                        ID="PurgeMigrationJob"
                                        DirectiveName="PurgeMigrationJob"
                                        DefaultValue="0"
@@ -1804,7 +1804,7 @@ function show_storage_warning(storage, pool, jobs) {
                                        ShowRemoveButton="false"
                                        />
                                <h2><%[ Limits ]%></h2>
-                               <com:Application.Web.Portlets.DirectiveTextBox
+                               <com:Baculum.Web.Portlets.DirectiveTextBox
                                        ID="MaximumSpawnedJobs"
                                        DirectiveName="MaximumSpawnedJobs"
                                        DefaultValue="600"
@@ -1814,7 +1814,7 @@ function show_storage_warning(storage, pool, jobs) {
                                        ShowRemoveButton="false"
                                        />
                                <h2><%[ Schedule ]%></h2>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Schedule"
                                        DirectiveName="Schedule"
                                        Label="Schedule"
@@ -1825,7 +1825,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <div>
                                        <h2><%[ Messages ]%></h2>
                                </div>
-                               <com:Application.Web.Portlets.DirectiveComboBox
+                               <com:Baculum.Web.Portlets.DirectiveComboBox
                                        ID="Messages"
                                        DirectiveName="Messages"
                                        Label="Messages"
@@ -1838,7 +1838,7 @@ function show_storage_warning(storage, pool, jobs) {
                                <a href="javascript:void(0)" onclick="$('#migrate_job_wizard_other_options').slideToggle();"><%[ Other options ]%></a>
                                <div id="migrate_job_wizard_other_options" style="float: none; margin: auto; display: none;">
                                        <p><%[ Level, Client and FileSet are not used during migrate jobs running but they are required to define in migrate job resource as the standard Job directives. ]%></p>
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="Level"
                                                DirectiveName="Level"
                                                Label="Level"
@@ -1848,7 +1848,7 @@ function show_storage_warning(storage, pool, jobs) {
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="Client"
                                                DirectiveName="Client"
                                                Label="Client"
@@ -1858,7 +1858,7 @@ function show_storage_warning(storage, pool, jobs) {
                                                ShowResetButton="false"
                                                ShowRemoveButton="false"
                                                />
-                                       <com:Application.Web.Portlets.DirectiveComboBox
+                                       <com:Baculum.Web.Portlets.DirectiveComboBox
                                                ID="FileSet"
                                                DirectiveName="Fileset"
                                                Label="FileSet"
index be106dcb12529b0c7e09d879c127afb787bdbd21..b21cacf18da2880ab5c0f48dfc1a67c4124b09ba 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.WebControls.TWizard');
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\Web\UI\ActiveControls\TCallback;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
+use Prado\Web\UI\WebControls\TWizard;
+use Prado\Web\UI\WebControls\TWizardNavigationEventParameter;
 
 /**
  * New migrate job wizard page.
@@ -104,7 +106,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardPrev($sender, $param) {
        }
@@ -114,7 +115,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardNext($sender, $param) {
        }
@@ -122,7 +122,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load JobDefs (step 1).
         *
-        * @return none
         */
        public function loadJobDefs() {
                $jobdefs_list = [];
@@ -144,7 +143,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Setup and remember selected JobDefs values to use in next wizard steps.
         *
-        * @return none
         */
        public function setupJobDefs() {
                $directive_value = $this->JobDefs->getDirectiveValue();
@@ -187,7 +185,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param string $name pool type directive name
         * @param object $control different type of controls (usually DirectiveComboBox)
-        * @return none
         */
        public function setPools($name, $control) {
                $pool_list = [];
@@ -207,7 +204,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load pool list (step 2).
         *
-        * @return none
         */
        public function loadPools() {
                $this->setPools('Pool', $this->Pool);
@@ -218,7 +214,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadVolumes($sender, $param) {
                $pool = $param->getCallbackParameter();
@@ -261,7 +256,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load source storage list (step 2).
         *
-        * @return none
         */
        public function loadSourceStorages() {
                $this->setStorages($this->SourceStorage);
@@ -272,7 +266,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setSourceStorageByPool($sender, $param) {
                $pool = $this->Pool->getDirectiveValue();
@@ -285,7 +278,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load selection types (step 3).
         *
-        * @return none
         */
        public function loadSelectionTypes() {
                $this->SelectionType->setData($this->sel_types);
@@ -297,7 +289,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadJobList($sender, $param) {
                $result = $this->getModule('api')->get([
@@ -331,7 +322,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadClientList($sender, $param) {
                $result = $this->getModule('api')->get(
@@ -350,7 +340,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load pool list (step 4).
         *
-        * @return none
         */
        public function loadNextPools() {
                $this->setPools('NextPool', $this->NextPool);
@@ -380,7 +369,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load destination storage list (step 4).
         *
-        * @return none
         */
        public function loadDestinationStorages() {
                $this->setStorages($this->DestinationStorage);
@@ -391,7 +379,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setStorageByPool($pool, $cb) {
                $pool = $this->getModule('api')->get([
@@ -414,7 +401,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setDestinationStorageByPool($sender, $param) {
                $nextpool = $this->NextPool->getDirectiveValue();
@@ -429,7 +415,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function getJobsUsingPool($sender, $param) {
                $values = $param->getCallbackParameter();
@@ -460,7 +445,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load messages (step 5).
         *
-        * @return none
         */
        public function loadMessages() {
                $message_list = [];
@@ -486,7 +470,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load schedule (step 5).
         *
-        * @return none
         */
        public function loadSchedules() {
                $schedule_list = [];
@@ -512,7 +495,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load job levels (step 5).
         *
-        * @return none
         */
        public function loadLevels() {
                // so far backup job levels only
@@ -532,7 +514,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load clients (step 5).
         *
-        * @return none
         */
        public function loadClients() {
                $clients = $this->getModule('api')->get([
@@ -559,7 +540,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Load filesets (step 5).
         *
-        * @return none
         */
        public function loadFileSets() {
                $filesets = $this->getModule('api')->get([
@@ -740,7 +720,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
        /**
         * Cancel wizard.
         *
-        * @return none
         */
        public function wizardStop($sender, $param) {
                $this->goToDefaultPage();
@@ -750,7 +729,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         * Set selected JobDefs values.
         *
         * @param $jobdefs selected JobDefs values
-        * @return none
         */
        public function setJobDefs($jobdefs) {
                $this->setViewState(self::JOBDEFS, $jobdefs);
@@ -769,7 +747,6 @@ class NewMigrateJobWizard extends BaculumWebPage {
         * Set previous wizard step.
         *
         * @param integer $step previous step number
-        * @return none
         */
        public function setPrevStep($step) {
                $step = intval($step);
index 40b3e9b2648cc38f220ace07fc3789e0fcdd81bb..4ddab90d19ca5ae8d9c3420168daf79eae35f94b 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
                        </div>
                </div>
                <div id="resource_config" class="w3-container">
-                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                ID="NewResource"
                                SaveDirectiveActionOk="save_directive_action_ok();"
                                ShowRemoveButton="false"
index 54eb8c314ecae990797402e2f9b3d38700f56e09..938e81fbb90686ad056373c9c786a01d93ca6f3e 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * New resource page.
index ab6d0b6627842dff6c6ca84221f47b0bbce1c441..20f97e318cc91b886cef8d0e1d01ee9274a80787 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.BaculumPage');
+use Baculum\Common\Modules\BaculumPage;
 
 /**
  * OAuth2 redirection callback page.
index 7685fe216d6366dde58f1609cf172959b214df57..f7cca96d2deb9e838c37438a00f15d3da0a99500 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index 733fec9fa2435509faf76945e825e650489a3be3..02da15ff4b471e686cd958cc8a98d8f6ae41b86e 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Pool list page.
index 2f89e31045dcf542d597bca44c98b5fbdf04e0d6..5654d7174e0bea35c9462bd8621034a55aae9fca 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -39,7 +39,7 @@
                >
                        <prop:Text><i class="fa fa-wrench"></i>&nbsp; <%=Prado::localize('Update all vols in pool')%></prop:Text>
                </com:TActiveLinkButton>
-               <com:Application.Web.Portlets.AssignVolumesToPool
+               <com:Baculum.Web.Portlets.AssignVolumesToPool
                        PoolId="<%=$this->getPoolId()%>"
                />
                <i id="status_pool_loading" class="fa fa-sync w3-spin" style="display: none; vertical-align: super;"></i>
                        <h3><%[ Warning ]%></h3>
                        <p><%[ The pool has not been renamed but it has been copied with the new name. Please note that if the original pool contained volumes, they have not been moved and they are still assigned to the original pool in the catalog database. To re-assign volumes from the original pool to this one please go to the MAIN MENU &#10148; Pools &#10148; [NEW POOL] &#10148; Tab: Actions and please use the 'Assign volumes' button. After re-assgning volumes you can delete the original pool. ]%></p>
                </div>
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="PoolConfig"
                        ComponentType="dir"
                        ResourceType="Pool"
index 5c1240a02ae548d77ea30cc09da955d006fa7c12..2c739f2468546f10530c00870642eeadfaf9cf5d 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Pool view page.
@@ -86,7 +84,6 @@ class PoolView extends BaculumWebPage {
        /**
         * Set pool poolid.
         *
-        * @return none;
         */
        public function setPoolId($poolid) {
                $poolid = intval($poolid);
@@ -105,7 +102,6 @@ class PoolView extends BaculumWebPage {
        /**
         * Set pool name.
         *
-        * @return none;
         */
        public function setPoolName($pool_name) {
                $this->setViewState(self::POOL_NAME, $pool_name);
index 4325a73a122309b95d9a2732bcd6c93eebfc45f1..b39ccc561128e88b2f3f8be5134b8fba2710dd4e 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Common.Class.GeneralRequirements');
+namespace Baculum\Web\Pages;
+
+use Baculum\Common\Modules\GeneralRequirements;
 
 /**
  * Web part requirements class.
@@ -58,7 +60,6 @@ class Requirements extends GeneralRequirements {
        /**
         * Validate all Web environment depenencies.
         *
-        * @return none
         */
        public function validateEnvironment() {
                parent::validateExtensions($this->req_exts);
index 6cd7217e4aca86b90df071f8aa51f453e553e355..e1a84fc58c922c8904c58486ec9ad916b2d9513c 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:BStyleSheet StyleSheetUrl=<%~ ../../../themes/Baculum-v2/css/restore-wizard.css %> />
        <com:TWizard ID="RestoreWizard"
index bf706713d7509733ec0a3e4a6172b3ccdae32e6f..fec36b36fb0d8920b8fb01f53068bb676bc62df4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage'); 
-Prado::using('System.Exceptions.TException');
-Prado::using('System.Web.UI.WebControls.TWizard');
-Prado::using('System.Web.UI.WebControls.TDataGrid');
-Prado::using('System.Web.UI.JuiControls.TJuiDroppable');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveDataGrid');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\TEventParameter;
+use Prado\Web\UI\ActiveControls\TActiveDropDownList;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
+use Prado\Web\UI\WebControls\TWizard;
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Prado\Web\UI\ActiveControls\TCallback;
+use Prado\Web\UI\WebControls\TWizardNavigationEventParameter;
+use Prado\Xml\TXmlElement;
 
 /**
  * Restore wizard page.
@@ -103,7 +101,6 @@ class RestoreWizard extends BaculumWebPage
         * Initialize restore page.
         *
         * @param TXmlElement $param page config
-        * @return none
         */
        public function onInit($param) {
                parent::onInit($param);
@@ -121,7 +118,6 @@ class RestoreWizard extends BaculumWebPage
         * On pre-render action.
         *
         * @param TXmlElement $param page config
-        * @return none
         */
        public function onPreRender($param) {
                parent::onPreRender($param);
@@ -132,7 +128,6 @@ class RestoreWizard extends BaculumWebPage
         * Set jobid to restore.
         * Used to restore specific job by jobid.
         *
-        * @return none
         */
        public function setJobIdToRestore($jobid) {
                $jobid = intval($jobid);
@@ -146,7 +141,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Set/prepare restore wizard to restore specific jobid.
         *
-        * @return none
         */
        public function setRestoreByJobId($jobid) {
                $job = $this->getModule('api')->get(
@@ -181,7 +175,6 @@ class RestoreWizard extends BaculumWebPage
         * Set navigation buttons.
         * Used for restore specific jobid (hide previous button)
         *
-        * @return none
         */
        public function setNavigationButtons() {
                $prev_btn = $this->RestoreWizard->getStepNavigation()->PreviousStepBtn;
@@ -197,7 +190,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardNext($sender, $param) {
                if ($param->CurrentStepIndex === 0) {
@@ -242,7 +234,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TWizard $sender sender object
         * @param TWizardNavigationEventParameter $param sender parameters
-        * @return none
         */
        public function wizardPrev($sender, $param) {
                if ($param->CurrentStepIndex === 1) {
@@ -260,7 +251,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Cancel wizard.
         *
-        * @return none
         */
        public function wizardStop($sender, $param) {
                $this->resetWizard();
@@ -272,7 +262,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TActiveDropDownList $sender sender object
         * @param TCommandParameter $param parameters object
-        * @return none
         */
        public function loadBackupClients() {
                $client_list = [];
@@ -292,7 +281,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load restore client list.
         *
-        * @return none
         */
        public function loadRestoreClients() {
                $client_list = [];
@@ -313,7 +301,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load backups for selected client (Step 2).
         *
-        * @return none
         */
        public function loadBackupsForClient() {
                $clientid = $this->BackupClient->SelectedValue;
@@ -367,7 +354,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param param object
-        * @return none
         */
        public function loadJobList($sender, $param) {
                $prop = $param->getCallbackParameter();
@@ -418,7 +404,6 @@ class RestoreWizard extends BaculumWebPage
         * Set selected backup client.
         *
         * @param integer $clientid client identifier
-        * @return none
         */
        public function getBackupClient($clientid) {
                $client = null;
@@ -435,7 +420,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load backup jobs to restore for group most recent backups feature.
         *
-        * @return none
         */
        public function loadGroupBackupToRestore() {
                $jobs = $this->getModule('api')->get(['jobs'])->output;
@@ -456,7 +440,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load filesets to restore for group most recent backups feature.
         *
-        * @return none
         */
        public function loadGroupFileSetToRestore() {
                $filesets = $this->getModule('api')->get(['filesets'])->output;
@@ -473,7 +456,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Prepare left file browser content.
         *
-        * @return none
         */
        private function prepareBrowserContent() {
                $jobids = $this->getElementaryBackup();
@@ -632,7 +614,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TActiveLinkButton $sender sender object
         * @param TEventParameter $param events parameter
-        * @return none
         */
        public function loadPath($sender, $param) {
                $path = explode('/', $this->PathField->Text);
@@ -655,7 +636,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param string|array $path path to go
         * @param bool $full_path determines if $path param is full path or relative path (singel directory)
-        * @return none
         */
        private function goToPath($path = '', $full_path = false) {
                if (!empty($path) && !$full_path && $this->Session->contains('restore_path')) {
@@ -682,7 +662,6 @@ class RestoreWizard extends BaculumWebPage
         * Go to specific path in the file browser by pathid.
         *
         * @param string $pathid path to go
-        * @return none
         */
        private function goToPathByPathId($pathid) {
                $this->setRestorePathId($pathid);
@@ -696,7 +675,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param object $sender sender object
         * @param object $param param object
-        * @return none
         */
        public function addFileToRestore($sender, $param) {
                $file_prop = [];
@@ -718,7 +696,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TCallback $sender sender object
         * @param TEventParameter $param param object
-        * @return none
         */
        public function removeSelectedFile($sender, $param) {
                $uniqid = $param->CallbackParameter;
@@ -732,7 +709,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param TCallback $sender sender object
         * @param object $param param object
-        * @return none
         */
        public function getVersions($sender, $param) {
                list($filename, $pathid, $filenameid, $jobid) = explode('|', $param->CallbackParameter, 4);
@@ -763,7 +739,7 @@ class RestoreWizard extends BaculumWebPage
                 * Helper for adding filename to versions list.
                 *
                 * @param array $el version list element
-                * @return return version list element
+                * @return version list element
                 */
                $add_version_filename_func = function ($el) use ($filename) {
                        $el['name'] = $filename;
@@ -786,7 +762,6 @@ class RestoreWizard extends BaculumWebPage
         * Load file browser files to list.
         *
         * @param array $files files to list.
-        * @return none
         */
        public function loadBrowserFiles($sender, $param) {
                $files = $this->Session->contains('files_browser') ? $this->Session['files_browser'] : [];
@@ -796,7 +771,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load file versions area.
         *
-        * @return none;
         */
        public function loadFileVersions($sender, $param) {
                $versions = $this->Session->contains('files_versions') ? $this->Session['files_versions'] : [];
@@ -806,7 +780,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load selected files in drop area.
         *
-        * @return none
         */
        public function loadSelectedFiles($sender, $param) {
                $files = $this->Session->contains('files_restore') ? $this->Session['files_restore'] : [];
@@ -816,7 +789,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Set file browser path field.
         *
-        * @return none
         */
        private function loadBrowserPath() {
                $path = $this->Session->contains('restore_path') ? $this->Session['restore_path'] : [];
@@ -827,7 +799,6 @@ class RestoreWizard extends BaculumWebPage
         * Generate Bvfs cache by job identifiers.
         *
         * @param string $jobids comma separated job identifiers
-        * @return none
         */
        private function generateBvfsCache($jobids) {
                $this->getModule('api')->set(
@@ -840,7 +811,6 @@ class RestoreWizard extends BaculumWebPage
         * Set versions for selected file.
         *
         * @param array $versions file versions data
-        * @return none
         */
        private function setFileVersions($versions = []) {
                $this->Session->add('files_versions', $versions);
@@ -850,7 +820,6 @@ class RestoreWizard extends BaculumWebPage
         * Get file versions for specified uniqid.
         *
         * @param string $uniqid file identifier
-        * @return none
         */
        private function getFileVersions($uniqid) {
                $versions = [];
@@ -869,7 +838,6 @@ class RestoreWizard extends BaculumWebPage
         * Set browser files.
         *
         * @param array $files file list
-        * @return none
         */
        private function setBrowserFiles($files = []) {
                $this->Session->add('files_browser', $files);
@@ -879,7 +847,6 @@ class RestoreWizard extends BaculumWebPage
         * Set restore browser path.
         *
         * @param array $path path
-        * @return none
         */
        private function setRestorePath($path = []) {
                $this->Session->add('restore_path', $path);
@@ -889,7 +856,6 @@ class RestoreWizard extends BaculumWebPage
         * Set restore browser pathid.
         *
         * @param integer $pathid pathid
-        * @return none
         */
        private function setRestorePathId($pathid) {
                $this->Session->add('restore_pathid', $pathid);
@@ -899,7 +865,6 @@ class RestoreWizard extends BaculumWebPage
         * Get browser file by uniqid.
         *
         * @param string $uniqid file identifier
-        * @return none
         */
        private function getBrowserFile($uniqid) {
                $element = [];
@@ -919,7 +884,6 @@ class RestoreWizard extends BaculumWebPage
         *
         * @param string $uniqid file identifier
         * @param array $file file properties to mark
-        * @return none
         */
        private function markFileToRestore($uniqid, $file) {
                if (is_null($uniqid)) {
@@ -935,7 +899,6 @@ class RestoreWizard extends BaculumWebPage
         * Unmark file to restore.
         *
         * @param string $uniqid file identifier
-        * @return none
         */
        private function unmarkFileToRestore($uniqid) {
                if (key_exists($uniqid, $this->Session['files_restore'])) {
@@ -958,7 +921,6 @@ class RestoreWizard extends BaculumWebPage
         * Set files to restore
         *
         * @param array $files files to restore
-        * @return none
         */
        public function setFilesToRestore($files = []) {
                $this->Session->add('files_restore', $files);
@@ -998,7 +960,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Wizard finish method.
         *
-        * @return none
         */
        public function wizardCompleted() {
                $jobids = $this->getElementaryBackup();
@@ -1088,7 +1049,6 @@ class RestoreWizard extends BaculumWebPage
        /**
         * Load restore jobs on the list.
         *
-        * @return none
         */
        private function loadRestoreJobs() {
                $restore_job_tasks = $this->getModule('api')->get(
@@ -1135,7 +1095,6 @@ class RestoreWizard extends BaculumWebPage
         * Reset wizard.
         * All fields are back to initial form.
         *
-        * @return none
         */
        private function resetWizard() {
                $this->setBrowserFiles();
index 986c0ab71797b9cd2dc289641ff12f1cb2671ff3..bde80e5bb0e5897d400cca6cb8725425399af313 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index f2463f884e48b65ad6075dfff0ef244d89d5f7ec..f338b2f685fc07098dde676a2563ee8afffabfca 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Schedule list page.
index fcbdb1f03e3ab034d9c40bf09e9086903f5b8d0d..3f73f6623402ded54a7ae2ea4426eb33778d4bab 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage');
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Schedule status list.
index d98a56c4aa8aa7ed3d3337f4fa91d9885d475864..a3c5e90d0709ba727c6bad3f3a7430d41d580a88 100644 (file)
@@ -1,6 +1,6 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
-       <com:Application.Web.Portlets.StatusSchedule
+       <com:Baculum.Web.Portlets.StatusSchedule
                ShowClientFilter="true"
                ShowScheduleFilter="true"
        />
index c4bfcaf502b8905abc76454d3969c1a0f2a6391f..d0ad9d29482fe3683bca4b476782d457511c4e70 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -11,7 +11,7 @@
                <a class="w3-button w3-bar-item" href="<%=$this->Service->constructUrl('ScheduleList')%>"><i class="fa fa-angle-left"></i></a>
        </div>
        <div class="w3-container">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="ScheduleConfig"
                        ComponentType="dir"
                        ResourceType="Schedule"
index 58c6e998c64d2af471165466713a90308f8032c0..0360898fa29f9e17ea0c908af3289c915af4dd38 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Schedule view page.
@@ -61,7 +61,6 @@ class ScheduleView extends BaculumWebPage {
        /**
         * Set schedule name.
         *
-        * @return none;
         */
        public function setScheduleName($schedule_name) {
                $this->setViewState(self::SCHEDULE_NAME, $schedule_name);
index 68c1ba7f575ed8575c6211321603775b939cd7c3..d45266b5e7bdf308ee4676bbce94647b64d0f141 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -1890,7 +1890,7 @@ $(function() {
 var bulk_actions_output_id = '<%=$this->SourceTemplateControl->BulkActions->BulkActionsOutput->ClientID%>';
 </script>
        <com:TCallback ID="RemoveRolesAction" OnCallback="TemplateControl.removeRoles" />
-       <com:Application.Web.Portlets.BulkActionsModal ID="BulkActions" />
+       <com:Baculum.Web.Portlets.BulkActionsModal ID="BulkActions" />
        <div class="w3-container tab_item" id="console_list" style="display: none">
                <p class="w3-hide-small"><%[ The console ACLs enable to define available resources for users. The consoles are used in the Bacula configuration on the API host side. There is possible to assign the consoles to the API basic users or to the OAuth2 clients. The assign relation for the basic users is: Console ACL -&gt; API basic user -&gt; API host -&gt; User account. For OAuth2 clients the assign relation is: Console ACL -&gt; OAuth2 client -&gt; API host -&gt; User account. ]%></p>
                <div class="w3-panel">
@@ -2182,7 +2182,7 @@ $(function() {
                                >
                                        <i class="fas fa-globe"></i> &nbsp;<%[ Set all CommandAcls used by Baculum Web ]%>
                                </com:TActiveLinkButton>
-                               <com:Application.Web.Portlets.BaculaConfigDirectives
+                               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                        ID="ConsoleConfig"
                                        ComponentType="dir"
                                        ResourceType="Console"
index a15a04ea8f1f60ca01d61b3701691dcf90d88c80..09713d9e7f7af2e30c342129742d71dadf26e4e0 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveCustomValidator');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveHiddenField');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveListBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveRadioButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.WebControls.TCheckBox');
-Prado::using('System.Web.UI.WebControls.TLabel');
-Prado::using('System.Web.UI.WebControls.TListItem');
-Prado::using('System.Web.UI.WebControls.TRadioButton');
-Prado::using('System.Web.UI.WebControls.TRegularExpressionValidator');
-Prado::using('System.Web.UI.WebControls.TRequiredFieldValidator');
-Prado::using('System.Web.UI.WebControls.TValidationSummary');
-Prado::using('Application.Common.Class.Crypto');
-Prado::using('Application.Common.Class.Ldap');
-Prado::using('Application.Common.Class.OAuth2');
-Prado::using('Application.Common.Class.BasicUserConfig');
-Prado::using('Application.Web.Class.BaculumWebPage');
-Prado::using('Application.Web.Portlets.BaculaConfigResources');
+use Baculum\Common\Modules\Logging;
+use Baculum\Web\Modules\HostConfig;
+use Baculum\Web\Modules\OAuth2Record;
+use Baculum\Web\Modules\WebConfig;
+use Baculum\Web\Modules\WebUserRoles;
+use Prado\Web\UI\ActiveControls\TActiveCustomValidator;
+use Prado\Web\UI\ActiveControls\TActiveDropDownList;
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Prado\Web\UI\ActiveControls\TCallback;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
+use Prado\Web\UI\TCommandEventParameter;
+use Prado\Web\UI\WebControls\TServerValidateEventParameter;
+use Baculum\Common\Modules\Ldap;
+use Baculum\Web\Modules\BaculumWebPage;
+use Baculum\Web\Portlets\BaculaConfigResources;
 
 /**
  * Security page (auth methods, users, roles...).
@@ -89,7 +81,6 @@ class Security extends BaculumWebPage {
         * Initialize page.
         *
         * @param mixed $param oninit event parameter
-        * @return none
         */
        public function onInit($param) {
                parent::onInit($param);
@@ -106,7 +97,6 @@ class Security extends BaculumWebPage {
        /**
         * Initialize form with default access settings.
         *
-        * @return none
         */
        public function initDefAccessForm() {
                $this->setRoles(
@@ -138,7 +128,6 @@ class Security extends BaculumWebPage {
        /**
         * Initialize form with authentication method settings.
         *
-        * @return none
         */
        public function initAuthForm() {
                if (isset($this->web_config['security']['auth_method'])) {
@@ -185,7 +174,6 @@ class Security extends BaculumWebPage {
        /**
         * Initialize values in user modal window.
         *
-        * @return none
         */
        public function initUserWindow() {
                // set API hosts
@@ -200,7 +188,6 @@ class Security extends BaculumWebPage {
         *
         * @param object $control control which contains role list
         * @param mixed $def_val default value or null if no default value to set
-        * @return none
         */
        private function setRoles($control, $def_val = null) {
                // set roles
@@ -222,7 +209,6 @@ class Security extends BaculumWebPage {
         * @param object $control control which contains API host list
         * @param mixed $def_val default value or null if no default value to set
         * @param boolean determines if add first blank item
-        * @return none
         */
        private function setAPIHosts($control, $def_val = null, $add_blank_item = true) {
                $api_hosts = array_keys($this->getModule('host_config')->getConfig());
@@ -241,7 +227,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setUserList($sender, $param) {
                $config = $this->getModule('user_config')->getConfig();
@@ -256,7 +241,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadUserWindow($sender, $param) {
                //$this->getModule('user_config')->importBasicUsers();
@@ -308,7 +292,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function saveUser($sender, $param) {
                if (!$this->UserIps->IsValid) {
@@ -397,7 +380,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeUsers($sender, $param) {
                $usernames = explode('|', $param->getCallbackParameter());
@@ -428,7 +410,6 @@ class Security extends BaculumWebPage {
        /**
         * Initialize values in role modal window.
         *
-        * @return none
         */
        public function initRoleWindow() {
                // set role resources
@@ -442,7 +423,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setRoleList($sender, $param) {
                $config = $this->getModule('user_role')->getRoles();
@@ -457,7 +437,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadRoleWindow($sender, $param) {
                $role = $param->getCallbackParameter();
@@ -497,7 +476,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function saveRole($sender, $param) {
                $role_win_type = $this->RoleWindowType->Value;
@@ -545,7 +523,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeRoles($sender, $param) {
                $roles = explode('|', $param->getCallbackParameter());
@@ -571,7 +548,6 @@ class Security extends BaculumWebPage {
         * It adds user count to information about roles.
         *
         * @param array $role_config role config (note, passing by reference)
-        * @return none
         */
        private function addUserStatsToRoles(&$role_config) {
                $config = [];
@@ -598,7 +574,6 @@ class Security extends BaculumWebPage {
        /**
         * Set basic authentication user file.
         *
-        * @return none
         */
        private function setBasicAuthConfig() {
                $is_basic = $this->getModule('web_config')->isAuthMethodBasic();
@@ -612,7 +587,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender
         * @param TCommandEventParameter $param event parameter object
-        * @return none
         */
        public function getBasicUsers($sender, $param) {
                if ($param instanceof Prado\Web\UI\TCommandEventParameter && $param->getCommandParameter() === 'load') {
@@ -707,7 +681,6 @@ class Security extends BaculumWebPage {
         * Note, extra parameters are not set in config.
         *
         * @param array $params basic auth parameters (passing by reference)
-        * @return none
         */
        private function addBasicExtraParams(&$params) {
                if ($this->GetUsersImportOptions->SelectedValue == self::IMPORT_OPT_CRITERIA) {
@@ -767,7 +740,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCallbackEventParameter $param event parameter object
-        * @return none
         */
        public function doBasicUserFileTest($sender, $param) {
                $user_file = $this->BasicAuthUserFile->Text;
@@ -798,7 +770,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender
         * @param TCommandEventParameter $param event parameter object
-        * @return none
         */
        public function getLdapUsers($sender, $param) {
                if ($param instanceof Prado\Web\UI\TCommandEventParameter && $param->getCommandParameter() === 'load') {
@@ -965,7 +936,6 @@ class Security extends BaculumWebPage {
         * Note, extra parameters are not set in config.
         *
         * @param array $params LDAP auth parameters (passing by reference)
-        * @return none
         */
        private function addLdapExtraParams(&$params) {
                $params['attrs'] = [$params['user_attr']]; // user attribute is obligatory
@@ -1050,7 +1020,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCallbackEventParameter $param event object parameter
-        * @return none
         */
        public function testLdapConnection($sender, $param) {
                $ldap = $this->getModule('ldap');
@@ -1074,7 +1043,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCallbackEventParameter $param event object parameter
-        * @return none
         */
        public function importUsers($sender, $param) {
                if (!$this->GetUsersDefaultIps->IsValid) {
@@ -1152,7 +1120,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCallbackEventParameter $param event object parameter
-        * @return none
         */
        public function getUsers($sender, $param) {
                if ($this->BasicAuth->Checked) {
@@ -1167,7 +1134,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCallbackEventParameter $param event object parameter
-        * @return none
         */
        public function saveSecurityConfig($sender, $param) {
                $config = $this->web_config;
@@ -1219,7 +1185,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setConsoleList($sender, $param) {
                $config = $this->getModule('api')->get(['config', 'dir', 'Console']);
@@ -1265,7 +1230,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadConsoleWindow($sender, $param) {
                $name = $param->getCallbackParameter();
@@ -1291,7 +1255,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeConsoles($sender, $param) {
                $consoles = explode('|', $param->getCallbackParameter());
@@ -1356,7 +1319,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setAPIBasicUserList($sender, $param) {
                $basic_users = $this->getModule('api')->get(['basic', 'users']);
@@ -1380,7 +1342,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadAPIBasicUserWindow($sender, $param) {
                $username = $param->getCallbackParameter();
@@ -1424,7 +1385,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function saveAPIBasicUser($sender, $param) {
                $username = $this->APIBasicUserUsername->Text;
@@ -1461,7 +1421,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeAPIBasicUsers($sender, $param) {
                $usernames = explode('|', $param->getCallbackParameter());
@@ -1483,7 +1442,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveDropDownList $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function loadAPIBasicUserSettings($sender, $param) {
                $username = $this->APIHostBasicUserSettings->SelectedValue;
@@ -1501,7 +1459,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setOAuth2ClientList($sender, $param) {
                $oauth2_clients = $this->getModule('api')->get(['oauth2', 'clients']);
@@ -1528,7 +1485,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadOAuth2ClientWindow($sender, $param) {
                $client_id = $param->getCallbackParameter();
@@ -1564,7 +1520,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function saveOAuth2Client($sender, $param) {
                $client_id = $this->OAuth2ClientClientId->Text;
@@ -1604,7 +1559,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeOAuth2Clients($sender, $param) {
                $client_ids = explode('|', $param->getCallbackParameter());
@@ -1626,7 +1580,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveDropDownList $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function loadOAuth2ClientSettings($sender, $param) {
                $client_id = $this->APIHostOAuth2ClientSettings->SelectedValue;
@@ -1645,7 +1598,6 @@ class Security extends BaculumWebPage {
        /**
         * Load OAuth2 client list to get OAuth2 client settings.
         *
-        * @return none
         */
        private function loadOAuth2ClientList() {
                $host = $this->APIHostSettings->SelectedValue ?: null;
@@ -1666,7 +1618,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function setAPIHostList($sender, $param) {
                $api_hosts = $this->getModule('host_config')->getConfig();
@@ -1686,7 +1637,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function loadAPIHostWindow($sender, $param) {
                $name = $param->getCallbackParameter();
@@ -1731,7 +1681,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveDropDownList $sender sender object
         * @param TCallbackEventParameter callback parameter
-        * @return none
         */
        public function loadAPIHostSettings($sender, $param) {
                $api_host = $this->APIHostSettings->SelectedValue;
@@ -1885,7 +1834,6 @@ class Security extends BaculumWebPage {
         *
         * @param TCallback $sender sender object
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function removeAPIHosts($sender, $param) {
                $names = explode('|', $param->getCallbackParameter());
@@ -1907,7 +1855,6 @@ class Security extends BaculumWebPage {
         *
         * @param TActiveCustomValidator $sender sender object
         * @param TServerValidateEventParameter $param event object parameter
-        * @return none
         */
        public function validateIps($sender, $param) {
                $valid = true;
index 8acfcf95aa9a836502125834d8fe744bca30eb72..224ff0f70e2d0461a7c775412e7724913cdd045b 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Simple" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Simple" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <div style="width: 100%; height: 100%;">
                <com:TPanel ID="SelectAPIHostForm" CssClass="w3-display-middle w3-center" Style="width: 100%; max-width: 440px">
index e1fbeff303f7396069065fdaf2adffafc5b7ae60..65c4141ca135b41708785eac14855215aa4325de 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage');
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Select API host page.
index d71abc3b70ffa0da2ba318ea0a508852e35cc51d..11aede6d6ec8812e2af3046c2b67189638ce6070 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index 67bae0fb9e70875a3be04d3949f65f9a0d9f29e8..5f0876d3e7e92a8847587a8973be1beb3b60fa2a 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage')
+use Baculum\Web\Modules\BaculumWebPage
 
 /**
  * Storage list page.
index c720024f874ee034dc7a2508dc6144ebd5b67a10..711e785e85b873203705c95173c8269c1c0c65ba 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -87,7 +87,7 @@
                >
                        <prop:Text><i class="fa fa-caret-up"></i> &nbsp;<%=Prado::localize('Umount')%></prop:Text>
                </com:TActiveLinkButton>
-               <com:Application.Web.Portlets.ComponentActionsMenu
+               <com:Baculum.Web.Portlets.ComponentActionsMenu
                        ID="CompActions"
                        BigButtons="true"
                />
@@ -1640,7 +1640,7 @@ MonitorParams = {
                </div>
        </div>
        <div class="w3-container tab_item" id="configure_storage" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="DIRStorageConfig"
                        ComponentType="dir"
                        ResourceType="Storage"
@@ -1693,7 +1693,7 @@ function load_sd_res_config(resource) {
                                CssClass="w3-text-red"
                                Display="None"
                        />
-                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                ID="SDStorageDaemonConfig"
                                ComponentType="sd"
                                ResourceType="Storage"
@@ -1701,7 +1701,7 @@ function load_sd_res_config(resource) {
                        />
                </div>
                <div id="sd_resources_config_form" class="subtab_item" style="display: none">
-                       <com:Application.Web.Portlets.BaculaConfigResourceList
+                       <com:Baculum.Web.Portlets.BaculaConfigResourceList
                                ID="StorageDaemonResourcesConfig"
                                ComponentType="sd"
                                ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
@@ -1709,7 +1709,7 @@ function load_sd_res_config(resource) {
                </div>
        </div>
        <div class="w3-container tab_item" id="configure_autochanger" style="display: none">
-               <com:Application.Web.Portlets.BaculaConfigDirectives
+               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                        ID="AutochangerConfig"
                        ComponentType="sd"
                        ResourceType="Autochanger"
@@ -1920,7 +1920,7 @@ var oDrives = {
                <com:TCallback ID="MovingFromImportExportSlot" OnCallback="movingFromIE" />
                <com:TCallback ID="ReleaseImportExportSlot" OnCallback="releaseIE" />
                <com:TCallback ID="ReleasingImportExportSlot" OnCallback="releasingIE" />
-               <com:Application.Web.Portlets.LabelVolume
+               <com:Baculum.Web.Portlets.LabelVolume
                        ID="LabelBarcodes"
                        ShowButton="false"
                        BarcodeLabel="true"
@@ -1930,7 +1930,7 @@ var oDrives = {
                        OnLabelSuccess="hideChangerLoading"
                        OnLabelFail="hideChangerLoading"
                />
-               <com:Application.Web.Portlets.UpdateSlots
+               <com:Baculum.Web.Portlets.UpdateSlots
                        ID="UpdateSlots"
                        ShowButton="false"
                        Storage="<%=$this->StorageName%>"
@@ -2631,5 +2631,5 @@ var oSlots = {
                        </div>
                </div>
        </div>
-       <com:Application.Web.Portlets.BulkActionsModal ID="BulkActions" />
+       <com:Baculum.Web.Portlets.BulkActionsModal ID="BulkActions" />
 </com:TContent>
index 05eb71e74ac7b9a29730f112479bf1c5b90dde2b..be89c40f5a878c406a02d523fdb9c0f81acac0b9 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Common.Class.Errors');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Common\Modules\Errors\DeviceError;
+use Baculum\Common\Modules\Params;
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Storage view page.
@@ -301,6 +296,7 @@ class StorageView extends BaculumWebPage {
 
        private function logActionError($result) {
                $emsg = sprintf('Error %s: %s', $result->error, $result->output);
+               $messages_log = $this->getModule('messages_log');
                $messages_log->append($result->output);
                $this->getCallbackClient()->callClientFunction(
                        'oStorageActions.log',
@@ -1017,7 +1013,6 @@ class StorageView extends BaculumWebPage {
        /**
         * Set storage storageid.
         *
-        * @return none;
         */
        public function setStorageId($storageid) {
                $storageid = intval($storageid);
@@ -1036,7 +1031,6 @@ class StorageView extends BaculumWebPage {
        /**
         * Set storage name.
         *
-        * @return none;
         */
        public function setStorageName($storage_name) {
                $this->setViewState(self::STORAGE_NAME, $storage_name);
@@ -1054,7 +1048,6 @@ class StorageView extends BaculumWebPage {
        /**
         * Set device name.
         *
-        * @return none;
         */
        public function setDeviceName($device_name) {
                $this->setViewState(self::DEVICE_NAME, $device_name);
@@ -1081,7 +1074,6 @@ class StorageView extends BaculumWebPage {
        /**
         * Set autochanger value for storage
         *
-        * @return none;
         */
        public function setIsAutochanger($is_autochanger) {
                settype($is_autochanger, 'bool');
@@ -1091,7 +1083,6 @@ class StorageView extends BaculumWebPage {
        /**
         * Set storage address.
         *
-        * @return none;
         */
        public function setStorageAddress($address) {
                $this->setViewState(self::STORAGE_ADDRESS, $address);
index bbe0aa754259c3f301ad03fe584c1c8bb3fa6974..327761f739dc2e2f38992b9d9afa009b7cc73566 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
@@ -8,8 +8,8 @@
        </header>
        <div class="w3-container tab_item">
                <div class="w3-section">
-                       <com:Application.Web.Portlets.LabelVolume />
-                       <com:Application.Web.Portlets.UpdateSlots />
+                       <com:Baculum.Web.Portlets.LabelVolume />
+                       <com:Baculum.Web.Portlets.UpdateSlots />
                </div>
                <table id="volume_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom selectable" style="width: 100%">
                        <thead>
@@ -573,7 +573,7 @@ var bulk_actions_output_id = '<%=$this->SourceTemplateControl->BulkActions->Bulk
                oVolumeList.reset_filters();
        </prop:ClientSide.OnComplete>
 </com:TCallback>
-<com:Application.Web.Portlets.BulkActionsModal
+<com:Baculum.Web.Portlets.BulkActionsModal
        ID="BulkActions"
        RefreshPageBtn="false"
        />
index 3a1df651f681bb021f1e2341d620d14045473391..09a3ae80293b9937b55e08515609907dc9999e37 100644 (file)
@@ -20,7 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
+use Prado\Web\UI\ActiveControls\TCallback;
 
 /**
  * Volume list page.
@@ -58,7 +59,6 @@ class VolumeList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function pruneVolumes($sender, $param) {
                $result = [];
@@ -83,7 +83,6 @@ class VolumeList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function purgeVolumes($sender, $param) {
                $result = [];
@@ -108,7 +107,6 @@ class VolumeList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function deleteVolumes($sender, $param) {
                $result = [];
@@ -133,7 +131,6 @@ class VolumeList extends BaculumWebPage {
         *
         * @param TCallback $sender callback object
         * @param TCallbackEventPrameter $param event parameter
-        * @return none
         */
        public function updateVolumes($sender, $param) {
                $volumes = $this->getVolumes();
index 68f8bae6cf1adc742bec6baaf9355a42794b1a88..6bf9e3b4e25560d38753e54ed9e19b1665cc2031 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Main" Theme="Baculum-v2"%>
 <com:TContent ID="Main">
        <!-- Header -->
        <header class="w3-container">
index a6c87d50ef9f5417717b70b0892191b876d7df8b..1aef3f115817bf7ed8dabb3a24b448c55f0cdd0f 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Web.Class.BaculumWebPage'); 
+use Baculum\Web\Modules\BaculumWebPage;
 
 /**
  * Volume view page.
@@ -74,7 +69,6 @@ class VolumeView extends BaculumWebPage {
        /**
         * Set volume mediaid.
         *
-        * @return none;
         */
        public function setMediaId($mediaid) {
                $mediaid = intval($mediaid);
@@ -93,7 +87,6 @@ class VolumeView extends BaculumWebPage {
        /**
         * Set volume name.
         *
-        * @return none;
         */
        public function setVolumeName($volume_name) {
                $this->setViewState(self::VOLUME_NAME, $volume_name);
index 2bf114800ceb7fef01ed871ecdaaac68a4e27947..3d0a43b9c578abf0bfdcd6119d3f1cbc86dd8d2c 100644 (file)
@@ -1,4 +1,4 @@
-<%@ MasterClass="Application.Web.Layouts.Wizard" Theme="Baculum-v2"%>
+<%@ MasterClass="Baculum\Web\Layouts\Wizard" Theme="Baculum-v2"%>
 <com:TContent ID="Wizard">
        <com:TWizard ID="InstallWizard"
                CssClass="wizard"
                <com:TWizardStep ID="Step2" Title="<%[ Step 2 - add API instances ]%>" StepType="Auto">
                        <div class="w3-half" style="float: none; margin: auto">
                                <p><%[ Baculum web interface requires to add at least one Baculum API instance with shared Catalog access. Please add API instance. ]%></p>
-                               <com:Application.Common.Portlets.NewHost
+                               <com:Baculum.Common.Portlets.NewHost
                                        ID="AddNewHost"
                                        ForceHostName="Main"
                                        ShowButtons="false"
index 278130649f1e32a492da5a0df60b84c14d2d9170..e4a9177eb842e8455f05736204d00524e71757f4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Class.BaculumWebPage'); 
-Prado::using('Application.Web.Class.HostConfig');
-Prado::using('Application.Web.Class.BasicWebUserConfig'); 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
+use Baculum\Common\Modules\Logging;
+use Baculum\Web\Modules\BaculumWebPage;
+use Baculum\Web\Modules\HostConfig;
+use Baculum\Web\Modules\WebUserRoles;
 
 /**
  * Web config wizard page.
index 1c4d6b681876939eb5d334259ffbf4cb592272cf..804728fcbef8596a4388e46c32d192cad05e05ad 100644 (file)
@@ -4,30 +4,30 @@
        </paths>
        <modules>
                <!-- config modules -->
-               <module id="web_config" class="Application.Web.Class.WebConfig" />
-               <module id="host_config" class="Application.Web.Class.HostConfig" />
-               <module id="user_config" class="Application.Web.Class.WebUserConfig" />
-               <module id="role_config" class="Application.Web.Class.WebRoleConfig" />
+               <module id="web_config" class="Baculum\Web\Modules\WebConfig" />
+               <module id="host_config" class="Baculum\Web\Modules\HostConfig" />
+               <module id="user_config" class="Baculum\Web\Modules\WebUserConfig" />
+               <module id="role_config" class="Baculum\Web\Modules\WebRoleConfig" />
                <!-- data modules -->
-               <module id="api" class="Application.Web.Class.BaculumAPIClient" />
-               <module id="data_desc" class="Application.Web.Class.DataDescription" />
-               <module id="data_deps" class="Application.Web.Class.DataDependencies" />
-               <module id="doc_dir" class="Application.Web.Class.DirectiveDoc" />
+               <module id="api" class="Baculum\Web\Modules\BaculumAPIClient" />
+               <module id="data_desc" class="Baculum\Web\Modules\DataDescription" />
+               <module id="data_deps" class="Baculum\Web\Modules\DataDependencies" />
+               <module id="doc_dir" class="Baculum\Web\Modules\DirectiveDoc" />
                <module id="globalization" class="TGlobalization">
-                       <translation type="gettext" source="Application.Web.Lang" marker="@@" autosave="false" cache="false" DefaultCulture="en" />
+                       <translation type="gettext" source="Baculum\Web\Lang" marker="@@" autosave="false" cache="false" DefaultCulture="en" />
                </module>
-               <module id="log" class="System.Util.TLogRouter">
-                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Application.Web.Logs" LogFile="baculum-web.log" MaxFileSize="1000" MaxLogFiles="5" />
+               <module id="log" class="System\Util\TLogRouter">
+                       <route class="TFileLogRoute"  Categories="Execute, External, Application, General, Security" LogPath="Baculum\Web\Logs" LogFile="baculum-web.log" MaxFileSize="1000" MaxLogFiles="5" />
                </module>
-               <module id="log_parser" class="Application.Web.Class.LogParser" />
+               <module id="log_parser" class="Baculum\Web\Modules\LogParser" />
                <!-- auth modules -->
-               <module id="basic_webuser" class="Application.Web.Class.BasicWebUserConfig" />
-               <module id="page_category" class="Application.Web.Class.PageCategory" />
-               <module id="user_role" class="Application.Web.Class.WebUserRoles" />
-               <module id="auth" class="System.Security.TAuthManager" UserManager="users" LoginPage="LoginPage" />
-               <module id="users" class="Application.Web.Class.WebUserManager" UserClass="Application.Web.Class.WebUser" />
+               <module id="basic_webuser" class="Baculum\Web\Modules\BasicWebUserConfig" />
+               <module id="page_category" class="Baculum\Web\Modules\PageCategory" />
+               <module id="user_role" class="Baculum\Web\Modules\WebUserRoles" />
+               <module id="auth" class="Prado\Security\TAuthManager" UserManager="users" LoginPage="LoginPage" />
+               <module id="users" class="Baculum\Web\Modules\WebUserManager" UserClass="Baculum\Web\Modules\WebUser" />
                <!-- data modules -->
-               <module id="job_info" class="Application.Web.Class.JobInfo" />
-               <module id="messages_log" class="Application.Web.Class.MessagesLog" />
+               <module id="job_info" class="Baculum\Web\Modules\JobInfo" />
+               <module id="messages_log" class="Baculum\Web\Modules\MessagesLog" />
        </modules>
 </configuration>
index 56d24fa3a9dca9b3f6b62b495276e407d76b1f70..642d542352780eb4b7555f9aea0d7504657f7451 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
+
+use Prado\Prado;
 
 /**
  * Assign volumes to pool control.
@@ -36,7 +38,6 @@ class AssignVolumesToPool extends Portlets {
        /**
         * Set pool identifier.
         *
-        * @return none;
         */
        public function setPoolId($pool) {
                settype($pool, 'integer');
index 22f3f9cc141c03c42621551cfa723f996dafb8b5..ba9af431ce56a6c04cdeab8a120e0b3a277fb407 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.WebControls.TConditional');
+use Prado\IDataRenderer;
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
+use Prado\Web\UI\TTemplateControl;
 
 /**
  * Baculum conditional control.
index 05ba7a9a28ab2ba708f2ca5586436f99d715e733..5f78ced147897297bde00fc2e519ae1eac2c2958 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Portlets.ComponentListTemplate');
-Prado::using('Application.Web.Portlets.NewResourceMenu');
-Prado::using('Application.Web.Class.Miscellaneous');
+namespace Baculum\Web\Portlets;
 
 /**
  * Bacula config components control.
index 18ea121f6b0a0b730acd244ab75d92ad202a3687..81750b1b75e3875944458ed6c04f9bf5dc646325 100644 (file)
                                                        <i class="fa fa-sync w3-spin" style="display: none"><i/>
                                                </td>
                                                <td class="right" style="width: 20%">
-                                                       <com:Application.Web.Portlets.ComponentActionsMenu ID="CompActions" Visible="<%=$this->CompActions->getComponentType() !== 'bcons'%>" />
+                                                       <com:Baculum.Web.Portlets.ComponentActionsMenu ID="CompActions" Visible="<%=$this->CompActions->getComponentType() !== 'bcons'%>" />
                                                        <a class="w3-button w3-green w3-right button_fixed" href="javascript:void(0)" onmousedown="openElementOnCursor(event, '<%=$this->ResourcesMenu->ClientID%>_new_resource', -80, 20);"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></a>
-                                                       <com:Application.Web.Portlets.NewResourceMenu ID="ResourcesMenu"/>
+                                                       <com:Baculum.Web.Portlets.NewResourceMenu ID="ResourcesMenu"/>
                                                </td>
                                        </tr>
                                </table>
-                               <com:Application.Web.Portlets.BaculaConfigResources />
+                               <com:Baculum.Web.Portlets.BaculaConfigResources />
                        </com:TPanel>
                </prop:ItemTemplate>
        </com:TActiveRepeater>
@@ -34,7 +34,7 @@
        <!-- New resource -->
        <h2 rel="<%[ Add new %resource_type resource on %component_name (%component_type) ]%>"></h2>
        <hr />
-       <com:Application.Web.Portlets.BaculaConfigDirectives
+       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                ID="NewResource"
                LoadValues="<%=false%>"
                SaveDirectiveActionOk="$('#<%=$this->ResourceCreatedOk->ClientID%>').show();"
index ddc802958de37a1149451574101fe813caf6b06e..2f1c1b542c2444d11ae46d2996ad3a163f141074 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.TCommandEventParameter');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveComboBox');
-Prado::using('Application.Web.Portlets.DirectiveInteger');
-Prado::using('Application.Web.Portlets.DirectiveListBox');
-Prado::using('Application.Web.Portlets.DirectivePassword');
-Prado::using('Application.Web.Portlets.DirectiveSize');
-Prado::using('Application.Web.Portlets.DirectiveSpeed');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveMultiComboBox');
-Prado::using('Application.Web.Portlets.DirectiveMultiTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTimePeriod');
-Prado::using('Application.Web.Portlets.DirectiveRunscript');
-Prado::using('Application.Web.Portlets.DirectiveMessages');
+use Baculum\Common\Modules\Logging;
+use Prado\TPropertyValue;
+use Prado\Web\UI\TCommandEventParameter;
+use Baculum\Web\Portlets\DirectiveListTemplate;
 
 /**
  * Bacula config directives control.
@@ -61,24 +46,24 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        public $resource_names = array();
 
        private $directive_types = array(
-               'DirectiveCheckBox',
-               'DirectiveComboBox',
-               'DirectiveInteger',
-               'DirectiveListBox',
-               'DirectivePassword',
-               'DirectiveTextBox',
-               'DirectiveSize',
-               'DirectiveSpeed',
-               'DirectiveTimePeriod'
+               'Baculum\Web\Portlets\DirectiveCheckBox',
+               'Baculum\Web\Portlets\DirectiveComboBox',
+               'Baculum\Web\Portlets\DirectiveInteger',
+               'Baculum\Web\Portlets\DirectiveListBox',
+               'Baculum\Web\Portlets\DirectivePassword',
+               'Baculum\Web\Portlets\DirectiveTextBox',
+               'Baculum\Web\Portlets\DirectiveSize',
+               'Baculum\Web\Portlets\DirectiveSpeed',
+               'Baculum\Web\Portlets\DirectiveTimePeriod'
        );
 
        private $directive_list_types = array(
-               'DirectiveFileSet',
-               'DirectiveSchedule',
-               'DirectiveMessages',
-               'DirectiveRunscript',
-               'DirectiveMultiComboBox',
-               'DirectiveMultiTextBox'
+               'Baculum\Web\Portlets\DirectiveFileSet',
+               'Baculum\Web\Portlets\DirectiveSchedule',
+               'Baculum\Web\Portlets\DirectiveMessages',
+               'Baculum\Web\Portlets\DirectiveRunscript',
+               'Baculum\Web\Portlets\DirectiveMultiComboBox',
+               'Baculum\Web\Portlets\DirectiveMultiTextBox'
        );
 
        private $field_multple_values = array(
@@ -307,9 +292,9 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
                                        // skip not changed values that don't exist in config
                                        continue;
                                }
-                               if ($this->directive_types[$i] === 'DirectiveCheckBox') {
+                               if ($this->directive_types[$i] === 'Baculum\Web\Portlets\DirectiveCheckBox') {
                                        settype($default_value, 'bool');
-                               } elseif ($this->directive_types[$i] === 'DirectiveInteger') {
+                               } elseif ($this->directive_types[$i] === 'Baculum\Web\Portlets\DirectiveInteger') {
                                        settype($directive_value, 'int');
                                }
                                if ($directive_value === $default_value && $in_config === false) {
@@ -338,21 +323,21 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
                                        $directives[$directive_name] = array();
                                }
                                if (is_array($directive_value)) {
-                                       if ($this->directive_list_types[$i] === 'DirectiveMessages') {
+                                       if ($this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveMessages') {
                                                $directives = array_merge($directives, $directive_value);
-                                       } elseif ($this->directive_list_types[$i] === 'DirectiveRunscript') {
+                                       } elseif ($this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveRunscript') {
                                                if (!isset($directives[$directive_name])) {
                                                        $directives[$directive_name] = array();
                                                }
                                                $directives[$directive_name] = array_merge($directives[$directive_name], $directive_value[$directive_name]);
-                                       } elseif ($this->directive_list_types[$i] === 'DirectiveFileSet') {
+                                       } elseif ($this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveFileSet') {
                                                if (key_exists('Exclude', $directive_value) && count($directive_value['Exclude']) > 0) {
                                                        $directives['Exclude'] = array($directive_value['Exclude']);
                                                }
                                                $directives[$directive_name] = $directive_value[$directive_name];
-                                       } elseif ($this->directive_list_types[$i] === 'DirectiveSchedule') {
+                                       } elseif ($this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveSchedule') {
                                                $directives[$directive_name] = $directive_value[$directive_name];
-                                       } elseif ($this->directive_list_types[$i] === 'DirectiveMultiTextBox' || $this->directive_list_types[$i] === 'DirectiveMultiComboBox') {
+                                       } elseif ($this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveMultiTextBox' || $this->directive_list_types[$i] === 'Baculum\Web\Portlets\DirectiveMultiComboBox') {
                                                if (key_exists($directive_name, $directives)) {
                                                        $directive_value = array_merge($directives[$directive_name], $directive_value);
                                                }
@@ -441,7 +426,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         *
         * @return object $sender sender instance
         * @return mixed $param additional parameters
-        * @return none
         */
        public function removeResource($sender, $param) {
                if (!$this->getPage()->IsCallback) {
@@ -499,7 +483,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         *
         * @param string $resource_type removed resource type
         * @param string $resource_name removed resource name
-        * @return none
         */
        private function showRemovedResourceInfo($resource_type, $resource_name) {
                $msg = Prado::localize('Resource %s "%s" removed successfully.');
@@ -517,7 +500,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         * Show removed resource error message.
         *
         * @param string $error_message error message
-        * @return none
         */
        private function showRemovedResourceError($error_message) {
                $this->RemoveResourceError->Text = $error_message;
@@ -531,7 +513,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         * @param array $deps list dependencies for the removing resource
         * @param string $resource_type resource type of the removing resource
         * @param string $resource_name resource name of the removing resource
-        * @return none
         */
        private function showDependenciesError($deps, $resource_type, $resource_name) {
                $emsg = Prado::localize('Resource %s "%s" is used in the following resources:');
@@ -561,7 +542,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         * @param array $config entire config
         * @param string $resource_type resource type to remove
         * @param string $resource_name resource name to remove
-        * @return none
         */
        private function removeResourceFromConfig(&$config, $resource_type, $resource_name) {
                for ($i = 0; $i < count($config); $i++) {
@@ -647,7 +627,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
         * @param string $resource_type resource type to rename
         * @param string $resource_name resource name to rename
         * @param string $resource_name_new new resource name to set
-        * @return none
         */
        private function renameResourceInConfig(&$config, $deps, $resource_type, $resource_name, $resource_name_new) {
                for ($i = 0; $i < count($config); $i++) {
@@ -669,7 +648,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * Set if remove button should be available.
         *
-        * @return none;
         */
        public function setShowRemoveButton($show) {
                $show = TPropertyValue::ensureBoolean($show);
@@ -688,7 +666,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * Set if cancel button should be available.
         *
-        * @return none;
         */
        public function setShowCancelButton($show) {
                $show = TPropertyValue::ensureBoolean($show);
@@ -707,7 +684,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * Set if buttons should be flexible and available at the bottom of the page.
         *
-        * @return none
         */
        public function setShowBottomButtons($show) {
                $show = TPropertyValue::ensureBoolean($show);
@@ -726,7 +702,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * On save event fired when resource is saved.
         *
-        * @return none
         */
        public function onSave($param) {
                $this->raiseEvent('OnSave', $this, $param);
@@ -735,7 +710,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * On rename event fired when resource is renamed.
         *
-        * @return none
         */
        public function onRename($param) {
                $this->raiseEvent('OnRename', $this, $param);
@@ -745,7 +719,6 @@ class BaculaConfigDirectives extends DirectiveListTemplate {
        /**
         * Set if name field should be disabled.
         *
-        * @return none;
         */
        public function setDisableRename($rename) {
                $rename = TPropertyValue::ensureBoolean($rename);
index 0675d7425db71155d98325adae1e8848d072472b..829b8142c4880917ddbe0aba58ebfd3f41d4c592 100644 (file)
 <com:TActivePanel ID="ConfigDirectives" Style="margin-bottom: 48px">
        <com:TActiveRepeater
                ID="RepeaterDirectives"
-               ItemRenderer="Application.Web.Portlets.DirectiveRenderer"
+               ItemRenderer="Baculum.Web.Portlets.DirectiveRenderer"
                >
        </com:TActiveRepeater>
        <div class="w3-row w3-center<%=$this->ShowBottomButtons ? ' w3-border bottom_buttons' : ''%> page_main_el"<%=$this->ShowBottomButtons ? ' style="margin-left: 250px"' : ''%>>
-               <com:Application.Web.Portlets.DirectiveSetting
+               <com:Baculum.Web.Portlets.DirectiveSetting
                        ID="DirectiveSetting"
                        Resource="<%=$this->getResource()%>"
                        OnLoadDirectives="loadDirectives"
index 2f5be191e13fef2ee3295611a58fb445a8d729a9..41e089a57847b52041ad81840a2ebfb4c623f158 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Portlets.BaculaConfigResources');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
 
 /**
  * Bacula config resource list control.
index 6d03245d7bbbb3d6032885646dd933625e48c65d..59ccbaefe817aa132ef6d0038b4eb1fbfedd53bd 100644 (file)
@@ -9,11 +9,11 @@
                <thead>
                        <tr>
                                <th></th>
-                               <com:Application.Common.Portlets.BSimpleRepeater ID="ResourceListHeaderRepeater">
+                               <com:Baculum.Common.Portlets.BSimpleRepeater ID="ResourceListHeaderRepeater">
                                        <prop:ItemTemplate>
                                                <th class="center"><%=$this->Data['label']%></th>
                                        </prop:ItemTemplate>
-                               </com:Application.Common.Portlets.BSimpleRepeater>
+                               </com:Baculum.Common.Portlets.BSimpleRepeater>
                                <th><%[ Actions ]%></th>
                        </tr>
                </thead>
                <tfoot>
                        <tr>
                                <th></th>
-                               <com:Application.Common.Portlets.BSimpleRepeater ID="ResourceListFooterRepeater">
+                               <com:Baculum.Common.Portlets.BSimpleRepeater ID="ResourceListFooterRepeater">
                                        <prop:ItemTemplate>
                                                <th class="center"><%=$this->Data['label']%></th>
                                        </prop:ItemTemplate>
-                               </com:Application.Common.Portlets.BSimpleRepeater>
+                               </com:Baculum.Common.Portlets.BSimpleRepeater>
                                <th><%[ Actions ]%></th>
                        </tr>
                </tfoot>
@@ -66,11 +66,11 @@ var oBaculaConfigResourceList<%=$this->ClientID%> = {
                                                        data: null,
                                                        defaultContent: '<button type="button" class="w3-button w3-blue"><i class="fa fa-angle-down"></i></button>'
                                                }
-                                               <com:Application.Common.Portlets.BSimpleRepeater ID="ResourceListColumnsRepeater">
+                                               <com:Baculum.Common.Portlets.BSimpleRepeater ID="ResourceListColumnsRepeater">
                                                        <prop:ItemTemplate>
                                                                ,{data: '<%=$this->Data['name']%>'}
                                                        </prop:ItemTemplate>
-                                               </com:Application.Common.Portlets.BSimpleRepeater>
+                                               </com:Baculum.Common.Portlets.BSimpleRepeater>
                                                ,{
                                                        data: 'Name',
                                                        render: function (data, type, row) {
@@ -145,7 +145,7 @@ var oBaculaConfigResourceList<%=$this->ClientID%> = {
                        </div>
                </div>
                <div class="w3-container w3-margin-left w3-margin-right w3-margin-top">
-                       <com:Application.Web.Portlets.BaculaConfigDirectives
+                       <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                ID="ResourceConfig"
                                ShowRemoveButton="false"
                                ShowCancelButton="false"
index 3eab718c04590e141fb7333f7a6722720a3bdc1d..e7d6bcc607a4a6b78d217a37d6102f2d4aab9721 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Portlets.ResourceListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\Prado;
 
 /**
  * Bacula config resource control.
@@ -103,7 +103,6 @@ class BaculaConfigResources extends ResourceListTemplate {
         *
         * @return object $sender sender instance
         * @return mixed $param additional parameters
-        * @return none
         */
        public function removeResource($sender, $param) {
                if (!$this->getPage()->IsCallback) {
@@ -159,7 +158,6 @@ class BaculaConfigResources extends ResourceListTemplate {
         *
         * @param string $resource_type removed resource type
         * @param string $resource_name removed resource name
-        * @return none
         */
        private function showRemovedResourceInfo($resource_type, $resource_name) {
                $msg = Prado::localize('Resource %s "%s" removed successfully.');
@@ -177,7 +175,6 @@ class BaculaConfigResources extends ResourceListTemplate {
         * Show removed resource error message.
         *
         * @param string $error_message error message
-        * @return none
         */
        private function showRemovedResourceError($error_message) {
                $this->RemoveResourceError->Text = $error_message;
@@ -222,7 +219,6 @@ class BaculaConfigResources extends ResourceListTemplate {
         * @param array $config entire config
         * @param string $resource_type resource type to remove
         * @param string $resource_name resource name to remove
-        * @return none
         */
        public static function removeResourceFromConfig(&$config, $resource_type, $resource_name) {
                for ($i = 0; $i < count($config); $i++) {
index f70e65145f074420fc30bb7d2e8a11a8141767ac..f74255b9917aca708218322325ea5d932b7e6afe 100644 (file)
@@ -62,7 +62,7 @@
                                        </tr>
                                </table>
                                <div class="config_directives w3-khaki" style="display: none">
-                               <com:Application.Web.Portlets.BaculaConfigDirectives
+                               <com:Baculum.Web.Portlets.BaculaConfigDirectives
                                        Resource="<%#$this->Data['resource_name']%>"
                                        LoadValues="<%=true%>"
                                        ShowRemoveButton="false"
index 54456831d1c0595409fe57ff1139d286b298daf6..733cf8b76612d3b5c1defd1063739b741bb6da3f 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Class.HostConfig');
-Prado::using('Application.Web.Portlets.HostListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Baculum\Web\Modules\HostConfig;
+use Prado\Web\UI\TCommandEventParameter;
 
 /**
  * Bacula hosts control.
index 9426f065de5cfa81638970fc9be676b6ea8133d7..0b6279c43a79fe36afae713ef8e47a1463ee140f 100644 (file)
@@ -1,5 +1,5 @@
 <button type="button" class="w3-button w3-green w3-margin-left" onclick="$('#new_host').slideToggle()"><i class="fa fa-plus"></i> &nbsp;<%[ Add API host]%></button>
-<com:Application.Common.Portlets.NewHost ID="AddNewHost" APIRequired="config" ClientMode="true" OnCallback="loadConfig" />
+<com:Baculum.Common.Portlets.NewHost ID="AddNewHost" APIRequired="config" ClientMode="true" OnCallback="loadConfig" />
 <div class="w3-margin-left config_hosts">
        <com:TActiveRepeater ID="RepeaterHosts" OnItemCreated="createHostListElement">
                <prop:ItemTemplate>
@@ -35,7 +35,7 @@
 
                                        </tr>
                                </table>
-                               <com:Application.Web.Portlets.BaculaConfigComponents />
+                               <com:Baculum.Web.Portlets.BaculaConfigComponents />
                        </com:TPanel>
                </prop:ItemTemplate>
        </com:TActiveRepeater>
index 37eaabc655f8d3f98da6503b840f0bf8a078f8a0..3e6a71dbad38b2b76f5d09e31b6884334277e991 100644 (file)
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveButton');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.Portlets');
+
+namespace Baculum\Web\Portlets;
 
 /**
  * Bconsole control.
index efb3955d6f382308198a43cf7ea8d8820345c6df..257ffcaa5de234fcc6e8a883320b0fa2a9253c9b 100644 (file)
@@ -20,8 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\TPropertyValue;
+use Baculum\Web\Portlets\Portlets;
 
 /**
  * Bulk actions modal control.
index b96af4f323085380d6bab7e5a1d935e05fa889eb..e92a85f5bf94d4f716bd3b34e442ac2f78a8f04b 100644 (file)
  */
 
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveSpeed');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Baculum\Web\Portlets\Portlets;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
 
 /**
  * Set client bandwidth limit control.
@@ -43,7 +42,6 @@ class ClientBandwidthLimit extends Portlets {
         *
         * @param TActiveLinkButton $sender sender
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setupBandwidthLimit($sender, $param) {
                $clientid = $this->getClientId();
@@ -73,7 +71,6 @@ class ClientBandwidthLimit extends Portlets {
         * Callback event method.
         *
         * @param mixed $param callback parameter or null
-        * @return none
         */
        public function onCallback($param) {
                $this->raiseEvent('OnCallback', $this, $param);
@@ -82,7 +79,6 @@ class ClientBandwidthLimit extends Portlets {
        /**
         * Set client clientid.
         *
-        * @return none;
         */
        public function setClientId($clientid) {
                $clientid = intval($clientid);
@@ -101,7 +97,6 @@ class ClientBandwidthLimit extends Portlets {
        /**
         * Set client name.
         *
-        * @return none;
         */
        public function setClientName($client_name) {
                $this->setViewState(self::CLIENT_NAME, $client_name);
@@ -129,7 +124,6 @@ class ClientBandwidthLimit extends Portlets {
         * Set bandwidth limit value in field.
         *
         * @param integer $bwlimit bandiwdth limit in bytes
-        * @return none
         */
        public function setBandwidthLimit($bwlimit) {
                $this->BandwidthLimit->setDirectiveValue($bwlimit);
index 9056813f127a2e64cc66ba9a5b76d6758d073be5..265b2d2e566ba12dc8c4084cc4ab2d797aeb80ea 100644 (file)
@@ -9,7 +9,7 @@
                        <p><%[ Here you can set bandwidth limit on client. This change is applied on running client. There is no need to restart it. ]%></p>
                        <p><%[ Setting 0 (zero) value disables bandwidth limitation. ]%></p>
                        <div class="w3-row w3-section w3-medium">
-                               <com:Application.Web.Portlets.DirectiveSpeed
+                               <com:Baculum.Web.Portlets.DirectiveSpeed
                                        ID="BandwidthLimit"
                                        DirectiveName="BandwidthLimit"
                                        DefaultValue="0"
index 72b557d4d832d85ed4f424d36206c9a08e593179..d0281a98c531fa44a13b1a0d6347ed4a4ffd42a5 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Baculum\Web\Portlets\DirectiveListTemplate;
+use Prado\Web\UI\TCommandEventParameter;
 
 /**
  * Component actions control responsible for start,
@@ -45,7 +47,6 @@ class ComponentActionsMenu extends DirectiveListTemplate {
         *
         * @param TActiveLinkButton $sender sender object
         * @param TCommandEventParameter $param command parameter
-        * @return none
         */
        public function componentAction($sender, $param) {
                $action = $param->getCommandParameter();
index 4f7b6d44d63907154e8d0803dbdcd5b8e6cc3ad6..4c205ef275f4121932591def73565b898306e531 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
-Prado::using('Application.Web.Portlets.ConfigListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
 
 /**
  * Component list template control.
index e294108c0bd042a74da541e5ae3262b994c678b4..bddced053abffb67ea2150537a55af5fbd5ad7a4 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveControlTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Config list template control.
index 71bc0098e0c81500717a931972bf90b6d6404066..4a910f8a6b4ceb7da5326d64913171c62bdf56e4 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Checkbox directive control.
index 455051cd1a2e388f00f223b59ae8be0faa3ecbc9..8b4a705a9209cdcf388a8aa0e4af593da08c6dec 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Combobox directive control.
index 389101b13a9b39ce5a4eda3325ab73e75eaab6b5..c3ba26fd5f9ae50c97e001b4f2378830b3a8e1d9 100644 (file)
@@ -20,7 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.TTemplateControl');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\TTemplateControl;
 
 /**
  * Abstraction to directive control template.
index c228e8eb10ad76f9c9efec6bfbf067f094cbb7a5..71784ec8852395fe7512217b120ca7c95e48b662 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
 
 /**
  * Days of month directive control.
index 235bbb5876994b8b0c7d87ee74d287565712ce54..71c8604bfaec8c5f7bf4b88a38ee86f835f6ef8e 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
+use Baculum\Common\Modules\Params;
 
 /**
  * Days of week directive control.
index 26c7fa0d24723eac8d1f01b4be5b8fe8f80a84ca..0cdd70c27d9fcafe42d6fc92a804d826d883d665 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveComboBox');
-Prado::using('Application.Web.Portlets.DirectiveInteger');
-Prado::using('Application.Web.Portlets.FileSetOptionRenderer');
+namespace Baculum\Web\Portlets;
 
 /**
  * FileSet directive template.
@@ -40,19 +32,19 @@ Prado::using('Application.Web.Portlets.FileSetOptionRenderer');
 class DirectiveFileSet extends DirectiveListTemplate {
 
        private $directive_types = array(
-               'DirectiveCheckBox',
-               'DirectiveTextBox',
-               'DirectiveComboBox',
-               'DirectiveListBox',
-               'DirectiveInteger'
+               'Baculum\Web\Portlets\DirectiveCheckBox',
+               'Baculum\Web\Portlets\DirectiveTextBox',
+               'Baculum\Web\Portlets\DirectiveComboBox',
+               'Baculum\Web\Portlets\DirectiveListBox',
+               'Baculum\Web\Portlets\DirectiveInteger'
        );
 
        private $directive_list_types = array(
-               'DirectiveMultiTextBox'
+               'Baculum\Web\Portlets\DirectiveMultiTextBox'
        );
 
        private $directive_inc_exc_types = array(
-               'DirectiveTextBox'
+               'Baculum\Web\Portlets\DirectiveTextBox'
        );
 
        public function loadConfig() {
@@ -296,7 +288,7 @@ class DirectiveFileSet extends DirectiveListTemplate {
                                                // option not set or removed
                                                continue;
                                        }
-                                       if ($this->directive_types[$i] === 'DirectiveCheckBox') {
+                                       if ($this->directive_types[$i] === 'Baculum\Web\Portlets\DirectiveCheckBox') {
                                                settype($default_value, 'bool');
                                        }
                                        if ($directive_value === $default_value) {
index b1c696313af4d71fa02d95a1881aab6b46601a47..4fe3a934471b015602d313e26e244ac691b42b93 100644 (file)
@@ -1,14 +1,14 @@
 <button type="button" onmousedown="openElementOnCursor(event, '<%=$this->FileSetIncludeMenu->ClientID%>_new_fileset', 0, 20);" class="w3-button w3-green w3-margin-bottom" style="display: <%=$this->getDirectiveName() == 'Include' ? '' : 'none'%>"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
-<com:Application.Web.Portlets.NewFileSetIncExcMenu ID="FileSetIncludeMenu" />
+<com:Baculum.Web.Portlets.NewFileSetIncExcMenu ID="FileSetIncludeMenu" />
 <com:TActiveRepeater ID="RepeaterFileSetIncludes" OnItemDataBound="createFileSetIncludes">
        <prop:ItemTemplate>
                <div class="w3-card-4 w3-padding w3-margin-bottom directive incexc">
                        <h3><%#$this->SourceTemplateControl->getDirectiveName()%> #<%#$this->ItemIndex + 1%></h3>
                        <button type="button" onmousedown="openElementOnCursor(event, '<%=$this->FileSetFileOptMenu->ClientID%>_new_fileset', 0, 20);" class="w3-button w3-green w3-margin-bottom"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
-                       <com:Application.Web.Portlets.NewFileSetFileOptMenu ID="FileSetFileOptMenu" FileSetBrowserId="<%=$this->SourceTemplateControl->FSBrowser->ClientID%>" />
+                       <com:Baculum.Web.Portlets.NewFileSetFileOptMenu ID="FileSetFileOptMenu" FileSetBrowserId="<%=$this->SourceTemplateControl->FSBrowser->ClientID%>" />
                <com:TActiveRepeater
                        ID="RepeaterFileSetOptions"
-                       ItemRenderer="Application.Web.Portlets.FileSetOptionRenderer"
+                       ItemRenderer="Baculum.Web.Portlets.FileSetOptionRenderer"
                >
                        <prop:HeaderTemplate>
                                <div class="w3-border w3-padding w3-margin-bottom directive">
@@ -17,7 +17,7 @@
                                </div>
                        </prop:FooterTemplate>
                </com:TActiveRepeater>
-               <com:TActiveRepeater ID="RepeaterFileSetInclude"  ItemRenderer="Application.Web.Portlets.DirectiveRenderer" CssClass="incexc_item">
+               <com:TActiveRepeater ID="RepeaterFileSetInclude"  ItemRenderer="Baculum.Web.Portlets.DirectiveRenderer" CssClass="incexc_item">
                        <prop:HeaderTemplate>
                                <div class="w3-border w3-padding w3-margin-bottom directive include_file">
                                        <h3><%[ Files ]%></h3>
@@ -26,7 +26,7 @@
                                </div>
                        </prop:FooterTemplate>
                </com:TActiveRepeater>
-               <com:TActiveRepeater ID="RepeaterFileSetPlugin"  ItemRenderer="Application.Web.Portlets.DirectiveRenderer" CssClass="incexc_item">
+               <com:TActiveRepeater ID="RepeaterFileSetPlugin"  ItemRenderer="Baculum.Web.Portlets.DirectiveRenderer" CssClass="incexc_item">
                        <prop:HeaderTemplate>
                                <div class="w3-border w3-padding w3-margin-bottom directive include_plugin">
                                        <h3><%[ Plugins ]%></h3>
                <div class="w3-card-4 w3-padding w3-margin-bottom directive">
                        <h2><%[ Exclude ]%></h2>
                        <button type="button" onmousedown="openElementOnCursor(event, '<%=$this->FileSetExcMenu->ClientID%>_new_fileset', 0, 20);" class="w3-button w3-green w3-margin-bottom"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
-                       <com:Application.Web.Portlets.NewFileSetExcMenu ID="FileSetExcMenu" />
+                       <com:Baculum.Web.Portlets.NewFileSetExcMenu ID="FileSetExcMenu" />
                        <h3><%[ Files ]%></h3>
        </prop:HeaderTemplate>
        <prop:ItemTemplate>
                        <div class="directive_field exclude_file">
-                               <com:Application.Web.Portlets.DirectiveTextBox />
+                               <com:Baculum.Web.Portlets.DirectiveTextBox />
                        </div>
        </prop:ItemTemplate>
        <prop:FooterTemplate>
@@ -59,7 +59,7 @@
        <div class="w3-modal-content w3-card-4 w3-padding-large w3-animate-zoom" style="width: 85%">
                <span onclick="document.getElementById('<%=$this->FSBrowser->ClientID%>fileset_browser').style.display = 'none'" class="w3-button w3-xlarge w3-hover-red w3-display-topright">×</span>
                <h2><%[ Include files to FileSet]%></h2>
-               <com:Application.Web.Portlets.FileSetBrowser ID="FSBrowser" />
+               <com:Baculum.Web.Portlets.FileSetBrowser ID="FSBrowser" />
                <com:TCallback ID="NewIncExcFile" OnCallback="newIncludeExcludeFile" />
                <div class="w3-center w3-margin-top">
                        <button type="button" class="w3-button w3-red" onclick="document.getElementById('<%=$this->FSBrowser->ClientID%>fileset_browser').style.display = 'none'"><i class="fa fa-times"></i> &nbsp; <%[ Cancel ]%></button>
index 41d031d7c7f14f3244b4eb9b17458e3815c5a43d..16cc5f076bc49c6f43cc0de627b51b3c1c946584 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Integer directive template.
index 79ba93a333662d1a16555d1920556c028926477c..a464c45ff7abcc21c3fe58088599a6b998b789c7 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveListBox');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * ListBox directive template.
index fa24447684388eed2fd25da1cdcf4a24f70c4dd5..ec7e4b5814aeb3a75880c382b479c59117d7e627 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
-Prado::using('Application.Web.Portlets.ConfigListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
 
 /**
  * Directive list template.
index 33359dd294a337ea14a5f6bd819adee8b0f13831..33098ad60f7926604892118d1b74136b1f083497 100644 (file)
@@ -20,8 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\TCommandEventParameter;
 
 /**
  * Messages directive.
@@ -33,7 +34,7 @@ Prado::using('Application.Web.Portlets.DirectiveTextBox');
 class DirectiveMessages extends DirectiveListTemplate {
 
        private $directive_types = array(
-               'DirectiveTextBox'
+               'Baculum\Web\Portlets\DirectiveTextBox'
        );
 
        public $destination_simple = array(
@@ -136,7 +137,7 @@ class DirectiveMessages extends DirectiveListTemplate {
                $controls = $this->RepeaterMessages->getControls();
                for ($i = 0; $i < $controls->count(); $i++) {
                        $directive_values = array();
-                       $where_control = $controls->itemAt($i)->findControlsByType('DirectiveTextBox');
+                       $where_control = $controls->itemAt($i)->findControlsByType('Baculum\Web\Portlets\DirectiveTextBox');
                        if (count($where_control) === 1 && $where_control[0]->getShow() === true) {
                                $directive_values = array($where_control[0]->getDirectiveValue());
                        }
@@ -164,7 +165,7 @@ class DirectiveMessages extends DirectiveListTemplate {
                $controls = $this->RepeaterMessages->getItems();
                foreach ($controls as $control) {
                        $directive_values = array();
-                       $where_control = $control->findControlsByType('DirectiveTextBox');
+                       $where_control = $control->findControlsByType('Baculum\Web\Portlets\DirectiveTextBox');
                        if (count($where_control) === 1 && $where_control[0]->getShow() === true) {
                                $where_control[0]->setValue();
                                $directive_values['Where'] = array($where_control[0]->getDirectiveValue());
@@ -218,7 +219,7 @@ class DirectiveMessages extends DirectiveListTemplate {
        }
 
        public function removeMessages($sender, $param) {
-               if ($param instanceof Prado\Web\UI\TCommandEventParameter) {
+               if ($param instanceof TCommandEventParameter) {
                        $idx = $param->getCommandName();
                        $data = $this->getDirectiveData();
                        array_splice($data, $idx, 1);
index dcf73a6c43f3425246eb58098ddef7ae84480e80..29b2ade59aceabe495936c6c1b33801b869b325b 100644 (file)
@@ -1,6 +1,6 @@
 <button type="button" class="w3-button w3-green w3-margin" onclick="openElementOnCursor(event, '<%=$this->MessagesMenu->ClientID%>_new_messages', 0, 20);"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
 <p class="bold"><%[ Tip: checking 'All' message type causes, that rest checked message types are saved with negation ex. Catalog = All, !Debug, !Saved, !Skipped ]%></p>
-<com:Application.Web.Portlets.NewMessagesMenu ID="MessagesMenu" />
+<com:Baculum.Web.Portlets.NewMessagesMenu ID="MessagesMenu" />
 <com:TActiveRepeater ID="RepeaterMessages" OnItemCreated="createDirectiveListElement" OnItemDataBound="loadMessageTypes">
        <prop:ItemTemplate>
                <div class="w3-card w3-padding directive">
@@ -12,8 +12,8 @@
                                <i class="fa fa-trash-alt"></i> &nbsp;<%[ Remove ]%>
                        </com:TActiveLinkButton>
                        <h2><%#$this->Data['directive_name']%></h2>
-                       <com:Application.Web.Portlets.DirectiveTextBox />
-                       <com:Application.Web.Portlets.MessageTypes ID="Types" />
+                       <com:Baculum.Web.Portlets.DirectiveTextBox />
+                       <com:Baculum.Web.Portlets.MessageTypes ID="Types" />
                </div>
        </prop:ItemTemplate>
 </com:TActiveRepeater>
index 2d3e8bd72964be3709acf9a36ec3663c41d7a3fb..d10aeef7b616e0b059ed395f2980d9b7e37766a3 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+use Prado\TPropertyValue;
+use Baculum\Common\Modules\Params;
+use Baculum\Web\Portlets\DirectiveTemplate;
 
 /**
  * Months of the year directive control.
index 596d88edbfb2b79e851501f441c3608664a7b9bd..ebcc31779f23b5ebd7bc8f87fe0cc9fa9f08d3b6 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Multi-combobox directive control.
index 5994072b632b5abad1b2d381402a020869aa2418..70bddf27ae4ab65e27d24740dbfe0d8a9ce87b68 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Multi-textbox directive control.
index 17766cadb4805e78629e4f7d319849737486ea6a..55f7d2bcbee183c9defd3f3e0ae94d450bfa4e08 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Password directive control.
index ef625b93c76274d66d69d29790696dccd3718892..d0e0d1b223363a2cc1921b253313dd3905ff679f 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('System.Web.UI.WebControls.TItemDataRenderer');
-Prado::using('System.Web.UI.WebControls.THeader3');
-Prado::using('System.Web.UI.WebControls.TLiteral');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveComboBox');
-Prado::using('Application.Web.Portlets.DirectiveInteger');
-Prado::using('Application.Web.Portlets.DirectiveListBox');
-Prado::using('Application.Web.Portlets.DirectivePassword');
-Prado::using('Application.Web.Portlets.DirectiveSize');
-Prado::using('Application.Web.Portlets.DirectiveSpeed');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveMultiComboBox');
-Prado::using('Application.Web.Portlets.DirectiveMultiTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTimePeriod');
-Prado::using('Application.Web.Portlets.DirectiveRunscript');
-Prado::using('Application.Web.Portlets.DirectiveMessages');
+namespace Baculum\Web\Portlets;
+
+use Prado\Prado;
+use Prado\Web\UI\WebControls\TItemDataRenderer;
 
 /**
  * Directive renderer control.
@@ -166,7 +149,7 @@ class DirectiveRenderer extends TItemDataRenderer {
        }
 
        private function getField($field_type) {
-               return 'Application.Web.Portlets.Directive' . $field_type;
+               return 'Baculum.Web.Portlets.Directive' . $field_type;
        }
 }
 ?>
index c3bb030156c0b97eac7ddb4f966ae86e6e692c28..78f552fbfff65a24795dfd69df673f10b5d2bc1e 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveComboBox');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\TCommandEventParameter;
+use stdClass;
 
 /**
  * Runscript directive control.
@@ -35,9 +35,9 @@ Prado::using('Application.Web.Portlets.DirectiveComboBox');
 class DirectiveRunscript extends DirectiveListTemplate {
 
        private $directive_types = array(
-               'DirectiveCheckBox',
-               'DirectiveComboBox',
-               'DirectiveTextBox'
+               'Baculum\Web\Portlets\DirectiveCheckBox',
+               'Baculum\Web\Portlets\DirectiveComboBox',
+               'Baculum\Web\Portlets\DirectiveTextBox'
        );
 
        public function loadConfig() {
@@ -147,7 +147,7 @@ class DirectiveRunscript extends DirectiveListTemplate {
                                        // skip not changed values that don't exist in config
                                        continue;
                                }
-                               if ($this->directive_types[$i] === 'DirectiveCheckBox') {
+                               if ($this->directive_types[$i] === 'Baculum\Web\Portlets\DirectiveCheckBox') {
                                        settype($default_value, 'bool');
                                }
                                if ($directive_value === $default_value) {
@@ -169,7 +169,7 @@ class DirectiveRunscript extends DirectiveListTemplate {
        }
 
        public function removeRunscript($sender, $param) {
-               if ($param instanceof Prado\Web\UI\TCommandEventParameter) {
+               if ($param instanceof TCommandEventParameter) {
                        $idx = $param->getCommandName();
                        $data = $this->getDirectiveValue();
                        if (is_array($data)) {
index b0d4e64b5f3aa89e8bdea578fcae1d42f1a1c432..f7d8851601cacca64a418b687526d81bd397729d 100644 (file)
@@ -1,6 +1,6 @@
 <button type="button" class="w3-button w3-green w3-margin-bottom" onmousedown="openElementOnCursor(event, '<%=$this->RunscriptMenu->ClientID%>_new_runscript', 0, 20);"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
-<com:Application.Web.Portlets.NewRunscriptMenu ID="RunscriptMenu" />
-<com:TActiveRepeater ID="RepeaterRunscriptOptions" ItemRenderer="Application.Web.Portlets.JobRunscriptRenderer">
+<com:Baculum.Web.Portlets.NewRunscriptMenu ID="RunscriptMenu" />
+<com:TActiveRepeater ID="RepeaterRunscriptOptions" ItemRenderer="Baculum.Web.Portlets.JobRunscriptRenderer">
        <prop:HeaderTemplate>
                <div class="w3-card-4 w3-padding w3-margin-bottom directive runscript">
        </prop:HeaderTemplate>
index 0ef3eae5c57e37c0f0cdfe54fcf9c70b5cdf23ec..98b8b2df984ac94e4b88d29c88cbd8b28d9ee0b7 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveHiddenField');
-Prado::using('System.Web.UI.ActiveControls.TActiveRadioButton');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
-Prado::using('Application.Web.Portlets.DirectiveComboBox');
-Prado::using('Application.Web.Portlets.DirectiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTimePeriod');
-Prado::using('Application.Web.Portlets.DirectiveTime');
-Prado::using('Application.Web.Portlets.DirectiveDaysOfWeek');
-Prado::using('Application.Web.Portlets.DirectiveDaysOfMonth');
-Prado::using('Application.Web.Portlets.DirectiveWeeksOfMonth');
-Prado::using('Application.Web.Portlets.DirectiveWeeksOfYear');
+namespace Baculum\Web\Portlets;
+
+use Baculum\Common\Modules\Params;
+use Prado\Web\UI\TCommandEventParameter;
+use stdClass;
 
 /**
  * Schedule directive control.
@@ -359,7 +351,7 @@ class DirectiveSchedule extends DirectiveListTemplate {
        }
 
        public function removeSchedule($sender, $param) {
-               if ($param instanceof Prado\Web\UI\TCommandEventParameter) {
+               if ($param instanceof TCommandEventParameter) {
                        $idx = (integer)$param->getCommandName();
                        $data = $this->getDirectiveValue(true);
                        array_splice($data, $idx, 1);
@@ -453,10 +445,10 @@ class DirectiveSchedule extends DirectiveListTemplate {
                                if (is_null($subdirective_value)) {
                                        continue;
                                }
-                               if (get_class($control) === 'DirectiveCheckBox') {
+                               if (get_class($control) === 'Baculum\Web\Portlets\DirectiveCheckBox') {
                                        settype($default_value, 'bool');
                                }
-                               if (get_class($control) === 'DirectiveTextBox') {
+                               if (get_class($control) === 'Baculum\Web\Portlets\DirectiveTextBox') {
                                        settype($default_value, 'string');
                                }
 
@@ -465,7 +457,7 @@ class DirectiveSchedule extends DirectiveListTemplate {
                                        continue;
                                }
                                $obj->{$subdirective_name} = $subdirective_value;
-                               if (get_class($control) === 'DirectiveCheckBox') {
+                               if (get_class($control) === 'Baculum\Web\Portlets\DirectiveCheckBox') {
                                        $subdirective_value = Params::getBoolValue($subdirective_value);
                                }
                                $directive_values[] = "{$subdirective_name}=\"{$subdirective_value}\"";
index 153678c852467b7ac1898d5e19aa43f610f1b697..84d397c9d934b8100656dc2418a78b3ebe90dbb6 100644 (file)
@@ -1,5 +1,5 @@
 <button type="button" class="w3-button w3-green w3-margin-bottom" onmousedown="openElementOnCursor(event, '<%=$this->ScheduleMenu->ClientID%>_new_schedule', 0, 20);"><i class="fa fa-plus"></i> &nbsp;<%[ Add ]%></button>
-<com:Application.Web.Portlets.NewScheduleMenu ID="ScheduleMenu" />
+<com:Baculum.Web.Portlets.NewScheduleMenu ID="ScheduleMenu" />
 <com:TActiveRepeater ID="RepeaterScheduleRuns" OnItemDataBound="createRunItem">
        <prop:ItemTemplate>
                <div class="w3-card-4 w3-padding w3-margin-bottom directive runscript">
@@ -21,7 +21,7 @@
                        </div>
                        <div class="w3-border w3-hide w3-animate-right status_content <%=$this->ScheduleMode->Value == DirectiveSchedule::SCHEDULE_MODE_HOURLY ? 'w3-show': ''%>">
                                <div class="w3-padding">
-                                       <com:Application.Web.Portlets.DirectiveTime
+                                       <com:Baculum.Web.Portlets.DirectiveTime
                                                ID="TimeHourly"
                                                Label="<%[ Run hourly at minute ]%>"
                                                InConfig="false"
@@ -42,7 +42,7 @@
                        </div>
                        <div class="w3-border w3-hide w3-animate-right status_content <%=$this->ScheduleMode->Value == DirectiveSchedule::SCHEDULE_MODE_DAILY ? 'w3-show': ''%>">
                                <div class="w3-padding">
-                                       <com:Application.Web.Portlets.DirectiveTime
+                                       <com:Baculum.Web.Portlets.DirectiveTime
                                                ID="TimeDaily"
                                                Label="<%[ Run at ]%>"
                                                InConfig="false"
@@ -62,7 +62,7 @@
                        </div>
                        <div class="w3-border w3-hide w3-animate-right status_content <%=$this->ScheduleMode->Value == DirectiveSchedule::SCHEDULE_MODE_WEEKLY ? 'w3-show': ''%>">
                                <div class="w3-padding">
-                                       <com:Application.Web.Portlets.DirectiveTime
+                                       <com:Baculum.Web.Portlets.DirectiveTime
                                                ID="TimeWeekly"
                                                Label="<%[ Run at ]%>"
                                                InConfig="false"
@@ -71,7 +71,7 @@
                                                Show="true"
                                                CssClass="xtinybox"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveDaysOfWeek
+                                       <com:Baculum.Web.Portlets.DirectiveDaysOfWeek
                                                ID="DaysOfWeekWeekly"
                                                Label="<%[ Days of the week ]%>"
                                                InConfig="false"
@@ -90,7 +90,7 @@
                        </div>
                        <div class="w3-border w3-hide w3-animate-right status_content <%=$this->ScheduleMode->Value == DirectiveSchedule::SCHEDULE_MODE_MONTHLY ? 'w3-show': ''%>">
                                <div class="w3-padding">
-                                       <com:Application.Web.Portlets.DirectiveTime
+                                       <com:Baculum.Web.Portlets.DirectiveTime
                                                ID="TimeMonthly"
                                                Label="<%[ Run at ]%>"
                                                InConfig="false"
@@ -99,7 +99,7 @@
                                                Show="true"
                                                CssClass="xtinybox"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveWeeksOfMonth
+                                       <com:Baculum.Web.Portlets.DirectiveWeeksOfMonth
                                                ID="WeeksOfMonthMonthly"
                                                Label="<%[ Weeks of the month ]%>"
                                                InConfig="false"
                                                ShowResetButton="false"
                                                Show="true"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveDaysOfWeek
+                                       <com:Baculum.Web.Portlets.DirectiveDaysOfWeek
                                                ID="DaysOfWeekMonthly"
                                                Label="<%[ Days of the week ]%>"
                                                InConfig="false"
                                                </script>
                                        </div>
                                        <div class="w3-hide custom_hourly <%=$this->TimeHourlyCustomOption->Checked ? 'w3-show' : 'w3-hide'%>">
-                                               <com:Application.Web.Portlets.DirectiveTime
+                                               <com:Baculum.Web.Portlets.DirectiveTime
                                                        ID="TimeHourlyCustom"
                                                        Label="<%[ Run hourly at minute ]%>"
                                                        InConfig="false"
                                                />
                                        </div>
                                        <div class="w3-hide custom_time <%=$this->TimeAtCustomOption->Checked ? 'w3-show' : 'w3-hide'%>">
-                                               <com:Application.Web.Portlets.DirectiveTime
+                                               <com:Baculum.Web.Portlets.DirectiveTime
                                                        ID="TimeCustom"
                                                        Label="<%[ Run at ]%>"
                                                        InConfig="false"
                                                        CssClass="xtinybox"
                                                />
                                        </div>
-                                       <com:Application.Web.Portlets.DirectiveWeeksOfMonth
+                                       <com:Baculum.Web.Portlets.DirectiveWeeksOfMonth
                                                ID="WeeksOfMonthCustom"
                                                Label="<%[ Weeks of the month ]%>"
                                                InConfig="false"
                                                ShowOptions="true"
                                                Show="true"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveDaysOfWeek
+                                       <com:Baculum.Web.Portlets.DirectiveDaysOfWeek
                                                ID="DaysOfWeekCustom"
                                                Label="<%[ Days of the week ]%>"
                                                InConfig="false"
                                                ShowOptions="true"
                                                Show="true"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveDaysOfMonth
+                                       <com:Baculum.Web.Portlets.DirectiveDaysOfMonth
                                                ID="DaysOfMonthCustom"
                                                Label="<%[ Days of the month ]%>"
                                                InConfig="false"
                                                ShowOptions="true"
                                                Show="true"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveMonthsOfYear
+                                       <com:Baculum.Web.Portlets.DirectiveMonthsOfYear
                                                ID="MonthsOfYearCustom"
                                                Label="<%[ Months of the year ]%>"
                                                InConfig="false"
                                                ShowOptions="true"
                                                Show="true"
                                        />
-                                       <com:Application.Web.Portlets.DirectiveWeeksOfYear
+                                       <com:Baculum.Web.Portlets.DirectiveWeeksOfYear
                                                ID="WeeksOfYearCustom"
                                                Label="<%[ Weeks of the year ]%>"
                                                InConfig="false"
                </div>
                <com:TActiveHiddenField ID="ScheduleMode" Value="daily" />
                <h3 class="<%=$this->Level->Show || $this->Pool->Show || $this->Storage->Show || $this->Messages->Show || $this->NextPool->Show || $this->FullPool->Show || $this->DifferentialPool->Show || $this->IncrementalPool->Show || $this->Accurate->Show || $this->Priority->Show || $this->SpoolData->Show || $this->MaxRunSchedTime->Show || $this->MaxConnectTime->Show ? 'w3-show' : 'w3-hide'%>"><%[ Override directives ]%></h3>
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="Level"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="Pool"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="Storage"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="Messages"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="NextPool"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="FullPool"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="DifferentialPool"
                />
-               <com:Application.Web.Portlets.DirectiveComboBox
+               <com:Baculum.Web.Portlets.DirectiveComboBox
                        ID="IncrementalPool"
                />
-               <com:Application.Web.Portlets.DirectiveCheckBox
+               <com:Baculum.Web.Portlets.DirectiveCheckBox
                        ID="Accurate"
                />
-               <com:Application.Web.Portlets.DirectiveTextBox
+               <com:Baculum.Web.Portlets.DirectiveTextBox
                        ID="Priority"
                        CssClass="smallbox"
                />
-               <com:Application.Web.Portlets.DirectiveCheckBox
+               <com:Baculum.Web.Portlets.DirectiveCheckBox
                        ID="SpoolData"
                />
-               <com:Application.Web.Portlets.DirectiveTimePeriod
+               <com:Baculum.Web.Portlets.DirectiveTimePeriod
                        ID="MaxRunSchedTime"
                />
-               <com:Application.Web.Portlets.DirectiveTimePeriod
+               <com:Baculum.Web.Portlets.DirectiveTimePeriod
                        ID="MaxConnectTime"
                />
        </div>
index 24c4057a3e0d32f82370dd87bb44e94073c97d82..0b12f69d9cdea7af69cfaceff0f5926e1a5efb88 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Directive settings control.
index c6cb936c3db1e1a52b2a69c7ea756822cf67bda1..a977ac9d86a282b83e94a27ab74c9b108240313c 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * Size directive control.
index c4892abe1893a8c957579fdcc933a0f110379eb0..907db862f25e47313b29fb60c1601c1ea8cef1b5 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Exception;
 
 /**
  * Speed directive control.
@@ -173,7 +172,6 @@ class DirectiveSpeed extends DirectiveTemplate {
         * If not set, there supported are both decimal and binary.
         *
         * @param string $unit_type unit type value (decimal or binary)
-        * @return none
         * @throw Exception if provided invalid unit type value
         */
        public function setUnitType($unit_type) {
@@ -193,7 +191,6 @@ class DirectiveSpeed extends DirectiveTemplate {
         * Get unit type to show in control.
         * If unit type is not set, returned is empty string that means both unit types are supported.
         *
-        * @return none
         */
        public function getUnitType() {
                return $this->getViewState(self::UNIT_TYPE, '');
index 7d25e5327bc4ba67ef6e6cd094903eb510b08316..38e4f60981f1ab95ab2105eecc82c5aa2fdcaa1a 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
-Prado::using('Application.Web.Portlets.DirectiveControlTemplate');
-Prado::using('Application.Web.Portlets.IDirectiveField');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
+use Prado\Web\UI\TCommandEventParameter;
 
 /**
  * Directive template control.
index d28fccb29b15ca203a28e085e0a1a216c10aaaa5..bcc8e64f36fa305089fb51fd6dc0b949b853d596 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * TextBox directive control.
index b306b270af1fd957983aaaa6087545d9b3c7883d..4fd21f0918afe3cd0e01fa86604f5da82b7b117c 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-use Prado\TPropertyValue;
+namespace Baculum\Web\Portlets;
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+use Prado\TPropertyValue;
 
 /**
  * Time directive control.
index 25d2e5a3019c86e985044a00d55612a5e6b4d654..330ab6800cc768ea91b76bbc65ec030de6a4f5e6 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\Prado;
 
 /**
  * Time period directive control.
index 2a3661ca836a0c2034bb8fbb1b4b75a66bdee8b2..a6a58a75ff26a4f6419d117a1a3526e1effbf3b4 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
+use Baculum\Common\Modules\Params;
 
 /**
  * Weeks of month directive control.
index febe535148c86e13deefb84b391011dd708d7899..6f9bee8ae1c2a309ba2b81630a2cab75dc4af73e 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('Application.Common.Class.Params');
-Prado::using('Application.Web.Portlets.DirectiveTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
 
 /**
  * Weeks of year directive control.
index 272b59503ef9e2b7de8ce337cc1aba35f5b2181e..711dbb729732495913db5d936ff0575c6afa28f9 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
 
 /**
  * Error message box - displays global errors and problems.
index 92a590de5b37741457d55fb9ae799fd9148404ce..4578794f5797027122dcf6921767255fed670cfc 100644 (file)
@@ -20,8 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\Web\UI\ActiveControls\TActiveDropDownList;
+use Baculum\Web\Portlets\Portlets;
 
 /**
  * FileSet browser control.
@@ -38,7 +38,6 @@ class FileSetBrowser extends Portlets {
        /**
         * Load client list.
         *
-        * @return none
         */
        public function loadClients($sender, $param) {
                $client_list = array();
@@ -58,7 +57,6 @@ class FileSetBrowser extends Portlets {
         *
         * @param TActiveDropDownList $sender, sender object
         * @param TCommandParameter $param parameters object
-        * @return none
         */
        public function selectClient($sender, $param) {
                $client_id = $this->Client->getSelectedValue();
index c614dbd5e0ed1a9b301d14a49843d4bb93e51189..46366edf6bc2aa1291cc57fd04078eba75d101d1 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveRenderer');
+namespace Baculum\Web\Portlets;
 
 /**
  * FileSet option renderer.
index b23d0a7bf8c1d7133d5187d6a1bf6f766e6fc5af..2641658f63e53ca8a7b36e6f8c475947c4d06ee1 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
-Prado::using('Application.Web.Portlets.ConfigListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
 
 /**
  * Host list template control.
index 3df223ad8ad57dddbc9b2093518e1cf3a58645c7..3f060f227e6485e103c86eab9c454ca4c61f03d9 100644 (file)
@@ -20,6 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Web\Portlets;
+
 /**
  * Directive field interface.
  *
index e92c8b2f0af227f3099042da2614d031f3e34dad..ce5f844f4c2270599e720fa46f56c11ac48b78a2 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveSpeed');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Baculum\Web\Portlets\Portlets;
+use Prado\Web\UI\ActiveControls\TCallbackEventParameter;
 
 /**
  * Set job bandwidth limit control.
@@ -42,7 +41,6 @@ class JobBandwidthLimit extends Portlets {
         *
         * @param TActiveLinkButton $sender sender
         * @param TCallbackEventParameter $param callback parameter
-        * @return none
         */
        public function setupBandwidthLimit($sender, $param) {
                $jobid = $this->getJobId();
@@ -72,7 +70,6 @@ class JobBandwidthLimit extends Portlets {
         * Callback event method.
         *
         * @param mixed $param callback parameter or null
-        * @return none
         */
        public function onCallback($param) {
                $this->raiseEvent('OnCallback', $this, $param);
@@ -81,7 +78,6 @@ class JobBandwidthLimit extends Portlets {
        /**
         * Set job jobid.
         *
-        * @return none;
         */
        public function setJobId($jobid) {
                $jobid = intval($jobid);
@@ -101,7 +97,6 @@ class JobBandwidthLimit extends Portlets {
        /**
         * Set job uname.
         *
-        * @return none;
         */
        public function setJobUname($job_uname) {
                $this->setViewState(self::JOB_UNAME, $job_uname);
@@ -130,7 +125,6 @@ class JobBandwidthLimit extends Portlets {
         * Set bandwidth limit value in field.
         *
         * @param integer $bwlimit bandiwdth limit in bytes
-        * @return none
         */
        public function setBandwidthLimit($bwlimit) {
                $this->BandwidthLimit->setDirectiveValue($bwlimit);
index ca1d929bbc3d9a5dd79d460823aad4139f3165c8..4a4243430f52f092ee48945601c63b019423a7ec 100644 (file)
@@ -9,7 +9,7 @@
                        <p><%[ Here you can set bandwidth limit for job. This change is applied on running job. ]%></p>
                        <p><%[ Setting 0 (zero) value disables bandwidth limitation. ]%></p>
                        <div class="w3-row w3-section w3-medium">
-                               <com:Application.Web.Portlets.DirectiveSpeed
+                               <com:Baculum.Web.Portlets.DirectiveSpeed
                                        ID="BandwidthLimit"
                                        DirectiveName="BandwidthLimit"
                                        DefaultValue="0"
index 8697f26dffe2578167e0f7da0c65e0da40859fa5..53d9f2de014995255301ed5bed1f9233f2d58508 100644 (file)
@@ -19,7 +19,7 @@
  *
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
-Prado::using('Application.Web.Portlets.Portlets');
+use Baculum\Web\Portlets\Portlets;
 
 /**
  * Job graphs control.
@@ -31,6 +31,7 @@ Prado::using('Application.Web.Portlets.Portlets');
 class JobGraphs extends Portlets {
 
        const JOB = 'Job';
+       const CLIENT = 'Client';
 
        public function onInit($param) {
                parent::onInit($param);
@@ -53,7 +54,6 @@ class JobGraphs extends Portlets {
        /**
         * Set client to show graphs.
         *
-        * @return none
         */
        public function setClient($client) {
                $this->setViewState(self::CLIENT, $client);
@@ -62,7 +62,6 @@ class JobGraphs extends Portlets {
        /**
         * Get client to show graph.
         *
-        * @return none
         */
        public function getClient() {
                return $this->getViewState(self::CLIENT);
@@ -71,7 +70,6 @@ class JobGraphs extends Portlets {
        /**
         * Set job to show graphs.
         *
-        * @return none
         */
        public function setJob($job) {
                $this->setViewState(self::JOB, $job);
@@ -80,7 +78,6 @@ class JobGraphs extends Portlets {
        /**
         * Get job to show graph.
         *
-        * @return none
         */
        public function getJob() {
                return $this->getViewState(self::JOB);
index 9b369323c55b30e472aa4ba2235c015ddbbb5f2a..c6be77e444e86003be037645cc48b9f5e3280dce 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.WebControls.TListItem');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
 
 /**
  * Job list files control.
@@ -95,7 +89,6 @@ class JobListFiles extends Portlets {
        /**
         * Set job identifier to show files.
         *
-        * @return none
         */
        public function setJobId($jobid) {
                $jobid = intval($jobid);
index d9716035d14f7d69be1f0ba9962d071aef147aa0..cb43c9d41baf608754c75d0f4eaec34574b658ae 100644 (file)
@@ -20,8 +20,8 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveRenderer');
+use Prado\Web\UI\ActiveControls\TActiveLinkButton;
+use Baculum\Web\Portlets\DirectiveRenderer;
 
 /**
  * Job runscript renderer.
index 94f78284d1ba28368a2d2144dc98c8d76866dba7..58a642180f6342294873fdd50dd4c2b1fa5f5a09 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\TPropertyValue;
+use Baculum\Web\Portlets\Portlets;
 
 /**
  * Label volume control.
index 30c10b43ad3ff5dac2f8302147af329b94016ac0..afeb5fe34627230ec6b028f585e2a7807d1ad1bd 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
 
 /**
  * Main side-bar control.
index 7b16d140148cca32b67bb5a712f6eb745d00d369..fc7722706c17e423fa847d6ddca66693e86bd20a 100644 (file)
@@ -20,9 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.Ui.ActiveControls.TActiveRepeater');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
-Prado::using('Application.Web.Portlets.DirectiveCheckBox');
+namespace Baculum\Web\Portlets;
 
 /**
  * Message types control.
@@ -39,7 +37,7 @@ class MessageTypes extends DirectiveListTemplate {
        }
 
        public function getDirectiveValues() {
-               $type_controls = $this->RepeaterMessageTypes->findControlsByType('DirectiveCheckBox');
+               $type_controls = $this->RepeaterMessageTypes->findControlsByType('Baculum\Web\Portlets\DirectiveCheckBox');
                $is_all = false;
                $types = array();
                for ($i = 0; $i < count($type_controls); $i++) {
@@ -63,7 +61,7 @@ class MessageTypes extends DirectiveListTemplate {
                        // skip parent repeater items
                        return;
                }
-               $control = $this->getChildControl($param->Item, 'DirectiveCheckBox');
+               $control = $this->getChildControl($param->Item, 'Baculum\Web\Portlets\DirectiveCheckBox');
                if (is_object($control)) {
                        $control->setHost($param->Item->Data['host']);
                        $control->setComponentType($param->Item->Data['component_type']);
index 1c5b39a96cb18b7b5a8722699341a80b5a8c7e3f..75005dae267a89f35a08b6a01fd6cf99720132ab 100644 (file)
@@ -1,5 +1,5 @@
 <com:TActiveRepeater ID="RepeaterMessageTypes" OnItemCreated="createTypeListElement">
        <prop:ItemTemplate>
-               <com:Application.Web.Portlets.DirectiveCheckBox />
+               <com:Baculum.Web.Portlets.DirectiveCheckBox />
        </prop:ItemTemplate>
 </com:TActiveRepeater>
index 2537c9c1ddaf941f581e107dd48274c716b96fe4..c290b94a814de63e107510ed3a9273f7b063f9cc 100644 (file)
@@ -21,9 +21,9 @@
  */
 
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('Application.Web.Class.WebUserRoles');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
+
+use Baculum\Web\Modules\WebUserRoles;
 
 /**
  * Message envelope control.
index cc328282e5a5ebfc7519864cc7526a87308f1387..aa8823f13d6b7f043f2d053064cbc8c6bb0613cc 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New FileSet exclude menu.
index 981bbb9e56bc59bb841f2ed21d0950c09b8317d2..c1adebf3d05af7b8aac71868d5e768407258c62e 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New FileSet file options menu.
index a1c75a40cb90126f621f3fbf80f035dcb73a7399..1efc4d9e11d38ca6e7a2b730d1455936c5362f35 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New FileSet include and exclude menu.
index 540000cfa730561092d890d2209fce7b3a53c261..3540b89ec3c0aabc646cd953c5bf509e9a3d9ab5 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New messages menu control.
index 8ab185d3c200b3ad7833ae5aeb3251735280de84..a56665a9d401ef5d70beccd1bbbd5a66cbeaba82 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New resource menu.
index 46c15c516a2f5b998ad738409df590f2053f7776..a1395c58141ec326ce24aaca7341292ce4072a1c 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New runscript menu.
index 8f196227b4a66d984b16d1b56d9e700c313fd23c..feede91f24893217d922343cb3981f8b4138c8ac 100644 (file)
@@ -20,8 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.DirectiveListTemplate');
+namespace Baculum\Web\Portlets;
 
 /**
  * New schedule menu.
index 76bad8c3d814d7a128a23f87c147363f260c895a..81bea1b507deffc968785332d23c0be8c11a9cc5 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\TTemplateControl;
+
 /**
  * Portlets control base.
  *
index 50f0d794a572678ab7874a96935a07f55294a58e..ee5d96f925bcce6c5eaa4741b3c5e57eab34f5e7 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
-Prado::using('Application.Web.Portlets.ConfigListTemplate');
+namespace Baculum\Web\Portlets;
+
+use Prado\Web\UI\ActiveControls\IActiveControl;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\UI\ActiveControls\TActiveControlAdapter;
 
 /**
  * Resource list template control.
index 62ef659fa196704e61b5bc81b5d870be089275d2..82a98f03222598a32464cfc5ac6b8522c8f2efb8 100644 (file)
@@ -20,7 +20,7 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
 
 /**
  * Resource monitor.
index f4694272ec14cc40b6fa01e265af8cb55d0270bb..f5e32ff9354875c05664b26c02f82ab0d59b07ce 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActivePanel');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveCustomValidator');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
+
+use Prado\Prado;
+use stdClass;
 
 /**
  * Run job control.
@@ -206,7 +201,10 @@ class RunJob extends Portlets {
                        $jobshow = $this->getModule('api')->get(
                                array('jobs', $jobdata->jobid, 'show'), null, true, self::USE_CACHE
                        )->output;
-                       $jobdata->storage = $this->getResourceName('storage', $jobshow);
+                       $jsh = $this->getModule('job_info')->parseResourceDirectives($jobshow);
+                       $storage = key_exists('storage', $jsh) ? $jsh['storage']['name'] : null;
+                       $autochanger = key_exists('autochanger', $jsh) ? $jsh['autochanger']['name'] : null;
+                       $jobdata->storage = $storage ?: $autochanger;
                }
                $storage_list = array();
                $storages = $this->getModule('api')->get(array('storages'), null, true, self::USE_CACHE)->output;
@@ -242,7 +240,6 @@ class RunJob extends Portlets {
        /**
         * set jobid to run job again.
         *
-        * @return none;
         */
        public function setJobId($jobid) {
                $jobid = intval($jobid);
@@ -261,7 +258,6 @@ class RunJob extends Portlets {
        /**
         * set job name to run job again.
         *
-        * @return none;
         */
        public function setJobName($job_name) {
                $this->setViewState(self::JOB_NAME, $job_name);
index 8ebf3fd7e1047e8c3ceeff46918d8d64222020e2..9998b0d2617cd4c1485cca1e763f5101314a9dc9 100644 (file)
@@ -20,9 +20,9 @@
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.JuiControls.TJuiDatePicker');
-Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
-Prado::using('Application.Web.Portlets.Portlets');
+namespace Baculum\Web\Portlets;
+
+use Prado\TPropertyValue;
 
 /**
  * Schedule status control.
index 0247415df888dca5defa284437bee746bf477243..316077327ad33e45945478dda3fd5c10da367758 100644 (file)
  * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
-Prado::using('System.Web.UI.ActiveControls.TCallback');
-Prado::using('System.Web.UI.ActiveControls.TActiveCheckBox');
-Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
-Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
-Prado::using('Application.Web.Portlets.Portlets');
+use Prado\TPropertyValue;
+use Baculum\Web\Portlets\Portlets;
 
 /**
  * Update slots control.
index a54bb7676ccd69ba40255b24fce75e0f60d588ea..c006ee5f6a956c765bef90c360434ede693be764 100644 (file)
@@ -2,39 +2,38 @@
 <application id="baculum" mode="Debug">
        <paths>
                <using namespace="System.I18N.*" />
-               <using namespace="Application.Common.Portlets.BButton" />
-               <using namespace="Application.Common.Portlets.BActiveButton" />
-               <using namespace="Application.Common.Class.BClientScript" />
-               <using namespace="Application.Common.Class.BStyleSheet" />
+               <alias id="Baculum" path="" />
+               <using namespace="Baculum.Common.Modules.*" />
+               <using namespace="Baculum.Common.Portlets.*" />
        </paths>
        <modules>
                <!-- generic common modules -->
-               <module id="asset" class="Application.Common.Class.BAssetManager" />
-               <module id="logging" class="Application.Common.Class.Logging" />
-               <module id="misc" class="Application.Common.Class.Miscellaneous" />
-               <module id="config_ini" class="Application.Common.Class.ConfigIni" />
-               <module id="config_bacula" class="Application.Common.Class.ConfigBacula" />
+               <module id="asset" class="Baculum\Common\Modules\BAssetManager" />
+               <module id="logging" class="Baculum\Common\Modules\Logging" />
+               <module id="misc" class="Baculum\Common\Modules\Miscellaneous" />
+               <module id="config_ini" class="Baculum\Common\Modules\ConfigIni" />
+               <module id="config_bacula" class="Baculum\Common\Modules\ConfigBacula" />
                <!-- authentication and authorization modules -->
-               <module id="auth_basic" class="Application.Common.Class.AuthBasic" />
-               <module id="auth_oauth2" class="Application.Common.Class.AuthOAuth2" />
-               <module id="ldap" class="Application.Common.Class.Ldap" />
+               <module id="auth_basic" class="Baculum\Common\Modules\AuthBasic" />
+               <module id="auth_oauth2" class="Baculum\Common\Modules\AuthOAuth2" />
+               <module id="ldap" class="Baculum\Common\Modules\Ldap" />
                <!-- cryptographic modules -->
-               <module id="crypto" class="Application.Common.Class.Crypto" />
-               <module id="apr1md5" class="Application.Common.Class.Apr1Md5" />
-               <module id="bcrypt" class="Application.Common.Class.BCrypt" />
-               <module id="sha1" class="Application.Common.Class.Sha1" />
-               <module id="ssha1" class="Application.Common.Class.Ssha1" />
-               <module id="sha256" class="Application.Common.Class.Sha256" />
-               <module id="sha512" class="Application.Common.Class.Sha512" />
+               <module id="crypto" class="Baculum\Common\Modules\Crypto" />
+               <module id="apr1md5" class="Baculum\Common\Modules\Apr1Md5" />
+               <module id="bcrypt" class="Baculum\Common\Modules\BCrypt" />
+               <module id="sha1" class="Baculum\Common\Modules\Sha1" />
+               <module id="ssha1" class="Baculum\Common\Modules\Ssha1" />
+               <module id="sha256" class="Baculum\Common\Modules\Sha256" />
+               <module id="sha512" class="Baculum\Common\Modules\Sha512" />
                <!-- communication modules -->
                <module id="request" class="THttpRequest" UrlManager="url_manager" UrlFormat="HiddenPath" />
-               <module id="url_manager" class="Application.Common.Class.BaculumUrlMapping" EnableCustomUrl="true" />
+               <module id="url_manager" class="Baculum\Common\Modules\BaculumUrlMapping" EnableCustomUrl="true" />
        </modules>
        <services>
-               <service id="page" class="TPageService" BasePath="Application.Common.Pages" DefaultPage="CommonPage" />
-               <service id="oauth" class="TPageService" BasePath="Application.API.Pages.OAuth2" DefaultPage="Authorize" />
-               <service id="api" class="TPageService" BasePath="Application.API.Pages.API" DefaultPage="Welcome" />
-               <service id="panel" class="TPageService" BasePath="Application.API.Pages.Panel" DefaultPage="APIHome" />
-               <service id="web" class="TPageService" BasePath="Application.Web.Pages" DefaultPage="Dashboard" />
+               <service id="page" class="TPageService" BasePath="Baculum.Common.Pages" DefaultPage="CommonPage" />
+               <service id="oauth" class="TPageService" BasePath="Baculum.API.Pages.OAuth2" DefaultPage="Authorize" />
+               <service id="api" class="TPageService" BasePath="Baculum.API.Pages.API" DefaultPage="Welcome" />
+               <service id="panel" class="TPageService" BasePath="Baculum.API.Pages.Panel" DefaultPage="APIHome" />
+               <service id="web" class="TPageService" BasePath="Baculum.Web.Pages" DefaultPage="Dashboard" />
        </services>
 </application>
index f596c766ad00edfe10abe427315b15c17a834a88..1e25b48a8dc464bc03e56a85061ba80ae9362a18 100644 (file)
@@ -36,7 +36,8 @@
 
 $namespaces = [
        'Prado\\' => APPLICATION_DIRECTORY . '/protected/vendor/pradosoft/prado/framework',
-       'JSMin\\' => APPLICATION_DIRECTORY . '/protected/vendor/mrclay/jsmin-php/src/JSMin'
+       'JSMin\\' => APPLICATION_DIRECTORY . '/protected/vendor/mrclay/jsmin-php/src/JSMin',
+       'Baculum\\' => APPLICATION_DIRECTORY . '/protected'
 ];
 
 class BaculumAutoloader {