├── .gitignore ├── .project ├── 4CONTRIBUTORS ├── 4CONTRIBUTORS.ru ├── AUTHORS ├── COPYING ├── ChangeLog ├── README ├── UPGRADE ├── application ├── .htaccess ├── cli │ ├── .htaccess │ └── test.php ├── config.ini ├── config.ini.original ├── controllers │ ├── AdminController.php │ ├── AuthController.php │ ├── BconsoleController.php │ ├── ChartController.php │ ├── ClientController.php │ ├── DirectorController.php │ ├── ErrorController.php │ ├── FeedController.php │ ├── FileController.php │ ├── HelpController.php │ ├── IndexController.php │ ├── JobController.php │ ├── LogController.php │ ├── PoolController.php │ ├── RestorejobController.php │ ├── StorageController.php │ ├── VolumeController.php │ ├── WbjobdescController.php │ └── WblogbookController.php ├── forms │ ├── FormBaculaACL.php │ ├── FormBaculaCommandACL.php │ ├── FormBaculaFill.php │ ├── FormForgotPassword.php │ ├── FormJobdesc.php │ ├── FormJobrun.php │ ├── FormLogin.php │ ├── FormRestoreOptions.php │ ├── FormRole.php │ ├── FormUser.php │ └── FormWebaculaACL.php ├── layouts │ └── default │ │ ├── dashboard.phtml │ │ ├── footer.phtml │ │ ├── header.phtml │ │ ├── login.phtml │ │ ├── main-menu.phtml │ │ ├── main.phtml │ │ └── printable.phtml ├── models │ ├── Client.php │ ├── Director.php │ ├── FileSet.php │ ├── Files.php │ ├── Job.php │ ├── Log.php │ ├── Media.php │ ├── Pool.php │ ├── Storage.php │ ├── Timeline.php │ ├── Version.php │ ├── WbClientACL.php │ ├── WbCommandACL.php │ ├── WbDtCommands.php │ ├── WbDtResources.php │ ├── WbFilesetACL.php │ ├── WbJobACL.php │ ├── WbPoolACL.php │ ├── WbStorageACL.php │ ├── WbTmpTable.php │ ├── WbWhereACL.php │ ├── Wbjobdesc.php │ ├── Wblogbook.php │ ├── Wblogtype.php │ ├── Wbphpsession.php │ ├── Wbresources.php │ ├── Wbroles.php │ └── Wbusers.php └── views │ ├── helpers │ ├── ConvBytes.php │ ├── ConvSecondsToDays.php │ ├── ConvSecondsToDaysHours.php │ ├── DecodeJobType.php │ ├── Int2Char.php │ ├── MainmenuFloat.php │ └── PermissionOctal2String.php │ └── scripts │ ├── admin │ ├── form-bacula-acl.phtml │ ├── form-role.phtml │ ├── form-user.phtml │ ├── index.phtml │ ├── role-index.phtml │ ├── role-main-form.phtml │ ├── role-more-info.phtml │ └── user-index.phtml │ ├── auth │ ├── forgot-password.phtml │ └── login.phtml │ ├── bconsole │ ├── cmd.phtml │ └── wterminal.phtml │ ├── client │ ├── all.phtml │ └── status-client-id.phtml │ ├── decorators │ ├── formBaculaACL.phtml │ ├── formBaculaCommandACL.phtml │ ├── formBaculaFill.phtml │ ├── formJobrun.phtml │ ├── formRestoreoptions.phtml │ ├── formRole.phtml │ ├── formUser.phtml │ └── formWebaculaACL.phtml │ ├── director │ ├── listjobtotals.phtml │ └── statusdir.phtml │ ├── error │ ├── bacula-access-denied.phtml │ ├── error.phtml │ └── webacula-access-denied.phtml │ ├── file │ ├── list.phtml │ └── list_pagination_ctrl.phtml │ ├── help │ ├── index.phtml │ └── my-php-info.phtml │ ├── index │ └── index.phtml │ ├── job │ ├── cancel-job.phtml │ ├── detail.phtml │ ├── find-file-name.phtml │ ├── find-filters.phtml │ ├── find-form.phtml │ ├── find_filters_pagination_ctrl.phtml │ ├── next-dashboard.phtml │ ├── next.phtml │ ├── problem-dashboard.phtml │ ├── problem.phtml │ ├── run-job-output.phtml │ ├── run-job.phtml │ ├── running-dashboard.phtml │ ├── running.phtml │ ├── show-job.phtml │ ├── terminated-dashboard.phtml │ ├── terminated.phtml │ ├── timeline-dashboard.phtml │ └── timeline.phtml │ ├── log │ └── view-log-id.phtml │ ├── msg-note.phtml │ ├── pagination_ctrl.phtml │ ├── pool │ └── all.phtml │ ├── restorejob │ ├── draw-file-tree.phtml │ ├── list-recent-restore.phtml │ ├── list-restore.phtml │ ├── main-form.phtml │ ├── msg01.phtml │ ├── msg02session.phtml │ ├── restore-all.phtml │ ├── restore-recent-all.phtml │ ├── restore-single-file.phtml │ ├── run-restore.phtml │ └── select-backups-before-date.phtml │ ├── storage │ ├── act-mount.phtml │ ├── status-id.phtml │ └── storage.phtml │ ├── volume │ ├── detail.phtml │ ├── find-name.phtml │ ├── find-pool-id.phtml │ ├── problem-dashboard.phtml │ └── problem.phtml │ ├── wbjobdesc │ ├── add.phtml │ ├── index.phtml │ └── modify.phtml │ └── wblogbook │ ├── add.phtml │ ├── index-printable.phtml │ ├── index.phtml │ └── modify.phtml ├── data ├── .htaccess ├── README └── cache │ └── _dummy ├── docs ├── .htaccess ├── html │ ├── ACLs.png │ ├── image.png │ ├── install.css │ └── install.html ├── pdf │ └── install.pdf ├── src │ ├── install.tex │ ├── makedoc │ └── pics │ │ ├── ACLs.odg │ │ └── ACLs.png └── txt │ ├── FAQ.txt │ ├── LogBook.txt │ ├── RestoreJob.txt │ ├── WebaculaTerminal.txt │ ├── Workflow.txt │ ├── install.txt │ ├── install.ubuntu.txt │ └── upgrade.txt ├── html ├── .htaccess ├── .htaccess_original ├── favicon.ico ├── images │ ├── 1x1.png │ ├── PoweredBy_ZF_4LightBG.png │ ├── Webacula_logo.png │ ├── arrow-left.png │ ├── arrow-right.png │ ├── bookmark-new.png │ ├── connected.png │ ├── dialog-ok-apply-small.png │ ├── dialog-ok-apply.png │ ├── disconnected.png │ ├── document-edit.png │ ├── documentinfo.png │ ├── edit-delete.png │ ├── feed-icon-14x14.png │ ├── feed-icon-28x28.png │ ├── folder.png │ ├── gplv3-127x51.png │ ├── jquery_logo.png │ ├── list-add.png │ ├── media-tape-changer.png │ ├── printer1.png │ ├── process-stop.png │ ├── re-run-job-small.png │ ├── re-run-job.png │ ├── restore-small.png │ ├── restore.png │ ├── up.png │ └── user-online.png ├── index.php ├── scripts │ ├── hoverIntent.js │ ├── insert_tags.js │ ├── jqModal.js │ ├── jquery-1.4.4.min.js │ ├── jquery-blockUI.js │ ├── jquery-ui-1.8.6.custom.min.js │ ├── jquery-ui.core.js │ ├── jquery-ui.datepicker-de.js │ ├── jquery-ui.datepicker-es.js │ ├── jquery-ui.datepicker-fr.js │ ├── jquery-ui.datepicker-it.js │ ├── jquery-ui.datepicker-pt.js │ ├── jquery-ui.datepicker-ru.js │ ├── jquery-ui.datepicker.js │ ├── jquery.confirm-1.2.js │ ├── jquery.corner.js │ ├── jquery.tooltip.min.js │ ├── json2.js │ ├── superfish.js │ ├── supersubs.js │ ├── ui.selectmenu.js │ └── wterm.jquery.js ├── styles │ └── default │ │ ├── admin.css │ │ ├── dialog.css │ │ ├── images │ │ ├── arrows-ffffff.png │ │ ├── shadow.png │ │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png │ │ ├── ui-bg_flat_15_cd0a0a_40x100.png │ │ ├── ui-bg_glass_100_e4f1fb_1x400.png │ │ ├── ui-bg_glass_50_3baae3_1x400.png │ │ ├── ui-bg_glass_80_d7ebf9_1x400.png │ │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png │ │ ├── ui-bg_highlight-hard_70_000000_1x100.png │ │ ├── ui-bg_highlight-soft_100_deedf7_1x100.png │ │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png │ │ ├── ui-icons_2694e8_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_3d80b3_256x240.png │ │ ├── ui-icons_72a7cf_256x240.png │ │ └── ui-icons_ffffff_256x240.png │ │ ├── jquery-ui-1.8.6.custom.css │ │ ├── site.css │ │ ├── superfish-navbar.css │ │ ├── superfish-vertical.css │ │ ├── superfish.css │ │ ├── ui.selectmenu.css │ │ ├── wbjobdesc.css │ │ ├── wblogbook.css │ │ └── wterm.css └── test_mod_rewrite │ ├── .htaccess │ ├── index.php │ └── testlink1.html ├── install ├── .htaccess ├── MySql │ ├── 10_make_tables.sh │ └── 20_acl_make_tables.sh ├── PostgreSql │ ├── 10_make_tables.sh │ └── 20_acl_make_tables.sh ├── SqLite │ ├── 10_make_tables.sh │ └── 20_acl_make_tables.sh ├── apache │ └── webacula.conf ├── check_system_requirements.php ├── db.conf └── password-to-hash.php ├── languages ├── .htaccess ├── cs │ ├── webacula_cs.mo │ └── webacula_cs.po ├── de │ ├── webacula_de.mo │ └── webacula_de.po ├── en │ ├── webacula_en.mo │ └── webacula_en.po ├── es │ ├── webacula_es.mo │ └── webacula_es.po ├── fr │ ├── webacula_fr.mo │ └── webacula_fr.po ├── it │ ├── webacula_it.mo │ └── webacula_it.po ├── pt │ ├── webacula_pt_BR.mo │ └── webacula_pt_BR.po └── ru │ ├── webacula_ru.mo │ └── webacula_ru.po ├── library └── MyClass │ ├── Action │ └── Helper │ │ └── MyCache.php │ ├── BaculaAcl.php │ ├── ControllerAclAction.php │ ├── GaugeTime.php │ ├── HomebrewBase64.php │ ├── PasswordHash.php │ ├── SendEmail.php │ ├── Session │ └── SaveHandler │ │ └── DbTable.php │ ├── Validate │ ├── BaculaAclWhere.php │ ├── BaculaJobId.php │ ├── Datetime.php │ └── LogBookId.php │ └── WebaculaAcl.php ├── packaging ├── Fedora │ ├── build.sh │ └── webacula.spec └── README └── tests ├── AllTests.php ├── README ├── application ├── ControllerTestCase.php ├── ModelTestCase.php ├── bootstrap.php ├── controllers │ ├── AdminControllerTest.php │ ├── AllTests.php │ ├── ChartControllerTest.php │ ├── ClientControllerTest.php │ ├── DirectorControllerTest.php │ ├── ErrorControllerTest.php │ ├── FeedControllerTest.php │ ├── FileControllerTest.php │ ├── HelpControllerTest.php │ ├── IndexControllerTest.php │ ├── JobControllerTest.php │ ├── LogControllerTest.php │ ├── OtherControllerTest.php │ ├── PoolControllerTest.php │ ├── RestoreControllerTest.php │ ├── StorageControllerTest.php │ ├── VolumeControllerTest.php │ ├── WbjobdescControllerTest.php │ ├── WblogbookControllerTest.php │ └── WebaculaAclControllerTest.php └── models │ ├── AllTests.php │ ├── JobTest.php │ ├── WbTmpTableTest.php │ ├── WbjobdescTest.php │ ├── WblogbookTest.php │ └── WblogtypeTest.php ├── conf ├── .htaccess_development ├── config.ini.mysql ├── config.ini.pgsql ├── config.ini.sqlite └── locale │ ├── config.ini.cs │ ├── config.ini.de │ ├── config.ini.en │ ├── config.ini.es │ ├── config.ini.fake_locale │ ├── config.ini.fr │ ├── config.ini.it │ ├── config.ini.pt_BR │ └── config.ini.ru ├── locale-test.sh ├── phpunit_report.xml ├── prepare_tests ├── MySql │ ├── 10_bacula_make_tables │ ├── 20_webacula_fill_logbook │ ├── 25_webacula_fill_jobdesc │ ├── 30_webacula_fill_acl │ └── 40_bacula_fill_log ├── PostgreSql │ ├── 10_bacula_make_tables │ ├── 20_bacula_grant_privileges │ ├── 30_webacula_fill_logbook │ ├── 35_webacula_fill_jobdesc │ └── 40_webacula_fill_acl ├── SqLite │ ├── 10_bacula_make_tables │ ├── 20_webacula_fill_logbook │ ├── 25_webacula_fill_jobdesc │ └── 30_webacula_fill_acl ├── bacula_DBcopy_MySQL2PGSQL.php ├── bacula_DBcopy_MySQL2sqlite.php ├── catalog │ └── bacula.mysql.dump ├── check-password.php ├── clean_all.sh ├── create_dir_tree.php ├── dev │ ├── devchanger │ │ └── conf │ └── pool.file.7d.0001 ├── opt │ └── bacula │ │ └── etc │ │ ├── bacula-dir.conf │ │ ├── bacula-fd.conf │ │ ├── bacula-sd.conf │ │ ├── bconsole.conf │ │ ├── disk-changer │ │ └── scripts │ │ ├── after_test.sh │ │ └── before_test.sh ├── prepare.sh └── sync_bacula_db_from_mysql2others.sh └── runtest.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.tmp 3 | *.swp 4 | .buildpath 5 | .project 6 | .settings/ 7 | nbproject/ 8 | library/Zend/ 9 | library/Zend.arc/ 10 | tests/report/* 11 | # 12 | # data : cache, tmp, session 13 | # 14 | data/cache/* 15 | data/tmp/* 16 | data/session/* 17 | # 18 | # latex 19 | # 20 | *.tex.backup 21 | docs/src/*.aux 22 | docs/src/*.dvi 23 | docs/src/*.lof 24 | docs/src/*.log 25 | docs/src/*.out 26 | docs/src/*.toc 27 | docs/src/*.pdf 28 | #docs/html/* 29 | #docs/txt/* 30 | #docs/pdf/* -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | webacula 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.validation.validationbuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.dltk.core.scriptbuilder 20 | 21 | 22 | 23 | 24 | net.sourceforge.phpeclipse.parserbuilder 25 | 26 | 27 | 28 | 29 | 30 | net.sourceforge.phpeclipse.phpnature 31 | org.eclipse.php.core.PHPNature 32 | org.eclipse.wst.jsdt.core.jsNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /4CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | 2 | The list of contributors you can find in the file AUTHORS. 3 | 4 | For Contributors 5 | ~~~~~~~~~~~~~~~~ 6 | 7 | If you find a bug and describe it in the bugtracker http://webacula.tim4dev.com/ 8 | I'll be grateful. 9 | If you send me a patch, I'll be very grateful. 10 | 11 | Can attach the patch directly in the bugtracker or send it to me by email tim4dev@gmail.com 12 | 13 | If you are working with Git, then use 14 | git send-email 15 | And follow these simple rules : 16 | "Pro Git : Commit Guidelines" http://progit.org/book/ch5-2.html 17 | 18 | 19 | 20 | For Translators 21 | ~~~~~~~~~~~~~~~ 22 | 23 | Webacula support multilingual - standard gettext (*.mo) files. 24 | Make copy languages/en/webacula_en.po and modify for your language. 25 | And send me the file as described above. 26 | 27 | 28 | 29 | For designers 30 | ~~~~~~~~~~~~~ 31 | 32 | Now very easy to create new skins. 33 | For a basis, take the contents of directory "html/styles/default". 34 | Create a subdirectory in "html/styles", for example "html/styles/mycoolskin". 35 | Make their own styles and images. 36 | Further, if you want to change the layouts of the pages in "application/layouts". 37 | For a basis, take the contents of directory "application/layouts/default". 38 | Create a subdirectory "application/layouts/mycoolskin". 39 | Make their own layouts. 40 | 41 | And then include your styles, images and layouts in "application/config.ini" : 42 | 43 | [layout] 44 | path = "mycoolskin" 45 | 46 | -------------------------------------------------------------------------------- /4CONTRIBUTORS.ru: -------------------------------------------------------------------------------- 1 | 2 | Список помощников вы можете найти в файле AUTHORS. 3 | 4 | Для помощников 5 | ~~~~~~~~~~~~~~ 6 | 7 | Если вы заметили баг и описали его в багтрекере 8 | https://sourceforge.net/tracker/?group_id=201199&atid=976599 9 | я буду вам благодарен. Если вы пришлете мне патч, то я буду вам премного благодарен. 10 | 11 | Вы можете приаттачить патч прямо в багтрекере, либо прислать его мне по емайлу tim4dev@gmail.com 12 | 13 | Если вы работаете с Git, то используйте 14 | git send-email 15 | следуя этим простым правилам : 16 | "Pro Git : Commit Guidelines" http://progit.org/book/ch5-2.html 17 | 18 | 19 | 20 | Для переводчиков 21 | ~~~~~~~~~~~~~~~~ 22 | 23 | Webacula имеет мультиязычную поддержку в виде стандартных файлов для gettext (*.mo). 24 | Сделайте копию languages/en/webacula_en.po и измените для вашего языка. 25 | И пришлите файл мне как описано выше. 26 | 27 | 28 | 29 | Для дизайнеров 30 | ~~~~~~~~~~~~~~ 31 | 32 | Теперь можно легко создавать новые скины. 33 | За основу возьмите содержимое каталога "html/styles/default". 34 | Создайте свой подкаталог в "html/styles", например, "html/styles/mycoolskin". 35 | Сделайте там свои стили и картинки. 36 | Далее, если вы хотите, измените макеты страниц в "application/layouts". 37 | За основу возьмите содержимое каталога "application/layouts/default". 38 | Создайте подкаталог "application/layouts/mycoolskin". 39 | Сделайте свои макеты. 40 | 41 | И подключите все ваши стили, картинки и макеты в "application/config.ini" : 42 | 43 | [layout] 44 | path = "mycoolskin" 45 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | This file contains a list of the people who have contributed code, language translation to the Webacula project. 3 | Thanks to all of you. Without your participation, Webacula would not be the success it is today. 4 | 5 | If you have made a contribution and do not find your name on this list, please send a note to me: tim4dev@gmail.com 6 | 7 | Contributors: 8 | 9 | Alexandre Boily : French translation 10 | Carsten Menke : German translation, patches 11 | Dimitri Bellini : Italian translation 12 | Efren Bravo : Spanish translation 13 | John Resig : jQuery JavaScript Library 14 | Joel Birch : Superfish jQuery menu widget 15 | Kern Sibbald : Bacula developer 16 | Manuel María Pérez : Spanish translation 17 | Mauro Colorio : Italian translation 18 | Reynier Perez Mira : INSTALL.es translation 19 | Samuel Rios Carvalho : Portuguese Brazil translation 20 | Sébastien Ursini : documentation to install Webacula on Ubuntu/Debian based 21 | Sven-Hendrik Haase : German translation 22 | Tomáš Rybička : Czech translation 23 | Venkatakrishnan Ganesh : wterminal 24 | Yuriy Timofeev : Webacula developer 25 | 26 | -------------------------------------------------------------------------------- /UPGRADE: -------------------------------------------------------------------------------- 1 | Please see the file docs/txt/upgrade.txt 2 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | ## no access to this directory 2 | order allow,deny 3 | deny from all 4 | -------------------------------------------------------------------------------- /application/cli/.htaccess: -------------------------------------------------------------------------------- 1 | order allow,deny 2 | deny from all 3 | -------------------------------------------------------------------------------- /application/cli/test.php: -------------------------------------------------------------------------------- 1 | general->db->adapter) ); 33 | $params = $config->general->db->config->toArray(); 34 | // for cross database compatibility with PDO, MySQL, PostgreSQL 35 | $params['options'] = array(Zend_Db::CASE_FOLDING => Zend_Db::CASE_LOWER, Zend_DB::AUTO_QUOTE_IDENTIFIERS => FALSE); 36 | $db_bacula = Zend_Db::factory($config->general->db->adapter, $params); 37 | Zend_Db_Table::setDefaultAdapter($db_bacula); 38 | Zend_Registry::set('db_bacula', $db_bacula); 39 | 40 | 41 | /* 42 | * main program 43 | */ 44 | $params = $config->general->db->config->toArray(); 45 | var_dump($params); 46 | 47 | echo "\n", getcwd(), "\n"; 48 | 49 | ?> -------------------------------------------------------------------------------- /application/controllers/IndexController.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | require_once 'Zend/Controller/Action.php'; 25 | 26 | class IndexController extends MyClass_ControllerAclAction 27 | { 28 | 29 | 30 | function indexAction () 31 | { 32 | if ($this->_helper->hasHelper('layout')) 33 | $this->_helper->layout->setLayout('dashboard'); 34 | // actionToStack($action, $controller, $module, $params); 35 | $this->_helper->actionStack('problem-dashboard', 'job'); 36 | $this->_helper->actionStack('problem-dashboard', 'volume'); 37 | $this->_helper->actionStack('next-dashboard', 'job'); 38 | $this->_helper->actionStack('running-dashboard', 'job'); 39 | $this->_helper->actionStack('terminated-dashboard', 'job'); 40 | $this->_helper->actionStack('timeline-dashboard', 'job'); 41 | if (empty($this->view->config->general->head_title)) { 42 | $this->view->titleDashboard = $this->view->translate('Webacula Main Page'); 43 | } else { 44 | $this->view->titleDashboard = $this->view->config->general->head_title; 45 | } 46 | $this->view->meta_refresh = 300; // meta http-equiv="refresh" 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /application/controllers/LogController.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | require_once 'Zend/Controller/Action.php'; 25 | 26 | class LogController extends MyClass_ControllerAclAction 27 | { 28 | 29 | function init () 30 | { 31 | parent::init(); 32 | Zend_Loader::loadClass('Log'); 33 | } 34 | 35 | function viewLogIdAction () 36 | { 37 | // http://localhost/webacula/log/jobid//jobname/ 38 | $job_id = intval($this->_request->getParam('jobid')); 39 | $job_name = addslashes($this->_request->getParam('jobname')); 40 | if (! empty($job_id)) { 41 | $this->view->title = sprintf($this->view->translate->_("Console messages for Job %s, JobId %u"), $job_name, $job_id); 42 | $log = new Log(); 43 | $this->view->result = $log->getById($job_id); 44 | } else 45 | $this->view->result = null; 46 | $this->view->meta_refresh = 300; // meta http-equiv="refresh" 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /application/controllers/PoolController.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | 25 | require_once 'Zend/Controller/Action.php'; 26 | 27 | class PoolController extends MyClass_ControllerAclAction 28 | { 29 | 30 | function init() 31 | { 32 | parent::init(); 33 | Zend_Loader::loadClass('Pool'); 34 | } 35 | 36 | function allAction() 37 | { 38 | $order = addslashes(trim( $this->_request->getParam('order', 'Name') )); 39 | $this->view->title = $this->view->translate->_("Pools"); 40 | // to view 41 | $this->view->meta_refresh = 300; // meta http-equiv="refresh" 42 | $pools = new Pool(); 43 | $this->view->pools = $pools->fetchAll(null, $order); 44 | } 45 | 46 | 47 | } -------------------------------------------------------------------------------- /application/layouts/default/dashboard.phtml: -------------------------------------------------------------------------------- 1 | render('header.phtml') ?> 2 | 3 | 4 | render('main-menu.phtml') ?> 5 | 6 | meta_refresh ) : ?> 7 |
8 | translate->_("Last Updated: %s"), date("r")); ?>. 9 | translate->_("Updated every %s seconds"), $this->meta_refresh); ?> 10 |
11 | 12 | 13 | 14 | layout()->job_running) ) 18 | $aContent[] = $this->layout()->job_running; 19 | 20 | if ( !empty($this->layout()->job_next) ) 21 | $aContent[] = $this->layout()->job_next; 22 | 23 | if ( !empty($this->layout()->job_terminated) ) 24 | $aContent[] = $this->layout()->job_terminated; 25 | 26 | if ( !empty($this->layout()->job_timeline) ) 27 | $aContent[] = $this->layout()->job_timeline; 28 | 29 | if ( !empty($this->layout()->job_problem) ) 30 | $aContent[] = $this->layout()->job_problem; 31 | 32 | if ( !empty($this->layout()->volume_problem) ) 33 | $aContent[] = $this->layout()->volume_problem; 34 | ?> 35 | 36 | 37 | 38 | 39 |
40 | 44 |
45 | '; 48 | ?> 49 | 50 | 51 |

 

