dbmsv2 init...1
This commit is contained in:
parent
3c3861c3e3
commit
b1df9e946c
@ -4,7 +4,6 @@ namespace App\Cells\Customer;
|
||||
|
||||
use App\Services\Customer\PaymentService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\ServerPartService;
|
||||
|
||||
class ServiceCell extends CustomerCell
|
||||
{
|
||||
|
||||
@ -40,7 +40,7 @@ class ClientController extends CustomerController
|
||||
// 생성 후, Client 코드값 재정의
|
||||
$format = env("Client.Prefix.{$formDatas['site']}.code.format", false);
|
||||
if (!$format) {
|
||||
throw new \Exception(__METHOD__ . "에서 code의 prefix가 정의되지 않았습니다.");
|
||||
throw new \Exception(__METHOD__ . "에서 code의 code의 format[Client.Prefix.{$formDatas['site']}.code.format] 정의되지 않았습니다.");
|
||||
}
|
||||
$this->getService()->modify(
|
||||
$entity,
|
||||
|
||||
@ -64,11 +64,11 @@ class ServiceController extends CustomerController
|
||||
//생성관련
|
||||
protected function create_form_process(): void
|
||||
{
|
||||
//Form 기본값정의
|
||||
$format = env("Server.Prefix.code.format", false);
|
||||
if (!$format) {
|
||||
throw new \Exception(__METHOD__ . "에서 code의 format[Server.Prefix.code.format]이 정의되지 않았습니다.");
|
||||
}
|
||||
//기본값정의
|
||||
$this->getService()->setFormDatas([
|
||||
'location' => 'chiba',
|
||||
'type' => 'normal',
|
||||
|
||||
@ -52,11 +52,11 @@ class ServerController extends EquipmentController
|
||||
//생성
|
||||
protected function create_form_process(): void
|
||||
{
|
||||
//Form 기본값정의
|
||||
$format = env("Server.Prefix.code.format", false);
|
||||
if (!$format) {
|
||||
throw new \Exception(__METHOD__ . "에서 code의 format[Server.Prefix.code.format]이 정의되지 않았습니다.");
|
||||
}
|
||||
//기본값정의
|
||||
$this->getService()->setFormDatas([
|
||||
'code' => $this->getService()->getLastestCode(
|
||||
$format,
|
||||
|
||||
@ -63,8 +63,11 @@ class Home extends AdminController
|
||||
public function index(): RedirectResponse|string
|
||||
{
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
//기본전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFields();
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
$this->getService()->setFormOptions();
|
||||
//Total 서버 현황
|
||||
$this->totalCounts = $this->getService()->getTotalCountsByType();
|
||||
|
||||
@ -143,7 +143,7 @@ abstract class CommonController extends BaseController
|
||||
//초기화
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -153,7 +153,6 @@ abstract class CommonController extends BaseController
|
||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||
return $this->getResultSuccess();
|
||||
} catch (\Exception $e) {
|
||||
// dd($e->getMessage());
|
||||
return $this->getResultFail($e->getMessage());
|
||||
}
|
||||
}
|
||||
@ -168,7 +167,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getPost());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -191,7 +190,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -221,7 +220,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getPost());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -252,7 +251,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields([$field]);
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -306,7 +305,7 @@ abstract class CommonController extends BaseController
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
list($selectedFields, $formDatas, $uids) = $this->batchjob_pre_process();
|
||||
$this->getService()->setFormFields($selectedFields);
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getPost());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -405,7 +404,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -430,7 +429,7 @@ abstract class CommonController extends BaseController
|
||||
//Filter조건절 처리
|
||||
$index_filters = [];
|
||||
foreach ($this->getService()->getControlDatas('actionFilters') as $field) {
|
||||
$value = $this->request->getGet($field);
|
||||
$value = $this->getService()->getFormDatas()[$field] ?? null;
|
||||
if ($value) {
|
||||
$this->getService()->index_condition_filterField($field, $value);
|
||||
$index_filters[$field] = $value;
|
||||
@ -490,7 +489,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
@ -549,7 +548,7 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
//기본전달값정의
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
|
||||
@ -342,7 +342,8 @@ class CommonHelper
|
||||
case 'clientinfo_uid':
|
||||
case 'serviceinfo_uid':
|
||||
case 'serverinfo_uid':
|
||||
$value = array_key_exists($value, $viewDatas['control']['field_optons'][$field]) && $viewDatas['control']['field_optons'][$field][$value] ? $viewDatas['control']['field_optons'][$field][$value]->getTitle() : "";
|
||||
$value = array_key_exists($value, $viewDatas['control']['field_optons'][$field]) &&
|
||||
$viewDatas['control']['field_optons'][$field][$value] ? $viewDatas['control']['field_optons'][$field][$value]->getTitle() : "";
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
|
||||
@ -27,12 +27,12 @@ abstract class CommonService
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getControlDatas(?string $key = null): mixed
|
||||
final public function getControlDatas(?string $key = null): string|array
|
||||
{
|
||||
if (!$key) {
|
||||
return $this->_control;
|
||||
}
|
||||
return array_key_exists($key, $this->_control) ? $this->_control[$key] : null;
|
||||
return array_key_exists($key, $this->_control) ? $this->_control[$key] : [];
|
||||
}
|
||||
final public function setControlDatas(string $key, mixed $values): void
|
||||
{
|
||||
|
||||
@ -69,6 +69,7 @@ class ServiceService extends CustomerService
|
||||
'type',
|
||||
'clientinfo_uid',
|
||||
'serverinfo_uid',
|
||||
'user_uid', //home의 최신신규서버현황에서 사용
|
||||
'status',
|
||||
];
|
||||
}
|
||||
|
||||
@ -122,25 +122,15 @@ class ServerPartService extends EquipmentService
|
||||
{
|
||||
switch ($field) {
|
||||
case 'part_uid':
|
||||
$options = $this->getPartService()->getEntities();
|
||||
break;
|
||||
$type = $this->getFormDatas()['type'] ?? null;
|
||||
switch ($type) {
|
||||
case 'CPU':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'CPU']);
|
||||
break;
|
||||
case 'RAM':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'RAM']);
|
||||
break;
|
||||
case 'DISK':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'DISK']);
|
||||
break;
|
||||
case 'OS':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'OS']);
|
||||
break;
|
||||
case 'DB':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'DB']);
|
||||
break;
|
||||
case 'SOFTWARE':
|
||||
$options = $this->getPartService()->getEntities(['type' => 'SOFTWARE']);
|
||||
$options = $this->getPartService()->getEntities(['type' => $type]);
|
||||
break;
|
||||
case 'SWITCH':
|
||||
$options = $this->getSwitchService()->getEntities();
|
||||
@ -151,6 +141,11 @@ class ServerPartService extends EquipmentService
|
||||
case 'CS':
|
||||
$options = $this->getCSService()->getEntities();
|
||||
break;
|
||||
default:
|
||||
$options = [];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormOption($field, $options);
|
||||
break;
|
||||
|
||||
@ -13,14 +13,13 @@
|
||||
<td class="layout_right">
|
||||
<!-- Layout Right Start -->
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/banner"); ?>
|
||||
<div class="row align-items-start" style="padding-top:20px;">
|
||||
<div class="col">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/total"); ?>
|
||||
<div class="row align-items-start mt-3">
|
||||
<div class="col-8">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/total_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/new_service"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-start" style="padding-top:20px;">
|
||||
<div class="col">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/new"); ?>
|
||||
<div class="col-4">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/user_history"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Layout Right End -->
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<div class="layout_header">
|
||||
<div class="layout_header mt-3">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= ICONS['CHART'] ?> 최신 신규 서버 현황 </h4>
|
||||
<h4> <?= ICONS['CHART'] ?> 최신 신규 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -15,11 +15,8 @@
|
||||
<th>업체명</th>
|
||||
<th>구분</th>
|
||||
<th>장비번호</th>
|
||||
<th>스위치정보</th>
|
||||
<th>IP정보</th>
|
||||
<th>CS정보</th>
|
||||
<th>스위치정보 / IP정보 / CS정보</th>
|
||||
<th>등록자</th>
|
||||
<th>비고</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -30,11 +27,8 @@
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('type', $entity->getType(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('serveripinfo_uid', $entity->getServerEntity()->getCode(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('SWITCH', null, $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('IP', null, $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('CS', null, $viewDatas) ?></td>
|
||||
<td><?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $entity->getServerEntity()->getPK(), 'types' => SERVERPART['SERVICE_PARTTYPES'], 'template' => 'part_service']) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('user_uid', $entity->getUserUID(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('history', "", $viewDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
@ -2,7 +2,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= ICONS['CHART'] ?> 최신 신규 서버 현황 </h4>
|
||||
<h4> <?= ICONS['CHART'] ?> 전체 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
13
app/Views/admin/welcome/user_history.php
Normal file
13
app/Views/admin/welcome/user_history.php
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= ICONS['SETUP'] ?>작업내역 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
준비중....
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
Loading…
Reference in New Issue
Block a user