From 04173263974af0e7a354e066b9d7ec9c13c4289d Mon Sep 17 00:00:00 2001 From: OpenSLX Date: Wed, 20 Jan 2010 16:47:35 +0100 Subject: initial import --- .gitignore | 13 + .zfproject.xml | 125 +++++ application/Bootstrap.php | 57 +++ application/configs/application.ini | 30 ++ application/configs/db.sql | 83 ++++ application/controllers/ErrorController.php | 31 ++ application/controllers/IndexController.php | 66 +++ application/layouts/layout.phtml | 56 +++ application/models/Bootmedia.php | 8 + application/models/Kernels.php | 8 + application/models/Menuassignmentbm.php | 8 + application/models/Menuassignmentip.php | 8 + application/models/Menuassignments.php | 8 + application/models/Menuentries.php | 8 + application/models/Menus.php | 8 + application/models/Sources.php | 8 + application/models/Systems.php | 7 + .../backend/controllers/BootmediaController.php | 53 +++ .../modules/backend/controllers/JsonController.php | 84 ++++ .../modules/backend/controllers/MenuController.php | 210 +++++++++ .../backend/controllers/MkisoController.php | 283 ++++++++++++ .../backend/controllers/SystemController.php | 273 +++++++++++ .../modules/backend/controllers/UserController.php | 18 + .../backend/views/scripts/bootmedia/index.phtml | 1 + .../backend/views/scripts/bootmedia/list.phtml | 20 + .../modules/backend/views/scripts/menu/index.phtml | 1 + .../modules/backend/views/scripts/menu/list.phtml | 15 + .../views/scripts/menu/listassignments.phtml | 18 + .../backend/views/scripts/menu/listentries.phtml | 19 + .../backend/views/scripts/mkiso/index.phtml | 1 + .../modules/backend/views/scripts/system/add.phtml | 1 + .../backend/views/scripts/system/addkernel.phtml | 0 .../backend/views/scripts/system/index.phtml | 1 + .../backend/views/scripts/system/sync.phtml | 0 .../views/scripts/system/updateinitramfs.phtml | 0 .../views/scripts/system/updatekernel.phtml | 0 .../modules/backend/views/scripts/user/index.phtml | 1 + .../bootloader/controllers/EnvController.php | 218 +++++++++ .../bootloader/controllers/IndexController.php | 29 ++ .../bootloader/views/scripts/env/bootmenu.dialog | 7 + .../bootloader/views/scripts/env/prebootInit.sh | 71 +++ .../bootloader/views/scripts/index/index.phtml | 0 .../modules/ui/controllers/DialogController.php | 53 +++ .../modules/ui/controllers/SubpageController.php | 60 +++ .../ui/views/scripts/dialog/bootmedia.create.phtml | 18 + .../views/scripts/dialog/bootmedia.progress.phtml | 17 + .../modules/ui/views/scripts/dialog/get.phtml | 2 + .../ui/views/scripts/dialog/menu.create.phtml | 14 + .../scripts/dialog/menu.createassignment.phtml | 22 + .../ui/views/scripts/dialog/menu.createentry.phtml | 18 + .../views/scripts/dialog/menu.createentry2.phtml | 20 + .../scripts/subpage/bootmedia.actionmenu.phtml | 2 + .../ui/views/scripts/subpage/bootmedia.list.phtml | 5 + .../modules/ui/views/scripts/subpage/get.phtml | 2 + .../scripts/subpage/menu.actionmenu-entries.phtml | 3 + .../subpage/menu.actionmenu-menuassignment.phtml | 1 + .../ui/views/scripts/subpage/menu.actionmenu.phtml | 1 + .../scripts/subpage/menu.assignmentlist.phtml | 5 + .../ui/views/scripts/subpage/menu.entrylist.phtml | 5 + .../ui/views/scripts/subpage/menu.list.phtml | 5 + application/views/helpers/BaseUrl.php | 10 + application/views/scripts/error/error.phtml | 28 ++ application/views/scripts/index/bootmedia.phtml | 13 + application/views/scripts/index/index.phtml | 3 + application/views/scripts/index/menu.phtml | 13 + .../views/scripts/index/menuassignment.phtml | 13 + data/db/README | 0 data/syslinux/LICENSE | 3 + data/syslinux/README.iso | 6 + data/syslinux/README.pxe | 68 +++ data/syslinux/extlinux | Bin 0 -> 52714 bytes data/syslinux/initramfs-shutdown | Bin 0 -> 665088 bytes data/syslinux/isolinux.bin | Bin 0 -> 14336 bytes data/syslinux/kernel-shutdown | Bin 0 -> 688752 bytes data/syslinux/mboot.c32 | Bin 0 -> 31148 bytes data/syslinux/mbr.bin | Bin 0 -> 440 bytes data/syslinux/menu.c32 | Bin 0 -> 57140 bytes data/syslinux/pxechain.com | Bin 0 -> 998 bytes data/syslinux/pxelinux.0 | Bin 0 -> 16138 bytes data/syslinux/pxemenu-bottom.example | 39 ++ data/syslinux/pxemenu-include.example | 58 +++ data/syslinux/syslinux | Bin 0 -> 25604 bytes data/syslinux/themes/openslx/openslx.png | Bin 0 -> 168728 bytes data/syslinux/themes/openslx/theme.conf | 40 ++ data/syslinux/vesamenu.c32 | Bin 0 -> 147728 bytes library/OpenSLX/DB.php | 1 + library/OpenSLX/DB_Schema.php | 1 + public/.htaccess | 8 + public/images/bg.png | Bin 0 -> 2307 bytes public/images/bg_footer.png | Bin 0 -> 248 bytes public/images/bg_footer.xcf | Bin 0 -> 1192 bytes public/images/bg_menu.png | Bin 0 -> 319 bytes public/images/bg_menupng.xcf | Bin 0 -> 1114 bytes public/images/bg_title.png | Bin 0 -> 36499 bytes public/images/bg_title2.png | Bin 0 -> 39491 bytes public/images/bg_title3.png | Bin 0 -> 36005 bytes public/images/cd_bg.png | Bin 0 -> 3008 bytes public/images/logo.png | Bin 0 -> 4861 bytes public/images/pbar-ani.gif | Bin 0 -> 304064 bytes public/images/ui-bg_flat_0_666666_40x100.png | Bin 0 -> 223 bytes public/index.php | 27 ++ public/js/jquery-1.3.2.min.js | 19 + public/js/jquery-ui-1.7.2.custom.min.js | 298 ++++++++++++ public/js/pbs.js | 504 +++++++++++++++++++++ public/styles/site.css | 345 ++++++++++++++ .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../smoothness/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../styles/smoothness/jquery-ui-1.7.2.custom.css | 406 +++++++++++++++++ .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 3762 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 5355 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes .../styles/ui-lightness/jquery-ui-1.7.2.custom.css | 406 +++++++++++++++++ tests/application/bootstrap.php | 0 .../controllers/BootmediaControllerTest.php | 20 + .../controllers/SystemControllerTest.php | 20 + .../application/controllers/UserControllerTest.php | 20 + tests/library/bootstrap.php | 0 tests/phpunit.xml | 0 140 files changed, 4478 insertions(+) create mode 100644 .gitignore create mode 100644 .zfproject.xml create mode 100644 application/Bootstrap.php create mode 100644 application/configs/application.ini create mode 100644 application/configs/db.sql create mode 100644 application/controllers/ErrorController.php create mode 100644 application/controllers/IndexController.php create mode 100644 application/layouts/layout.phtml create mode 100644 application/models/Bootmedia.php create mode 100644 application/models/Kernels.php create mode 100644 application/models/Menuassignmentbm.php create mode 100644 application/models/Menuassignmentip.php create mode 100644 application/models/Menuassignments.php create mode 100644 application/models/Menuentries.php create mode 100644 application/models/Menus.php create mode 100644 application/models/Sources.php create mode 100644 application/models/Systems.php create mode 100644 application/modules/backend/controllers/BootmediaController.php create mode 100644 application/modules/backend/controllers/JsonController.php create mode 100644 application/modules/backend/controllers/MenuController.php create mode 100644 application/modules/backend/controllers/MkisoController.php create mode 100644 application/modules/backend/controllers/SystemController.php create mode 100644 application/modules/backend/controllers/UserController.php create mode 100644 application/modules/backend/views/scripts/bootmedia/index.phtml create mode 100644 application/modules/backend/views/scripts/bootmedia/list.phtml create mode 100644 application/modules/backend/views/scripts/menu/index.phtml create mode 100644 application/modules/backend/views/scripts/menu/list.phtml create mode 100644 application/modules/backend/views/scripts/menu/listassignments.phtml create mode 100644 application/modules/backend/views/scripts/menu/listentries.phtml create mode 100644 application/modules/backend/views/scripts/mkiso/index.phtml create mode 100644 application/modules/backend/views/scripts/system/add.phtml create mode 100644 application/modules/backend/views/scripts/system/addkernel.phtml create mode 100644 application/modules/backend/views/scripts/system/index.phtml create mode 100644 application/modules/backend/views/scripts/system/sync.phtml create mode 100644 application/modules/backend/views/scripts/system/updateinitramfs.phtml create mode 100644 application/modules/backend/views/scripts/system/updatekernel.phtml create mode 100644 application/modules/backend/views/scripts/user/index.phtml create mode 100644 application/modules/bootloader/controllers/EnvController.php create mode 100644 application/modules/bootloader/controllers/IndexController.php create mode 100644 application/modules/bootloader/views/scripts/env/bootmenu.dialog create mode 100644 application/modules/bootloader/views/scripts/env/prebootInit.sh create mode 100644 application/modules/bootloader/views/scripts/index/index.phtml create mode 100644 application/modules/ui/controllers/DialogController.php create mode 100644 application/modules/ui/controllers/SubpageController.php create mode 100644 application/modules/ui/views/scripts/dialog/bootmedia.create.phtml create mode 100644 application/modules/ui/views/scripts/dialog/bootmedia.progress.phtml create mode 100644 application/modules/ui/views/scripts/dialog/get.phtml create mode 100644 application/modules/ui/views/scripts/dialog/menu.create.phtml create mode 100644 application/modules/ui/views/scripts/dialog/menu.createassignment.phtml create mode 100644 application/modules/ui/views/scripts/dialog/menu.createentry.phtml create mode 100644 application/modules/ui/views/scripts/dialog/menu.createentry2.phtml create mode 100644 application/modules/ui/views/scripts/subpage/bootmedia.actionmenu.phtml create mode 100644 application/modules/ui/views/scripts/subpage/bootmedia.list.phtml create mode 100644 application/modules/ui/views/scripts/subpage/get.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.actionmenu-entries.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.actionmenu-menuassignment.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.actionmenu.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.assignmentlist.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.entrylist.phtml create mode 100644 application/modules/ui/views/scripts/subpage/menu.list.phtml create mode 100644 application/views/helpers/BaseUrl.php create mode 100644 application/views/scripts/error/error.phtml create mode 100644 application/views/scripts/index/bootmedia.phtml create mode 100644 application/views/scripts/index/index.phtml create mode 100644 application/views/scripts/index/menu.phtml create mode 100644 application/views/scripts/index/menuassignment.phtml create mode 100644 data/db/README create mode 100644 data/syslinux/LICENSE create mode 100644 data/syslinux/README.iso create mode 100644 data/syslinux/README.pxe create mode 100755 data/syslinux/extlinux create mode 100644 data/syslinux/initramfs-shutdown create mode 100644 data/syslinux/isolinux.bin create mode 100644 data/syslinux/kernel-shutdown create mode 100755 data/syslinux/mboot.c32 create mode 100644 data/syslinux/mbr.bin create mode 100755 data/syslinux/menu.c32 create mode 100644 data/syslinux/pxechain.com create mode 100644 data/syslinux/pxelinux.0 create mode 100644 data/syslinux/pxemenu-bottom.example create mode 100644 data/syslinux/pxemenu-include.example create mode 100755 data/syslinux/syslinux create mode 100644 data/syslinux/themes/openslx/openslx.png create mode 100644 data/syslinux/themes/openslx/theme.conf create mode 100755 data/syslinux/vesamenu.c32 create mode 100644 library/OpenSLX/DB.php create mode 100644 library/OpenSLX/DB_Schema.php create mode 100644 public/.htaccess create mode 100644 public/images/bg.png create mode 100644 public/images/bg_footer.png create mode 100644 public/images/bg_footer.xcf create mode 100644 public/images/bg_menu.png create mode 100644 public/images/bg_menupng.xcf create mode 100644 public/images/bg_title.png create mode 100644 public/images/bg_title2.png create mode 100644 public/images/bg_title3.png create mode 100644 public/images/cd_bg.png create mode 100644 public/images/logo.png create mode 100644 public/images/pbar-ani.gif create mode 100644 public/images/ui-bg_flat_0_666666_40x100.png create mode 100644 public/index.php create mode 100644 public/js/jquery-1.3.2.min.js create mode 100644 public/js/jquery-ui-1.7.2.custom.min.js create mode 100644 public/js/pbs.js create mode 100644 public/styles/site.css create mode 100644 public/styles/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 public/styles/smoothness/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 public/styles/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 public/styles/smoothness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 public/styles/smoothness/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 public/styles/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 public/styles/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 public/styles/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 public/styles/smoothness/images/ui-icons_222222_256x240.png create mode 100644 public/styles/smoothness/images/ui-icons_2e83ff_256x240.png create mode 100644 public/styles/smoothness/images/ui-icons_454545_256x240.png create mode 100644 public/styles/smoothness/images/ui-icons_888888_256x240.png create mode 100644 public/styles/smoothness/images/ui-icons_cd0a0a_256x240.png create mode 100644 public/styles/smoothness/jquery-ui-1.7.2.custom.css create mode 100644 public/styles/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 public/styles/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 public/styles/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 public/styles/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 public/styles/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 public/styles/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 public/styles/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 public/styles/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 public/styles/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 public/styles/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 public/styles/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 public/styles/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 public/styles/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 public/styles/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 public/styles/ui-lightness/jquery-ui-1.7.2.custom.css create mode 100644 tests/application/bootstrap.php create mode 100644 tests/application/controllers/BootmediaControllerTest.php create mode 100644 tests/application/controllers/SystemControllerTest.php create mode 100644 tests/application/controllers/UserControllerTest.php create mode 100644 tests/library/bootstrap.php create mode 100644 tests/phpunit.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5ae9a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.settings +.project +.buildpath +data/db/pbs.db +data/debug.log +data/kernels/ +public/isos/ diff --git a/.zfproject.xml b/.zfproject.xml new file mode 100644 index 0000000..848faab --- /dev/null +++ b/.zfproject.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/Bootstrap.php b/application/Bootstrap.php new file mode 100644 index 0000000..35400b1 --- /dev/null +++ b/application/Bootstrap.php @@ -0,0 +1,57 @@ + '', + 'basePath' => APPLICATION_PATH + ) + ); + return $moduleLoader; + } + + protected function _initDbSetup() + { + $logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $logger->addWriter($w); + + $this->bootstrap('Db'); + $db = $this->getResource('Db'); + $tables = $db->listTables(); + if(empty($tables)) { + $sql = file_get_contents(APPLICATION_PATH . '/configs/db.sql'); + $logger->info("Setup DB"); + $sqlcommands = explode(";\n",$sql); + try{ + foreach($sqlcommands as $s) { + $db->getConnection()->exec($s); + } + } + catch (Exception $e) { + $logger->warn($e->getMessage()); + } + } else { + $logger->info("Skip DB setup"); + + } + return; + } + + public function _initViewHelpers() + { + $this->bootstrap('layout'); + $layout = $this->getResource('layout'); + $view = $layout->getView(); + $view->doctype('XHTML1_STRICT'); + $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8'); + $view->headTitle()->setSeparator(' :: '); + $view->headTitle('OpenSLX PBS'); + } + +} + diff --git a/application/configs/application.ini b/application/configs/application.ini new file mode 100644 index 0000000..3e2230b --- /dev/null +++ b/application/configs/application.ini @@ -0,0 +1,30 @@ +[production] +phpSettings.display_startup_errors = 0 +phpSettings.display_errors = 0 +includePaths.library = APPLICATION_PATH "/../library" +bootstrap.path = APPLICATION_PATH "/Bootstrap.php" +bootstrap.class = "Bootstrap" +resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" +resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" +resources.frontController.defaultControllerName = "index" +resources.frontController.defaultAction = "index" +resources.modules[] = "backend" +resources.db.adapter = PDO_SQLITE; +resources.db.params.dbname = APPLICATION_PATH "/../data/db/pbs.db" +resources.db.isDefaultTableAdapter = true + +resources.layout.layoutpath = APPLICATION_PATH "/layouts" + +[staging : production] +resources.db.params.dbname = APPLICATION_PATH "/../data/db/pbs.db" + + +[testing : production] +resources.db.params.dbname = APPLICATION_PATH "/../data/db/pbs.testing.db" +phpSettings.display_startup_errors = 1 +phpSettings.display_errors = 1 + +[development : production] +resource.db.params.dbname = APPLICATION_PATH "/../data/db/pbs.development.db" +phpSettings.display_startup_errors = 1 +phpSettings.display_errors = 1 diff --git a/application/configs/db.sql b/application/configs/db.sql new file mode 100644 index 0000000..48efbe3 --- /dev/null +++ b/application/configs/db.sql @@ -0,0 +1,83 @@ +CREATE TABLE pbs ( + id INTEGER PRIMARY KEY, + attribute TEXT, + val TEXT +); + +INSERT INTO pbs (attribute, val) VALUES ("version", "0.1"); +INSERT INTO pbs (attribute, val) VALUES ("location", "http://pbs.lan/"); +INSERT INTO pbs (attribute, val) VALUES ("uclibrootfs-version", "1"); + +CREATE TABLE systems ( + id INTEGER PRIMARY KEY, + external_id TEXT, + append TEXT, + description TEXT, + initrd TEXT, + kernel TEXT, + name TEXT, + source TEXT +); + +CREATE TABLE sources ( + ip TEXT PRIMARY KEY, + version TEXT, + lastdemux TEXT, + description TEXT +); + +CREATE TABLE kernels ( + id INTEGER PRIMARY KEY, + kernel TEXT, + kernel_md5 TEXT, + initramfs_md5 TEXT +); + +CREATE TABLE bootmedia ( + id INTEGER PRIMARY KEY, + kernel TEXT, + name TEXT, + identifier TEXT, + description TEXT, + created TEXT, + theme TEXT, + mediatype TEXT +); + +CREATE TABLE menus ( + id INTEGER PRIMARY KEY, + name TEXT, + description TEXT, + theme TEXT +); + +CREATE TABLE menu_entries ( + id INTEGER PRIMARY KEY, + menu_id INTEGER, + entry_order INTEGER, + system_id INTEGER, + overwrite_caption INTEGER, + overwrite_append INTEGER, + alternative_caption TEXT, + alternative_append TEXT +); + +CREATE TABLE menu_assignments ( + id INTEGER PRIMARY KEY, + name TEXT, + menu_id INTEGER +); + +CREATE TABLE menu_assignment_iprules ( + id INTEGER PRIMARY KEY, + menu_assignment_rule INTEGER, + ip TEXT, + netmask TEXT +); + +CREATE TABLE menu_assignment_bmrules ( + id INTEGER PRIMARY KEY, + menu_assignment_rule INTEGER, + bootmedia_id INTEGER +); + diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php new file mode 100644 index 0000000..8fec924 --- /dev/null +++ b/application/controllers/ErrorController.php @@ -0,0 +1,31 @@ +_getParam('error_handler'); + + switch ($errors->type) { + case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: + case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION: + + // 404 error -- controller or action not found + $this->getResponse()->setHttpResponseCode(404); + $this->view->message = 'Page not found'; + break; + default: + // application error + $this->getResponse()->setHttpResponseCode(500); + $this->view->message = 'Application error'; + break; + } + + $this->view->exception = $errors->exception; + $this->view->request = $errors->request; + } + + +} + diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php new file mode 100644 index 0000000..333b38e --- /dev/null +++ b/application/controllers/IndexController.php @@ -0,0 +1,66 @@ +view->baseUrl(); + $v = $this->view; + + $v->headLink() + ->prependStylesheet($burl .'/styles/site.css') + ->appendStylesheet($burl.'/styles/smoothness/jquery-ui-1.7.2.custom.css'); + $v->headScript() + ->setFile($burl.'/js/jquery-1.3.2.min.js') + ->appendFile($burl.'/js/jquery-ui-1.7.2.custom.min.js') + ->appendFile($burl.'/js/pbs.js'); + + $v->menubar = array( + "Home" => "/", + "Bootmedia" => "/index/bootmedia", + "Menus" => "/index/menu", + "Menu Assignment" => "/index/menuassignment", + "Systeminfo" => "/index/sysinfo" + ); + } + + public function indexAction() + { + $this->view->title = "Home"; + $this->view->headTitle($this->view->title, 'APPEND'); + } + + public function menuAction() + { + $this->view->title = "Menus"; + $this->view->headTitle($this->view->title, 'APPEND'); + + } + + public function bootmediaAction() + { + $this->view->title = "Bootmedia"; + $this->view->headTitle($this->view->title, 'APPEND'); + + } + + public function menuassignmentAction() + { + $this->view->title = "Menu Assignment"; + $this->view->headTitle($this->view->title, 'APPEND'); + + } + + public function sysinfoAction() + { + $this->view->title = "System Information"; + $this->view->headTitle($this->view->title, 'APPEND'); + + } + + +} + + + diff --git a/application/layouts/layout.phtml b/application/layouts/layout.phtml new file mode 100644 index 0000000..45552f3 --- /dev/null +++ b/application/layouts/layout.phtml @@ -0,0 +1,56 @@ +doctype() ?> + + +headMeta() ?> +headTitle() ?> +headLink() ?> +headScript() ?> + + +
+
+
+ + +
+
+ +
+
+

:: escape($this->title) ?> ::

+
+menubar)) :?> +menubar); ?> +
    +menubar as $title => $link) : ?> +
  • + +