52 | 53 | 54 | render('footer.phtml') ?> -------------------------------------------------------------------------------- /application/layouts/default/footer.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /application/layouts/default/login.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?php echo $this->escape($this->title); ?> 7 | 8 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
60 | 63 |
64 | 65 | -------------------------------------------------------------------------------- /application/layouts/default/main.phtml: -------------------------------------------------------------------------------- 1 | render('header.phtml') ?> 2 | 3 | 4 | 5 | render('main-menu.phtml') ?> 6 | 7 | meta_refresh ) : ?> 8 |
9 | translate->_("Last Updated: %s"), date("r")); ?>. 10 | translate->_("Updated every %s seconds"), $this->meta_refresh); ?> 11 |
12 | 13 |
 
14 | 15 | 16 | layout()->content ?> 17 | 18 |

 

19 | 20 | 21 | render('footer.phtml') ?> -------------------------------------------------------------------------------- /application/layouts/default/printable.phtml: -------------------------------------------------------------------------------- 1 | layout()->content ?> -------------------------------------------------------------------------------- /application/models/Files.php: -------------------------------------------------------------------------------- 1 | . 19 | * 20 | * @author Yuriy Timofeev 21 | * @package webacula 22 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 23 | * 24 | */ 25 | 26 | class Files 27 | { 28 | public $db; 29 | public $db_adapter; 30 | 31 | public function __construct() 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 35 | } 36 | 37 | public function getSelectFilesByJobId($jobid) 38 | { 39 | // do Bacula ACLs 40 | Zend_Loader::loadClass('Job'); 41 | $table = new Job(); 42 | if ( !$table->isJobIdExists($jobid) ) 43 | return FALSE; 44 | // !!! IMPORTANT !!! с Zend Paginator нельзя использовать DISTINCT иначе не работает в PDO_PGSQL 45 | $select = new Zend_Db_Select($this->db); 46 | $select->from(array('f' => 'File'), array('FileId', 'FileIndex', 'LStat')); 47 | $select->joinLeft(array('p' => 'Path'), 'f.PathId = p.PathId' ,array('Path')); 48 | $select->joinLeft(array('n' => 'Filename'), 'f.FileNameId = n.FileNameId',array('Name')); 49 | $select->where("f.JobId = ?", $jobid); 50 | $select->order(array('f.FileIndex', 'f.FileId')); 51 | return $select; 52 | } 53 | 54 | 55 | } -------------------------------------------------------------------------------- /application/models/Pool.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class Pool extends Zend_Db_Table 25 | { 26 | public $db; 27 | public $db_adapter; 28 | protected $bacula_acl; // bacula acl 29 | 30 | public function __construct($config = array()) 31 | { 32 | $this->db = Zend_Registry::get('db_bacula'); 33 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 34 | $this->bacula_acl = new MyClass_BaculaAcl(); 35 | parent::__construct($config); 36 | } 37 | 38 | protected function _setupTableName() 39 | { 40 | switch ($this->db_adapter) { 41 | case 'PDO_PGSQL': 42 | $this->_name = 'pool'; 43 | break; 44 | default: // including mysql, sqlite 45 | $this->_name = 'Pool'; 46 | } 47 | parent::_setupTableName(); 48 | } 49 | 50 | protected function _setupPrimaryKey() 51 | { 52 | $this->_primary = 'poolid'; 53 | parent::_setupPrimaryKey(); 54 | } 55 | 56 | 57 | public function fetchAll($where = null, $order = null, $count = null, $offset = null) 58 | { 59 | $res = parent::fetchAll($where, $order, $count, $offset) 60 | ->toArray(); 61 | // do Bacula ACLs 62 | return $this->bacula_acl->doBaculaAcl($res, 'name', 'pool'); 63 | } 64 | 65 | 66 | } -------------------------------------------------------------------------------- /application/models/Version.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | class Version extends Zend_Db_Table 24 | { 25 | public $db; 26 | public $db_adapter; 27 | 28 | 29 | public function __construct ($config = array()) 30 | { 31 | $this->db = Zend_Registry::get('db_bacula'); 32 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 33 | parent::__construct($config); 34 | } 35 | 36 | 37 | protected function _setupTableName () 38 | { 39 | switch ($this->db_adapter) { 40 | case 'PDO_PGSQL': 41 | $this->_name = 'version'; 42 | break; 43 | default: // including mysql, sqlite 44 | $this->_name = 'Version'; 45 | } 46 | parent::_setupTableName(); 47 | } 48 | 49 | function getVesion() 50 | { 51 | $select = new Zend_Db_Select($this->db); 52 | $select->from('Version', 'VersionId'); 53 | $select->limit(1); 54 | $res = $this->db->fetchOne($select); 55 | return $res; 56 | } 57 | 58 | /** 59 | * Check Catalog DB version 60 | * Сравнивает версию БД Каталога Bacula 61 | * 62 | * @param $ver valid version 63 | * @return TRUE if correct 64 | */ 65 | function checkVesion($ver) 66 | { 67 | $res = $this->getVesion(); 68 | return ( $res == $ver ); 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /application/models/WbClientACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbClientACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_client_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbCommandACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbCommandACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_command_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | /** 40 | * Update Bacula Command ACLs 41 | * @param $commands FK to 'webacula_dt_commands' table 42 | * @param $role_id 43 | * @return int affected rows 44 | */ 45 | public function updateCommands($commands, $role_id) 46 | { 47 | // delete all ACLs 48 | $where = $this->getAdapter()->quoteInto('role_id = ?', $role_id); 49 | $this->delete($where); 50 | // set ACLs again 51 | $i = 0; 52 | if ($commands) 53 | foreach( $commands as $v ) { 54 | $data = array( 55 | 'role_id' => $role_id, 56 | 'dt_id' => $v ); 57 | $this->insert($data); 58 | $i++; 59 | } 60 | return $i; 61 | } 62 | 63 | 64 | 65 | } -------------------------------------------------------------------------------- /application/models/WbDtCommands.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbDtCommands extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_dt_commands'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbDtResources.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbDtResources extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_dt_resources'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbFilesetACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbFilesetACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_fileset_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbJobACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbJobACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_job_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbPoolACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbPoolACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_pool_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbStorageACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbStorageACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_storage_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/WbWhereACL.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class WbWhereACL extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_where_acl'; 27 | protected $_primary = 'id'; 28 | protected $_parents = array(); 29 | 30 | 31 | public function __construct ($config = array()) 32 | { 33 | $this->db = Zend_Registry::get('db_bacula'); 34 | parent::__construct($config); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /application/models/Wbjobdesc.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * Class for Logbook 19 | * 20 | * @package webacula 21 | * @author Yuriy Timofeev 22 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 23 | */ 24 | 25 | 26 | class Wbjobdesc extends Zend_Db_Table 27 | { 28 | public $db_adapter; 29 | protected $_name = 'webacula_jobdesc'; 30 | protected $_primary = 'desc_id'; 31 | 32 | 33 | 34 | public function __construct($config = array()) 35 | { 36 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 37 | $config['db'] = Zend_Registry::get('db_bacula'); // database 38 | $config['sequence']= true; 39 | parent::__construct($config); 40 | } 41 | 42 | 43 | public function init() { 44 | $db = Zend_Db_Table::getAdapter('db_bacula'); 45 | } 46 | 47 | 48 | } -------------------------------------------------------------------------------- /application/models/Wblogtype.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * Class for Logbook 19 | * 20 | * @package webacula 21 | * @author Yuriy Timofeev 22 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 23 | */ 24 | /* 25 | * workaround http://zendframework.com/issues/browse/ZF-7070 26 | * http://www.zfforums.com/zend-framework-components-13/databases-20/problem-postgres-2151.html#post11910 27 | */ 28 | class Wblogtype extends Zend_Db_Table 29 | { 30 | public $db; 31 | public $db_adapter; 32 | protected $_name = 'webacula_logtype'; 33 | protected $_primary = 'typeid'; 34 | 35 | 36 | public function __construct ($config = array()) 37 | { 38 | $this->db = Zend_Registry::get('db_bacula'); 39 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 40 | $config['db'] = $this->db; 41 | $config['sequence'] = true; 42 | parent::__construct($config); 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /application/models/Wbphpsession.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | * @author Yuriy Timofeev 19 | * @package webacula 20 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 21 | * 22 | */ 23 | 24 | class Wbphpsession extends Zend_Db_Table 25 | { 26 | protected $_name = 'webacula_php_session'; 27 | protected $_primary = 'id'; 28 | 29 | public $db; 30 | public $db_adapter; 31 | 32 | 33 | public function __construct ($config = array()) 34 | { 35 | $this->db = Zend_Registry::get('db_bacula'); 36 | $this->db_adapter = Zend_Registry::get('DB_ADAPTER'); 37 | parent::__construct($config); 38 | } 39 | 40 | 41 | /** 42 | * Delete session record(s) when delete user login 43 | * @param int $user_id 44 | */ 45 | public function deleteSession( $user_id ) 46 | { 47 | // get user login by user Id 48 | Zend_Loader::loadClass('Wbusers'); 49 | $users = new Wbusers(); 50 | $where = $users->getAdapter()->quoteInto('id = ?', $user_id); 51 | $row = $users->fetchRow($where); 52 | unset($where); 53 | if ( isset($row->login) ) { 54 | $where = $this->getAdapter()->quoteInto('login = ?', $row->login); 55 | $this->delete($where); 56 | } else { 57 | throw new Exception(__METHOD__.' : User login not found'); 58 | } 59 | } 60 | 61 | 62 | } -------------------------------------------------------------------------------- /application/views/helpers/ConvBytes.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | */ 10 | class Zend_View_Helper_ConvBytes { 11 | 12 | public function convBytes($bytes) 13 | { 14 | switch (TRUE) { 15 | case ($bytes == 0) : return 0; 16 | case ($bytes < pow(2,10)): return $bytes.' bytes'; 17 | case ($bytes >= pow(2,10) && $bytes < pow(2,20)): return round($bytes / pow(2,10), 0).' KB'; 18 | case ($bytes >= pow(2,20) && $bytes < pow(2,30)): return round($bytes / pow(2,20), 1).' MB'; 19 | case ($bytes >= pow(2,30) && $bytes < pow(2,40)): return round($bytes / pow(2,30), 1).' GB'; 20 | case ($bytes > pow(2,40)): return round($bytes / pow(2,40), 2).' TB'; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /application/views/helpers/ConvSecondsToDays.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | * 10 | * Special thanks to http://www.google.com/codesearch 11 | */ 12 | 13 | class Zend_View_Helper_convSecondsToDays { 14 | 15 | public function convSecondsToDays($seconds) 16 | { 17 | $days = floor($seconds / 86400); 18 | return ( $days ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /application/views/helpers/ConvSecondsToDaysHours.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | */ 10 | class Zend_View_Helper_convSecondsToDaysHours { 11 | 12 | public function convSecondsToDaysHours($seconds) 13 | { 14 | $days = floor($seconds / 86400); 15 | if ($days > 0) 16 | $seconds -= $days * 86400; 17 | 18 | $hours = floor($seconds / 3600); 19 | if ($days > 0 || $hours > 0) 20 | $seconds -= $hours * 3600; 21 | 22 | return ( $days . ":" . $hours ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /application/views/helpers/DecodeJobType.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | */ 10 | class Zend_View_Helper_DecodeJobType { 11 | 12 | public function decodeJobType($short) 13 | { 14 | switch ($short) { 15 | case 'B': return 'Backup'; 16 | case 'V': return 'Verify'; 17 | case 'R': return 'Restore'; 18 | case 'C': return 'Console program'; 19 | case 'D': return 'Admin'; 20 | case 'A': return 'Archive'; 21 | default: return 'Unknown'; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /application/views/helpers/Int2Char.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | */ 10 | class Zend_View_Helper_Int2Char { 11 | 12 | public function int2Char($val) 13 | { 14 | if ( $val > 0 ) return '+'; 15 | else 16 | return '-'; 17 | } 18 | } -------------------------------------------------------------------------------- /application/views/helpers/MainmenuFloat.php: -------------------------------------------------------------------------------- 1 | 21 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 22 | */ 23 | require_once 'Zend/View/Helper/Abstract.php'; 24 | 25 | class Zend_View_Helper_MainmenuFloat extends Zend_View_Helper_Abstract 26 | { 27 | public function mainmenuFloat() 28 | { 29 | $config = Zend_Registry::get('config'); 30 | if ( empty($config->mainmenu_floating) ) { 31 | return ''; 32 | } else { 33 | if ( $config->mainmenu_floating == 1 ) { 34 | return ' 35 | 47 | '; } 48 | } 49 | } 50 | 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /application/views/helpers/PermissionOctal2String.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | * 10 | * Special thanks to http://www.google.com/codesearch 11 | */ 12 | class Zend_View_Helper_PermissionOctal2String 13 | { 14 | 15 | 16 | public function permissionOctal2String($mode) 17 | { 18 | if (($mode & 0xC000) === 0xC000) { 19 | $type = 's'; 20 | } elseif (($mode & 0xA000) === 0xA000) { 21 | $type = 'l'; 22 | } elseif (($mode & 0x8000) === 0x8000) { 23 | $type = '-'; 24 | } elseif (($mode & 0x6000) === 0x6000) { 25 | $type = 'b'; 26 | } elseif (($mode & 0x4000) === 0x4000) { 27 | $type = 'd'; 28 | } elseif (($mode & 0x2000) === 0x2000) { 29 | $type = 'c'; 30 | } elseif (($mode & 0x1000) === 0x1000) { 31 | $type = 'p'; 32 | } else { 33 | $type = '?'; 34 | } 35 | 36 | $owner = ($mode & 00400) ? 'r' : '-'; 37 | $owner .= ($mode & 00200) ? 'w' : '-'; 38 | if ($mode & 0x800) { 39 | $owner .= ($mode & 00100) ? 's' : 'S'; 40 | } else { 41 | $owner .= ($mode & 00100) ? 'x' : '-'; 42 | } 43 | 44 | $group = ($mode & 00040) ? 'r' : '-'; 45 | $group .= ($mode & 00020) ? 'w' : '-'; 46 | if ($mode & 0x400) { 47 | $group .= ($mode & 00010) ? 's' : 'S'; 48 | } else { 49 | $group .= ($mode & 00010) ? 'x' : '-'; 50 | } 51 | 52 | $other = ($mode & 00004) ? 'r' : '-'; 53 | $other .= ($mode & 00002) ? 'w' : '-'; 54 | if ($mode & 0x200) { 55 | $other .= ($mode & 00001) ? 't' : 'T'; 56 | } else { 57 | $other .= ($mode & 00001) ? 'x' : '-'; 58 | } 59 | 60 | return $type . $owner . $group . $other; 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /application/views/scripts/admin/form-bacula-acl.phtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |

escape($this->title); ?>

4 |
5 | 6 | 7 |
8 | render('decorators/formBaculaACL.phtml'); ?> 9 |
10 | -------------------------------------------------------------------------------- /application/views/scripts/admin/form-role.phtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |

escape($this->title); ?>

4 |
5 | 6 | 7 |
8 | render('decorators/formRole.phtml'); ?> 9 |
10 | -------------------------------------------------------------------------------- /application/views/scripts/admin/form-user.phtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |

escape($this->title); ?>

4 |
5 | 6 | 7 |
8 | render('decorators/formUser.phtml'); ?> 9 |
10 | -------------------------------------------------------------------------------- /application/views/scripts/admin/index.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /application/views/scripts/admin/role-more-info.phtml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 |
12 |

escape($this->title); ?>

13 |
14 | 15 |
16 |

translate->_("More info"); ?>

17 |
18 | 19 |

20 | id : escape($this->role_id); ?> 21 |

22 | 23 |

24 | translate->_('Inherited roles'); ?> : 25 | inherited_roles) : ?> 26 | inherited_roles as $role_id => $role_name) { 29 | $str .= ''; 30 | $str .= $this->escape($role_name) . ', '; 31 | } 32 | echo substr_replace($str, '', -2); // удалить оставшийся разделитель 33 | ?> 34 | 35 | translate->_('none'); ?> 36 | 37 |

