diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php index 84b955e..8cee7a6 100644 --- a/app/Controllers/Admin/Equipment/ServerController.php +++ b/app/Controllers/Admin/Equipment/ServerController.php @@ -2,16 +2,17 @@ namespace App\Controllers\Admin\Equipment; +use App\Helpers\Equipment\ServerHelper; +use App\Services\Equipment\Link\CpuService; +use App\Services\Equipment\Link\DiskService; + +use App\Services\Equipment\Link\RamService; +use App\Services\Equipment\ServerService; +use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Helpers\Equipment\ServerHelper; -use App\Services\Equipment\ServerService; -use App\Services\Equipment\Link\CpuService; -use App\Services\Equipment\Link\RamService; -use App\Services\Equipment\Link\DiskService; - class ServerController extends EquipmentController { private ?CpuService $_cpuService = null; @@ -61,11 +62,24 @@ class ServerController extends EquipmentController } return $this->_diskService; } + protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + { + switch ($action) { + case 'index': + $this->getHelper()->setViewDatas($this->getViewDatas()); + $result = view($this->view_path . 'server' . DIRECTORY_SEPARATOR . $action, ['viewDatas' => $this->getViewDatas()]); + break; + default: + $result = parent::getResultPageByActon($action, $message); + break; + } + return $result; + } //Index,FieldForm관련 protected function index_process(): array { $fields = [ - 'fields' => ['code', 'type', 'model', 'price', 'CPU', 'RAM', 'DISK', "raid", 'status'], + 'fields' => ['code', 'type', 'model', 'price', "raid", 'status'], ]; $this->init('index', $fields); // $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임 diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 71d5aad..30d8ba8 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -31,14 +31,14 @@
+| + + = $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> + + | +
+
+ = $this->include("templates/{$viewDatas['layout']}/index_header"); ?>
+
+
+
+
+
+
+ = $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
+ = form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
+
+
= $viewDatas['pagination'] ?>
+ = $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?>
+
+ |
+ ||||||||||||||||||||||