+ +
+
+
+
+
+layout()->content ?> +
+
+ +
+ + diff --git a/application/models/Bootmedia.php b/application/models/Bootmedia.php new file mode 100644 index 0000000..b9e806f --- /dev/null +++ b/application/models/Bootmedia.php @@ -0,0 +1,8 @@ +_helper->layout->disableLayout(); + #$this->_helper->viewRenderer->setNoRender(); + + $this->_mbootmedia = new Model_Bootmedia(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + // action body + } + + public function delAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $id = $this->getRequest()->getParam("id"); + + $w = $this->_mbootmedia->getAdapter()->quoteInto('id = ?', $id); + $this->_mbootmedia->delete($w); + } + + public function listAction() + { + $data = $this->_mbootmedia->fetchAll()->toArray(); + $this->view->listdata = $data; + } + + +} + + + + + + + + + diff --git a/application/modules/backend/controllers/JsonController.php b/application/modules/backend/controllers/JsonController.php new file mode 100644 index 0000000..61da947 --- /dev/null +++ b/application/modules/backend/controllers/JsonController.php @@ -0,0 +1,84 @@ +_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $this->_mkernels = new Model_Kernels(); + $this->_mmenus = new Model_Menus(); + $this->_msources = new Model_Sources(); + $this->_msystems = new Model_Systems(); + $this->_mbootmedia = new Model_Bootmedia(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + // action body + } + + public function kernelAction() + { + $kernels = $this->_mkernels->fetchAll()->toArray(); + echo (json_encode($kernels)); + } + + public function menuAction() + { + $menus = $this->_mmenus->fetchAll()->toArray(); + echo (json_encode($menus)); + } + + public function bootmediaAction() + { + $bootmedia= $this->_mbootmedia->fetchAll()->toArray(); + echo (json_encode($bootmedia)); + } + + public function sourcesAction() + { + $sources = $this->_msources->fetchAll()->toArray(); + echo (json_encode($sources)); + + } + + public function systemsAction() + { + $ip = $this->getRequest()->getParam('ip'); + if (!empty($ip)) { + $s = $this->_msystems->select(); + $s->where('source = ?', $ip); + $systems = $this->_msystems->fetchAll($s)->toArray(); + } else { + $systems = $this->_msystems->fetchAll()->toArray(); + } + echo (json_encode($systems)); + } + + + +} + + + + + + + + + diff --git a/application/modules/backend/controllers/MenuController.php b/application/modules/backend/controllers/MenuController.php new file mode 100644 index 0000000..f8c6a7f --- /dev/null +++ b/application/modules/backend/controllers/MenuController.php @@ -0,0 +1,210 @@ +_helper->layout->disableLayout(); + #$this->_helper->viewRenderer->setNoRender(); + + $this->_mmenus = new Model_Menus(); + $this->_mmenu_entries = new Model_Menuentries(); + $this->_mmenu_assignments = new Model_Menuassignments(); + $this->_mmenu_assignment_iprules = new Model_Menuassignmentip(); + $this->_mmenu_assignment_bmrules = new Model_Menuassignmentbm(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + // action body + } + + public function listentriesAction() + { + $mid = $this->getRequest()->getParam('id'); + $s = $this->_mmenu_entries->select(Zend_Db_Table::SELECT_WITH_FROM_PART); + $s->setIntegrityCheck(false) + ->where('menu_id = ?', $mid) + ->joinLeft(array('s' => 'systems'), 's.id = menu_entries.system_id', + array('s_name' => 'name', + 's_external_id' => 'external_id', + 's_source' => 'source')) + ->order('entry_order'); + $data = $this->_mmenu_entries->fetchAll($s)->toArray(); + $this->view->listdata = $data; + } + + public function listAction() + { + $data = $this->_mmenus->fetchAll()->toArray(); + $this->view->listdata = $data; + } + + public function addAction() + { + $this->_helper->viewRenderer->setNoRender(); + $name = $this->getRequest()->getParam("name"); + $description = $this->getRequest()->getParam("description"); + + #TODO: make themes selectable + $db_data = array( + "name" => $name, + "description" => $description, + "theme" => "openslx" + ); + + $this->_mmenus->insert($db_data); + + } + + public function delAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $id = $this->getRequest()->getParam("id"); + + $w = $this->_mmenus->getAdapter()->quoteInto('id = ?', $id); + $this->_mmenus->delete($w); + + $w = $this->_mmenu_entries->getAdapter()->quoteInto('menu_id = ?', $id); + $this->_mmenu_entries->delete($w); + + } + + public function addentryAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $menu = $this->getRequest()->getParam("menu"); + $system = $this->getRequest()->getParam("system"); + $altCaptionSet = $this->getRequest()->getParam("altCaptionSet"); + $altCaption = ($altCaptionSet) ? $this->getRequest()->getParam("altCaption") : null; + $altAppendSet = $this->getRequest()->getParam("altAppendSet"); + $altAppend = ($altAppendSet) ? $this->getRequest()->getParam("altAppend") : null; + + $db_data = array( + "menu_id" => $menu, + "system_id" => $system, + "overwrite_caption" => $altCaptionSet, + "overwrite_append" => $altAppendSet, + "alternative_caption" => $altCaption, + "alternative_append" => $altAppend + ); + + $this->_mmenu_entries->insert($db_data); + + } + + public function saveentryorderAction() { + $this->_helper->viewRenderer->setNoRender(); + $data = $this->getRequest()->getParam("data"); + + $data = explode(';', $data); + foreach ($data as $d) { + if (!empty($d)) { + list($id, $order) = explode(':', $d); + $db_data = array( + 'entry_order' => $order + ); + $w = $this->_mmenu_entries->getAdapter()->quoteInto('id = ?', $id); + $this->_mmenu_entries->update($db_data, $w); + } + } + + } + + public function delentryAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $id = $this->getRequest()->getParam("id"); + + $w = $this->_mmenu_entries->getAdapter()->quoteInto('id = ?', $id); + $this->_mmenu_entries->delete($w); + } + + public function listassignmentsAction() + { + $l = $this->_logger; + $s = $this->_mmenu_assignments->select(Zend_Db_Table::SELECT_WITH_FROM_PART); + $s->setIntegrityCheck(false) + ->joinLeft(array('m' => 'menus'), 'm.id = menu_assignments.menu_id', + array('m_name' => 'name')) + ->joinLeft(array('i' => 'menu_assignment_iprules'), 'i.menu_assignment_rule = menu_assignments.id', + array('i_ip' => 'ip', + 'i_netmask' => 'netmask')) + ->joinLeft(array('b' => 'menu_assignment_bmrules'), 'b.menu_assignment_rule = menu_assignments.id', + array('b_bootmedia_id' => 'bootmedia_id')) + ->joinLeft(array('bm' => 'bootmedia'), 'bm.id = b.bootmedia_id', + array('b_name' => 'name')) + ->order(array('menu_id', 'i_netmask', 'b_bootmedia')); + $l->info('[menucontroller] '. $s->assemble()); + $data = $this->_mmenu_assignments->fetchAll($s)->toArray(); + $this->view->listdata = $data; + } + + public function addassignmentAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $name = $this->getRequest()->getParam("name"); + $menu = $this->getRequest()->getParam("menu"); + $bootmedia = $this->getRequest()->getParam("bootmedia"); + $ip = $this->getRequest()->getParam("ip"); + + if (empty($ip) || !strpos($ip, "/")) { + $ip = ""; $netmask=""; + } else { + list($ip, $netmask) = explode("/", $ip); + } + + $db_data = array( + 'name' => $name, + 'menu_id' => $menu + ); + + $id = (int)$this->_mmenu_assignments->insert($db_data); + + if ($bootmedia != "all") { + $db_data = array ( + 'menu_assignment_rule' => $id, + 'bootmedia_id' => $bootmedia + ); + $this->_mmenu_assignment_bmrules->insert($db_data); + } + + if (!empty($ip)) { + $db_data = array ( + 'menu_assignment_rule' => $id, + 'ip' => $ip, + 'netmask' => $netmask + ); + $this->_mmenu_assignment_iprules->insert($db_data); + } + + } + +} + + + + + + + + + diff --git a/application/modules/backend/controllers/MkisoController.php b/application/modules/backend/controllers/MkisoController.php new file mode 100644 index 0000000..b0b4fd5 --- /dev/null +++ b/application/modules/backend/controllers/MkisoController.php @@ -0,0 +1,283 @@ +\n"; + $result=smartCopy($source.$file, $dest.$file, $folderPermission, $filePermission); + } + } + closedir($dirHandle); + } + else { + $result=false; + } + return $result; + } + + public function init() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $this->_mkernels = new Model_Kernels(); + $this->_msources = new Model_Sources(); + $this->_mbootmedia = new Model_Bootmedia(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + private function delTree($dir) { + $files = glob( $dir . '*', GLOB_MARK ); + foreach( $files as $file ){ + if( substr( $file, -1 ) == '/' ) + $this->delTree( $file ); + else + unlink( $file ); + } + + if (is_dir($dir)) rmdir( $dir ); + + } + + public function indexAction() + { + + } + + public function prepareAction() { + $l = $this->_logger; + + $kernel = $this->getRequest()->getParam('kernel'); + $name = $this->getRequest()->getParam('name'); + $description = $this->getRequest()->getParam('description'); + $identifier = dechex(mktime()); + + $tmppath = APPLICATION_PATH . "/../data/tmp"; + $cdpath = $tmppath . "/cd"; + $isoDir = "$cdpath/iso/isolinux"; + $syslinuxpath = APPLICATION_PATH . "/../data/syslinux"; + + + if (!is_dir($isoDir)) + mkdir($isoDir, 0777, true); + $files = array('LICENSE', 'README.iso', 'vesamenu.c32', 'isolinux.bin'); + foreach ($files as $f) copy ($syslinuxpath . "/$f", $isoDir . "/$f"); + $l->info("copy syslinux files to tmp"); + + if ($kernel != "auto") { + $s = $this->_mkernels->select(); + $s->where("kernel = ?", $kernel); + $r = $this->_mkernels->fetchAll($s)->toArray(); + } + + #TODO: fetch newest kernel or let user select kernel + if ($kernel == "auto" || empty($r)){ + #TODO: build in some ordering to get the newest kernel.. + #$s = $this->_mkernels->select(); + $r = $this->_mkernels->fetchAll()->toArray(); + } + + $r = $r[0]; + + $kernel = $r['kernel']; + $kernelpath = APPLICATION_PATH . "/../data/kernels/$kernel"; + + $files = array('vmlinuz', 'initramfs'); + foreach ($files as $f) copy ($kernelpath . "/$f", $isoDir . "/$f"); + $l->info("copy kernel/initramfs to tmp"); + + $isolinuxConfig = "DEFAULT vesamenu.c32\n"; + $isolinuxConfig .= "PROMPT 0\n"; + $isolinuxConfig .= "TIMEOUT 100\n"; + $isolinuxConfig .= file_get_contents($syslinuxpath . "/themes/openslx/theme.conf"); + + copy($syslinuxpath . "/themes/openslx/openslx.png", $isoDir . "/openslx.png"); + + + $isolinuxConfig .= ' +MENU TITLE Welcome to OpenSLX PreBoot ISO/CD (Mini Linux/Kexec) +LABEL SLXSTDBOOT + MENU LABEL OpenSLX PreBoot - Stateless Netboot Linux ... + MENU DEFAULT + KERNEL vmlinuz + APPEND initrd=initramfs vga=0x317 pbsId='.$identifier.' + TEXT HELP + Use this (default) entry if you have configured your client. + You have chance to edit the kernel commandline by hitting + the TAB key (e.g. for adding debug=3 to it for bug hunting). + ENDTEXT +LABEL LOCALBOOT + MENU LABEL Boot locally (skip OpenSLX PreBoot) ... + LOCALBOOT -1 + TEXT HELP + Gets you out of here by booting from next device in BIOS + boot order. + ENDTEXT'; + + file_put_contents($isoDir . "/isolinux.cfg", $isolinuxConfig); + + $return = array( + "kernel" => $kernel, + "name" => $name, + "description" => $description, + "identifier" => $identifier, + "progress" => "30", + "progressmsg" => "creating iso", + "error" => false, + "errormsg" => "" + ); + + echo(json_encode($return)); + + } + + public function createisoAction() { + $l = $this->_logger; + + $kernel = $this->getRequest()->getParam('kernel'); + $name = $this->getRequest()->getParam('name'); + $description = $this->getRequest()->getParam('description'); + $identifier = $this->getRequest()->getParam('identifier'); + + $tmppath = APPLICATION_PATH . "/../data/tmp"; + $cdpath = $tmppath . "/cd"; + + $mkisofsCmd = 'mkisofs \ + -o %s \ + -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \ + -r -J -l -boot-info-table -joliet-long \ + -publisher "OpenSLX Project - http://www.openslx.org" \ + -p "OpenSLX Project - openslx-devel@openslx.org" \ + -V "OpenSLX BootISO" \ + -volset "OpenSLX Project - PreBoot ISO/CD for non PXE/TFTP start of a Linux Stateless Client" \ + -c isolinux/boot.cat "%s/iso"'; + + $outDir = APPLICATION_PATH . "/../public/isos/$identifier"; + if (!is_dir($outDir)) + mkdir($outDir, 0777, true); + + $iso = $outDir . "/openslx.iso"; + $isolog = $outDir . "/openslx.iso.log"; + $mkisofsCmd = sprintf ($mkisofsCmd, $iso, $cdpath); + $output = array(); + $returnval = null; + exec($mkisofsCmd, $output, $returnval); + + $l->info(print_r($output,true)); + + $return = array( + "kernel" => $kernel, + "name" => $name, + "description" => $description, + "identifier" => $identifier, + "progress" => "60", + "progressmsg" => "cleaning up", + "error" => false, + "errormsg" => "" + ); + + echo(json_encode($return)); + + } + + public function cleanupAction() { + $l = $this->_logger; + + $kernel = $this->getRequest()->getParam('kernel'); + $name = $this->getRequest()->getParam('name'); + $description = $this->getRequest()->getParam('description'); + $identifier = $this->getRequest()->getParam('identifier'); + + $tmppath = APPLICATION_PATH . "/../data/tmp"; + $cdpath = $tmppath . "/cd"; + + $this->delTree($cdpath); + + $return = array( + "kernel" => $kernel, + "name" => $name, + "description" => $description, + "identifier" => $identifier, + "progress" => "80", + "progressmsg" => "update DB", + "error" => false, + "errormsg" => "" + ); + + echo(json_encode($return)); + } + + public function dbAction() { + + $kernel = $this->getRequest()->getParam('kernel'); + $name = $this->getRequest()->getParam('name'); + $description = $this->getRequest()->getParam('description'); + $identifier = $this->getRequest()->getParam('identifier'); + + $db_data = array( + kernel => $kernel, + name => $name, + identifier => $identifier, + description => $description, + theme => "openslx", + created => mktime(), + mediatype => "cd" + ); + + $this->_mbootmedia->insert($db_data); + + $return = array( + "kernel" => $kernel, + "name" => $name, + "description" => $description, + "identifier" => $identifier, + "progress" => "80", + "progressmsg" => "update DB", + "error" => false, + "errormsg" => "" + ); + echo(json_encode(array("progress" => "100", "progressmsg" => "FINISHED!"))); + } + + + +} diff --git a/application/modules/backend/controllers/SystemController.php b/application/modules/backend/controllers/SystemController.php new file mode 100644 index 0000000..a13ed2a --- /dev/null +++ b/application/modules/backend/controllers/SystemController.php @@ -0,0 +1,273 @@ +_helper->layout->disableLayout(); + $this->_msystems = new Model_Systems(); + $this->_mkernels = new Model_Kernels(); + $this->_msources = new Model_Sources(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + // action body + } + + public function updateinitramfsAction() + { + // we don't need any view for json output + $this->_helper->viewRenderer->setNoRender(); + + $l = $this->_logger; + $adapter = new Zend_File_Transfer_Adapter_Http(); + $kernel = $this->getRequest()->getParam('kernel'); + + $s = $this->_mkernels->select(); + $s->where('kernel=?', $data['kernel']); + $r = $this->_mkernels->fetchAll($s)->toArray(); + + $id = $r[0]['id']; + + #TODO: bild in more checks + $targetpath = APPLICATION_PATH . "/../data/kernels/$kernel/"; + + if (!is_dir($targetpath)) + mkdir($targetpath, 0777, true); + + $adapter->setDestination($targetpath); + + #todo add to db + + if (!$adapter->receive()) { + $messages = $adapter->getMessages(); + foreach ($messages as $m) { + $l->crit($m); + } + } else { + $db_data = array( + 'initramfs_md5' => $adapter->getHash('md5', 'initramfsFile') + ); + $w = $this->_mkernels->getAdapter()->quoteInto('id = ?', $id); + $this->_mkernels->update($db_data, $w); + $l->info(sprintf( + "updated initramfs with following md5s:\n\tinitramfs:\t%s", + $adapter->getHash('md5', 'initramfsFile') + )); + } + } + + public function updatekernelAction() + { + // we don't need any view for json output + $this->_helper->viewRenderer->setNoRender(); + + $l = $this->_logger; + $adapter = new Zend_File_Transfer_Adapter_Http(); + $kernel = $this->getRequest()->getParam('kernel'); + + $s = $this->_mkernels->select(); + $s->where('kernel=?', $data['kernel']); + $r = $this->_mkernels->fetchAll($s)->toArray(); + + $id = $r[0]['id']; + + #TODO: bild in more checks + $targetpath = APPLICATION_PATH . "/../data/kernels/$kernel/"; + + if (!is_dir($targetpath)) + mkdir($targetpath, 0777, true); + + $adapter->setDestination($targetpath); + + #todo add to db + + if (!$adapter->receive()) { + $messages = $adapter->getMessages(); + foreach ($messages as $m) { + $l->crit($m); + } + } else { + $db_data = array( + 'kernel_md5' => $adapter->getHash('md5', 'kernelFile') + ); + $w = $this->_mkernels->getAdapter()->quoteInto('id = ?', $id); + $this->_mkernels->update($db_data, $w); + $l->info(sprintf( + "updated kernel with following md5s:\n\tkernel:\t%s", + $adapter->getHash('md5', 'kernelFile') + )); + } + } + + public function addkernelAction() + { + // we don't need any view for json output + $this->_helper->viewRenderer->setNoRender(); + + $l = $this->_logger; + $adapter = new Zend_File_Transfer_Adapter_Http(); + $kernel = $this->getRequest()->getParam('kernel'); + + #TODO: bild in more checks + $targetpath = APPLICATION_PATH . "/../data/kernels/$kernel/"; + + if (!is_dir($targetpath)) + mkdir($targetpath, 0777, true); + + $adapter->setDestination($targetpath); + + #todo add to db + + if (!$adapter->receive()) { + $messages = $adapter->getMessages(); + foreach ($messages as $m) { + $l->crit($m); + } + } else { + $db_data = array( + 'kernel' => $kernel, + 'kernel_md5' => $adapter->getHash('md5', 'kernelFile'), + 'initramfs_md5' => $adapter->getHash('md5', 'initramfsFile') + ); + $this->_mkernels->insert($db_data); + $l->info(sprintf( + "added kernel/initramfs with following md5s:\n\tkernel:\t\t%s\n\tinitramfs:\t%s", + $adapter->getHash('md5', 'kernelFile'), + $adapter->getHash('md5', 'initramfsFile') + )); + } + } + + public function syncAction() + { + $l = $this->_logger; + + // we don't need any view for json output + $this->_helper->viewRenderer->setNoRender(); + + // get data from slxconfig-demuxer + $data = $this->getRequest()->getParam('data'); + $data = json_decode(stripslashes($data), true); + + if (empty($data)) return; + + $source = $this->getRequest()->getServer('REMOTE_ADDR'); + + // compare md5sums with old values from db + $s = $this->_mkernels->select(); + $s->where('kernel=?', $data['kernel']); + $r = $this->_mkernels->fetchAll($s)->toArray(); + + $response = array(); + if (empty($r)) { + $response['getKernel'] = "fresh"; + $response['getInitramfs'] = "fresh"; + $l->info("request new kernel/initramfs pair"); + } else { + $r = $r[0]; + if ($data['kernel_md5'] == $r['kernel_md5']) { + $response['getKernel'] = "no"; + $l->info("kernel is still up to date"); + } else { + $response['getKernel'] = "update"; + $l->info("request updated kernel"); + } + if ($data['initramfs_md5'] == $r['initramfs_md5']) { + $response['getInitramfs'] = "no"; + $l->info("initramfs is still up to date"); + } else { + $response['getInitramfs'] = "update"; + $l->info("request updated initramfs"); + } + } + + echo(json_encode($response)); + + // add systems to db.. + if (!empty($data['systems'])) { + $s = $this->_msystems->select(); + $s->where('source=?', $source); + $r = $this->_msystems->fetchAll($s)->toArray(); + $externalIDs = array(); + if (!empty($r)) { + foreach ($r as $r_) { + $externalIDs[] = $r_['external_id']; + } + } + + foreach ($data['systems'] as $d) { + if (in_array($d['external-id'],$externalIDs)) { + $db_data = array( + 'name' => $d["label"], + 'external_id' => $d["external-id"], + 'description' => $d["description"], + 'kernel' => $d['vendor-os']['name'] . "/" . basename($d["kernel-file"]), + 'initrd' => $d['vendor-os']['name'] . "/" .$d["initramfs-name"], + 'append' => $d["append"], + 'source' => $source + ); + $w[] = $this->_msystems->getAdapter() + ->quoteInto('external_id = ?', $d["external-id"]); + $w[] = $this->_msystems->getAdapter() + ->quoteInto('source = ?', $source); + + $this->_msystems->update($db_data, $w); + $l->info(sprintf("updated system: %s", $d["external-id"])); + } else { + $db_data = array( + 'name' => $d["label"], + 'external_id' => $d["external-id"], + 'description' => $d["description"], + 'kernel' => $d['vendor-os']['name'] . "/" . basename($d["kernel-file"]), + 'initrd' => $d['vendor-os']['name'] . "/" .$d["initramfs-name"], + 'append' => $d["append"], + 'source' => $source + ); + $this->_msystems->insert($db_data); + $l->info(sprintf("added system: %s", $d["external-id"])); + } + } + } + + // add / modify systems table + $s = $this->_msources->select(); + $s->where('ip=?', $source); + $r = $this->_msources->fetchAll($s)->toArray(); + + if (!empty($r)) { + $db_data = array( + 'version' => $data['slxinfo'], + 'lastdemux' => mktime() + ); + $w = $this->_msources->getAdapter()->quoteInto('ip = ?', $source); + $this->_msources->update($db_data, $w); + } else { + $db_data = array( + 'ip' => $source, + 'version' => $data['slxinfo'], + 'lastdemux' => mktime() + ); + $this->_msources->insert($db_data); + } + + + } + + +} + + + diff --git a/application/modules/backend/controllers/UserController.php b/application/modules/backend/controllers/UserController.php new file mode 100644 index 0000000..a7a90c2 --- /dev/null +++ b/application/modules/backend/controllers/UserController.php @@ -0,0 +1,18 @@ +
View script for controller bootmedia and script/action name index
\ No newline at end of file diff --git a/application/modules/backend/views/scripts/bootmedia/list.phtml b/application/modules/backend/views/scripts/bootmedia/list.phtml new file mode 100644 index 0000000..8d441c9 --- /dev/null +++ b/application/modules/backend/views/scripts/bootmedia/list.phtml @@ -0,0 +1,20 @@ +listdata)): ?> +listdata as $l): ?> +
+