38 | 39 |
40 |
41 |

translate->_('Who use this role'); ?>

42 |
43 | 44 |

45 | translate->_('Roles'); ?> : 46 | roles->count() > 0 ) { 49 | $str = ''; 50 | foreach( $this->roles as $v) { 51 | $str .= $v->name. ', '; 52 | } 53 | echo substr_replace($str, '', -2); // удалить оставшийся разделитель 54 | } else 55 | echo $this->translate->_('none'); 56 | ?> 57 |

58 | 59 |

60 | translate->_('Users'); ?> : 61 | users->count() > 0 ) { 64 | $str = ''; 65 | foreach( $this->users as $v) { 66 | $str .= $v->login. ', '; 67 | } 68 | echo substr_replace($str, '', -2); // удалить оставшийся разделитель 69 | } else 70 | echo $this->translate->_('none'); 71 | ?> 72 |

73 | 74 |
75 |
-------------------------------------------------------------------------------- /application/views/scripts/auth/forgot-password.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

title; ?>

4 | 5 |

6 | translate->_('Forgot your password? Enter your user name and email below.'); ?> 7 |

8 | 9 |
10 | msg; ?>   11 |
12 | 13 |
15 | 16 | 17 | 18 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 38 | 39 | 40 | 44 | 45 | 46 | 49 | 52 | 53 | 54 |
19 | 20 | 22 | translate->_('Username'); ?> 23 | 25 | form->login; ?> 26 |
30 | 31 | 33 | translate->_('Email'); ?> 34 | 36 | form->email; ?> 37 |
  41 | form->captcha; ?> 42 | form->csrf; ?> 43 |
47 | form->submit; ?> 48 | 50 | translate->_('Cancel'); ?> 51 |
55 |
56 | -------------------------------------------------------------------------------- /application/views/scripts/auth/login.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

caption; ?>

4 | 5 |
6 | msg; ?>   7 |
8 | 9 |
11 | 12 | 13 | 14 | 17 | 20 | 23 | 24 | 25 | 28 | 31 | 34 | 37 | 38 | 39 | 42 | 45 | 46 | 47 | 51 | 52 | 53 | 56 | 57 | 58 |
15 | 16 | 18 | translate->_('Username'); ?> 19 | 21 | form->login; ?> 22 |
26 | 27 | 29 | translate->_('Password'); ?> 30 | 32 | form->pwd; ?> 33 | 35 | translate->_('Forgot?'); ?> 36 |
40 | 41 | 43 | translate->_('Remember me'); ?>form->rememberme; ?> 44 |
  48 | form->captcha; ?> 49 | form->csrf; ?> 50 |
54 | form->submit; ?> 55 |
59 |
60 | -------------------------------------------------------------------------------- /application/views/scripts/bconsole/cmd.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
OK : bcommand; ?>

4 |
 5 | msg;
 7 |     if ( $this->command_output )
 8 |         foreach ($this->command_output as $line) {
 9 |             echo '
', $line; 10 | } 11 | ?> 12 |
13 |
14 |
return : 15 | return_var ) 17 | echo $this->return_var; 18 | else 19 | echo 'null'; 20 | ?> 21 |

-------------------------------------------------------------------------------- /application/views/scripts/client/all.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title); ?>

4 | 5 | clients): ?> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | clients as $client) : ?> 18 | 19 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
translate->_("Name"); ?> translate->_("Client Version"); ?> translate->_("Auto Prune"); ?> translate->_("Files Retention
days"); ?>
translate->_("Jobs Retention
days"); ?>
20 | escape($client['clientid']), 21 | "/name/", $this->escape($client['name']); ?>" title="translate->_("Client Detail");?>"> 22 | escape($client['name']);?> 23 | 24 | escape($client['uname']);?>int2Char($this->escape($client['autoprune']));?>convSecondsToDays($this->escape($client['fileretention']));?>convSecondsToDays($this->escape($client['jobretention']));?>
34 | 35 | 36 |
37 |
38 |

39 | translate->_("No Clients found.");?>

40 |
41 |
42 |
43 | -------------------------------------------------------------------------------- /application/views/scripts/client/status-client-id.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title); ?>

4 | 5 | result_error ): ?> 6 |
7 |
8 |

9 | 10 | result_error ) 12 | { 13 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 14 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 15 | break; 16 | case 'NOFOUND_BCONSOLE': // bconsole не найден 17 | $msg = $this->translate->_('ERROR: bconsole not found.'); 18 | break; 19 | default: $msg = ''; 20 | } 21 | echo $msg; 22 | if ( $this->command_output ) 23 | { 24 | foreach ($this->command_output as $line) { 25 | echo '
', $line, '
'; 26 | } 27 | } 28 | ?> 29 |

30 |
31 |
32 |
33 | 34 | 35 | 36 | 37 | 54 |
38 | translate->_("Director output:"); ?> 39 | command_output ) 41 | { 42 | echo '
';
43 |         foreach ($this->command_output as $line) {
44 |             if ( preg_match('/(ERR|not found|invalid)/i', $line) )   {
45 |                 echo '
' . $line . '

'; 46 | } else { 47 | echo $line . '
'; 48 | } 49 | } 50 | echo '
'; 51 | } 52 | ?> 53 |
55 | 56 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formBaculaACL.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->role_id; ?> 5 | form->role_name; ?> 6 | form->acl; ?> 7 | form->order; ?> 8 | form->name; ?> 9 | form->id; ?> 10 | form->submit;?> 11 | form->reset; ?> 12 |
13 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formBaculaCommandACL.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->role_id; ?> 5 | form->role_name; ?> 6 | form->acl; ?> 7 | form->bacula_commands; ?> 8 | form->submit; ?> 9 | form->reset; ?> 10 |
11 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formBaculaFill.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->role_id; ?> 5 | form->role_name; ?> 6 | form->bacula_fill; ?> 7 | form->submit; ?> 8 |
9 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formRole.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->role_id; ?> 5 | form->acl; ?> 6 | form->order; ?> 7 | form->role_name; ?> 8 | form->description; ?> 9 | form->inherit_id; ?> 10 | form->submit; ?> 11 | form->reset; ?> 12 |
13 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formUser.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->user_id; ?> 5 | form->action_id; ?> 6 | form->active; ?> 7 | form->login; ?> 8 | form->pwd; ?> 9 | form->name; ?> 10 | form->email; ?> 11 | form->role_id; ?> 12 | form->submit; ?> 13 | form->reset; ?> 14 |
15 | -------------------------------------------------------------------------------- /application/views/scripts/decorators/formWebaculaACL.phtml: -------------------------------------------------------------------------------- 1 | 2 |
4 | form->role_id; ?> 5 | form->role_name; ?> 6 | form->acl; ?> 7 | form->webacula_resources; ?> 8 | form->submit; ?> 9 | form->reset; ?> 10 |
11 | -------------------------------------------------------------------------------- /application/views/scripts/director/listjobtotals.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | result_error ): ?> 4 |
5 |
6 |

7 | 8 | escape($this->title), '
'; 10 | switch ( $this->result_error ) 11 | { 12 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 13 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 14 | break; 15 | case 'NOFOUND_BCONSOLE': // bconsole не найден 16 | $msg = $this->translate->_('ERROR: bconsole not found.'); 17 | break; 18 | default: $msg = ''; 19 | } 20 | echo $msg; 21 | if ( $this->command_output ) 22 | { 23 | foreach ($this->command_output as $line) { 24 | echo '
', $line, '
'; 25 | } 26 | } 27 | ?> 28 |

29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | 53 |

escape($this->title); ?>

37 | translate->_("Director output:"); ?> 38 | command_output ) 40 | { 41 | echo '
';
42 |         foreach ($this->command_output as $line) {
43 |             if ( preg_match('/(ERR|not found|invalid|Expected)/i', $line) )   {
44 |                 echo '
', $line, '

'; 45 | } else { 46 | echo $line, '
'; 47 | } 48 | } 49 | echo '
'; 50 | } 51 | ?> 52 |
54 | 55 | -------------------------------------------------------------------------------- /application/views/scripts/director/statusdir.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | result_error ): ?> 4 |
5 |
6 |

7 | 8 | escape($this->title), '
'; 10 | switch ( $this->result_error ) 11 | { 12 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 13 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 14 | break; 15 | case 'NOFOUND_BCONSOLE': // bconsole не найден 16 | $msg = $this->translate->_('ERROR: bconsole not found.'); 17 | break; 18 | default: $msg = ''; 19 | } 20 | echo $msg; 21 | if ( $this->command_output ) 22 | { 23 | foreach ($this->command_output as $line) { 24 | echo '
', $line, '
'; 25 | } 26 | } 27 | ?> 28 |

29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | 53 |
escape($this->title); ?>
37 | 38 | translate->_("Director output:"); ?> 39 | command_output ) 41 | { 42 | echo '
';
43 |             foreach ($this->command_output as $line) {
44 |                 if ( preg_match('/(ERR|not found|invalid|Expected)/i', $line) )   {
45 |                     echo '
', $line, '

'; 46 | } else { 47 | echo $line, '
'; 48 | } 49 | } 50 | echo '
'; 51 | } ?> 52 |
54 | 55 | -------------------------------------------------------------------------------- /application/views/scripts/error/bacula-access-denied.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 |

escape($this->title); ?>

5 |

escape($this->msg); ?>

6 |

Bacula ACLs : translate->_('Access denied.'); ?>

7 |

8 |

-------------------------------------------------------------------------------- /application/views/scripts/error/error.phtml: -------------------------------------------------------------------------------- 1 | 2 |

An error occurred

3 | 4 |

Message :

5 |

err_message; ?>

6 | 7 | err_custom_message) : ?> 8 |

Custom Message :

9 |

err_custom_message; ?>

10 | 11 | 12 |

Trace:

13 |
14 | err_trace; ?>
15 | 
16 | 17 |

System Information:

18 |
    19 |
  • DB Bacula : db_adapter_bacula, " ", $this->db_server_version_bacula, "\n"; ?>
  • 20 |
  • Version for Bacula Catalog database : catalog_version_bacula; ?>
  • 21 |
  • Director : director_version; ?>
  • 22 |
  • Bconsole : bconsole_version; ?>
  • 23 |
  • Webacula version :
  • 24 |
  • Zend Framework : zend_version, "\n"; ?>
  • 25 |
  • PHP :
  • 26 |
  • id :
  • 27 |
28 | 29 |

translate->_('What to do next?'); ?>

30 |

31 | Please help me improve the software you use by filing a report at 32 | Webacula bugtracker. 33 | Useful details include how to reproduce the error, and information (error message, trace) which is shown above, bacula version, etc. 34 |

-------------------------------------------------------------------------------- /application/views/scripts/error/webacula-access-denied.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 |

5 |

escape($this->title); ?>

6 |

escape($this->msg); ?>

7 |

Webacula ACLs : translate->_('Access denied.'); ?>

8 |

9 |
10 |

-------------------------------------------------------------------------------- /application/views/scripts/file/list_pagination_ctrl.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | translate = Zend_Registry::get('translate'); ?> 4 | 5 | pageCount): ?> 6 |

7 | firstItemNumber, ' -- ', $this->lastItemNumber, ' ', $this->translate->_('of'), ' ', $this->totalItemCount; 9 | ?> 10 |

11 | 12 | 13 | previous)): ?> 14 | url(array('page' => $this->first)),'">', $this->translate->_('First'), '  '; ?> 15 | 16 | 17 | 18 | previous)): ?> 19 | url(array('page' => $this->previous)), '">< ', $this->translate->_('Previous'), '  '; ?> 20 | 21 | 22 | 23 | pagesInRange as $page): ?> 24 | current): ?> 25 | url(array('page' => $page)), '"> ', $page, ''; ?>   26 | 27 |   28 | 29 | 30 | 31 | 32 | next)): ?> 33 | url(array('page' => $this->next)), '">', $this->translate->_('Next >'), '  '; ?> 34 | 35 | 36 | 37 | next)): ?> 38 | url(array('page' => $this->last)), '">', $this->translate->_('Last'); ?> 39 | 40 | 41 | -------------------------------------------------------------------------------- /application/views/scripts/help/my-php-info.phtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/views/scripts/index/index.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /application/views/scripts/job/cancel-job.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title); ?>

