From 289b814fcd4fc41389e04ddf801e25c4aee073f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Tue, 2 Sep 2025 22:08:24 +0900 Subject: [PATCH] dbmsv2 init...1 --- app/Helpers/Customer/ServiceHelper.php | 4 ++ app/Helpers/Equipment/ServerHelper.php | 18 ++--- app/Helpers/Equipment/ServerPartHelper.php | 18 ++--- app/Language/en/Equipment/Server.php | 16 ++--- app/Services/Customer/ServiceService.php | 52 +++++++-------- app/Services/Equipment/ServerPartService.php | 8 +-- app/Services/Equipment/ServerService.php | 42 ++++++------ app/Services/Equipment/SwitchService.php | 32 +++++---- app/Views/admin/server/create_form.php | 4 +- app/Views/admin/server/indexv2.php | 69 ++++++++++++++++++++ app/Views/admin/server/modify_form.php | 4 +- app/Views/admin/server/view.php | 4 +- 12 files changed, 168 insertions(+), 103 deletions(-) create mode 100644 app/Views/admin/server/indexv2.php diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 9ff1501..76133c9 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -50,6 +50,10 @@ class ServiceHelper extends CustomerHelper $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field'; $form = $this->form_dropdown_custom($field, array_key_exists('entity', $viewDatas) ? $viewDatas['entity']->getServerEntity()->getPK() : $value, $viewDatas, $extras); break; + case 'switchinfo_uid': + $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field'; + $form = $this->form_dropdown_custom($field, array_key_exists('entity', $viewDatas) ? $viewDatas['entity']->getSwitchEntity()->getPK() : $value, $viewDatas, $extras); + break; default: $form = parent::getFieldForm($field, $value, $viewDatas, $extras); break; diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php index 9a3e6fe..2febc51 100644 --- a/app/Helpers/Equipment/ServerHelper.php +++ b/app/Helpers/Equipment/ServerHelper.php @@ -19,9 +19,9 @@ class ServerHelper extends EquipmentHelper $serverpartEntity = $viewDatas['entity']->getServerPartEntity($partType); } $form = ""; - //수정시 Type별 사용할 hidden serverinfopartinfo_uid + //수정시 Type별 사용할 hidden partinfo_uid if ($serverpartEntity !== null) { - $form .= form_hidden("serverinfopartinfo_uid_{$partType}", $serverpartEntity->getPK()); + $form .= form_hidden("partinfo_uid_{$partType}", $serverpartEntity->getPK()); } //기존 입력화면에서 return 된것인지? if ($value === null && $serverpartEntity !== null) { @@ -45,40 +45,40 @@ class ServerHelper extends EquipmentHelper case 'partinfo_uid_CPU': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU'); break; - case 'serverinfopartinfo_uid_CPU_cnt': + case 'partinfo_uid_CPU_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_RAM': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',); break; - case 'serverinfopartinfo_uid_RAM_cnt': + case 'partinfo_uid_RAM_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_DISK': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK'); break; - case 'serverinfopartinfo_uid_DISK_cnt': + case 'partinfo_uid_DISK_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; - case 'serverinfopartinfo_uid_DISK_extra': + case 'partinfo_uid_DISK_extra': $form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras); break; case 'partinfo_uid_OS': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS'); break; - case 'serverinfopartinfo_uid_OS_cnt': + case 'partinfo_uid_OS_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_DB': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB'); break; - case 'serverinfopartinfo_uid_DB_cnt': + case 'partinfo_uid_DB_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_SOFTWARE': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE'); break; - case 'serverinfopartinfo_uid_SOFTWARE_cnt': + case 'partinfo_uid_SOFTWARE_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'ipinfo_uid': diff --git a/app/Helpers/Equipment/ServerPartHelper.php b/app/Helpers/Equipment/ServerPartHelper.php index 9f37da3..58185f1 100644 --- a/app/Helpers/Equipment/ServerPartHelper.php +++ b/app/Helpers/Equipment/ServerPartHelper.php @@ -19,9 +19,9 @@ class ServerPartHelper extends EquipmentHelper $serverpartEntity = $viewDatas['entity']->getServerPartEntity($partType); } $form = ""; - //수정시 Type별 사용할 hidden serverinfopartinfo_uid + //수정시 Type별 사용할 hidden partinfo_uid if ($serverpartEntity !== null) { - $form .= form_hidden("serverinfopartinfo_uid_{$partType}", $serverpartEntity->getPK()); + $form .= form_hidden("partinfo_uid_{$partType}", $serverpartEntity->getPK()); } //기존 입력화면에서 return 된것인지? if ($value === null && $serverpartEntity !== null) { @@ -45,40 +45,40 @@ class ServerPartHelper extends EquipmentHelper case 'partinfo_uid_CPU': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU'); break; - case 'serverinfopartinfo_uid_CPU_cnt': + case 'partinfo_uid_CPU_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_RAM': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',); break; - case 'serverinfopartinfo_uid_RAM_cnt': + case 'partinfo_uid_RAM_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_DISK': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK'); break; - case 'serverinfopartinfo_uid_DISK_cnt': + case 'partinfo_uid_DISK_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; - case 'serverinfopartinfo_uid_DISK_extra': + case 'partinfo_uid_DISK_extra': $form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras); break; case 'partinfo_uid_OS': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS'); break; - case 'serverinfopartinfo_uid_OS_cnt': + case 'partinfo_uid_OS_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_DB': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB'); break; - case 'serverinfopartinfo_uid_DB_cnt': + case 'partinfo_uid_DB_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'partinfo_uid_SOFTWARE': $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE'); break; - case 'serverinfopartinfo_uid_SOFTWARE_cnt': + case 'partinfo_uid_SOFTWARE_cnt': $form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개"; break; case 'ipinfo_uid': diff --git a/app/Language/en/Equipment/Server.php b/app/Language/en/Equipment/Server.php index bfa9c4d..11458bb 100644 --- a/app/Language/en/Equipment/Server.php +++ b/app/Language/en/Equipment/Server.php @@ -19,18 +19,18 @@ return [ "ipinfo_uid" => "IP정보", "csinfo_uid" => "CS정보", 'partinfo_uid_CPU' => "CPU", - 'serverinfopartinfo_uid_CPU_cnt' => "CPU갯수", + 'partinfo_uid_CPU_cnt' => "CPU갯수", 'partinfo_uid_RAM' => "RAM", - 'serverinfopartinfo_uid_RAM_cnt' => "RAM갯수", + 'partinfo_uid_RAM_cnt' => "RAM갯수", 'partinfo_uid_DISK' => "DISK", - 'serverinfopartinfo_uid_DISK_cnt' => "DISK갯수", - 'serverinfopartinfo_uid_DISK_extra' => "RAID설정", + 'partinfo_uid_DISK_cnt' => "DISK갯수", + 'partinfo_uid_DISK_extra' => "RAID설정", 'partinfo_uid_OS' => "OS", - 'serverinfopartinfo_uid_OS_cnt' => "OS갯수", + 'partinfo_uid_OS_cnt' => "OS갯수", 'partinfo_uid_DB' => "DB", - 'serverinfopartinfo_uid_DB_cnt' => "DB갯수", + 'partinfo_uid_DB_cnt' => "DB갯수", 'partinfo_uid_SOFTWARE' => "기타SW", - 'serverinfopartinfo_uid_SOFTWARE_cnt' => "SOFTWARE갯수", + 'partinfo_uid_SOFTWARE_cnt' => "SOFTWARE갯수", ], "TITLE" => [ 'HP DL360 Gen6' => "HP DL360 Gen6", @@ -50,7 +50,7 @@ return [ 'occupied' => "서비스중", 'forbidden' => "사용불가", ], - "SERVERINFOPARTINFO_UID_DISK_EXTRA" => [ + "PARTINFO_UID_DISK_EXTRA" => [ 'RAID0' => "RAID0", 'RAID1' => "RAID1", 'RAID5' => "RAID5", diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index e3ee042..c84346f 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -98,9 +98,13 @@ class ServiceService extends CustomerService { //서버정보 정의 $serverEntityy = $this->getServerService()->getEntity(['serviceinfo_uid' => $entity->getPK()]); - if ($serverEntityy) { + if ($serverEntityy !== null) { $entity->setServerEntity($serverEntityy); } + $switchEntityy = $this->getSwitchService()->getEntity(['serviceinfo_uid' => $entity->getPK()]); + if ($switchEntityy !== null) { + $entity->setSwitchEntity($switchEntityy); + } // //IP정보 정의 // foreach ($this->getIPService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $ipEntity) { // $entity->addIPEntity($ipEntity); @@ -160,46 +164,38 @@ class ServiceService extends CustomerService } //다른장치 설정용 - private function disableSetServiceToEquipments(ServiceEntity $entity): ServiceEntity + private function disableService(ServiceEntity $entity): ServiceEntity { //기존 Server정보와 다른경우 사용가능상태로 변경 $serverEntity = $entity->getServerEntity(); if ($serverEntity !== null) { - $serverEntity = $this->getServerService()->setService( - $entity, - $serverEntity->getPK(), - ServerEntity::STATUS_AVAILABLE - ); + $serverEntity = $this->getServerService()->disableService($serverEntity); $entity->setServerEntity(null); } //기존 Switch정보와 다른경우 사용가능상태로 변경 $switchEntity = $entity->getSwitchEntity(); if ($switchEntity !== null) { - $switchEntity = $this->getSwitchService()->setService( - $entity, - $switchEntity->getPK(), - SwitchEntity::STATUS_AVAILABLE - ); + $switchEntity = $this->getSwitchService()->disableService($switchEntity); $entity->setSwitchEntity(null); } return $entity; } - private function enableServiceToEquipments(ServiceEntity $entity, array $formDatas): ServiceEntity + private function enableService(ServiceEntity $entity, array $formDatas): ServiceEntity { //서버경우 서비스중으로 설정 - $serverEntity = $this->getServerService()->setService( - $entity, - $formDatas['serverinfo_uid'], - ServerEntity::STATUS_OCCUPIED - ); + $serverEntity = $this->getServerService()->getEntity($formDatas['serverinfo_uid']); + if (!$serverEntity) { + throw new \Exception("{$formDatas['serverinfo_uid']}에 대한 서버정보를 찾을수 없습니다."); + } + $serverEntity = $this->getServerService()->enableService($entity, $serverEntity); $entity->setServerEntity($serverEntity); //Switch경우 서비스중으로 설정 - $serverEntity = $this->getSwitchService()->setService( - $entity, - $formDatas['switchinfo_uid'], - SwitchEntity::STATUS_OCCUPIED - ); - $entity->setSwitchEntity($serverEntity); + $switchEntity = $this->getServerService()->getEntity($formDatas['switchinfo_uid']); + if (!$switchEntity) { + throw new \Exception("{$formDatas['switchinfo_uid']}에 대한 스위치정보를 찾을수 없습니다."); + } + $switchEntity = $this->getSwitchService()->enableService($entity, $switchEntity); + $entity->setSwitchEntity($switchEntity); return $entity; } //생성 @@ -213,7 +209,7 @@ class ServiceService extends CustomerService throw new \Exception("스위치정보가 지정되지 않았습니다."); } //신규정보 Enable - return $this->enableServiceToEquipments($entity, $formDatas); + return $this->enableService($entity, $formDatas); } //수정 public function modify(mixed $entity, array $formDatas): ServiceEntity @@ -226,15 +222,15 @@ class ServiceService extends CustomerService throw new \Exception("스위치정보가 지정되지 않았습니다."); } //기존정보 Disable - $entity = $this->disableSetServiceToEquipments($entity); + $entity = $this->disableService($entity); //신규정보 Enable - return $this->enableServiceToEquipments($entity, $formDatas); + return $this->enableService($entity, $formDatas); } //삭제 public function delete(mixed $entity): ServiceEntity { //기존정보 Disable - $entity = $this->disableSetServiceToEquipments($entity); + $entity = $this->disableService($entity); return parent::delete($entity); } } diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 46d17d1..45e0d9f 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -100,10 +100,10 @@ class ServerPartService extends EquipmentService $serverPartFormDatas["serverinfo_uid"] = $serverEntity->getPK(); $serverPartFormDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); $serverPartFormDatas["type"] = $partType; - $serverPartFormDatas["billing"] = array_key_exists("serverinfopartinfo_uid_{$partType}_billing", $formDatas) ? $formDatas["serverinfopartinfo_uid_{$partType}_billing"] : null; - $serverPartFormDatas["amount"] = array_key_exists("serverinfopartinfo_uid_{$partType}_amount", $formDatas) ? $formDatas["serverinfopartinfo_uid_{$partType}_amount"] : 0; - $serverPartFormDatas["cnt"] = array_key_exists("serverinfopartinfo_uid_{$partType}_cnt", $formDatas) ? $formDatas["serverinfopartinfo_uid_{$partType}_cnt"] : null; - $serverPartFormDatas["extra"] = array_key_exists("serverinfopartinfo_uid_{$partType}_extra", $formDatas) ? $formDatas["serverinfopartinfo_uid_{$partType}_extra"] : null; + $serverPartFormDatas["billing"] = array_key_exists("partinfo_uid_{$partType}_billing", $formDatas) ? $formDatas["partinfo_uid_{$partType}_billing"] : null; + $serverPartFormDatas["amount"] = array_key_exists("partinfo_uid_{$partType}_amount", $formDatas) ? $formDatas["partinfo_uid_{$partType}_amount"] : 0; + $serverPartFormDatas["cnt"] = array_key_exists("partinfo_uid_{$partType}_cnt", $formDatas) ? $formDatas["partinfo_uid_{$partType}_cnt"] : null; + $serverPartFormDatas["extra"] = array_key_exists("partinfo_uid_{$partType}_extra", $formDatas) ? $formDatas["partinfo_uid_{$partType}_extra"] : null; $entity = parent::create($serverPartFormDatas); //부품정보 정의 $partEntity = $this->getPartService()->getEntity($entity->getPartInfoUID()); diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index 1e08507..5e9d419 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -29,16 +29,16 @@ class ServerService extends EquipmentService "format_at", "status", "partinfo_uid_CPU", - "serverinfopartinfo_uid_CPU_cnt", + "partinfo_uid_CPU_cnt", "partinfo_uid_RAM", - "serverinfopartinfo_uid_RAM_cnt", + "partinfo_uid_RAM_cnt", "partinfo_uid_DISK", - "serverinfopartinfo_uid_DISK_cnt", - "serverinfopartinfo_uid_DISK_extra", + "partinfo_uid_DISK_cnt", + "partinfo_uid_DISK_extra", "partinfo_uid_OS", - "serverinfopartinfo_uid_OS_cnt", + "partinfo_uid_OS_cnt", "partinfo_uid_SOFTWARE", - "serverinfopartinfo_uid_SOFTWARE_cnt", + "partinfo_uid_SOFTWARE_cnt", "ipinfo_uid", "csinfo_uid", ]; @@ -53,7 +53,7 @@ class ServerService extends EquipmentService "partinfo_uid_CPU", "partinfo_uid_RAM", "partinfo_uid_DISK", - "serverinfopartinfo_uid_DISK_extra", + "partinfo_uid_DISK_extra", "partinfo_uid_OS", "partinfo_uid_SOFTWARE", "ipinfo_uid", @@ -223,22 +223,20 @@ class ServerService extends EquipmentService parent::setOrderBy($field, $value); } - public function setService(ServiceEntity $serviceEntity, mixed $uid, string $status): ServerEntity + public function enableService(ServiceEntity $serviceEntity, ServerEntity $entity): ServerEntity { - $entity = $this->getEntity($uid); - if (!$entity) { - throw new \Exception("{$uid}에 대한 서버정보를 찾을수 없습니다."); - } - $formDatas = ['status' => $status]; - if ($status === ServerEntity::STATUS_OCCUPIED) { - $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); - $formDatas["serviceinfo_uid"] = $serviceEntity->getPK(); - } elseif ($status === ServerEntity::STATUS_AVAILABLE) { - $formDatas["clientinfo_uid"] = null; - $formDatas["serviceinfo_uid"] = null; - } else { - throw new \Exception(__METHOD__ . "에서 오류발생: {$status}는 지정되지 않은 상태값입니다."); - } + $formDatas = []; + $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); + $formDatas["serviceinfo_uid"] = $serviceEntity->getPK(); + $formDatas['status'] = ServerEntity::STATUS_OCCUPIED; + return parent::modify($entity, $formDatas); + } + public function disableService(ServerEntity $entity): ServerEntity + { + $formDatas = []; + $formDatas["clientinfo_uid"] = null; + $formDatas["serviceinfo_uid"] = null; + $formDatas['status'] = ServerEntity::STATUS_AVAILABLE; return parent::modify($entity, $formDatas); } } diff --git a/app/Services/Equipment/SwitchService.php b/app/Services/Equipment/SwitchService.php index 305d01d..cbf9166 100644 --- a/app/Services/Equipment/SwitchService.php +++ b/app/Services/Equipment/SwitchService.php @@ -64,24 +64,22 @@ class SwitchService extends EquipmentService parent::setOrderBy($field, $value); } - public function setService(ServiceEntity $serviceEntity, mixed $uid, string $status): SwitchEntity + public function enableService(ServiceEntity $serviceEntity, SwitchEntity $entity): SwitchEntity { - $entity = $this->getEntity($uid); - if (!$entity) { - throw new \Exception("{$uid}에 대한 서버정보를 찾을수 없습니다."); - } - $formDatas = ['status' => $status]; - if ($status === SwitchEntity::STATUS_OCCUPIED) { - $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); - $formDatas["serviceinfo_uid"] = $serviceEntity->getPK(); - $formDatas["serverinfo_uid"] = $serviceEntity->getServerEntity()->getPK(); - } elseif ($status === SwitchEntity::STATUS_AVAILABLE) { - $formDatas["clientinfo_uid"] = null; - $formDatas["serviceinfo_uid"] = null; - $formDatas["serverinfo_uid"] = null; - } else { - throw new \Exception(__METHOD__ . "에서 오류발생: {$status}는 지정되지 않은 상태값입니다."); - } + $formDatas = []; + $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); + $formDatas["serviceinfo_uid"] = $serviceEntity->getPK(); + $formDatas["serverinfo_uid"] = $serviceEntity->getServerEntity()->getPK(); + $formDatas['status'] = SwitchEntity::STATUS_OCCUPIED; + return parent::modify($entity, $formDatas); + } + public function disableService(SwitchEntity $entity): SwitchEntity + { + $formDatas = []; + $formDatas["clientinfo_uid"] = null; + $formDatas["serviceinfo_uid"] = null; + $formDatas["serverinfo_uid"] = null; + $formDatas['status'] = SwitchEntity::STATUS_AVAILABLE; return parent::modify($entity, $formDatas); } } diff --git a/app/Views/admin/server/create_form.php b/app/Views/admin/server/create_form.php index b4baf98..cc783f7 100644 --- a/app/Views/admin/server/create_form.php +++ b/app/Views/admin/server/create_form.php @@ -31,9 +31,9 @@ getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?> getFieldForm("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null), $viewDatas) ?> - getFieldForm("serverinfopartinfo_uid_{$partType}_cnt", old("serverinfopartinfo_uid_{$partType}_cnt") ?? ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_cnt"] ?? null), $viewDatas) ?> + getFieldForm("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null), $viewDatas) ?> - getFieldForm("serverinfopartinfo_uid_{$partType}_extra", old("serverinfopartinfo_uid_{$partType}_extra") ?? ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_extra"] ?? null), $viewDatas) ?> + getFieldForm("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null), $viewDatas) ?> diff --git a/app/Views/admin/server/indexv2.php b/app/Views/admin/server/indexv2.php new file mode 100644 index 0000000..38b204d --- /dev/null +++ b/app/Views/admin/server/indexv2.php @@ -0,0 +1,69 @@ +extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +section('content') ?> +alert($error) ?> +
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
+ + + + + + +
+ + include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> + + + +
include("templates/{$viewDatas['layout']}/index_header"); ?>
+
+ +
+ include("templates/{$viewDatas['layout']}/index_content_top"); ?> + 'batchjob_form', 'method' => "post"]) ?> + + + + + + + + + + + + + + + getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> + + + + + + + + + + + +
번호getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>추가정보작업
getListButton('modify', '', $viewDatas) ?>getFieldView($field, $entity->$field, $viewDatas) ?> + +
getFieldView($partType, "", $viewDatas) ?>
+ +
getFieldView("ipinfo_uid", "", $viewDatas) ?>
+
getFieldView("csinfo_uid", "", $viewDatas) ?>
+
+ getListButton('view', '', $viewDatas) ?>  + getListButton('history', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?> +
+ include("templates/{$viewDatas['layout']}/index_content_bottom"); ?> + +
+
+ + +
+ +
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
+endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/server/modify_form.php b/app/Views/admin/server/modify_form.php index 601b9e8..94165c6 100644 --- a/app/Views/admin/server/modify_form.php +++ b/app/Views/admin/server/modify_form.php @@ -31,9 +31,9 @@ getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?> getFieldForm("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getPartInfoUID() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null)), $viewDatas) ?> - getFieldForm("serverinfopartinfo_uid_{$partType}_cnt", old("serverinfopartinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?> + getFieldForm("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?> - getFieldForm("serverinfopartinfo_uid_{$partType}_extra", old("serverinfopartinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?> + getFieldForm("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?> diff --git a/app/Views/admin/server/view.php b/app/Views/admin/server/view.php index 0bb5b90..2796bde 100644 --- a/app/Views/admin/server/view.php +++ b/app/Views/admin/server/view.php @@ -31,9 +31,9 @@ getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?> getFieldView("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getPartInfoUID() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null)), $viewDatas) ?> - getFieldView("serverinfopartinfo_uid_{$partType}_cnt", old("serverinfopartinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?> + getFieldView("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?> - getFieldView("serverinfopartinfo_uid_{$partType}_extra", old("serverinfopartinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["serverinfopartinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?> + getFieldView("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?>