+

+kernel:
+created:
+

+

+Description: + +

+

+Delete +Edit +Download +

+
+ + \ No newline at end of file diff --git a/application/modules/backend/views/scripts/menu/index.phtml b/application/modules/backend/views/scripts/menu/index.phtml new file mode 100644 index 0000000..2bd3dd3 --- /dev/null +++ b/application/modules/backend/views/scripts/menu/index.phtml @@ -0,0 +1 @@ +

View script for controller bootmedia and script/action name index
\ No newline at end of file diff --git a/application/modules/backend/views/scripts/menu/list.phtml b/application/modules/backend/views/scripts/menu/list.phtml new file mode 100644 index 0000000..e28e54e --- /dev/null +++ b/application/modules/backend/views/scripts/menu/list.phtml @@ -0,0 +1,15 @@ +listdata)): ?> +listdata as $l): ?> + + + \ No newline at end of file diff --git a/application/modules/backend/views/scripts/menu/listassignments.phtml b/application/modules/backend/views/scripts/menu/listassignments.phtml new file mode 100644 index 0000000..2ca982b --- /dev/null +++ b/application/modules/backend/views/scripts/menu/listassignments.phtml @@ -0,0 +1,18 @@ +listdata)): ?> +listdata as $l): ?> + + + \ No newline at end of file diff --git a/application/modules/backend/views/scripts/menu/listentries.phtml b/application/modules/backend/views/scripts/menu/listentries.phtml new file mode 100644 index 0000000..4d8431e --- /dev/null +++ b/application/modules/backend/views/scripts/menu/listentries.phtml @@ -0,0 +1,19 @@ +listdata)): ?> +listdata as $l): ?> + + + \ No newline at end of file diff --git a/application/modules/backend/views/scripts/mkiso/index.phtml b/application/modules/backend/views/scripts/mkiso/index.phtml new file mode 100644 index 0000000..2bd3dd3 --- /dev/null +++ b/application/modules/backend/views/scripts/mkiso/index.phtml @@ -0,0 +1 @@ +