4 | 5 | result_error ) 7 | { 8 | switch ( $this->result_error ) 9 | { 10 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 11 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 12 | break; 13 | case 'NOFOUND_BCONSOLE': // bconsole не найден 14 | $msg = $this->translate->_('ERROR: bconsole not found.'); 15 | break; 16 | default: $msg = ''; 17 | } 18 | echo '

' . $msg . '

'; 19 | echo ''; 20 | if ( $this->command_output ) 21 | { 22 | foreach ($this->command_output as $line) { 23 | echo $line . '
'; 24 | } 25 | } 26 | echo '
'; 27 | } 28 | ?> -------------------------------------------------------------------------------- /application/views/scripts/job/show-job.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | result_error ): ?> 4 |
5 |
6 |

7 | 8 | result_error ) 10 | { 11 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 12 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 13 | break; 14 | case 'NOFOUND_BCONSOLE': // bconsole не найден 15 | $msg = $this->translate->_('ERROR: bconsole not found.'); 16 | break; 17 | default: $msg = ''; 18 | } 19 | echo $msg; 20 | if ( $this->command_output ) 21 | { 22 | foreach ($this->command_output as $line) { 23 | echo '
', $line, '
'; 24 | } 25 | } 26 | ?> 27 |

28 |
29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 53 |
escape($this->title . ' : ' . $this->jobname); ?>
38 | translate->_("Director output:"); ?> 39 | command_output ) 41 | { 42 | echo '
';
43 |         foreach ($this->command_output as $line) {
44 |             echo $line . '
'; 45 | } 46 | echo '
'; 47 | } 48 | ?> 49 | 50 |

 

51 | 52 |
54 | 55 | -------------------------------------------------------------------------------- /application/views/scripts/log/view-log-id.phtml: -------------------------------------------------------------------------------- 1 | 2 |

escape($this->title); ?>

3 | 4 | result): ?> 5 | 6 | 7 | 8 | 21 |
 9 | result as $line) {
11 |         //echo $this->escape($line['logtime']) . "   " . rtrim( $this->escape($line['logtext']) , "\r\n\t \0") . "
"; 12 | $line = $this->escape($line['logtime']) . " " . rtrim($line['logtext'] , "\r\n\t \0"); 13 | if(preg_match ("/ERR/", $line)) { 14 | echo '
' . $line . '

'; 15 | } else { 16 | echo $line, '
'; 17 | } 18 | } 19 | ?> 20 |
22 | 23 | 24 |

translate->_("No Console messages found."); ?>

25 | 26 | -------------------------------------------------------------------------------- /application/views/scripts/msg-note.phtml: -------------------------------------------------------------------------------- 1 |

2 | escape($this->msg);?> 3 |

4 |

-------------------------------------------------------------------------------- /application/views/scripts/pagination_ctrl.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | translate = Zend_Registry::get('translate'); ?> 4 | 5 | pageCount): ?> 6 |
7 |

8 | firstItemNumber, ' -- ', $this->lastItemNumber, ' ', $this->translate->_('of'), ' ', $this->totalItemCount, ' ', 10 | $this->translate->_('file(s)'); 11 | ?> 12 |

13 | 14 | 15 | previous)): ?> 16 | url(array('page' => $this->first)),'">', $this->translate->_('First'), '  '; ?> 17 | 18 | 19 | 20 | previous)): ?> 21 | url(array('page' => $this->previous)), '">< ', $this->translate->_('Previous'), '  '; ?> 22 | 23 | 24 | 25 | pagesInRange as $page): ?> 26 | current): ?> 27 | url(array('page' => $page)), '"> ', $page, ''; ?>  28 | 29 |   30 | 31 | 32 | 33 | 34 | next)): ?> 35 | url(array('page' => $this->next)), '">', $this->translate->_('Next >'), '  '; ?> 36 | 37 | 38 | 39 | next)): ?> 40 | url(array('page' => $this->last)), '">', $this->translate->_('Last'); ?> 41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /application/views/scripts/restorejob/msg01.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 |

escape($this->title . ' ' . $this->jobid); ?>

17 | 18 |
19 | 20 |
21 |

translate->_("Found existing temporary tables for the Restore Job with JobId"); ?> 22 | jobid; ?>.

23 |

24 | translate->_("Probably someone already works above a choice of files for restoration, or these tables have not been removed since time of your last task for restoration for this JobId."); ?> 25 |

26 |

translate->_("Choose the action:"); ?>

27 | 28 | formRadio('choice', 'recreate_tmp', null, 29 | array( 30 | 'recreate_tmp' => $this->translate->_('Recreate temporary tables (recommended)'), 31 | 'continue_tmp' => $this->translate->_('Continue with the old temporary tables'), 32 | 'goto_homepage' => $this->translate->_('Exit') 33 | )); 34 | ?> 35 |
36 |

formSubmit('ok1', 'OK'); ?> 37 |
38 |
39 | 40 |
-------------------------------------------------------------------------------- /application/views/scripts/restorejob/msg02session.phtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

5 | translate->_("Session of Restore backup is expired.
Increase ttl_restore_session in your config.ini."); 7 | ?> 8 |

9 |
10 |
11 |
12 | formSubmit('ok1', 'OK'); ?> 13 |
14 |
15 |
-------------------------------------------------------------------------------- /application/views/scripts/restorejob/restore-all.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title), ' '; ?> 4 | 5 | escape($this->jobid); ?> 6 |

7 | 8 | msgNoValid) ) : ?> 9 |
10 |
11 |

12 | msgNoValid; ?>

13 |
14 |
15 |
16 | 17 | 18 | form; ?> 19 | 20 |
-------------------------------------------------------------------------------- /application/views/scripts/restorejob/restore-recent-all.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title), ' ', $this->client_from_restore, ' ', $this->fileset_restore; ?>

4 | 5 | msgNoValid) ) : ?> 6 |
7 |
8 |

9 | msgNoValid; ?>

10 |
11 |
12 |
13 | 14 | 15 | form;?> 16 |
-------------------------------------------------------------------------------- /application/views/scripts/restorejob/run-restore.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title . ' ' . $this->jobid); ?>

4 | 5 | result_error ): ?> 6 |
7 |
8 |

9 | 10 | result_error ) 12 | { 13 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 14 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 15 | break; 16 | case 'NOFOUND_BCONSOLE': // bconsole не найден 17 | $msg = $this->translate->_('ERROR: bconsole not found.'); 18 | break; 19 | default: $msg = ''; 20 | } 21 | echo $msg; 22 | if ( $this->command_output ) 23 | { 24 | foreach ($this->command_output as $line) { 25 | echo '
', $line, '
'; 26 | } 27 | } 28 | ?> 29 |

30 |
31 |
32 | 33 | 34 | 35 | 36 | 59 |
37 | translate->_("Director output:"); ?> 38 | command_output ) 40 | { 41 | echo '
';
42 |         foreach ($this->command_output as $line) {
43 |             if ( preg_match('/(ERR|not found|invalid|Expected)/i', $line) )   {
44 |                     echo '
', $line, '

'; 45 | } else { 46 | echo $line, '
'; 47 | } 48 | } 49 | echo '
'; 50 | } 51 | ?> 52 | 53 |

 

54 |
55 |
56 | formSubmit('ok1', $this->translate->_('View Running Jobs') ); ?> 57 |
58 |
60 | -------------------------------------------------------------------------------- /application/views/scripts/storage/act-mount.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title); ?>

4 | 5 | result_error ): ?> 6 |
7 |
8 |

9 | 10 | result_error ) 12 | { 13 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 14 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 15 | break; 16 | case 'NOFOUND_BCONSOLE': // bconsole не найден 17 | $msg = $this->translate->_('ERROR: bconsole not found.'); 18 | break; 19 | case 'BACULA_ACCESS_DENIED': 20 | $msg = $this->translate->_('Bacula ACLs : Access denied.'); 21 | break; 22 | default: $msg = ''; 23 | } 24 | echo $msg; 25 | if ( $this->command_output ) 26 | { 27 | foreach ($this->command_output as $line) { 28 | echo '
', $line, '
'; 29 | } 30 | } 31 | ?> 32 |

33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 61 |
42 | translate->_("Director output:"); ?> 43 | 44 | command_output ) 46 | { 47 | echo '
';
48 |         foreach ($this->command_output as $line) {
49 |             if ( strpos($line, 'ERR') || strpos($line, 'not found') )   {
50 |                 echo '
' . $line . '

'; 51 | } else { 52 | echo $line . '
'; 53 | } 54 | } 55 | echo '
'; 56 | } else { 57 | echo '

', $this->translate->_("No Storage [un]mount."), '

'; 58 | } 59 | ?> 60 |
62 | -------------------------------------------------------------------------------- /application/views/scripts/storage/status-id.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |

escape($this->title); ?>

4 | 5 | result_error ): ?> 6 |
7 |
8 |

9 | 10 | result_error ) 12 | { 13 | case 'ERROR_BCONSOLE': // ошибка при запуске bconsole 14 | $msg = $this->translate->_('ERROR: There was a problem executing bconsole.'); 15 | break; 16 | case 'NOFOUND_BCONSOLE': // bconsole не найден 17 | $msg = $this->translate->_('ERROR: bconsole not found.'); 18 | break; 19 | case 'BACULA_ACCESS_DENIED': 20 | $msg = $this->translate->_('Bacula ACLs : Access denied.'); 21 | break; 22 | default: $msg = ''; 23 | } 24 | echo $msg; 25 | if ( $this->command_output ) 26 | { 27 | foreach ($this->command_output as $line) { 28 | echo '
', $line, '
'; 29 | } 30 | } 31 | ?> 32 |

33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 59 |
41 | translate->_("Director output:"); ?> 42 | command_output ) 44 | { 45 | echo '
';
46 |         foreach ($this->command_output as $line) {
47 |             if ( strpos($line, 'ERR') || strpos($line, 'not found') )   {
48 |                 echo '
' . $line . '

'; 49 | } else { 50 | echo $line . '
'; 51 | } 52 | } 53 | echo '
'; 54 | } else { 55 | echo '

', $this->translate->_("No Storage status found."), '

'; 56 | } 57 | ?> 58 |
60 | -------------------------------------------------------------------------------- /application/views/scripts/wbjobdesc/add.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 |
10 |
11 | 12 | exception) ) : ?> 13 |
14 |
15 |

16 | exception; ?>

17 |
18 |
19 |
20 | 21 | 22 |
23 | title; ?> 24 | form->setAction( $this->url() ); 26 | echo $this->form; 27 | ?> 28 |
29 |
30 |
-------------------------------------------------------------------------------- /application/views/scripts/wbjobdesc/modify.phtml: -------------------------------------------------------------------------------- 1 | 2 | 8 |
9 |
10 | 11 | exception) ) : ?> 12 |
13 |
14 |

15 | exception; ?>

16 |
17 |
18 |
19 | 20 | 21 |
22 | title; ?> 23 | form->setAction( $this->url() ); 25 | echo $this->form; 26 | ?> 27 |
28 |
29 |
-------------------------------------------------------------------------------- /data/.htaccess: -------------------------------------------------------------------------------- 1 | ## no access to this directory 2 | order allow,deny 3 | deny from all 4 | -------------------------------------------------------------------------------- /data/README: -------------------------------------------------------------------------------- 1 | 2 | data/cache/ Cache directory for Zend_Cache 3 | 4 | -------------------------------------------------------------------------------- /data/cache/_dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/data/cache/_dummy -------------------------------------------------------------------------------- /docs/.htaccess: -------------------------------------------------------------------------------- 1 | ## no access to this directory 2 | order allow,deny 3 | deny from all 4 | -------------------------------------------------------------------------------- /docs/html/ACLs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/docs/html/ACLs.png -------------------------------------------------------------------------------- /docs/html/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/docs/html/image.png -------------------------------------------------------------------------------- /docs/html/install.css: -------------------------------------------------------------------------------- 1 | /* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ 2 | .MATH { font-family: "Century Schoolbook", serif; } 3 | .MATH I { font-family: "Century Schoolbook", serif; font-style: italic } 4 | .BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } 5 | 6 | /* implement both fixed-size and relative sizes */ 7 | SMALL.XTINY { font-size : xx-small } 8 | SMALL.TINY { font-size : x-small } 9 | SMALL.SCRIPTSIZE { font-size : smaller } 10 | SMALL.FOOTNOTESIZE { font-size : small } 11 | SMALL.SMALL { } 12 | BIG.LARGE { } 13 | BIG.XLARGE { font-size : large } 14 | BIG.XXLARGE { font-size : x-large } 15 | BIG.HUGE { font-size : larger } 16 | BIG.XHUGE { font-size : xx-large } 17 | 18 | /* heading styles */ 19 | H1 { } 20 | H2 { } 21 | H3 { } 22 | H4 { } 23 | H5 { } 24 | 25 | /* mathematics styles */ 26 | DIV.displaymath { } /* math displays */ 27 | TD.eqno { } /* equation-number cells */ 28 | 29 | 30 | /* document-specific styles come next */ 31 | -------------------------------------------------------------------------------- /docs/pdf/install.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/docs/pdf/install.pdf -------------------------------------------------------------------------------- /docs/src/makedoc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | my_clean() 5 | { 6 | rm -f *.aux *.lof *.log *.out *.html *.pdf *.txt *.toc WARNINGS *.pl *.css 7 | } 8 | 9 | 10 | 11 | my_pdflatex() 12 | { 13 | rm -f $1.pdf 14 | pdflatex -interaction=nonstopmode $1.tex > /dev/null 15 | # second pass for build Table Of Contents 16 | pdflatex -interaction=nonstopmode $1.tex > /dev/null 17 | rc=$? 18 | if [[ $rc -eq 0 ]] ; then 19 | echo "pdflatex Ok" 20 | else 21 | echo $rc 22 | echo "pdflatex ERROR" 23 | exit 2 24 | fi 25 | mv -f $1.pdf ../pdf/ 26 | } 27 | 28 | 29 | 30 | my_latex2html() 31 | { 32 | latex2html -no_subdir -noinfo -no_images -white -no_navigation -split 0 $1.tex >$1_latex2html.out 2>&1 33 | rc=$? 34 | if [[ $rc -eq 0 ]] ; then 35 | echo "latex2html Ok" 36 | cp $1.html ../html/ 37 | mv -f *.css ../html/ 38 | mv -f *.png ../html/ 39 | else 40 | echo $rc 41 | echo "latex2html ERROR" 42 | fi 43 | } 44 | 45 | 46 | 47 | my_pdf2txt() 48 | { 49 | links -html-numbered-links 1 -no-g -dump -width 80 $1.html > $1.txt 50 | rc=$? 51 | if [[ $rc -eq 0 ]] ; then 52 | echo "pdf2txt Ok" 53 | cp $1.txt ../txt/ 54 | else 55 | echo $rc 56 | echo "pdf2txt ERROR" 57 | fi 58 | } 59 | 60 | 61 | 62 | 63 | 64 | ######################################################## 65 | # MAIN PROGRAM 66 | ######################################################## 67 | 68 | my_clean 69 | 70 | my_pdflatex "install" 71 | 72 | my_latex2html "install" 73 | my_pdf2txt "install" 74 | 75 | my_clean 76 | 77 | -------------------------------------------------------------------------------- /docs/src/pics/ACLs.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/docs/src/pics/ACLs.odg -------------------------------------------------------------------------------- /docs/src/pics/ACLs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/docs/src/pics/ACLs.png -------------------------------------------------------------------------------- /docs/txt/FAQ.txt: -------------------------------------------------------------------------------- 1 | 2 | ----------------------------------------------------------------------------------- 3 | Q. I receive a message like "/usr/sbin/bconsole: Permission denied". 4 | 5 | A. This is not a Webacula (or Bacula) bug. 6 | 7 | First check: /usr/sbin/bconsole -- is binary ELF file (not a shell script). 8 | See also INSTALL file. 9 | 10 | Next, modify your .htaccess file : 11 | php_flag display_errors on 12 | RewriteEngine Off 13 | 14 | Create test.php : 15 | 16 | bconsole debug'; 19 | 20 | //$cmd = '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf'; 21 | // or 22 | $cmd = '/usr/bin/sudo /usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf'; 23 | 24 | exec($cmd . " <command_output:
', print_r($command_output), '

