dbms_init...1
This commit is contained in:
parent
9666de0600
commit
92936526ab
@ -197,6 +197,8 @@ define('ICONS', [
|
|||||||
'UNLOCK' => '<i class="bi bi-unlock"></i>',
|
'UNLOCK' => '<i class="bi bi-unlock"></i>',
|
||||||
'BOX' => '<i class="bi bi-box"></i>',
|
'BOX' => '<i class="bi bi-box"></i>',
|
||||||
'BOXS' => '<i class="bi bi-boxes"></i>',
|
'BOXS' => '<i class="bi bi-boxes"></i>',
|
||||||
|
'ONETIME' => '<i class="bi bi-1-circle-fill text-warning"></i>',
|
||||||
|
'SALE' => '<i class="bi bi-graph-down-arrow"></i>',
|
||||||
]);
|
]);
|
||||||
//배너관련
|
//배너관련
|
||||||
define('TOP_BANNER', [
|
define('TOP_BANNER', [
|
||||||
|
|||||||
@ -4,8 +4,19 @@ namespace App\Controllers\Admin\Customer;
|
|||||||
|
|
||||||
use App\Helpers\Customer\ServiceHelper;
|
use App\Helpers\Customer\ServiceHelper;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
|
|
||||||
use App\Services\Customer\ServiceItemService;
|
use App\Services\Customer\ServiceItemService;
|
||||||
|
|
||||||
|
use App\Services\Equipment\Part\CpuService;
|
||||||
|
use App\Services\Equipment\Part\DefenceService;
|
||||||
|
use App\Services\Equipment\Part\StorageService;
|
||||||
|
use App\Services\Equipment\Part\IpService;
|
||||||
|
use App\Services\Equipment\Part\LINEService;
|
||||||
|
use App\Services\Equipment\Part\RamService;
|
||||||
|
use App\Services\Equipment\Part\SoftwareService;
|
||||||
|
use App\Services\Equipment\ServerService;
|
||||||
|
use App\Services\Equipment\DomainService;
|
||||||
|
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
@ -13,6 +24,7 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
class ServiceController extends CustomerController
|
class ServiceController extends CustomerController
|
||||||
{
|
{
|
||||||
|
private $_equipmentService = [];
|
||||||
private ?ServiceItemService $_serviceItemService = null;
|
private ?ServiceItemService $_serviceItemService = null;
|
||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
@ -45,6 +57,70 @@ class ServiceController extends CustomerController
|
|||||||
}
|
}
|
||||||
return $this->_serviceItemService;
|
return $this->_serviceItemService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final public function getEquipmentService(string $key): mixed
|
||||||
|
{
|
||||||
|
if (!array_key_exists($key, $this->_equipmentService)) {
|
||||||
|
switch ($key) {
|
||||||
|
case 'SERVER':
|
||||||
|
$this->_equipmentService[$key] = new ServerService();
|
||||||
|
break;
|
||||||
|
case 'CPU':
|
||||||
|
$this->_equipmentService[$key] = new CpuService();
|
||||||
|
break;
|
||||||
|
case 'RAM':
|
||||||
|
$this->_equipmentService[$key] = new RamService();
|
||||||
|
break;
|
||||||
|
case 'STORAGE':
|
||||||
|
$this->_equipmentService[$key] = new StorageService();
|
||||||
|
break;
|
||||||
|
case 'LINE':
|
||||||
|
$this->_equipmentService[$key] = new LineService();
|
||||||
|
break;
|
||||||
|
case 'IP':
|
||||||
|
$this->_equipmentService[$key] = new IpService();
|
||||||
|
break;
|
||||||
|
case 'DEFENCE':
|
||||||
|
$this->_equipmentService[$key] = new DefenceService();
|
||||||
|
break;
|
||||||
|
case 'SOFTWARE':
|
||||||
|
$this->_equipmentService[$key] = new SoftwareService();
|
||||||
|
break;
|
||||||
|
case 'DOMAIN':
|
||||||
|
$this->_equipmentService[$key] = new DomainService();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new \Exception(__FUNCTION__ . "에서 사용하지않는 Service를 요청하였습니다.: {$key}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->_equipmentService[$key];
|
||||||
|
}
|
||||||
|
protected function getFormFieldOption(string $field, array $options): array
|
||||||
|
{
|
||||||
|
switch ($field) {
|
||||||
|
case 'SERVER':
|
||||||
|
case 'CPU':
|
||||||
|
case 'RAM':
|
||||||
|
case 'STORAGE':
|
||||||
|
case 'LINE':
|
||||||
|
case 'IP':
|
||||||
|
case 'DEFENCE':
|
||||||
|
case 'SOFTWARE':
|
||||||
|
case 'DOMAIN':
|
||||||
|
$temps = [];
|
||||||
|
// throw new \Exception(__FUNCTION__ . "에서 item_type이 지정되지 않았습니다.->{$item_type}");
|
||||||
|
foreach ($this->getEquipmentService($field)->getEntities() as $entity) {
|
||||||
|
$temps[$entity->getPK()] = $entity->getTitle();
|
||||||
|
}
|
||||||
|
$options[$field] = $temps;
|
||||||
|
// dd($options);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$options = parent::getFormFieldOption($field, $options);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||||
{
|
{
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
@ -65,7 +141,12 @@ class ServiceController extends CustomerController
|
|||||||
'fields' => ['clientinfo_uid', 'location', 'switch', 'code', 'type', 'raid', 'billing_at', 'start_at', 'status'],
|
'fields' => ['clientinfo_uid', 'location', 'switch', 'code', 'type', 'raid', 'billing_at', 'start_at', 'status'],
|
||||||
];
|
];
|
||||||
$this->init('index', $fields);
|
$this->init('index', $fields);
|
||||||
|
//추가 Field작업 처리
|
||||||
$this->item_types = lang($this->getServiceItemService()->getClassName() . '.' . strtoupper('ITEM_TYPE'));
|
$this->item_types = lang($this->getServiceItemService()->getClassName() . '.' . strtoupper('ITEM_TYPE'));
|
||||||
|
foreach ($this->item_types as $field => $label) {
|
||||||
|
$this->field_options = $this->getFormFieldOption($field, $this->field_options);
|
||||||
|
}
|
||||||
|
// dd($this->field_options);
|
||||||
$entities = [];
|
$entities = [];
|
||||||
foreach (parent::index_process() as $entity) {
|
foreach (parent::index_process() as $entity) {
|
||||||
foreach ($this->item_types as $field => $label) {
|
foreach ($this->item_types as $field => $label) {
|
||||||
|
|||||||
@ -137,6 +137,25 @@ class ServiceItemController extends CustomerController
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
|
protected function create_process(): mixed
|
||||||
|
{
|
||||||
|
// dd($this->formDatas);
|
||||||
|
if (!array_key_exists('item_type', $this->formDatas) || !$this->formDatas['item_type']) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 item_type이 지정되지 않았습니다.");
|
||||||
|
}
|
||||||
|
if (!array_key_exists('item_uid', $this->formDatas) || !$this->formDatas['item_uid']) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 item_uid가가 지정되지 않았습니다.");
|
||||||
|
}
|
||||||
|
$equipmentEntity = $this->getEquipmentService($this->formDatas['item_type'])->getEntity($this->formDatas['item_uid']);
|
||||||
|
if (!$equipmentEntity) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 equipmentEntity 정보가 확인되지 않습니다.");
|
||||||
|
}
|
||||||
|
//각 항목의 Price를 Item Price로 전달함
|
||||||
|
$formDatas = $this->formDatas;
|
||||||
|
$formDatas['price'] = $equipmentEntity->getPrice();
|
||||||
|
$this->formDatas = $formDatas;
|
||||||
|
return parent::create_process();
|
||||||
|
}
|
||||||
protected function index_process(): array
|
protected function index_process(): array
|
||||||
{
|
{
|
||||||
$fields = [
|
$fields = [
|
||||||
|
|||||||
@ -9,41 +9,40 @@ use Psr\Log\LoggerInterface;
|
|||||||
use App\Helpers\Equipment\ServerHelper;
|
use App\Helpers\Equipment\ServerHelper;
|
||||||
use App\Services\Equipment\ServerService;
|
use App\Services\Equipment\ServerService;
|
||||||
|
|
||||||
|
|
||||||
class ServerController extends EquipmentController
|
class ServerController extends EquipmentController
|
||||||
{
|
{
|
||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||||
$this->class_path .= $this->getService()->getClassName();
|
$this->class_path .= $this->getService()->getClassName();
|
||||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
|
}
|
||||||
|
public function getService(): ServerService
|
||||||
|
{
|
||||||
|
if (!$this->_service) {
|
||||||
|
$this->_service = new ServerService($this->request);
|
||||||
}
|
}
|
||||||
public function getService(): ServerService
|
return $this->_service;
|
||||||
{
|
}
|
||||||
if (!$this->_service) {
|
public function getHelper(): ServerHelper
|
||||||
$this->_service = new ServerService($this->request);
|
{
|
||||||
}
|
if (!$this->_helper) {
|
||||||
return $this->_service;
|
$this->_helper = new ServerHelper($this->request);
|
||||||
}
|
|
||||||
public function getHelper(): ServerHelper
|
|
||||||
{
|
|
||||||
if (!$this->_helper) {
|
|
||||||
$this->_helper = new ServerHelper($this->request);
|
|
||||||
}
|
|
||||||
return $this->_helper;
|
|
||||||
}
|
}
|
||||||
|
return $this->_helper;
|
||||||
|
}
|
||||||
|
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
protected function index_process(): array
|
protected function index_process(): array
|
||||||
{
|
{
|
||||||
$fields = [
|
$fields = [
|
||||||
'fields' => ['model', 'price', 'status', 'created_at'],
|
'fields' => ['model', 'price', 'status', 'created_at'],
|
||||||
];
|
];
|
||||||
$this->init('index', $fields);
|
$this->init('index', $fields);
|
||||||
// $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임
|
// $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임
|
||||||
return parent::index_process();
|
return parent::index_process();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,7 +182,15 @@ abstract class CommonController extends BaseController
|
|||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
|
|
||||||
// 생성
|
// 생성
|
||||||
protected function create_form_process(): void {}
|
protected function create_form_process(): void
|
||||||
|
{
|
||||||
|
foreach ($this->filter_fields as $field) {
|
||||||
|
$value = $this->request->getVar($field);
|
||||||
|
if ($value) {
|
||||||
|
$this->$field = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
final public function create_form(): RedirectResponse|string
|
final public function create_form(): RedirectResponse|string
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -9,8 +9,28 @@ class ServiceItemEntity extends CustomerEntity
|
|||||||
const PK = ServiceItemModel::PK;
|
const PK = ServiceItemModel::PK;
|
||||||
const TITLE = ServiceItemModel::TITLE;
|
const TITLE = ServiceItemModel::TITLE;
|
||||||
|
|
||||||
public function getTitle(): string
|
public function getItemUid(): int
|
||||||
{
|
{
|
||||||
return parent::getTitle() . " [" . number_format($this->attributes['price']) . '/' . number_format($this->attributes['amount']) . "원]";
|
return intval($this->attributes['item_uid']);
|
||||||
|
}
|
||||||
|
public function getPrice(): int
|
||||||
|
{
|
||||||
|
return intval($this->attributes['price']);
|
||||||
|
}
|
||||||
|
public function getAmount(): int
|
||||||
|
{
|
||||||
|
return intval($this->attributes['amount']);
|
||||||
|
}
|
||||||
|
public function getView_Price(): string
|
||||||
|
{
|
||||||
|
return sprintf("원가:%s원 , 제공가:%s원", number_format($this->getPrice()), number_format($this->getAmount()));
|
||||||
|
}
|
||||||
|
public function getView_Sale(): string
|
||||||
|
{
|
||||||
|
return $this->getPrice() > $this->getAmount() ? "" : ICONS['SALE'];
|
||||||
|
}
|
||||||
|
public function getView_BillingCycle(): string
|
||||||
|
{
|
||||||
|
return $this->attributes['billing_cycle'] == "month" ? "" : ICONS['ONETIME'];;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,8 @@ abstract class EquipmentEntity extends CommonEntity
|
|||||||
{
|
{
|
||||||
parent::__construct($data);
|
parent::__construct($data);
|
||||||
}
|
}
|
||||||
public function getTitle(): string
|
final public function getPrice(): int
|
||||||
{
|
{
|
||||||
return parent::getTitle() . " [" . number_format($this->attributes['price']) . "원]";
|
return intval($this->attributes['price']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -232,13 +232,11 @@ class CommonHelper
|
|||||||
}
|
}
|
||||||
$form = implode(" ", $forms);
|
$form = implode(" ", $forms);
|
||||||
} else {
|
} else {
|
||||||
$extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
|
|
||||||
// $extra_class = isset($extras['class']) ? $extras['class'] : "";
|
|
||||||
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
||||||
foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||||
$formOptions[$key] = $label;
|
$formOptions[$key] = $label;
|
||||||
}
|
}
|
||||||
$form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
|
$form = form_dropdown($field, $formOptions, $value, $extras);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'billing_at':
|
case 'billing_at':
|
||||||
@ -259,15 +257,12 @@ class CommonHelper
|
|||||||
if (!is_array($viewDatas['field_options'][$field])) {
|
if (!is_array($viewDatas['field_options'][$field])) {
|
||||||
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
|
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
|
||||||
}
|
}
|
||||||
//value값이 없을경우
|
$extras['class'] = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
|
||||||
$value = $value ?? $this->request->getVar($field);
|
|
||||||
$extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
|
|
||||||
// $extra_class = isset($extras['class']) ? $extras['class'] : "";
|
|
||||||
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
||||||
foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||||
$formOptions[$key] = $label;
|
$formOptions[$key] = $label;
|
||||||
}
|
}
|
||||||
$form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
|
$form = form_dropdown($field, $formOptions, $value, $extras);
|
||||||
} else {
|
} else {
|
||||||
$form = form_input($field, $value ?? "", ["autocomplete" => $field, ...$extras]);
|
$form = form_input($field, $value ?? "", ["autocomplete" => $field, ...$extras]);
|
||||||
}
|
}
|
||||||
@ -280,9 +275,6 @@ class CommonHelper
|
|||||||
{
|
{
|
||||||
$value = $viewDatas['entity']->$field ?? "";
|
$value = $viewDatas['entity']->$field ?? "";
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case $this->getTitleField():
|
|
||||||
$value = $this->getFieldForm($field, $viewDatas['entity']->$field, $viewDatas, $extras);
|
|
||||||
break;
|
|
||||||
case 'role':
|
case 'role':
|
||||||
$roles = [];
|
$roles = [];
|
||||||
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
|
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
|
||||||
@ -314,6 +306,10 @@ class CommonHelper
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (is_array($value)) {
|
||||||
|
echo __METHOD__ . "에서 오류: {$field}의 값이 Array형태입니다";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
final public function getListRowColor(mixed $entity, string $field = 'status', string $value = DEFAULTS['STATUS']): string
|
final public function getListRowColor(mixed $entity, string $field = 'status', string $value = DEFAULTS['STATUS']): string
|
||||||
|
|||||||
@ -26,6 +26,10 @@ class ClientHelper extends CustomerHelper
|
|||||||
$value = parent::getFieldView($field, $viewDatas, $extras);
|
$value = parent::getFieldView($field, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (is_array($value)) {
|
||||||
|
echo __METHOD__ . "에서 오류: {$field}의 값이 Array형태입니다";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
return $value;
|
return $value;
|
||||||
} //
|
} //
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,17 @@ class ServiceHelper extends CustomerHelper
|
|||||||
case "DEFENCE":
|
case "DEFENCE":
|
||||||
case "DOMAIN":
|
case "DOMAIN":
|
||||||
$label = form_label(lang("{$viewDatas['class_path']}.label.{$field}"), $field, $extras);
|
$label = form_label(lang("{$viewDatas['class_path']}.label.{$field}"), $field, $extras);
|
||||||
|
$extras = ["class" => "btn btn-light btn-circle", "target" => "_self", ...$extras];
|
||||||
|
$label .= form_label(
|
||||||
|
ICONS['SETUP'],
|
||||||
|
$field,
|
||||||
|
[
|
||||||
|
"data-src" => "/admin/customer/serviceitem?item_type={$field}&serviceinfo_uid={$viewDatas['entity']->getPK()}",
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#index_action_form",
|
||||||
|
...$extras
|
||||||
|
]
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$label = parent::getFieldLabel($field, $viewDatas, $extras);
|
$label = parent::getFieldLabel($field, $viewDatas, $extras);
|
||||||
@ -46,27 +57,21 @@ class ServiceHelper extends CustomerHelper
|
|||||||
case "SOFTWARE":
|
case "SOFTWARE":
|
||||||
case "DEFENCE":
|
case "DEFENCE":
|
||||||
case "DOMAIN":
|
case "DOMAIN":
|
||||||
$temps = [];
|
$temps = ["<ol>"];
|
||||||
foreach ($viewDatas['entity']->getItemEntities($field) as $partEntity) {
|
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
||||||
$temps[] = "<div>" . $partEntity->getTitle() . "</div>";
|
$temps[] = "<li title=\"" . $itemEntity->getView_Price() . "\">" . $viewDatas['field_options'][$field][$itemEntity->getItemUid()] . ' ' . $itemEntity->getView_BillingCycle() . ' ' . $itemEntity->getView_Sale() . "</li>";
|
||||||
}
|
}
|
||||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
$temps[] = "</ol>";
|
||||||
$temps[] = form_label(
|
|
||||||
'변경',
|
|
||||||
$field,
|
|
||||||
[
|
|
||||||
"data-src" => "/admin/customer/serviceitem?item_type={$field}&serviceinfo_uid={$viewDatas['entity']->getPK()}",
|
|
||||||
"data-bs-toggle" => "modal",
|
|
||||||
"data-bs-target" => "#index_action_form",
|
|
||||||
...$extras
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$value = implode("", $temps);
|
$value = implode("", $temps);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$value = parent::getFieldView($field, $viewDatas, $extras);
|
$value = parent::getFieldView($field, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (is_array($value)) {
|
||||||
|
echo __METHOD__ . "에서 오류: {$field}의 값이 Array형태입니다";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ return [
|
|||||||
'IP' => "IP",
|
'IP' => "IP",
|
||||||
'CPU' => "CPU",
|
'CPU' => "CPU",
|
||||||
'RAM' => "메모리",
|
'RAM' => "메모리",
|
||||||
'DISK' => "저장장치",
|
'STORAGE' => "저장장치",
|
||||||
'SOFTWARE' => "SOFTWARE",
|
'SOFTWARE' => "SOFTWARE",
|
||||||
'DEFENCE' => "방어(CS)",
|
'DEFENCE' => "방어(CS)",
|
||||||
'DOMAIN' => "도메인",
|
'DOMAIN' => "도메인",
|
||||||
@ -34,24 +34,24 @@ return [
|
|||||||
"default" => "치바",
|
"default" => "치바",
|
||||||
"tokyo" => "도쿄",
|
"tokyo" => "도쿄",
|
||||||
],
|
],
|
||||||
"SWITCH" => [
|
"SWITCH" => [
|
||||||
"R35P10" => "R35P10",
|
"R35P10" => "R35P10",
|
||||||
"R45P20" => "R45P20",
|
"R45P20" => "R45P20",
|
||||||
],
|
],
|
||||||
"CODE" => [
|
"CODE" => [
|
||||||
"JPN130" => "JPN130",
|
"JPN130" => "JPN130",
|
||||||
"JPN140" => "JPN140",
|
"JPN140" => "JPN140",
|
||||||
"JPN150" => "JPN138",
|
"JPN138" => "JPN138",
|
||||||
"X1508A" => "R45P20",
|
"R45P20" => "R45P20",
|
||||||
"X1508C" => "X1508C",
|
"X1508C" => "X1508C",
|
||||||
"X1508D" => "X1508D",
|
"X1508D" => "X1508D",
|
||||||
"X2001A" => "X2001A",
|
"X2001A" => "X2001A",
|
||||||
"X2001B" => "X2001B",
|
"X2001B" => "X2001B",
|
||||||
"X2001C" => "X2001C",
|
"X2001C" => "X2001C",
|
||||||
"X2001D" => "X2001D",
|
"X2001D" => "X2001D",
|
||||||
"X2001E" => "X2001E",
|
"X2001E" => "X2001E",
|
||||||
"P2404I510" => "P2404I510",
|
"P2404I510" => "P2404I510",
|
||||||
"P2404I710" => "P2404I710",
|
"P2404I710" => "P2404I710",
|
||||||
],
|
],
|
||||||
"TYPE" => [
|
"TYPE" => [
|
||||||
"default" => "일반",
|
"default" => "일반",
|
||||||
|
|||||||
@ -8,7 +8,7 @@ class ServiceModel extends CustomerModel
|
|||||||
{
|
{
|
||||||
const TABLE = "serviceinfo";
|
const TABLE = "serviceinfo";
|
||||||
const PK = "uid";
|
const PK = "uid";
|
||||||
const TITLE = "switch";
|
const TITLE = "code";
|
||||||
protected $table = self::TABLE;
|
protected $table = self::TABLE;
|
||||||
protected $primaryKey = self::PK;
|
protected $primaryKey = self::PK;
|
||||||
protected $returnType = ServiceEntity::class;
|
protected $returnType = ServiceEntity::class;
|
||||||
|
|||||||
@ -29,7 +29,6 @@ class ServiceItemService extends CustomerService
|
|||||||
"item_type",
|
"item_type",
|
||||||
"item_uid",
|
"item_uid",
|
||||||
"billing_cycle",
|
"billing_cycle",
|
||||||
"price",
|
|
||||||
"amount",
|
"amount",
|
||||||
"start_at",
|
"start_at",
|
||||||
"status",
|
"status",
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, $viewDatas) ?></th>
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, $viewDatas) ?></th>
|
||||||
<td nowrap class="text-start">
|
<td nowrap class="text-start">
|
||||||
<?= $viewDatas['helper']->getFieldForm($field, old($field), $viewDatas) ?>
|
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? isset($viewDatas[$field]) ? $viewDatas[$field] : null, $viewDatas) ?>
|
||||||
<span><?= validation_show_error($field); ?></span>
|
<span><?= validation_show_error($field); ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<table class="table table-bordered table-hover table-striped">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach ($viewDatas['item_types'] as $field => $label): ?>
|
<?php foreach ($viewDatas['item_types'] as $field => $label): ?>
|
||||||
<th data-rtc-resizable="<?= $field ?>"><?= $label ?></th>
|
<th data-rtc-resizable="<?= $field ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($field, $viewDatas) ?></th>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<ul class="nav justify-content-center">
|
<ul class="nav justify-content-center">
|
||||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
||||||
<?php foreach ($viewDatas['batchjob_fields'] as $field): ?>
|
<?php foreach ($viewDatas['batchjob_fields'] as $field): ?>
|
||||||
<?= $viewDatas['helper']->getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>
|
<?= $viewDatas['helper']->getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob', $viewDatas) ?></li>
|
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob', $viewDatas) ?></li>
|
||||||
<li class="nav-item"><?= $viewDatas['helper']->getListButton('create', $viewDatas) ?></li>
|
<li class="nav-item"><?= $viewDatas['helper']->getListButton('create', $viewDatas) ?></li>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<nav class="condition nav">
|
<nav class="condition nav">
|
||||||
조건:
|
조건:
|
||||||
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
|
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
|
||||||
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?? old($field), $viewDatas) ?>
|
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?? old($field), $viewDatas) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="search nav justify-content-center">
|
<nav class="search nav justify-content-center">
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<nav class="condition nav">
|
<nav class="condition nav">
|
||||||
조건:
|
조건:
|
||||||
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
|
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
|
||||||
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?? old($field), $viewDatas) ?>
|
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ? $viewDatas[$field] : old($field), $viewDatas) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="search nav justify-content-center">
|
<nav class="search nav justify-content-center">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user