View script for controller bootmedia and script/action name index
\ No newline at end of file diff --git a/application/modules/backend/views/scripts/system/add.phtml b/application/modules/backend/views/scripts/system/add.phtml new file mode 100644 index 0000000..f09beb8 --- /dev/null +++ b/application/modules/backend/views/scripts/system/add.phtml @@ -0,0 +1 @@ +

View script for controller system and script/action name add
\ No newline at end of file diff --git a/application/modules/backend/views/scripts/system/addkernel.phtml b/application/modules/backend/views/scripts/system/addkernel.phtml new file mode 100644 index 0000000..e69de29 diff --git a/application/modules/backend/views/scripts/system/index.phtml b/application/modules/backend/views/scripts/system/index.phtml new file mode 100644 index 0000000..690f955 --- /dev/null +++ b/application/modules/backend/views/scripts/system/index.phtml @@ -0,0 +1 @@ +

View script for controller system and script/action name index
\ No newline at end of file diff --git a/application/modules/backend/views/scripts/system/sync.phtml b/application/modules/backend/views/scripts/system/sync.phtml new file mode 100644 index 0000000..e69de29 diff --git a/application/modules/backend/views/scripts/system/updateinitramfs.phtml b/application/modules/backend/views/scripts/system/updateinitramfs.phtml new file mode 100644 index 0000000..e69de29 diff --git a/application/modules/backend/views/scripts/system/updatekernel.phtml b/application/modules/backend/views/scripts/system/updatekernel.phtml new file mode 100644 index 0000000..e69de29 diff --git a/application/modules/backend/views/scripts/user/index.phtml b/application/modules/backend/views/scripts/user/index.phtml new file mode 100644 index 0000000..c04cb93 --- /dev/null +++ b/application/modules/backend/views/scripts/user/index.phtml @@ -0,0 +1 @@ +