return_var = ', $return_var, ''; 31 | 32 | ?> 33 | 34 | And check this : http://localhost/webacula/test.php 35 | See also /var/log/httpd/error_log 36 | 37 | When you run test.php you SHOULD get a result like below. 38 | If not, you do experiments with the system settings, PHP and your web-server. 39 | 40 | -------------------------------------------------------------- 41 | bconsole debug 42 | 43 | command_output: 44 | Array 45 | ( 46 | [0] => Connecting to Director 127.0.0.1:9101 47 | [1] => 1000 OK: main.dir Version: 3.0.2 (18 July 2009) 48 | [2] => Enter a period to cancel a command. 49 | [3] => status dir 50 | [4] => main.dir Version: 3.0.2 (18 July 2009) i686-pc-linux-gnu redhat 51 | [5] => Daemon started 15-Ок-2009 12:36, 13 Jobs run since started. 52 | [6] => Heap: heap=393,216 smbytes=154,627 max_bytes=157,314 bufs=377 53 | max_bufs=499 54 | ... 55 | [37] => @quit 56 | ) 57 | 1 58 | return_var = 0 59 | 60 | -------------------------------------------------------------------------------- /docs/txt/LogBook.txt: -------------------------------------------------------------------------------- 1 | 2 | LogBook 3 | ~~~~~~~ 4 | Logbook - is simple electronic journal of backups. Records in logbook are insert, modify, delete manually by the operator. 5 | Records can contain links (usual web-links on which it is possible to click) to Bacula Jobs or links to other records of this logbook. 6 | In logbook insert records, for example, about Jobs, failures of the equipment, supernumerary situations, etc. 7 | 8 | -------------------------------------------------------------------------------- /docs/txt/WebaculaTerminal.txt: -------------------------------------------------------------------------------- 1 | 2 | Webacula terminal 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Webacula provides an ajax interface to Bacula Console (bconsole) - Webacula 6 | terminal. 7 | 8 | Important to understand that you need to write commands to 'bconsole' in 9 | the command-line-style. Webacula terminal is not fully interactive. 10 | 11 | For example, you do not have to write in terminal: 12 | status 13 | 14 | correctly write so: 15 | status all 16 | 17 | or: 18 | status dir 19 | status storage="storage.file.1" 20 | 21 | an so on. 22 | 23 | 24 | 25 | See Bacula documentation "Running the Console from a Shell Script" chapter for 26 | details. 27 | -------------------------------------------------------------------------------- /docs/txt/Workflow.txt: -------------------------------------------------------------------------------- 1 | 2 | Webacula workflow 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | - Feature releases are numbered (and tagged) as 'X.Y' and are meant to 6 | contain bugfixes and enhancements, including functionality, 7 | performance and usability, without unit tests. 8 | 9 | - Maintenance releases is supported only for the current release. 10 | Maintenance releases does not support backports. 11 | Maintenance releases are numbered (and tagged) as 'X.Y.Z' 12 | 13 | - All bugfixes since of the last feature release fall 14 | into the 'master' branch (possibly through a merge with topic 15 | branch), accumulate and testing there and release as the form 16 | of the next release candidate, which is tagged as 'X.Y.rcZ' 17 | Where 'X.Y' - is number of appropriate feature release, 18 | 'Z' - increase number of release candidate. 19 | 20 | - Files which contain the release candidates can be downloaded from 21 | the directory 'webacula/current' in Sourceforge. 22 | Or get with the command: 23 | 24 | git archive X.Y.rcZ --prefix='webacula/' | \ 25 | gzip > webacula-`git describe X.Y.rcZ`.tar.gz 26 | 27 | From Sourceforge or Github: 28 | git://webacula.git.sourceforge.net/gitroot/webacula/webacula 29 | git://github.com/tim4dev/webacula.git 30 | 31 | - 'master' branch is used to prepare for the release candidates and 32 | for next feature release. 33 | 34 | - Code, which is in the 'master' branch has been tested and is stable 35 | enough for use. 36 | 37 | - Assistance will be accepted as described in the file 4CONTRIBUTORS. 38 | Commits retain authorship with the command: 39 | git commit --author="A U Thor " 40 | 41 | - In the 'master' branch there is an object with the tag 42 | 'maintainer-gpg-public-key' to verify the signature tags. 43 | 44 | - 'web' - it is a separate branch for developing the website. 45 | -------------------------------------------------------------------------------- /html/.htaccess: -------------------------------------------------------------------------------- 1 | SetEnv APPLICATION_ENV development 2 | # SetEnv APPLICATION_ENV production 3 | 4 | php_flag magic_quotes_gpc off 5 | php_flag register_globals off 6 | 7 | RewriteEngine On 8 | 9 | # edit RewriteBase if necessary 10 | RewriteBase /webacula 11 | 12 | RewriteCond %{REQUEST_FILENAME} -s [OR] 13 | RewriteCond %{REQUEST_FILENAME} -l [OR] 14 | RewriteCond %{REQUEST_FILENAME} -d 15 | RewriteRule ^.*$ - [NC,L] 16 | RewriteRule ^.*$ index.php [NC,L] 17 | -------------------------------------------------------------------------------- /html/.htaccess_original: -------------------------------------------------------------------------------- 1 | SetEnv APPLICATION_ENV development 2 | # SetEnv APPLICATION_ENV production 3 | 4 | php_flag magic_quotes_gpc off 5 | php_flag register_globals off 6 | 7 | RewriteEngine On 8 | 9 | # edit RewriteBase if necessary 10 | RewriteBase /webacula 11 | 12 | RewriteCond %{REQUEST_FILENAME} -s [OR] 13 | RewriteCond %{REQUEST_FILENAME} -l [OR] 14 | RewriteCond %{REQUEST_FILENAME} -d 15 | RewriteRule ^.*$ - [NC,L] 16 | RewriteRule ^.*$ index.php [NC,L] 17 | -------------------------------------------------------------------------------- /html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/favicon.ico -------------------------------------------------------------------------------- /html/images/1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/1x1.png -------------------------------------------------------------------------------- /html/images/PoweredBy_ZF_4LightBG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/PoweredBy_ZF_4LightBG.png -------------------------------------------------------------------------------- /html/images/Webacula_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/Webacula_logo.png -------------------------------------------------------------------------------- /html/images/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/arrow-left.png -------------------------------------------------------------------------------- /html/images/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/arrow-right.png -------------------------------------------------------------------------------- /html/images/bookmark-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/bookmark-new.png -------------------------------------------------------------------------------- /html/images/connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/connected.png -------------------------------------------------------------------------------- /html/images/dialog-ok-apply-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/dialog-ok-apply-small.png -------------------------------------------------------------------------------- /html/images/dialog-ok-apply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/dialog-ok-apply.png -------------------------------------------------------------------------------- /html/images/disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/disconnected.png -------------------------------------------------------------------------------- /html/images/document-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/document-edit.png -------------------------------------------------------------------------------- /html/images/documentinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/documentinfo.png -------------------------------------------------------------------------------- /html/images/edit-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/edit-delete.png -------------------------------------------------------------------------------- /html/images/feed-icon-14x14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/feed-icon-14x14.png -------------------------------------------------------------------------------- /html/images/feed-icon-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/feed-icon-28x28.png -------------------------------------------------------------------------------- /html/images/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/folder.png -------------------------------------------------------------------------------- /html/images/gplv3-127x51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/gplv3-127x51.png -------------------------------------------------------------------------------- /html/images/jquery_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/jquery_logo.png -------------------------------------------------------------------------------- /html/images/list-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/list-add.png -------------------------------------------------------------------------------- /html/images/media-tape-changer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/media-tape-changer.png -------------------------------------------------------------------------------- /html/images/printer1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/printer1.png -------------------------------------------------------------------------------- /html/images/process-stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/process-stop.png -------------------------------------------------------------------------------- /html/images/re-run-job-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/re-run-job-small.png -------------------------------------------------------------------------------- /html/images/re-run-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/re-run-job.png -------------------------------------------------------------------------------- /html/images/restore-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/restore-small.png -------------------------------------------------------------------------------- /html/images/restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/restore.png -------------------------------------------------------------------------------- /html/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/up.png -------------------------------------------------------------------------------- /html/images/user-online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/images/user-online.png -------------------------------------------------------------------------------- /html/scripts/insert_tags.js: -------------------------------------------------------------------------------- 1 | // 2 | // Для вставки html-тегов и псевдотегов. 3 | // Используется в Logbook при создании текста записи. 4 | // 5 | // @package webacula 6 | // @thanks http://alexking.org/projects/js-quicktags 7 | // @author Yuriy Timofeev 8 | // @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 9 | // 10 | 11 | 12 | function insert_tag(el, tag) 13 | { 14 | var tag1; 15 | var tag2; 16 | 17 | switch ( tag.toLowerCase() ) { 18 | case "a": 19 | tag1 = ""; 20 | tag2 = ""; 21 | break; 22 | case "br": 23 | tag1 = ""; 24 | tag2 = "
"; 25 | break; 26 | case "bacula_jobid=": 27 | tag1 = ""; 28 | tag2 = " " + tag; 29 | break; 30 | case "logbook_id=": 31 | tag1 = ""; 32 | tag2 = " " + tag; 33 | break; 34 | default : 35 | tag1 = "<" + tag + ">"; 36 | tag2 = ""; 37 | } 38 | 39 | //IE support 40 | if (document.selection) { 41 | el.focus(); 42 | sel = document.selection.createRange(); 43 | if (sel.text.length > 0) { 44 | sel.text = tag1 + sel.text + tag2; 45 | } 46 | else { 47 | sel.text = tag1 + tag2; 48 | } 49 | el.focus(); 50 | } 51 | //MOZILLA/NETSCAPE support 52 | else if (el.selectionStart || el.selectionStart == '0') { 53 | var startPos = el.selectionStart; 54 | var endPos = el.selectionEnd; 55 | var cursorPos = endPos; 56 | var scrollTop = el.scrollTop; 57 | 58 | el.value = el.value.substring(0, startPos) 59 | + tag1 60 | + el.value.substring(startPos, endPos) 61 | + tag2 62 | + el.value.substring(endPos, el.value.length); 63 | cursorPos += tag1.length + tag2.length; 64 | 65 | el.focus(); 66 | el.selectionStart = cursorPos; 67 | el.selectionEnd = cursorPos; 68 | el.scrollTop = scrollTop; 69 | } 70 | else { 71 | var cursorPos = el.selectionEnd; 72 | el.value += tag1 + tag2; 73 | cursorPos += tag1.length + tag2.length; 74 | el.focus(); 75 | } 76 | } 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-de.js: -------------------------------------------------------------------------------- 1 | /* German initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Milian Wolff (mail@milianw.de). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['de'] = { 5 | closeText: 'schließen', 6 | prevText: '<zurück', 7 | nextText: 'Vor>', 8 | currentText: 'heute', 9 | monthNames: ['Januar','Februar','März','April','Mai','Juni', 10 | 'Juli','August','September','Oktober','November','Dezember'], 11 | monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 12 | 'Jul','Aug','Sep','Okt','Nov','Dez'], 13 | dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], 14 | dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], 15 | dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], 16 | dateFormat: 'dd.mm.yy', firstDay: 1, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['de']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-es.js: -------------------------------------------------------------------------------- 1 | /* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */ 2 | /* Traducido por Vester (xvester@gmail.com). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['es'] = { 5 | closeText: 'Cerrar', 6 | prevText: '<Ant', 7 | nextText: 'Sig>', 8 | currentText: 'Hoy', 9 | monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 10 | 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], 11 | monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', 12 | 'Jul','Ago','Sep','Oct','Nov','Dic'], 13 | dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], 14 | dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], 15 | dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], 16 | dateFormat: 'dd/mm/yy', firstDay: 0, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['es']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-fr.js: -------------------------------------------------------------------------------- 1 | /* French initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['fr'] = { 5 | closeText: 'Fermer', 6 | prevText: '<Préc', 7 | nextText: 'Suiv>', 8 | currentText: 'Courant', 9 | monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', 10 | 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], 11 | monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', 12 | 'Jul','Aoû','Sep','Oct','Nov','Déc'], 13 | dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], 14 | dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], 15 | dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], 16 | dateFormat: 'dd/mm/yy', firstDay: 1, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['fr']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-it.js: -------------------------------------------------------------------------------- 1 | /* Italian initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Apaella (apaella@gmail.com). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['it'] = { 5 | closeText: 'Chiudi', 6 | prevText: '<Prec', 7 | nextText: 'Succ>', 8 | currentText: 'Oggi', 9 | monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', 10 | 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], 11 | monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', 12 | 'Lug','Ago','Set','Ott','Nov','Dic'], 13 | dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], 14 | dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], 15 | dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'], 16 | dateFormat: 'dd/mm/yy', firstDay: 1, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['it']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-pt.js: -------------------------------------------------------------------------------- 1 | /* Brazilian initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['pt_BR'] = { 5 | closeText: 'Fechar', 6 | prevText: '<Anterior', 7 | nextText: 'Próximo>', 8 | currentText: 'Hoje', 9 | monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', 10 | 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], 11 | monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 12 | 'Jul','Ago','Set','Out','Nov','Dez'], 13 | dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'], 14 | dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], 15 | dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], 16 | dateFormat: 'dd/mm/yy', firstDay: 0, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['pt_BR']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/scripts/jquery-ui.datepicker-ru.js: -------------------------------------------------------------------------------- 1 | /* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Andrew Stromnov (stromnov@gmail.com). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['ru'] = { 5 | closeText: 'Закрыть', 6 | prevText: '<Пред', 7 | nextText: 'След>', 8 | currentText: 'Сегодня', 9 | monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', 10 | 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], 11 | monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', 12 | 'Июл','Авг','Сен','Окт','Ноя','Дек'], 13 | dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], 14 | dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], 15 | dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], 16 | dateFormat: 'dd.mm.yy', firstDay: 1, 17 | isRTL: false}; 18 | $.datepicker.setDefaults($.datepicker.regional['ru']); 19 | }); 20 | -------------------------------------------------------------------------------- /html/styles/default/admin.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------*/ 2 | /* tables */ 3 | /*--------------------------------------------------------------------------*/ 4 | #box-table-admin 5 | { 6 | font-family: "Lucida Sans Unicode", Sans-Serif; 7 | font-size: 1em; 8 | font-weight: normal; 9 | margin-top: 1em; 10 | margin-bottom: 2em; 11 | text-align: left; 12 | border-collapse: collapse; 13 | } 14 | #box-table-admin caption 15 | { 16 | margin-left: 0em; 17 | text-align: left; 18 | font-weight: bold; 19 | font-size: 1.2em; 20 | } 21 | #box-table-admin th 22 | { 23 | padding: 7px; 24 | border-top: 4px solid #816753; /* полоска сверху */ 25 | background: #A08167; /* фон заголовка */ 26 | border-bottom: 1px solid #fff; 27 | color: #fff; /* шрифт */ 28 | } 29 | #box-table-admin td 30 | { 31 | font-size: 0.9em; 32 | padding: 4px; 33 | background: #EDDE98; 34 | border-bottom: 1px solid #fff; 35 | color: #404060; 36 | border-top: 1px solid transparent; 37 | } 38 | #box-table-admin tr:hover td 39 | { 40 | background: #FFF4BA; 41 | color: #339; 42 | } 43 | #box-table-admin .warn 44 | { 45 | background: #FAFF63; 46 | } 47 | #box-table-admin .err 48 | { 49 | color:white; 50 | background: #FF5050; 51 | } 52 | #box-table-admin .linkerr 53 | { 54 | color:#FFFF77; 55 | } 56 | 57 | .td_inactive { 58 | text-decoration: line-through; 59 | } 60 | 61 | 62 | .div-bacula-fill { 63 | position: absolute; 64 | top: 4em; 65 | right: 2em; 66 | } -------------------------------------------------------------------------------- /html/styles/default/dialog.css: -------------------------------------------------------------------------------- 1 | /* jqModal base Styling courtesy of; 2 | Brice Burgess */ 3 | 4 | /* The Window's CSS z-index value is respected (takes priority). If none is supplied, 5 | the Window's z-index value will be set to 3000 by default (in jqModal.js). You 6 | can change this value by either; 7 | a) supplying one via CSS 8 | b) passing the "zIndex" parameter. E.g. (window).jqm({zIndex: 500}); */ 9 | 10 | .jqmWindow { 11 | display: none; 12 | 13 | position: fixed; 14 | top: 17%; 15 | left: 50%; 16 | 17 | margin-left: -200px; 18 | width: 27em; 19 | 20 | background-color: #E8EEFF; 21 | color: #001C55; 22 | border: 1px solid #6B7790; 23 | padding: 12px; 24 | font-size:1em; 25 | } 26 | 27 | .jqmOverlay { background-color: #000; } 28 | 29 | /* Fixed posistioning emulation for IE6 30 | Star selector used to hide definition from browsers other than IE6 31 | For valid CSS, use a conditional include instead */ 32 | * html .jqmWindow { 33 | position: absolute; 34 | top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px'); 35 | } 36 | 37 | .dialog-header { 38 | color: black; 39 | position: absolute; 40 | left: 1em; 41 | z-index: 1; 42 | } 43 | 44 | .dialog-close { 45 | position: absolute; 46 | right: 1em; 47 | z-index: 2; 48 | } 49 | 50 | .dialog-hr { 51 | margin-top: 1.3em; 52 | } 53 | -------------------------------------------------------------------------------- /html/styles/default/images/arrows-ffffff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/arrows-ffffff.png -------------------------------------------------------------------------------- /html/styles/default/images/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/shadow.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_flat_15_cd0a0a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_flat_15_cd0a0a_40x100.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_glass_100_e4f1fb_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_glass_100_e4f1fb_1x400.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_glass_50_3baae3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_glass_50_3baae3_1x400.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_glass_80_d7ebf9_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_glass_80_d7ebf9_1x400.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_highlight-hard_70_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_highlight-hard_70_000000_1x100.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_highlight-soft_100_deedf7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_highlight-soft_100_deedf7_1x100.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-bg_highlight-soft_25_ffef8f_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-bg_highlight-soft_25_ffef8f_1x100.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-icons_2694e8_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-icons_2694e8_256x240.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-icons_3d80b3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-icons_3d80b3_256x240.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-icons_72a7cf_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-icons_72a7cf_256x240.png -------------------------------------------------------------------------------- /html/styles/default/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/html/styles/default/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /html/styles/default/superfish-vertical.css: -------------------------------------------------------------------------------- 1 | /*** adding sf-vertical in addition to sf-menu creates a vertical menu ***/ 2 | .sf-vertical, .sf-vertical li { 3 | width: 10em; 4 | } 5 | /* this lacks ul at the start of the selector, so the styles from the main CSS file override it where needed */ 6 | .sf-vertical li:hover ul, 7 | .sf-vertical li.sfHover ul { 8 | left: 10em; /* match ul width */ 9 | top: 0; 10 | } 11 | 12 | /*** alter arrow directions ***/ 13 | .sf-vertical .sf-sub-indicator { background-position: -10px 0; } /* IE6 gets solid image only */ 14 | .sf-vertical a > .sf-sub-indicator { background-position: 0 0; } /* use translucent arrow for modern browsers*/ 15 | 16 | /* hover arrow direction for modern browsers*/ 17 | .sf-vertical a:focus > .sf-sub-indicator, 18 | .sf-vertical a:hover > .sf-sub-indicator, 19 | .sf-vertical a:active > .sf-sub-indicator, 20 | .sf-vertical li:hover > a > .sf-sub-indicator, 21 | .sf-vertical li.sfHover > a > .sf-sub-indicator { 22 | background-position: -10px 0; /* arrow hovers for modern browsers*/ 23 | } -------------------------------------------------------------------------------- /html/styles/default/ui.selectmenu.css: -------------------------------------------------------------------------------- 1 | /* Selectmenu 2 | ----------------------------------*/ 3 | .ui-selectmenu { display: block; position:relative; height:1.7em; text-decoration: none; overflow:hidden;} 4 | .ui-selectmenu-icon { position:absolute; right:6px; margin-top:-8px; top: 50%; } 5 | .ui-selectmenu-menu { padding:0; margin:0; list-style:none; position:absolute; top: 0; visibility: hidden; overflow: auto; } 6 | .ui-selectmenu-open { visibility: visible; } 7 | .ui-selectmenu-menu-popup { margin-top: -1px; } 8 | .ui-selectmenu-menu-dropdown { } 9 | .ui-selectmenu-menu li { padding:0; margin:0; display: block; border-top: 1px dotted transparent; border-bottom: 1px dotted transparent; border-right-width: 0 !important; border-left-width: 0 !important; font-weight: normal !important; } 10 | .ui-selectmenu-menu li a,.ui-selectmenu-status {line-height: 1.1em; display:block; padding:.3em 1em; outline:none; text-decoration:none; font-size: 1em;} 11 | .ui-selectmenu-menu li.ui-selectmenu-hasIcon a, 12 | .ui-selectmenu-hasIcon .ui-selectmenu-status { padding-left: 10px; position: relative; margin-left: 5px; } 13 | .ui-selectmenu-menu li .ui-icon, .ui-selectmenu-status .ui-icon { position: absolute; top: 1em; margin-top: -8px; left: 0; } 14 | .ui-selectmenu-status { line-height: 1.1em; } 15 | .ui-selectmenu-open li.ui-selectmenu-item-focus a { } 16 | .ui-selectmenu-open li.ui-selectmenu-item-selected { } 17 | .ui-selectmenu-menu li span,.ui-selectmenu-status span { display:block; margin-bottom: .2em; } 18 | .ui-selectmenu-menu li .ui-selectmenu-item-header { } 19 | .ui-selectmenu-menu li .ui-selectmenu-item-content { } 20 | .ui-selectmenu-menu li .ui-selectmenu-item-footer { opacity: .8; } 21 | /*for optgroups*/ 22 | .ui-selectmenu-menu .ui-selectmenu-group { font-size: 1em; } 23 | .ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.1em; display:block; padding:.6em .5em 0; } 24 | .ui-selectmenu-menu .ui-selectmenu-group ul { margin: 0; padding: 0; } 25 | -------------------------------------------------------------------------------- /html/styles/default/wbjobdesc.css: -------------------------------------------------------------------------------- 1 | /* 2 | wbjobdesc theme 3 | */ 4 | #box-table-wbjobdesc { 5 | font-size: 95%; 6 | font-family: "Lucida Grande", Helvetica, verdana, sans-serif; 7 | background-color:#fff; 8 | border-collapse: collapse; 9 | width: 80%; 10 | line-height: 1.2em; 11 | } 12 | #box-table-wbjobdesc caption { 13 | font-size: 30px; 14 | font-weight: bold; 15 | color: #002084; 16 | text-align: left; 17 | padding: 10px 0px; 18 | margin-bottom: 2px; 19 | text-transform: capitalize; 20 | } 21 | #box-table-wbjobdesc thead th { 22 | border-right: 2px solid #fff; 23 | color:#fff; 24 | text-align:center; 25 | padding:2px; 26 | height:25px; 27 | background-color: #004080; 28 | } 29 | #box-table-wbjobdesc tfoot { 30 | color:#002084; 31 | padding:2px; 32 | text-transform:uppercase; 33 | font-size:1.2em; 34 | font-weigth: bold; 35 | margin-top:6px; 36 | border-top: 6px solid #004080; 37 | border-bottom: 6px solid #004080; 38 | } 39 | #box-table-wbjobdesc tbody tr { 40 | background-color:#fff; 41 | border-bottom: 2px solid #c0c0c0; 42 | } 43 | #box-table-wbjobdesc tbody td { 44 | color:#002084; 45 | padding:5px; 46 | text-align:left; 47 | } 48 | #box-table-wbjobdesc tbody th { 49 | text-align:left; 50 | padding: 2px; 51 | } 52 | #box-table-wbjobdesc tbody td a, tbody th a { 53 | color:#002084; 54 | text-decoration:underline; 55 | font-weight:normal; 56 | } 57 | #box-table-wbjobdesc tbody td a:hover, tbody th a:hover { 58 | text-decoration:none; 59 | } 60 | 61 | #jobdesc-form { 62 | width: 34em; 63 | margin-top: 3px; 64 | } 65 | #jobdesc-form textarea:focus, #jobdesc-form input:focus { 66 | border: 1px solid #900; 67 | background-color: #FFF; 68 | } 69 | label { 70 | padding-top: 7px; 71 | padding-bottom: 7px; 72 | font-weight: bold; 73 | } 74 | 75 | div.roundcorner-wjd { 76 | width: 38em; 77 | padding: 10px; 78 | text-align: left; 79 | margin-top: 30px; 80 | margin-bottom: 20px; 81 | color: #000; 82 | background: #d0ffbd; 83 | font-family: 'Times New Roman',Times,serif; 84 | } 85 | -------------------------------------------------------------------------------- /html/styles/default/wterm.css: -------------------------------------------------------------------------------- 1 | /* Basic Terminal CSS */ 2 | .wterm_terminal { 3 | background: #000; 4 | color: #fff; 5 | font-size: 0.9em; 6 | font-family: monospace; 7 | padding: 1px; 8 | width: 70%; 9 | display: block; 10 | overflow-x: none; 11 | overflow-y: auto; 12 | margin: 0px; 13 | } 14 | 15 | /* TODO: Input Box Width is faulty */ 16 | .wterm_terminal input { background: transparent; border: 0; color: #fff; width: 70%; font-size: 1em; font-family: monospace; outline: none; } 17 | .wterm_terminal div:first { margin-bottom: 0; } 18 | .wterm_terminal .wterm_prompt { float: left; clear: left; } 19 | .wterm_terminal form { float: left; margin: 0px; width: 65%; } 20 | 21 | /* Themes */ 22 | .wterm_theme_green_on_black { 23 | background: #5A5A5A; 24 | color: #DADACC; 25 | } 26 | .wterm_theme_green_on_black input { background: transparent; border: 0; color: #0f0; } -------------------------------------------------------------------------------- /html/test_mod_rewrite/.htaccess: -------------------------------------------------------------------------------- 1 | # for test mod_rewrite 2 | php_flag magic_quotes_gpc off 3 | php_flag register_globals off 4 | 5 | RewriteEngine On 6 | # edit RewriteBase if necessary 7 | RewriteBase /webacula/test_mod_rewrite 8 | RewriteRule ^testlink([^/]*).html$ index.php?testlink=$1 [L] 9 | -------------------------------------------------------------------------------- /html/test_mod_rewrite/index.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | * 22 | * @author Yuriy Timofeev 23 | * @package webacula 24 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 25 | * 26 | */ 27 | ?> 28 | 30 | 31 | 32 | 33 | Test mod_rewrite 34 | 35 | 36 | 37 | 38 | 39 |

40 | 52 |

53 | 54 |

Run mod_rewrite Test

55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /html/test_mod_rewrite/testlink1.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Test mod_rewrite 7 | 8 | 9 | 10 | 11 | 12 |

mod_rewrite test ERROR

13 |

Run mod_rewrite Test again

14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /install/.htaccess: -------------------------------------------------------------------------------- 1 | ## no access to this directory 2 | order allow,deny 3 | deny from all 4 | -------------------------------------------------------------------------------- /install/MySql/10_make_tables.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Script to create webacula tables 4 | # 5 | 6 | . ../db.conf 7 | 8 | if [ -n "$db_pwd" ] 9 | then 10 | pwd="-p$db_pwd" 11 | else 12 | pwd="" 13 | fi 14 | 15 | 16 | if mysql $* -u $db_user $pwd $db_name -f < 21 | # and insert the resulting hash below 22 | webacula_root_pwd="" 23 | -------------------------------------------------------------------------------- /install/password-to-hash.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | \n\n"; 11 | } 12 | 13 | 14 | # проверка командной строки 15 | if ($argc != 2) { 16 | my_usage(); 17 | exit(1); 18 | } 19 | 20 | /* 21 | * Main program 22 | */ 23 | 24 | $pass = $argv[1]; 25 | 26 | $hasher = new MyClass_PasswordHash(); 27 | 28 | $hash = $hasher->HashPassword($pass); 29 | if (strlen($hash) < 20) 30 | exit('Failed to hash new password'); 31 | unset($hasher); 32 | 33 | echo $hash. "\n"; 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /languages/.htaccess: -------------------------------------------------------------------------------- 1 | ## no access to this directory 2 | order allow,deny 3 | deny from all 4 | -------------------------------------------------------------------------------- /languages/cs/webacula_cs.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/cs/webacula_cs.mo -------------------------------------------------------------------------------- /languages/de/webacula_de.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/de/webacula_de.mo -------------------------------------------------------------------------------- /languages/en/webacula_en.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/en/webacula_en.mo -------------------------------------------------------------------------------- /languages/es/webacula_es.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/es/webacula_es.mo -------------------------------------------------------------------------------- /languages/fr/webacula_fr.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/fr/webacula_fr.mo -------------------------------------------------------------------------------- /languages/it/webacula_it.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/it/webacula_it.mo -------------------------------------------------------------------------------- /languages/pt/webacula_pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/pt/webacula_pt_BR.mo -------------------------------------------------------------------------------- /languages/ru/webacula_ru.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tim4dev/webacula/4c3e400a41be020945d99612bf33ebac958c7e77/languages/ru/webacula_ru.mo -------------------------------------------------------------------------------- /library/MyClass/Action/Helper/MyCache.php: -------------------------------------------------------------------------------- 1 | . 18 | * 19 | * 20 | * @author Yuriy Timofeev 21 | * @package webacula 22 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 23 | * 24 | */ 25 | require_once 'Zend/Controller/Action/Helper/Abstract.php'; 26 | 27 | class MyClass_Action_Helper_MyCache extends Zend_Controller_Action_Helper_Abstract 28 | { 29 | protected $cache; 30 | 31 | 32 | 33 | public function init() 34 | { 35 | $this->cache = Zend_Registry::get('cache'); 36 | parent::init(); 37 | } 38 | 39 | 40 | /** 41 | * Cleaning cache by specified role_id : Zend_Cache and data/tmp files 42 | */ 43 | public function clearAllCacheRole($role_id) 44 | { 45 | // remove Bacula ACLs 46 | $bacula_acl = new MyClass_BaculaAcl(); 47 | $bacula_acl->removeCache(); 48 | // remove Webacula ACLs 49 | $this->cache->remove('MyClass_WebaculaAcl'); 50 | // main menu cache 51 | if ($role_id) 52 | $this->cache->remove($role_id . '_main_menu'); 53 | } 54 | 55 | 56 | /** 57 | * Cleaning all cache data and data/tmp files 58 | */ 59 | public function clearAllCache() 60 | { 61 | // remove all cache for all users 62 | $this->cache->clean(Zend_Cache::CLEANING_MODE_ALL); 63 | } 64 | 65 | 66 | 67 | } -------------------------------------------------------------------------------- /library/MyClass/GaugeTime.php: -------------------------------------------------------------------------------- 1 | 7 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 8 | */ 9 | 10 | class MyClass_GaugeTime 11 | { 12 | protected $start_time; 13 | 14 | public function __construct () 15 | { 16 | $this->start_time = $this->getTime(); 17 | } 18 | 19 | /** 20 | * @return возвращает текущее время 21 | */ 22 | function getTime () 23 | { 24 | $ptime = explode(' ', microtime()); 25 | $result = $ptime[1] + $ptime[0]; 26 | return $result; 27 | } 28 | 29 | /** 30 | * @return возвращает разницу во времени 31 | */ 32 | function diffTime () 33 | { 34 | $end_time = $this->getTime(); 35 | $diff_time = number_format($end_time - $this->start_time, 5); 36 | return $diff_time; 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /library/MyClass/SendEmail.php: -------------------------------------------------------------------------------- 1 | 5 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 6 | */ 7 | 8 | class MyClass_SendEmail { 9 | 10 | /** 11 | * $from_email, $from_name, $to_email, $to_name, $subj, $body 12 | * 13 | * @param $from_email 14 | * @param $from_name 15 | * @param $to_email 16 | * @param $to_name 17 | * @param $body 18 | * @param $subj 19 | */ 20 | public function mySendEmail( 21 | $from_email, 22 | $from_name = 'Webacula', 23 | $to_email, 24 | $to_name = '', 25 | $subj, 26 | $body ) 27 | { 28 | Zend_Loader::loadClass('Zend_Mail'); 29 | $mail = new Zend_Mail('utf-8'); 30 | $mail->addHeader('X-MailGenerator', 'webacula'); 31 | $mail->setBodyText($body, 'UTF-8'); 32 | $mail->setFrom($from_email, $from_name); 33 | $mail->addTo($to_email, $to_name); 34 | $mail->setSubject($subj); 35 | return $mail->send(); 36 | } 37 | } -------------------------------------------------------------------------------- /library/MyClass/Validate/BaculaAclWhere.php: -------------------------------------------------------------------------------- 1 | . 18 | * 19 | * 20 | * @author Yuriy Timofeev 21 | * @package webacula 22 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 23 | * 24 | */ 25 | 26 | require_once 'Zend/Validate/Interface.php'; 27 | require_once 'Zend/Validate.php'; 28 | 29 | class MyClass_Validate_BaculaAclWhere implements Zend_Validate_Interface 30 | { 31 | protected $_messages = array(); 32 | protected $translate; 33 | protected $bacula_acl; 34 | 35 | 36 | public function __construct() 37 | { 38 | $this->translate = Zend_Registry::get('translate'); 39 | Zend_Loader::loadClass('Job'); 40 | $this->bacula_acl = new MyClass_BaculaAcl(); 41 | } 42 | 43 | 44 | public function isValid($value) { 45 | if ( empty($value) ) // OK to restore to default "Where" location 46 | return TRUE; 47 | // do Bacula ACLs 48 | if ( $this->bacula_acl->doOneBaculaAcl($value, 'where') ) 49 | return TRUE; 50 | else { 51 | $this->_messages[0] = sprintf( $this->translate->_("Bacula ACLs : access denied for Where '%s'"), $value); 52 | return FALSE; 53 | } 54 | } 55 | 56 | 57 | public function getMessages() 58 | { 59 | return $this->_messages; 60 | } 61 | 62 | public function getErrors() 63 | { 64 | return $this->_messages; 65 | } 66 | 67 | 68 | } -------------------------------------------------------------------------------- /packaging/README: -------------------------------------------------------------------------------- 1 | Contains files needed for creating packages for various distributions. 2 | -------------------------------------------------------------------------------- /tests/AllTests.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | require_once dirname(__FILE__) . '/application/bootstrap.php'; 10 | require_once dirname(__FILE__) . '/application/controllers/AllTests.php'; 11 | require_once dirname(__FILE__) . '/application/models/AllTests.php'; 12 | 13 | /* какие каталоги учитывать при построении отчета */ 14 | if ( PHPUnit_Runner_Version::id() >= '3.5.0' ) { 15 | // PHPUnit 3.5.5 16 | PHP_CodeCoverage_Filter::getInstance()->addDirectoryToWhitelist('../application'); 17 | PHP_CodeCoverage_Filter::getInstance()->removeFileFromWhitelist('../application/views/helpers'); 18 | } else { 19 | // PHPUnit 3.4 20 | PHPUnit_Util_Filter::addDirectoryToWhitelist('../application'); 21 | PHPUnit_Util_Filter::removeFileFromWhitelist('../application/views/helpers'); 22 | } 23 | 24 | 25 | class AllTests 26 | { 27 | public static function main() { 28 | $parameters = array (); 29 | PHPUnit_TextUI_TestRunner::run ( self::suite (), $parameters ); 30 | } 31 | 32 | public static function suite() { 33 | $suite = new PHPUnit_Framework_TestSuite ( 'Webacula Test Suite' ); 34 | $suite->addTest ( ControllersAllTests::suite () ); 35 | $suite->addTest ( ModelsAllTests::suite () ); 36 | return $suite; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tests not worked under Zend Framework > 1.12.3 4 | Declaration of Zend_Test_PHPUnit_Constraint_DomQuery::fail() should be compatible with PHPUnit_Framework_Constraint::fail($other, $description, $not = false) 5 | 6 | 7 | --------------------------------------------------------------- 8 | 9 | Zend Framework 1 only function properly using PHPUnit 3.5.x. 10 | Downgrade phpunit 3.6 to 3.5.15 11 | Zend Framework 2 will support the current version of PHPUnit. 12 | 13 | pear config-set http_proxy http://username:password@yourproxy:80 14 | 15 | phpunit --version 16 | PHPUnit 3.5.15 17 | 18 | yum erase php-phpunit-\* 19 | 20 | pear channel-discover pear.symfony-project.com 21 | pear channel-discover pear.phpunit.de 22 | pear channel-update pear.phpunit.de 23 | 24 | pear install --alldeps pear.symfony-project.com/YAML-1.0.2 25 | pear install --alldeps phpunit/PHPUnit_Selenium-1.0.1 26 | pear install --alldeps phpunit/Text_Template-1.0.0 27 | pear install --alldeps phpunit/PHPUnit_MockObject-1.0.3 28 | pear install --alldeps phpunit/PHP_Timer-1.0.0 29 | pear install --alldeps phpunit/File_Iterator-1.2.3 30 | pear install --alldeps phpunit/PHP_TokenStream-1.0.1 31 | pear install --alldeps phpunit/PHP_CodeCoverage-1.0.2 32 | pear install --alldeps phpunit/DbUnit-1.0.0 33 | pear install --alldeps phpunit/PHPUnit-3.5.15 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/application/ModelTestCase.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | require_once 'PHPUnit/Framework/TestCase.php'; 10 | 11 | /* 12 | * see also ControllerTestCase.php 13 | */ 14 | class ModelTestCase extends PHPUnit_Framework_TestCase { 15 | 16 | protected function _rootLogin() { 17 | // php array to object 18 | $data = (object)$arr = array( 19 | 'id' => 1000, 20 | 'login' => 'root', 21 | 'role_id' => 1, 22 | 'role_name' => 'root_role' 23 | ); 24 | // write session 25 | $auth = Zend_Auth::getInstance(); 26 | $storage = $auth->getStorage(); 27 | $storage->write($data); 28 | Zend_Session::rememberMe(); 29 | echo ' (login as '.$data->login.') '; 30 | } 31 | 32 | protected function _logout() { 33 | Zend_Auth::getInstance()->clearIdentity(); 34 | Zend_Session::forgetMe(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tests/application/controllers/ChartControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | 10 | class ChartControllerTest extends ControllerTestCase 11 | { 12 | 13 | /** 14 | * @group chart 15 | */ 16 | public function testTimeline () 17 | { 18 | print "\n" . __METHOD__ . ' '; 19 | $this->_rootLogin(); 20 | $name_img = 'img_tmp.png'; 21 | if (file_exists($name_img)) { 22 | unlink($name_img); 23 | } 24 | $this->assertTrue(function_exists("imagepng"), "(imagepng not found)"); 25 | $this->dispatch('chart/timeline/datetimeline/' . date("Y-m-d", time())); 26 | $img = $this->response->outputBody(); 27 | $this->_isLogged($img); 28 | $this->assertModule('default'); 29 | $this->assertController('chart'); 30 | $this->assertAction('timeline'); 31 | if (empty($img)) { 32 | $this->assertTrue(FALSE, "image is empty!"); 33 | } 34 | $f = fopen("$name_img", 'w'); 35 | $res = fwrite($f, $img); 36 | if (! $res) { 37 | $this->assertTrue(FALSE, "file $name_img can't writing!"); 38 | } 39 | fclose($f); 40 | $this->assertNotNull($size = GetImageSize($name_img)); 41 | $this->assertGreaterThan(700, $size[0]); // width 42 | $this->assertGreaterThan(400, $size[1]); // height 43 | unlink($name_img); 44 | $this->assertFileNotExists($name_img, "file $name_img not deleted!"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/application/controllers/ClientControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | 10 | class ClientControllerTest extends ControllerTestCase 11 | { 12 | const ZF_pattern = '/Exception:|Warning:|Notice:|Call Stack/'; // Zend Framework 13 | 14 | 15 | /** 16 | * @group client 17 | */ 18 | public function testList() 19 | { 20 | print "\n".__METHOD__.' '; 21 | $this->_rootLogin(); 22 | $this->dispatch('client/all'); 23 | $this->_isLogged($this->response->outputBody()); 24 | $this->logBody( $this->response->outputBody() ); // debug log 25 | $this->assertController('client'); 26 | $this->assertAction('all'); 27 | $this->assertResponseCode(200); 28 | $this->assertNotQueryContentContains('div', 'No Clients found'); 29 | $this->assertQueryContentContains('td', 'local.fd'); 30 | } 31 | 32 | /** 33 | * @group use-bconsole 34 | * @group client 35 | */ 36 | public function testStatus() 37 | { 38 | print "\n".__METHOD__.' '; 39 | $this->_rootLogin(); 40 | $this->dispatch('client/status-client-id/id/1/name/local.fd'); 41 | $this->_isLogged($this->response->outputBody()); 42 | $this->logBody( $this->response->outputBody() ); // debug log 43 | $this->assertController('client'); 44 | $this->assertAction('status-client-id'); 45 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 46 | $this->assertResponseCode(200); 47 | $this->assertQueryContentRegex('td', '/1000 OK: .* main.dir/'); 48 | $this->assertNotQueryContentRegex('td', '/Error/i'); 49 | $this->assertQueryContentRegex('td', "/local.fd Version:.*linux/"); 50 | $this->assertQueryContentRegex('td', "/Daemon started/"); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /tests/application/controllers/ErrorControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | 10 | class ErrorControllerTest extends ControllerTestCase 11 | { 12 | 13 | /** 14 | * @group error 15 | */ 16 | public function testErrorAction() { 17 | print "\n".__METHOD__.' '; 18 | $this->_rootLogin(); 19 | $this->dispatch('index/fake_action'); 20 | $this->logBody( $this->response->outputBody() ); // debug log 21 | $this->assertModule('default'); 22 | $this->assertController('error'); 23 | $this->assertAction('error'); 24 | $this->assertResponseCode(404); 25 | $this->assertQueryContentContains('p', 'Action "fakeaction" does not exist'); 26 | } 27 | 28 | /** 29 | * @group error 30 | */ 31 | public function testErrorBoth() { 32 | print "\n".__METHOD__.' '; 33 | $this->_rootLogin(); 34 | $this->dispatch('fake_controller/fake_action'); 35 | $this->logBody( $this->response->outputBody() ); // debug log 36 | $this->assertModule('default'); 37 | $this->assertController('error'); 38 | $this->assertAction('error'); 39 | $this->assertResponseCode(404); 40 | $this->assertQueryContentContains('p', 'Invalid controller specified (fake_controller)'); 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /tests/application/controllers/FeedControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class FeedControllerTest extends ControllerTestCase 10 | { 11 | /** 12 | * @group feed 13 | */ 14 | public function testRSS () 15 | { 16 | print "\n" . __METHOD__ . ' '; 17 | $this->_rootLogin(); 18 | $this->dispatch('feed/feed/test/1'); 19 | $this->_isLogged($this->response->outputBody()); 20 | $this->logBody( $this->response->outputBody() ); // debug log 21 | $this->assertController('feed'); 22 | $this->assertAction('feed'); 23 | $this->assertResponseCode(200); 24 | $this->assertQueryContentContains('title', '[CDATA[My Bacula backup server #1]]'); 25 | } 26 | } -------------------------------------------------------------------------------- /tests/application/controllers/FileControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class FileControllerTest extends ControllerTestCase 10 | { 11 | 12 | /** 13 | * @group file 14 | */ 15 | public function testFileList () 16 | { 17 | print "\n" . __METHOD__ . ' '; 18 | $this->_rootLogin(); 19 | $this->dispatch('file/list/jobid/3/page/1'); 20 | $this->_isLogged($this->response->outputBody()); 21 | $this->logBody( $this->response->outputBody() ); // debug log 22 | $this->assertController('file'); 23 | $this->assertAction('list'); 24 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 25 | $this->assertResponseCode(200); 26 | $this->assertNotQueryContentContains('div', 'No Files found'); 27 | $this->assertQueryContentContains('td', 'file22.dat'); 28 | $this->assertQueryContentContains('td', 'file21.dat'); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /tests/application/controllers/HelpControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class HelpControllerTest extends ControllerTestCase 10 | { 11 | 12 | /** 13 | * @group help 14 | */ 15 | public function testHelp () 16 | { 17 | print "\n" . __METHOD__ . ' '; 18 | $this->_rootLogin(); 19 | $this->dispatch('help/index'); 20 | $this->_isLogged($this->response->outputBody()); 21 | $this->logBody( $this->response->outputBody() ); // debug log 22 | $this->assertController('help'); 23 | $this->assertAction('index'); 24 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 25 | $this->assertResponseCode(200); 26 | } 27 | } -------------------------------------------------------------------------------- /tests/application/controllers/IndexControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class IndexControllerTest extends ControllerTestCase 10 | { 11 | 12 | /** 13 | * @group test-test 14 | */ 15 | public function testTest () 16 | { 17 | print "\n" . __METHOD__ . ' '; 18 | $this->assertTrue(true); 19 | } 20 | 21 | 22 | /** 23 | * @group index 24 | */ 25 | public function testIndex () 26 | { 27 | print "\n" . __METHOD__ . ' '; 28 | $this->_rootLogin(); 29 | $this->dispatch('index/index'); 30 | $this->_isLogged($this->response->outputBody()); 31 | $this->logBody( $this->response->outputBody() ); // debug log 32 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 33 | $this->assertResponseCode(200); 34 | $this->assertQueryContentContains('h1', 'Terminated Jobs'); 35 | $this->assertQueryContentContains('h1', 'Scheduled Jobs'); 36 | $this->assertQueryContentContains('h1', 'List of Running Jobs'); 37 | $this->assertQueryContentContains('h1', 'Jobs with errors'); 38 | $this->assertNotQueryContentContains('h1', 'Volumes with errors'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/application/controllers/LogControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class LogControllerTest extends ControllerTestCase 10 | { 11 | 12 | /** 13 | * @group log 14 | */ 15 | public function testViewConsoleLog () 16 | { 17 | print "\n" . __METHOD__ . ' '; 18 | $this->_rootLogin(); 19 | $this->dispatch('log/view-log-id/jobid/3/jobname/job name test 2'); 20 | $this->logBody( $this->response->outputBody() ); // debug log 21 | $body = $this->response->outputBody(); 22 | $this->_isLogged($body); 23 | if ( preg_match('/символы в кодировке utf8.*������� � ��������� cp1251/', $body) ) 24 | echo ' Non-english characters found OK '; 25 | else 26 | throw new RuntimeException('Non-english characters not found!'); 27 | $this->assertController('log'); 28 | $this->assertAction('view-log-id'); 29 | $this->assertNotQueryContentRegex('table', '/Exception:|Notice:|Call Stack/'); // иногда Bacula глючит и выдает Warning в логах 30 | $this->assertResponseCode(200); 31 | $this->assertNotQueryContentContains('div', 'No Console messages found'); 32 | $this->assertQueryContentRegex('table', '/Termination:.*Backup OK/'); 33 | // non-english chars - phpunit not worked !!! 34 | //$this->assertQueryContentRegex('table', '/символы в кодировке utf8/'); 35 | //$this->assertQueryContentRegex('table', '/������� � ��������� cp1251/'); 36 | } 37 | } -------------------------------------------------------------------------------- /tests/application/controllers/OtherControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class OtherControllerTest extends ControllerTestCase 10 | { 11 | protected $locales = array('de' , 'en' , 'fr' , 'pt_BR' , 'ru', 'it', 'es'); 12 | 13 | /** 14 | * test language files 15 | * @group lang 16 | */ 17 | public function testTranslate () 18 | { 19 | print "\n" . __METHOD__ . ' '; 20 | $this->_rootLogin(); 21 | $translate = Zend_Registry::get('translate'); 22 | foreach ($this->locales as $locale) { 23 | echo ' ', $locale; 24 | $this->assertTrue($translate->isTranslated('Desktop', false, $locale), "invalid '$locale' language file!"); 25 | } 26 | echo ' '; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/application/controllers/PoolControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | class PoolControllerTest extends ControllerTestCase 10 | { 11 | 12 | /** 13 | * @group pool 14 | */ 15 | public function testListAllPool () 16 | { 17 | print "\n" . __METHOD__ . ' '; 18 | $this->_rootLogin(); 19 | $this->dispatch('pool/all'); 20 | $this->_isLogged($this->response->outputBody()); 21 | $this->logBody( $this->response->outputBody() ); // debug log 22 | $this->assertController('pool'); 23 | $this->assertAction('all'); 24 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 25 | $this->assertResponseCode(200); 26 | $this->assertQueryContentContains('td', 'pool.file.7d'); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/application/controllers/WbjobdescControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Yuriy Timofeev 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | 9 | 10 | class WbjobdescControllerTest extends ControllerTestCase 11 | { 12 | 13 | /** 14 | * Check non english character in DB 15 | * @group jobdesc 16 | */ 17 | public function testAdd() 18 | { 19 | print "\n".__METHOD__.' '; 20 | $this->_rootLogin(); 21 | $description = 'очень длинное UTF8 описание задания'; 22 | // add new record 23 | $this->request->setPost(array( 24 | 'form1' => 1, 25 | 'name_job' => 'job.name.test.1', 26 | 'short_desc' => 'short description '. $description, 27 | 'description' => "PHPUnit test $description\njob description\n", 28 | 'retention_period' => '3 years' 29 | )); 30 | $this->request->setMethod('POST'); 31 | $this->dispatch('wbjobdesc/add'); 32 | $this->logBody( $this->response->outputBody() ); // debug log 33 | $this->assertController('wbjobdesc'); 34 | $this->assertAction('add'); 35 | // check 36 | $this->resetRequest(); 37 | $this->resetResponse(); 38 | $this->dispatch('wbjobdesc/index'); 39 | $this->logBody( $this->response->outputBody(), 'a' ); // debug log 40 | $this->assertModule('default'); 41 | $this->assertController('wbjobdesc'); 42 | $this->assertAction('index'); 43 | $this->assertNotQueryContentRegex('table', self::ZF_pattern); // Zend Framework 44 | $pos = strpos($this->response->outputBody(), $description); 45 | // $this->assertQueryContentContains('td', $description); 46 | if ($pos === false) { 47 | $this->assertTrue(FALSE, "string '".$description.'" not found'); 48 | } 49 | } 50 | 51 | 52 | } -------------------------------------------------------------------------------- /tests/application/models/AllTests.php: -------------------------------------------------------------------------------- 1 | 5 | * @package webacula 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License 7 | */ 8 | require_once dirname(__FILE__) . '/WbTmpTableTest.php'; 9 | require_once dirname(__FILE__) . '/WblogbookTest.php'; 10 | require_once dirname(__FILE__) . '/WblogtypeTest.php'; 11 | require_once dirname(__FILE__) . '/WbjobdescTest.php'; 12 | require_once dirname(__FILE__) . '/JobTest.php'; 13 | 14 | class ModelsAllTests 15 | { 16 | public static function main() 17 | { 18 | PHPUnit_TextUI_TestRunner::run(self::suite()); 19 | } 20 | 21 | public static function suite() 22 | { 23 | $suite = new PHPUnit_Framework_TestSuite('Webacula Test Suite - Models'); 24 | $suite->addTestSuite('WbTmpTableTest'); 25 | $suite->addTestSuite('WblogbookTest'); 26 | $suite->addTestSuite('WblogtypeTest'); 27 | $suite->addTestSuite('WbjobdescTest'); 28 | $suite->addTestSuite('JobTest'); 29 | return $suite; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/application/models/JobTest.php: -------------------------------------------------------------------------------- 1 | job = null; 25 | parent::tearDown(); 26 | } 27 | 28 | /** 29 | * Constructs the test case. 30 | */ 31 | public function __construct() { 32 | // empty 33 | parent::__construct(); 34 | } 35 | 36 | 37 | /** 38 | * @group find-job 39 | */ 40 | public function testGetByFileName() { 41 | print "\n".__METHOD__.' '; 42 | $this->_rootLogin(); 43 | $limit = 100; 44 | // test 45 | // getByFileName($path, $namefile, $client, $limit, $type_search) 46 | echo "\n\t* Ordinary search"; // $result = id 5, 8 47 | $this->job = new Job(); 48 | $result = $this->job->getByFileName('/tmp/webacula/test/1/', 'file_new11.dat', '', $limit, 'ordinary'); 49 | $this->assertEquals(2, sizeof($result), 'error'); 50 | echo " - OK"; 51 | 52 | echo "\n\t* LIKE search"; // $result = id 2 53 | $result = $this->job->getByFileName("/tmp/webacula/test/1/0 Каталог'tmp/%/", "100_Файл%txt", '', $limit, 'like'); 54 | $this->assertEquals(1, sizeof($result), 'error'); 55 | echo " - OK"; 56 | 57 | if ( $this->job->db_adapter != 'PDO_SQLITE' ) { 58 | echo "\n\t* REGEXP search"; // $result = id 2 59 | $result = $this->job->getByFileName("", "^f.*dat$", '', $limit, 'regexp'); 60 | $this->assertEquals(34, sizeof($result), 'error'); // only terminated jobs 61 | echo " - OK"; 62 | } 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /tests/application/models/WbjobdescTest.php: -------------------------------------------------------------------------------- 1 | jobdesc = new wbJobDesc(); 17 | } 18 | 19 | /** 20 | * Cleans up the environment after running a test. 21 | */ 22 | protected function tearDown () 23 | { 24 | $this->jobdesc = null; 25 | $this->id_new = null; 26 | parent::tearDown(); 27 | } 28 | 29 | /** 30 | * Constructs the test case. 31 | */ 32 | public function __construct () 33 | { // empty 34 | } 35 | 36 | /** 37 | * @group jobdesc 38 | */ 39 | public function testInsertAndUpdateRecord () 40 | { 41 | print "\n" . __METHOD__ . ' '; 42 | // insert 43 | $data = array( 44 | 'name_job' => 'job-name-test-3', 45 | 'short_desc' => 'Important billing DB', 46 | 'description' => 'PHPUnit test', 47 | 'retention_period' => '3 days' 48 | ); 49 | $this->id_new = $this->jobdesc->insert($data); // возвращает id вставленной записи 50 | $this->assertNotNull($this->id_new); 51 | // update 52 | $data = array('retention_period' => '333 days'); 53 | $where = $this->jobdesc->getAdapter()->quoteInto('desc_id = ?', $this->id_new); 54 | $res = $this->jobdesc->update($data, $where); // возвращает кол-во измененных записей 55 | $this->assertEquals(1, $res, 'error update record to jobdesc'); 56 | } 57 | 58 | 59 | /** 60 | * @group jobdesc 61 | */ 62 | public function testIndex () 63 | { 64 | print "\n" . __METHOD__ . ' '; 65 | $this->jobdesc = new wbJobDesc(); 66 | $result = $this->jobdesc->fetchAll(); 67 | $this->assertGreaterThanOrEqual(1, sizeof($result), 'error job desc'); 68 | } 69 | 70 | 71 | } -------------------------------------------------------------------------------- /tests/application/models/WblogbookTest.php: -------------------------------------------------------------------------------- 1 | logbook = new wbLogBook(); 16 | } 17 | 18 | /** 19 | * Cleans up the environment after running a test. 20 | */ 21 | protected function tearDown() { 22 | $this->logbook = null; 23 | parent::tearDown(); 24 | } 25 | 26 | /** 27 | * Constructs the test case. 28 | */ 29 | public function __construct() { 30 | // empty 31 | } 32 | 33 | /** 34 | * @group logbook 35 | */ 36 | public function testIndex() { 37 | print "\n".__METHOD__.' '; 38 | $ret = $this->logbook->IndexLogBook(null, null, null); 39 | $result = $ret->fetchAll(); 40 | $this->assertGreaterThan(3, sizeof($result), 'error select logbook'); 41 | } 42 | 43 | /** 44 | * @group logbook 45 | */ 46 | public function testAddRecord() { 47 | print "\n".__METHOD__.' '; 48 | $data = array( 49 | 'logDateCreate' => date("Y-m-d H:i:s", time() ), 50 | 'logTxt' => 'PHPUnit test testAddRecord', 51 | 'logTypeId' => 20 52 | ); 53 | $id = $this->logbook->insert($data); // возвращает id вставленной записи 54 | $this->assertGreaterThan(3, $id, 'error insert record to logbook'); 55 | } 56 | 57 | /** 58 | * @group logbook 59 | */ 60 | public function testUpdateRecord() { 61 | print "\n".__METHOD__.' '; 62 | $data = array( 63 | 'logDateCreate' => date('Y-m-d H:i:s', time()-300), 64 | 'logDateLast' => date('Y-m-d H:i:s', time()), 65 | 'logTypeId' => 30, 66 | 'logTxt' => 'PHPUnit test testUpdateRecord', 67 | 'logIsDel' => 0 68 | ); 69 | $where = $this->logbook->getAdapter()->quoteInto('logId = ?', 6); 70 | $res = $this->logbook->update($data, $where); // возвращает кол-во измененных записей 71 | $this->assertEquals(1, $res, 'error update record to logbook'); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /tests/application/models/WblogtypeTest.php: -------------------------------------------------------------------------------- 1 | logtype = new wbLogtype(); 16 | } 17 | 18 | /** 19 | * Cleans up the environment after running a test. 20 | */ 21 | protected function tearDown() { 22 | $this->logtype = null; 23 | parent::tearDown(); 24 | } 25 | 26 | /** 27 | * Constructs the test case. 28 | */ 29 | public function __construct() { 30 | // empty 31 | } 32 | 33 | public function testIndex() { 34 | print "\n".__METHOD__.' '; 35 | $result = $this->logtype->fetchAll(); 36 | $this->assertGreaterThanOrEqual(4, sizeof($result), 'error select logtype'); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /tests/conf/.htaccess_development: -------------------------------------------------------------------------------- 1 | # for locale tests 2 | SetEnv APPLICATION_ENV development 3 | 4 | php_flag magic_quotes_gpc off 5 | php_flag register_globals off 6 | 7 | RewriteEngine On 8 | RewriteBase /webacula 9 | RewriteCond %{REQUEST_FILENAME} -s [OR] 10 | RewriteCond %{REQUEST_FILENAME} -l [OR] 11 | RewriteCond %{REQUEST_FILENAME} -d 12 | RewriteRule ^.*$ - [NC,L] 13 | RewriteRule ^.*$ index.php [NC,L] 14 | -------------------------------------------------------------------------------- /tests/conf/config.ini.pgsql: -------------------------------------------------------------------------------- 1 | ; tests 2 | ; config.ini 3 | ; Webacula 7.x 4 | ; 5 | 6 | [general] 7 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 8 | db.adapter = PDO_PGSQL 9 | db.config.host = localhost 10 | db.config.username = root 11 | db.config.password = 12 | db.config.dbname = bacula 13 | ; for Sqlite db.config.dbname = "/opt/bacula/working/bacula.db" 14 | 15 | ; see http://www.php.net/timezones 16 | def.timezone = "Europe/Minsk" 17 | 18 | ; if locale undefined, webacula use autodetect 19 | ; avaliable locales : en, de, fr, pt_BR, ru 20 | locale = "en" 21 | 22 | ; see INSTALL file for details 23 | bacula.sudo = "/usr/bin/sudo" 24 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 25 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 26 | 27 | ; time to live data (session and temporary data tables) for restore files (sec) 28 | ; default = 1h, minimum = 600sec. 29 | ; ttl_restore_session = 3600 30 | 31 | ; the text, which will be placed in the header of the page 32 | ; head_title = "webacula :: domain.tld" 33 | 34 | ; Main menu floating (default = 0) 35 | ; A floating menu stays visible even if you scroll down a web page. 36 | ; They're animated, so they move up and down as you scroll the browser window up or down. 37 | ; mainmenu_floating = 1 38 | 39 | ; As many days to show those Jobs that are completed with errors (default = 7) 40 | ; Jobs with errors (last NN day(s) 41 | ; days_to_show_jobs_with_errors = 7 42 | 43 | ;; Show human readable short Job description instead of Job Bacula names (default = 0) 44 | ; show_job_description = 0 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/config.ini.sqlite: -------------------------------------------------------------------------------- 1 | ; tests 2 | ; config.ini 3 | ; Webacula 7.x 4 | ; 5 | 6 | [general] 7 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 8 | db.adapter = PDO_SQLITE 9 | db.config.host = localhost 10 | db.config.username = 11 | db.config.password = 12 | db.config.dbname = "/tmp/webacula/sqlite/bacula.db" 13 | 14 | ; see http://www.php.net/timezones 15 | def.timezone = "Europe/Minsk" 16 | 17 | ; if locale undefined, webacula use autodetect 18 | ; avaliable locales : en, de, fr, pt_BR, ru 19 | locale = "en" 20 | 21 | ; see INSTALL file for details 22 | bacula.sudo = "/usr/bin/sudo" 23 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 24 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; the text, which will be placed in the header of the page 31 | ; head_title = "webacula :: domain.tld" 32 | 33 | ; Main menu floating (default = 0) 34 | ; A floating menu stays visible even if you scroll down a web page. 35 | ; They're animated, so they move up and down as you scroll the browser window up or down. 36 | ; mainmenu_floating = 1 37 | 38 | ; As many days to show those Jobs that are completed with errors (default = 7) 39 | ; Jobs with errors (last NN day(s) 40 | ; days_to_show_jobs_with_errors = 7 41 | 42 | ;; Show human readable short Job description instead of Job Bacula names (default = 0) 43 | ; show_job_description = 0 44 | 45 | [timeline] 46 | gdfontpath = "/usr/share/fonts/dejavu" 47 | fontname = "DejaVuLGCSansMono" 48 | fontsize = 10 49 | 50 | 51 | [webacula] 52 | email.to_admin = root@localhost 53 | email.from = webacula@localhost 54 | 55 | 56 | [feed] 57 | feed_title = "My Bacula backup server #1" 58 | feed_desc = "Description feed here" 59 | 60 | [layout] 61 | ; available values : "default" 62 | path = "default" 63 | 64 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.cs: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it, es 15 | locale = "cs" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.de: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "de" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.en: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "en" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/sbin/bconsole" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.es: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it, es 15 | locale = "es" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.fake_locale: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "fake" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.fr: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "fr" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.it: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "it" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.pt_BR: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "pt_BR" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/conf/locale/config.ini.ru: -------------------------------------------------------------------------------- 1 | [general] 2 | ; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE 3 | db.adapter = PDO_MYSQL 4 | db.config.host = localhost 5 | db.config.username = root 6 | db.config.password = 7 | db.config.dbname = bacula 8 | ; for Sqlite db.config.dbname = "/full patch/bacula.db" 9 | 10 | ; see http://www.php.net/timezones 11 | def.timezone = "Europe/Minsk" 12 | 13 | ; if locale undefined, webacula use autodetect 14 | ; avaliable locales : en, de, fr, pt_BR, ru, it 15 | locale = "ru" 16 | 17 | ; see INSTALL file for details 18 | bacula.sudo = "/usr/bin/sudo" 19 | bacula.bconsole = "/opt/bacula/sbin/bconsole" 20 | bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf" 21 | 22 | ; Directory "tmpdir" which will be saved the file, which contains a list of files to restore. 23 | ; This directory and files in it should be available to read the Director service. 24 | tmpdir = "/tmp" 25 | 26 | ; time to live data (session and temporary data tables) for restore files (sec) 27 | ; default = 1h, minimum = 600sec. 28 | ; ttl_restore_session = 3600 29 | 30 | ; for debug only (default = 0). Debug log written to '/tmp/webacula_debug.log' 31 | ; debug_level = <0...9> 32 | 33 | ; the text, which will be placed in the header of the page 34 | ; head_title = "webacula :: domain.tld" 35 | 36 | ; Main menu floating (default = 0) 37 | ; A floating menu stays visible even if you scroll down a web page. 38 | ; They're animated, so they move up and down as you scroll the browser window up or down. 39 | ; mainmenu_floating = 1 40 | 41 | ; As many days to show those Jobs that are completed with errors (default = 7) 42 | ; Jobs with errors (last NN day(s) 43 | ; days_to_show_jobs_with_errors = 7 44 | 45 | 46 | [timeline] 47 | gdfontpath = "/usr/share/fonts/dejavu" 48 | fontname = "DejaVuLGCSansMono" 49 | fontsize = 10 50 | 51 | 52 | [webacula] 53 | email.to_admin = root@localhost 54 | email.from = webacula@localhost 55 | 56 | 57 | [feed] 58 | feed_title = "My Bacula backup server #1" 59 | feed_desc = "Description feed here" 60 | 61 | [layout] 62 | ; available values : "default" 63 | path = "default" 64 | 65 | -------------------------------------------------------------------------------- /tests/phpunit_report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/prepare_tests/MySql/20_webacula_fill_logbook: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Id: webacula_mysql_fill_logbook 405 2009-08-17 19:51:14Z tim4dev $ 4 | # 5 | 6 | if mysql -f <power failure. 29 | Not accomplished nightly backups job.test.1, job.test.2 BACULA_JOBID=4, BACULA_JOBID=5 30 | Problem with power has been resolved in 02:00 pm. 31 | 32 | -- Michael Foobar',255,0); 33 | 34 | 35 | 36 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 37 | VALUES (ADDTIME(NOW(),'-10:30:25'),NULL,'Warning record (for example).\r\n\r\nSee BACULA_JOBID=1 for more details.',30,0); 38 | 39 | 40 | 41 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 42 | VALUES (ADDTIME(NOW(),'-1:10:55'), NOW(),'