View script for controller user and script/action name index
\ No newline at end of file diff --git a/application/modules/bootloader/controllers/EnvController.php b/application/modules/bootloader/controllers/EnvController.php new file mode 100644 index 0000000..aba575b --- /dev/null +++ b/application/modules/bootloader/controllers/EnvController.php @@ -0,0 +1,218 @@ +_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + } + + public function indexAction() + { + } + + function _ip_netmask_check ($ip, $net, $mask) { + + if (empty($net) OR empty($mask)) return false; + + $ip_net = ip2long ($net); + $ip_mask = ~((1 << (32 - $mask)) - 1); + + $ip_ip = ip2long ($ip); + + $ip_ip_net = $ip_ip & $ip_mask; + + return ($ip_ip_net == $ip_net); + } + + public function getmenuAction() { + + $mid = $this->getRequest()->getParam('formedia'); + + $this->_mmenus = new Model_Menus(); + $this->_mmenu_entries = new Model_Menuentries(); + $this->_mmenu_assignments = new Model_Menuassignments(); + $this->_mmenu_assignment_iprules = new Model_Menuassignmentip(); + $this->_mmenu_assignment_bmrules = new Model_Menuassignmentbm(); + + $s = $this->_mmenu_assignments->select(Zend_Db_Table::SELECT_WITH_FROM_PART); + $s->setIntegrityCheck(false) + ->joinLeft(array('m' => 'menus'), 'm.id = menu_assignments.menu_id', + array('m_name' => 'name')) + ->joinLeft(array('i' => 'menu_assignment_iprules'), 'i.menu_assignment_rule = menu_assignments.id', + array('i_ip' => 'ip', + 'i_netmask' => 'netmask')) + ->joinLeft(array('b' => 'menu_assignment_bmrules'), 'b.menu_assignment_rule = menu_assignments.id', + array('b_bootmedia_id' => 'bootmedia_id')) + ->joinLeft(array('bm' => 'bootmedia'), 'bm.id = b.bootmedia_id', + array('b_name' => 'name', + 'b_identifier' => 'identifier')) + ->order(array('menu_id', 'i_netmask', 'b_bootmedia')); + $data = $this->_mmenu_assignments->fetchAll($s)->toArray(); + + foreach ($data as $d) { + if ($this->_ip_netmask_check($_SERVER['REMOTE_ADDR'], $d['i_ip'], $d['i_netmask'])) { + if ($pbs_id == $d['b_identifier']) $r[4][] = $d['menu_id']; + else $r[3][] = $d['menu_id']; + } else { + if ($pbs_id == $d['b_identifier']) $r[2][] = $d['menu_id']; + else $r[1][] = $d['menu_id']; + } + } + + for ($i = 4; $i>0; $i--) { + if (!empty($r[$i])) { + $r = array_shift($r[$i]); + break; + } + } + + $s = $this->_mmenu_entries->select(Zend_Db_Table::SELECT_WITH_FROM_PART); + $s->setIntegrityCheck(false) + ->where('menu_id = ?', $r) + ->joinLeft(array('s' => 'systems'), 's.id = menu_entries.system_id', + array('s_name' => 'name', + 's_append' => 'append', + 's_external_id' => 'external_id', + 's_source' => 'source')) + ->order('entry_order'); + $data = $this->_mmenu_entries->fetchAll($s)->toArray(); + + + $r = array(); + $c = 1; + $mapping = "\n case $(cat result) in "; + foreach ($data as $d) { + $r[] = "$c \"" . (($d['overwrite_caption'] == 1)? $d['alternative_caption'] : $d['s_name']) . "\""; + $m = "\n %s)"; + $m .= "\n echo \"systemid=%s\" >> /tmp/boot"; + $m .= "\n echo \"systemname=\\\"%s\\\"\" >> /tmp/boot"; + $m .= "\n echo \"sysname=%s\" >> /tmp/boot"; + $m .= "\n echo \"syssource=%s\" >> /tmp/boot"; + $m .= "\n echo \"append=%s\" >> /tmp/boot"; + $m .= "\n ;;"; + $mapping .= sprintf($m, + $c, + $d['id'], + (($d['overwrite_caption'] == 1)? $d['alternative_caption'] : $d['s_name']), + $d['s_external_id'], + $d['s_source'], + (($d['overwrite_append'] == 1)? $d['alternative_append'] : $d['s_append']) + ); + $c++; + } + $mapping .= "\n esac"; + + $entryCount = count($r); + $entries = implode(" ", $r); + + $v = $this->view; + $v->bootmenu = "$entryCount $entries"; + $v->bootmenu_mapping = $mapping; + echo $v->render('env/bootmenu.dialog'); + } + + public function getinitAction() { + + $mid = $this->getRequest()->getParam('formedia'); + + $v = $this->view; + #$v->dialog = "/bin/sh"; + echo $v->render('env/prebootInit.sh'); + } + + public function getkernelAction() { + $sid = $this->getRequest()->getParam('forsystem'); + $s = new Model_Systems(); + + $d = $s->find($sid)->toArray(); + $d = $d[0]; + + + $cmd = "atftp %s -g -r %s -l /tmp/vmlinuz"; + $cmd = sprintf($cmd, $d['source'], $d['kernel']); + + $output = array(); + $returnval = null; + exec($cmd, $output, $returnval); + + $file = "/tmp/vmlinuz"; + + header("Content-Type: application/octet-stream"); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . (string)filesize($file)); + header('Content-Disposition: attachment; filename="vmlinuz"'); + + readfile($file); + } + + public function getinitramfsAction() { + $sid = $this->getRequest()->getParam('forsystem'); + $s = new Model_Systems(); + + $d = $s->find($sid)->toArray(); + $d = $d[0]; + + $cmd = "atftp %s -g -r %s -l /tmp/initramfs"; + $cmd = sprintf($cmd, $d['source'], $d['initrd']); + + $output = array(); + $returnval = null; + exec($cmd, $output, $returnval); + + $file = "/tmp/initramfs"; + + header("Content-Type: application/octet-stream"); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . (string)filesize($file)); + header('Content-Disposition: attachment; filename="initramfs"'); + + readfile($file); + } + + public function getccAction() { + $sid = $this->getRequest()->getParam('forsystem'); + $s = new Model_Systems(); + + $d = $s->find($sid)->toArray(); + $d = $d[0]; + + $file = "/tmp/initramfs.".mktime(); + + $cmd = "atftp %s -g -r %s -l $file"; + $cmd = sprintf($cmd, $d['source'], $d['external_id']); + + $output = array(); + $returnval = null; + exec($cmd, $output, $returnval); + + + header("Content-Type: application/octet-stream"); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . (string)filesize($file)); + header('Content-Disposition: attachment; filename="initramfs"'); + + readfile($file); + } + + public function __call($a, $b) + { + var_dump($a,$b); + } + + + +} + + + diff --git a/application/modules/bootloader/controllers/IndexController.php b/application/modules/bootloader/controllers/IndexController.php new file mode 100644 index 0000000..7a2fcea --- /dev/null +++ b/application/modules/bootloader/controllers/IndexController.php @@ -0,0 +1,29 @@ +bootmenu ?> 2>result +done + +bootmenu_mapping ?> \ No newline at end of file diff --git a/application/modules/bootloader/views/scripts/env/prebootInit.sh b/application/modules/bootloader/views/scripts/env/prebootInit.sh new file mode 100644 index 0000000..acf8f33 --- /dev/null +++ b/application/modules/bootloader/views/scripts/env/prebootInit.sh @@ -0,0 +1,71 @@ +#!/bin/ash +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# preboot script for user interaction with OpenSLX preloading environment for +# Linux stateless clients (fetched by Preboot init over the net) + +# get configuration +. /etc/initramfs-setup +. /etc/pbs.conf +. ./preboot-scripts/dialog.functions + +# bring the mac address into the standard format 01- +client=$(echo 01-$macaddr|sed "s/:/-/g") + +# check if already a configuration is available to decide if user interaction +# is required (path is to be fixed) +#wget -q -O /tmp/have-user-config "$boot_uri/users.pl?user=${client}" +#have_user_config=$(cat /tmp/have-user-config); + +#if [ "x1" == "x$have_user_config" ]; then +# wget -q -O /tmp/oldconfig "$boot_uri/users.pl?user=${client}&action=read" +# . /tmp/oldconfig +# menu_oldconfig $oldconfig +#else +# menu_firststart +#fi +#rm result; + +# Switch here for several boot TYPE=fastboot/directkiosk/cfgkiosk/slxconfig +# fastboot - no interaction use system from client config +# directkiosk - start the default slx system into kiosk (using vmchooser) +# cfgkiosk - offer the user changes to his kiosk system (GUI environment) +# slxconfig - offer the user set of configuration options, like setting a non- +# priviledged user, root password, standard gui, plugins to activate ... + +wget -q -O /preboot/bootmenu.dialog ${boot_uri}bootloader/env/getmenu/formedia/$pbs_id + +# we expect to have a system selection dialog file in /preboot/bootmenu.dialog +chmod u+x /preboot/bootmenu.dialog +/preboot/bootmenu.dialog + +. /tmp/boot + + +# fetch kernel and initramfs of selected system +dialog --infobox "Loading kernel of ${systemname} ..." 3 65 +#ddownload ${boot_uri}bootloader/env/getkernel/forsystem/$systemid "Kernel" /tmp/kernel +wget -q -O /tmp/kernel ${boot_uri}bootloader/env/getkernel/forsystem/$systemid +dialog --infobox "Loading initial ramfs of ${systemname} ..." 3 65 +#ddownload ${boot_uri}bootloader/env/getinitramfs/forsystem/$systemid "Initramfs" /tmp/initramfs +wget -q -O /tmp/initramfs ${boot_uri}bootloader/env/getinitramfs/forsystem/$systemid + +# read primary IP configuration to pass it on (behaviour like IPAPPEND=1 of +# PXElinux) +. /tmp/ipstuff + +[ "x$DEBUGLEVEL" != x0 ] && { clear; ash; } + +# start the new kernel with initialramfs and composed cmdline +dialog --infobox "Booting OpenSLX client $label ... (be patient this could take some time)" 3 69 +kexec -l /tmp/kernel --initrd=/tmp/initramfs \ + --append="$append file=http://${syssource}/pbs/client-config/${sysname}/pbs.tgz $quiet ip=$ip:$siaddr:$router:$subnet:$dnssrv $debug" 2>/dev/null +kexec -e >/dev/null 2>&1 diff --git a/application/modules/bootloader/views/scripts/index/index.phtml b/application/modules/bootloader/views/scripts/index/index.phtml new file mode 100644 index 0000000..e69de29 diff --git a/application/modules/ui/controllers/DialogController.php b/application/modules/ui/controllers/DialogController.php new file mode 100644 index 0000000..6bba3f8 --- /dev/null +++ b/application/modules/ui/controllers/DialogController.php @@ -0,0 +1,53 @@ +_helper->layout->disableLayout(); + #$this->_helper->viewRenderer->setNoRender(); + + $this->_mkernels = new Model_Kernels(); + $this->_msources = new Model_Sources(); + $this->_mbootmedia = new Model_Bootmedia(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + + } + + public function getAction() + { + $dialog = $this->getRequest()->getParam('bootmedia'); + + if (!empty($dialog)) { + if (in_array($dialog, array('create', 'progress'))) + $this->view->dialog = + $this->view->render("dialog/bootmedia.$dialog.phtml"); + } + + $dialog = $this->getRequest()->getParam('menu'); + + if (!empty($dialog)) { + if (in_array($dialog, array('create', 'createentry', 'createassignment', 'createentry2', 'progress'))) + $this->view->dialog = + $this->view->render("dialog/menu.$dialog.phtml"); + } + } + + + +} diff --git a/application/modules/ui/controllers/SubpageController.php b/application/modules/ui/controllers/SubpageController.php new file mode 100644 index 0000000..51fadd3 --- /dev/null +++ b/application/modules/ui/controllers/SubpageController.php @@ -0,0 +1,60 @@ +_helper->layout->disableLayout(); + #$this->_helper->viewRenderer->setNoRender(); + + $this->_mkernels = new Model_Kernels(); + $this->_msources = new Model_Sources(); + $this->_mbootmedia = new Model_Bootmedia(); + $this->_mmenus = new Model_Menus(); + + + $this->_logger = new Zend_Log(); + $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log'); + + $this->_logger->addWriter($w); + } + + public function indexAction() + { + + } + + public function getAction() + { + $subpage = $this->getRequest()->getParam('bootmedia'); + + if (!empty($subpage)) { + if (in_array($subpage, array('actionmenu', 'list'))) + $this->view->subpage = + $this->view->render("subpage/bootmedia.$subpage.phtml"); + } + + $subpage = $this->getRequest()->getParam('menu'); + + if (!empty($subpage)) { + if (in_array($subpage, array('actionmenu','actionmenu-entries','actionmenu-menuassignment', 'list', 'entrylist', 'assignmentlist'))) + if ($subpage == 'entrylist') { + $r = $this->_mmenus->find($this->getRequest()->getParam('id')); + $this->view->currentMenu = $r[0]; + } + $this->view->subpage = + $this->view->render("subpage/menu.$subpage.phtml"); + } + + } + + + +} diff --git a/application/modules/ui/views/scripts/dialog/bootmedia.create.phtml b/application/modules/ui/views/scripts/dialog/bootmedia.create.phtml new file mode 100644 index 0000000..44e7569 --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/bootmedia.create.phtml @@ -0,0 +1,18 @@ +
+

+ Enter meta data for the image and select the kernel version it should be based on.. +

+ +
+
+ + + + + + +
+
+
diff --git a/application/modules/ui/views/scripts/dialog/bootmedia.progress.phtml b/application/modules/ui/views/scripts/dialog/bootmedia.progress.phtml new file mode 100644 index 0000000..9550248 --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/bootmedia.progress.phtml @@ -0,0 +1,17 @@ + + +
+ +
+
+

Prepareing ISO..

+
+

+ +

+ +
diff --git a/application/modules/ui/views/scripts/dialog/get.phtml b/application/modules/ui/views/scripts/dialog/get.phtml new file mode 100644 index 0000000..4f1ea39 --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/get.phtml @@ -0,0 +1,2 @@ + +dialog ?> \ No newline at end of file diff --git a/application/modules/ui/views/scripts/dialog/menu.create.phtml b/application/modules/ui/views/scripts/dialog/menu.create.phtml new file mode 100644 index 0000000..56f2d7f --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/menu.create.phtml @@ -0,0 +1,14 @@ +
+

+ Enter meta data for the menu.. +

+ +
+
+ + + + +
+
+
diff --git a/application/modules/ui/views/scripts/dialog/menu.createassignment.phtml b/application/modules/ui/views/scripts/dialog/menu.createassignment.phtml new file mode 100644 index 0000000..d16b215 --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/menu.createassignment.phtml @@ -0,0 +1,22 @@ +
+

+ Enter meta data for the menu.. +

+ +
+
+ + + + + + + + +
+
+
diff --git a/application/modules/ui/views/scripts/dialog/menu.createentry.phtml b/application/modules/ui/views/scripts/dialog/menu.createentry.phtml new file mode 100644 index 0000000..326b41f --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/menu.createentry.phtml @@ -0,0 +1,18 @@ +
+

+ Step 1: Select source OpenSLX installation and system you want to create a menu entry for.. +

+ +
+
+ + + + +
+
+
diff --git a/application/modules/ui/views/scripts/dialog/menu.createentry2.phtml b/application/modules/ui/views/scripts/dialog/menu.createentry2.phtml new file mode 100644 index 0000000..f9fdac9 --- /dev/null +++ b/application/modules/ui/views/scripts/dialog/menu.createentry2.phtml @@ -0,0 +1,20 @@ +
+

+ Step 2: Modify append and caption if necessary .. +

+ +
+
+ + system default:
+ alternative caption (only for this menu entry)
+ + + + system default:
+ alternative append line (only for this menu entry)
+ + +
+
+
diff --git a/application/modules/ui/views/scripts/subpage/bootmedia.actionmenu.phtml b/application/modules/ui/views/scripts/subpage/bootmedia.actionmenu.phtml new file mode 100644 index 0000000..a7b2c10 --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/bootmedia.actionmenu.phtml @@ -0,0 +1,2 @@ + + diff --git a/application/modules/ui/views/scripts/subpage/bootmedia.list.phtml b/application/modules/ui/views/scripts/subpage/bootmedia.list.phtml new file mode 100644 index 0000000..288cedb --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/bootmedia.list.phtml @@ -0,0 +1,5 @@ +

Available Bootmedia

+
+
+ +
diff --git a/application/modules/ui/views/scripts/subpage/get.phtml b/application/modules/ui/views/scripts/subpage/get.phtml new file mode 100644 index 0000000..69ec5e8 --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/get.phtml @@ -0,0 +1,2 @@ + +subpage ?> \ No newline at end of file diff --git a/application/modules/ui/views/scripts/subpage/menu.actionmenu-entries.phtml b/application/modules/ui/views/scripts/subpage/menu.actionmenu-entries.phtml new file mode 100644 index 0000000..5241042 --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/menu.actionmenu-entries.phtml @@ -0,0 +1,3 @@ + + + diff --git a/application/modules/ui/views/scripts/subpage/menu.actionmenu-menuassignment.phtml b/application/modules/ui/views/scripts/subpage/menu.actionmenu-menuassignment.phtml new file mode 100644 index 0000000..13f905c --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/menu.actionmenu-menuassignment.phtml @@ -0,0 +1 @@ + diff --git a/application/modules/ui/views/scripts/subpage/menu.actionmenu.phtml b/application/modules/ui/views/scripts/subpage/menu.actionmenu.phtml new file mode 100644 index 0000000..c0742e3 --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/menu.actionmenu.phtml @@ -0,0 +1 @@ + diff --git a/application/modules/ui/views/scripts/subpage/menu.assignmentlist.phtml b/application/modules/ui/views/scripts/subpage/menu.assignmentlist.phtml new file mode 100644 index 0000000..0e27b73 --- /dev/null +++ b/application/modules/ui/views/scripts/subpage/menu.assignmentlist.phtml @@ -0,0 +1,5 @@ +

Menu Assignment Rules

+
+