Header 1

\r\n

Header 2

\r\n

Header 3

\r\n
Preformatted text
\r\nItalic text\r\n\r\nBACULA_JOBID=1\r\n\r\nLOGBOOK_ID=1\r\n\r\nExternal link',10,0); 43 | 44 | 45 | 46 | END-OF-DATA 47 | then 48 | echo "succeeded." 49 | else 50 | echo "failed." 51 | fi 52 | 53 | exit 0 54 | -------------------------------------------------------------------------------- /tests/prepare_tests/MySql/25_webacula_fill_jobdesc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Job descriptions 4 | # 5 | 6 | if mysql -f <Error record (for example).\r\n\r\nSerious errors in BACULA_JOBID=2',255,0); 13 | 14 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 15 | VALUES ((NOW() - time '10:30:25'),NULL, E'Warning record (for example).\r\n\r\nSee BACULA_JOBID=1 for more details.',30,0); 16 | 17 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 18 | VALUES ((NOW() - time '01:10:55'), NOW(), E'

Header 1

\r\n

Header 2

\r\n

Header 3

\r\n
Preformatted text
\r\nItalic text\r\n\r\nBACULA_JOBID=1\r\n\r\nLOGBOOK_ID=1\r\n\r\nExternal link',10,0); 19 | 20 | 21 | END-OF-DATA 22 | then 23 | echo "PostgreSql : fill logbook succeeded" 24 | else 25 | echo "PostgreSql : fill logbook failed !" 26 | fi 27 | 28 | exit 0 29 | -------------------------------------------------------------------------------- /tests/prepare_tests/PostgreSql/35_webacula_fill_jobdesc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Job descriptions 4 | # 5 | 6 | if /usr/bin/psql -q -f - -d bacula <Error record (for example). 20 | 21 | Serious errors in BACULA_JOBID=2',255,0); 22 | 23 | 24 | 25 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 26 | VALUES (datetime('now', '-10 hour'),NULL, 27 | 'Warning record (for example). 28 | 29 | See BACULA_JOBID=1 for more details.',30,0); 30 | 31 | 32 | 33 | INSERT INTO webacula_logbook (logDateCreate, logDateLast, logTxt, logTypeId, logIsDel) 34 | VALUES (datetime('now', '-1 hour'), datetime('now'), 35 | '

Header 1

36 |

Header 2

37 |

Header 3

38 |
Preformatted text
39 | Italic text 40 | 41 | BACULA_JOBID=1 42 | 43 | LOGBOOK_ID=1 44 | 45 | External link',10,0); 46 | 47 | 48 | 49 | END-OF-DATA 50 | 51 | 52 | echo "Sqlite : logbook fill OK" 53 | 54 | exit 0 -------------------------------------------------------------------------------- /tests/prepare_tests/SqLite/25_webacula_fill_jobdesc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Job descriptions 4 | # 5 | 6 | db_name="/tmp/webacula/sqlite/bacula.db" 7 | 8 | /usr/bin/sqlite3 $* ${db_name} < \n\n"; 11 | } 12 | 13 | 14 | # проверка командной строки 15 | if ($argc != 3) { 16 | my_usage(); 17 | exit(1); 18 | } 19 | 20 | /* 21 | * Main program 22 | */ 23 | 24 | $pass = $argv[1]; 25 | $hash = $argv[2]; 26 | 27 | echo "read:\npassword = $pass\nhash = $hash\n\n"; 28 | 29 | $hasher = new MyClass_PasswordHash(); 30 | 31 | $rc = $hasher->CheckPassword($pass, $hash); 32 | if ( $rc ) { 33 | echo "OK\n"; 34 | } else { 35 | echo "ERROR\n"; 36 | } 37 | unset($hasher); 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /tests/prepare_tests/clean_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########################################################### 4 | # Main program 5 | ########################################################### 6 | 7 | if [ "$UID" -ne 0 ] 8 | then 9 | echo -e "\nYou must be root to run this test.\nExit.\n" 10 | exit 11 | fi 12 | 13 | echo -e "\n\n*** WARNING!!! All Bacula, Webacula databases and files will be erased!!!\n" 14 | echo -e "*** Press Enter to continue ...\n\n" 15 | read 16 | 17 | /usr/bin/mysqlshow -u root mysql > /dev/null 18 | if test $? -ne 0; then 19 | echo "Can't connect to mysqld." 20 | /sbin/service mysqld start 21 | sleep 7 22 | else 23 | echo "Connect MySql OK" 24 | fi 25 | 26 | /usr/bin/psql -l > /dev/null 27 | if test $? -ne 0; then 28 | echo "Can't connect to postgresql." 29 | /sbin/service postgresql start 30 | sleep 7 31 | else 32 | echo "Connect PostgreSql OK" 33 | fi 34 | 35 | 36 | cd /opt/bacula/etc 37 | ./bacula stop 38 | sleep 3 39 | 40 | echo -e "\n\n" 41 | 42 | rm -r -f /tmp/webacula/sqlite/* 43 | rm -r -f /tmp/webacula/* 44 | rmdir /tmp/webacula 45 | 46 | /usr/bin/mysql -u root -f <