dbmsv4 init...1
This commit is contained in:
parent
e574e3226f
commit
fa91de0067
19
app/Cells/CommonCell.php
Normal file
19
app/Cells/CommonCell.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells;
|
||||||
|
|
||||||
|
use App\Services\CommonService;
|
||||||
|
|
||||||
|
abstract class CommonCell
|
||||||
|
{
|
||||||
|
protected $_service = null;
|
||||||
|
|
||||||
|
protected function __construct(CommonService $service)
|
||||||
|
{
|
||||||
|
$this->_service = $service;
|
||||||
|
}
|
||||||
|
final public function getService(): mixed
|
||||||
|
{
|
||||||
|
return $this->_service;
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Cells/Customer/CustomerCell.php
Normal file
15
app/Cells/Customer/CustomerCell.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Customer;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\CommonService;
|
||||||
|
|
||||||
|
abstract class CustomerCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
protected function __construct(CommonService $service)
|
||||||
|
{
|
||||||
|
parent::__construct($service);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
app/Cells/Customer/PaymentCell.php
Normal file
32
app/Cells/Customer/PaymentCell.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Customer;
|
||||||
|
|
||||||
|
use App\Services\PaymentService;
|
||||||
|
|
||||||
|
class PaymentCell extends CustomerCell
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new PaymentService());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
$entities = $this->getService()->getEntities(['clientinfo_uid' => $params['clientinfo_uid'], 'billing' => PAYMENT['BILLING']['ONETIME'], 'status' => STATUS['UNPAID']]);
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/payment/' . $template, [
|
||||||
|
'serviceCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'entities' => $entities,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
53
app/Cells/Customer/ServiceCell.php
Normal file
53
app/Cells/Customer/ServiceCell.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Customer;
|
||||||
|
|
||||||
|
use App\Helpers\Equipment\ServerPartHelper;
|
||||||
|
use App\Services\Customer\ServiceService;
|
||||||
|
use App\Services\PaymentService;
|
||||||
|
|
||||||
|
class ServiceCell extends CustomerCell
|
||||||
|
{
|
||||||
|
|
||||||
|
private ?PaymentService $_paymentService = null;
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new ServiceService());
|
||||||
|
}
|
||||||
|
final public function getPaymentService(): PaymentService
|
||||||
|
{
|
||||||
|
if (!$this->_paymentService) {
|
||||||
|
$this->_paymentService = new PaymentService();
|
||||||
|
}
|
||||||
|
return $this->_paymentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
//서비스별 미납 Count
|
||||||
|
$unPaids = $this->getPaymentService()->getUnPaids('serviceinfo_uid', ['clientinfo_uid' => $params['clientinfo_uid']]);
|
||||||
|
//서비스별 서버리스트
|
||||||
|
$entities = [];
|
||||||
|
$childServers = [];
|
||||||
|
foreach ($this->getService()->getEntities(['clientinfo_uid' => $params['clientinfo_uid']]) as $entity) {
|
||||||
|
$entities[] = $entity;
|
||||||
|
$childServers[$entity->getPK()] = $this->getService()->getServerService()->getEntities(['serviceinfo_uid' => $entity->getPK()]);
|
||||||
|
}
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/service/' . $template, [
|
||||||
|
'serviceCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'unPaids' => $unPaids,
|
||||||
|
'entities' => $entities,
|
||||||
|
'childServers' => $childServers,
|
||||||
|
'serverPartHelper' => new ServerPartHelper(),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Cells/Equipment/EquipmentCell.php
Normal file
15
app/Cells/Equipment/EquipmentCell.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Equipment;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\CommonService;
|
||||||
|
|
||||||
|
abstract class EquipmentCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
protected function __construct(CommonService $service)
|
||||||
|
{
|
||||||
|
parent::__construct($service);
|
||||||
|
}
|
||||||
|
}
|
||||||
77
app/Cells/Equipment/ServerCell.php
Normal file
77
app/Cells/Equipment/ServerCell.php
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Equipment;
|
||||||
|
|
||||||
|
use App\Services\Equipment\ServerService;
|
||||||
|
|
||||||
|
class ServerCell extends EquipmentCell
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new ServerService());
|
||||||
|
}
|
||||||
|
|
||||||
|
//서비스 방식에 따른 서비스별 Count
|
||||||
|
final public function totalCountDashboard(array $params): string
|
||||||
|
{
|
||||||
|
$totalCounts = [
|
||||||
|
'all' => [
|
||||||
|
'normal' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'defence' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'dedicated' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'alternative' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'vpn' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'event' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'test' => ['tokyo' => 0, 'chiba' => 0],
|
||||||
|
'summary_tokyo' => 0,
|
||||||
|
'summary_chiba' => 0,
|
||||||
|
'summary_all' => 0,
|
||||||
|
]
|
||||||
|
];
|
||||||
|
foreach (array_keys(SITES) as $site) {
|
||||||
|
$totalCounts[$site] = $this->getService()->getTotalServiceCount(['serviceinfo.site' => $site]);
|
||||||
|
$totalCounts['all']['normal']['tokyo'] += $totalCounts[$site]['normal']['tokyo'];
|
||||||
|
$totalCounts['all']['normal']['chiba'] += $totalCounts[$site]['normal']['chiba'];
|
||||||
|
$totalCounts['all']['defence']['tokyo'] += $totalCounts[$site]['defence']['tokyo'];
|
||||||
|
$totalCounts['all']['defence']['chiba'] += $totalCounts[$site]['defence']['chiba'];
|
||||||
|
$totalCounts['all']['dedicated']['tokyo'] += $totalCounts[$site]['dedicated']['tokyo'];
|
||||||
|
$totalCounts['all']['dedicated']['chiba'] += $totalCounts[$site]['dedicated']['chiba'];
|
||||||
|
$totalCounts['all']['alternative']['tokyo'] += $totalCounts[$site]['alternative']['tokyo'];
|
||||||
|
$totalCounts['all']['alternative']['chiba'] += $totalCounts[$site]['alternative']['chiba'];
|
||||||
|
$totalCounts['all']['vpn']['tokyo'] += $totalCounts[$site]['vpn']['tokyo'];
|
||||||
|
$totalCounts['all']['vpn']['chiba'] += $totalCounts[$site]['vpn']['chiba'];
|
||||||
|
$totalCounts['all']['event']['tokyo'] += $totalCounts[$site]['event']['tokyo'];
|
||||||
|
$totalCounts['all']['event']['chiba'] += $totalCounts[$site]['event']['chiba'];
|
||||||
|
$totalCounts['all']['test']['tokyo'] += $totalCounts[$site]['test']['tokyo'];
|
||||||
|
$totalCounts['all']['test']['chiba'] += $totalCounts[$site]['test']['chiba'];
|
||||||
|
$totalCounts['all']['summary_tokyo'] += $totalCounts[$site]['tokyo_summary'];
|
||||||
|
$totalCounts['all']['summary_chiba'] += $totalCounts[$site]['chiba_summary'];
|
||||||
|
$totalCounts['all']['summary_all'] = $totalCounts['all']['summary_tokyo'] + $totalCounts['all']['summary_chiba'];
|
||||||
|
}
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/server/' . $template, [
|
||||||
|
'serviceCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'totalCounts' => $totalCounts,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
public function stock(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : 'stock';
|
||||||
|
return view('cells/server/' . $template, [
|
||||||
|
'partCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'rows' => $this->getService()->getStockCount(),
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
62
app/Cells/Equipment/ServerPartCell.php
Normal file
62
app/Cells/Equipment/ServerPartCell.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Equipment;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Entities\Equipment\ServerEntity;
|
||||||
|
use App\Services\Equipment\ServerPartService;
|
||||||
|
use App\Services\Equipment\ServerService;
|
||||||
|
|
||||||
|
class ServerPartCell extends EquipmentCell
|
||||||
|
{
|
||||||
|
private ?ServerService $_serverService = null;
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new ServerPartService());
|
||||||
|
}
|
||||||
|
|
||||||
|
final public function getServerService(): ServerService
|
||||||
|
{
|
||||||
|
if (!$this->_serverService) {
|
||||||
|
$this->_serverService = new ServerService();
|
||||||
|
}
|
||||||
|
return $this->_serverService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function parttable(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
if (!array_key_exists('serverinfo_uid', $params)) {
|
||||||
|
return "서버정보를 정의하셔야합니다.";
|
||||||
|
}
|
||||||
|
if (!array_key_exists('types', $params)) {
|
||||||
|
return "부품정보 형태(Types) 리스트를 정의하셔야합니다.";
|
||||||
|
}
|
||||||
|
//서버정보
|
||||||
|
$serverEntity = $this->getServerService()->getEntity($params['serverinfo_uid']);
|
||||||
|
if (!$serverEntity instanceof ServerEntity) {
|
||||||
|
return "[{$params['serverinfo_uid']}]의 서버정보를 확인할수없습니다..";
|
||||||
|
}
|
||||||
|
//PartType별 Entities
|
||||||
|
$entities = [];
|
||||||
|
foreach ($params['types'] as $type) {
|
||||||
|
$entities[$type] = [];
|
||||||
|
$entities[$type][] = $this->getService()->getEntities(['serverinfo_uid' => $serverEntity->getPK(), 'type' => $type]);
|
||||||
|
}
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/serverpart/' . $template, [
|
||||||
|
'serverPartCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'serverinfo_uid' => $params['serverinfo_uid'],
|
||||||
|
'types' => $params['types'],
|
||||||
|
'serverEntity' => $serverEntity,
|
||||||
|
'entities' => $entities,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
33
app/Cells/MylogCell.php
Normal file
33
app/Cells/MylogCell.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\MyLogService;
|
||||||
|
|
||||||
|
class MylogCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new MyLogService());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dashboard(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
$this->getService()->setLimit(20);
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/mylog/' . $template, [
|
||||||
|
'myLogCellDatas' => [
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'entities' => $this->getService()->getEntities(),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Cells/Part/DISKCell.php
Normal file
30
app/Cells/Part/DISKCell.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Part;
|
||||||
|
|
||||||
|
use App\Services\Part\DISKService;
|
||||||
|
|
||||||
|
class DISKCell extends PartCell
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new DISKService());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function stock(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : 'disk_stock';
|
||||||
|
return view('cells/part/' . $template, [
|
||||||
|
'partCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'entities' => $this->getService()->getEntities(),
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Cells/Part/PartCell.php
Normal file
15
app/Cells/Part/PartCell.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Part;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\CommonService;
|
||||||
|
|
||||||
|
abstract class PartCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
protected function __construct(CommonService $service)
|
||||||
|
{
|
||||||
|
parent::__construct($service);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Cells/Part/RAMCell.php
Normal file
30
app/Cells/Part/RAMCell.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells\Part;
|
||||||
|
|
||||||
|
use App\Services\Part\RAMService;
|
||||||
|
|
||||||
|
class RAMCell extends PartCell
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new RAMService());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function stock(array $params): string
|
||||||
|
{
|
||||||
|
$this->getService()->setAction(__FUNCTION__);
|
||||||
|
$this->getService()->setFormFields();
|
||||||
|
$this->getService()->setFormFilters();
|
||||||
|
$this->getService()->setFormRules();
|
||||||
|
$this->getService()->setFormOptions();
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : 'ram_stock';
|
||||||
|
return view('cells/part/' . $template, [
|
||||||
|
'partCellDatas' => [
|
||||||
|
'control' => $this->getService()->getControlDatas(),
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'entities' => $this->getService()->getEntities(),
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
31
app/Cells/SearchCell.php
Normal file
31
app/Cells/SearchCell.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\Customer\ClientService;
|
||||||
|
|
||||||
|
class SearchCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(service('customer_clientservice'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function client(array $params): string
|
||||||
|
{
|
||||||
|
$options = ["" => "고객명 선택"];
|
||||||
|
foreach ($this->getService()->getEntities() as $entity) {
|
||||||
|
$options[$entity->getPK()] = $entity->getTitle();
|
||||||
|
}
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/search/' . $template, [
|
||||||
|
'searchCellDatas' => [
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'options' => $options,
|
||||||
|
'selected' => null,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,6 @@ namespace App\Controllers;
|
|||||||
|
|
||||||
use App\Entities\CommonEntity;
|
use App\Entities\CommonEntity;
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\Validation\Exceptions\ValidationException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AbstractCRUDController
|
* AbstractCRUDController
|
||||||
|
|||||||
@ -9,11 +9,10 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
abstract class AdminController extends CommonController
|
abstract class AdminController extends CommonController
|
||||||
{
|
{
|
||||||
public const PATH = 'admin';
|
|
||||||
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->addActionPaths(self::PATH);
|
$this->addActionPaths('admin');
|
||||||
}
|
}
|
||||||
final protected function getLayout(): string
|
final protected function getLayout(): string
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class AccountController extends CustomerController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('customer_accountservice');
|
$this->service = service('customer_accountservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('account');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class ClientController extends CustomerController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('customer_clientservice');
|
$this->service = service('customer_clientservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('client');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class CouponController extends CustomerController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('customer_couponservice');
|
$this->service = service('customer_couponservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('coupon');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,11 +10,10 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
abstract class CustomerController extends AdminController
|
abstract class CustomerController extends AdminController
|
||||||
{
|
{
|
||||||
public const PATH = 'customer';
|
|
||||||
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->addActionPaths(self::PATH);
|
$this->addActionPaths('customer');
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class PointController extends CustomerController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('customer_pointservice');
|
$this->service = service('customer_pointservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('point');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,11 +10,10 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
abstract class EquipmentController extends AdminController
|
abstract class EquipmentController extends AdminController
|
||||||
{
|
{
|
||||||
public const PATH = 'equipment';
|
|
||||||
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->addActionPaths(self::PATH);
|
$this->addActionPaths('equipment');
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class LineController extends EquipmentController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('equipment_lineservice');
|
$this->service = service('equipment_lineservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('line');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class ServerController extends EquipmentController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('equipment_serverservice');
|
$this->service = service('equipment_serverservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('server');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class ServerPartController extends EquipmentController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('equipment_serverpartservice');
|
$this->service = service('equipment_serverpartservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('serverpart');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class MylogController extends AdminController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('mylogservice');
|
$this->service = service('mylogservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('mylog');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class CPUController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_cpuservice');
|
$this->service = service('part_cpuservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('cpu');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class CSController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_softwareservice');
|
$this->service = service('part_softwareservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('cs');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class DISKController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_diskservice');
|
$this->service = service('part_diskservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('disk');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class IPController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_softwareservice');
|
$this->service = service('part_softwareservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('ip');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,11 +10,10 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
abstract class PartController extends AdminController
|
abstract class PartController extends AdminController
|
||||||
{
|
{
|
||||||
public const PATH = 'part';
|
|
||||||
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->addActionPaths(self::PATH);
|
$this->addActionPaths('part');
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class RAMController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_ramservice');
|
$this->service = service('part_ramservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('ram');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class SOFTWAREController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_softwareservice');
|
$this->service = service('part_softwareservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('software');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class SWITCHController extends PartController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('part_softwareservice');
|
$this->service = service('part_softwareservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('switch');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class PaymentController extends AdminController
|
|||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('paymentservice');
|
$this->service = service('paymentservice');
|
||||||
}
|
}
|
||||||
|
$this->addActionPaths('payment');
|
||||||
}
|
}
|
||||||
//Action작업관련
|
//Action작업관련
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
|
|||||||
@ -13,14 +13,13 @@ use RuntimeException;
|
|||||||
|
|
||||||
class UserController extends AdminController
|
class UserController extends AdminController
|
||||||
{
|
{
|
||||||
public const PATH = 'user';
|
|
||||||
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);
|
||||||
if ($this->service === null) {
|
if ($this->service === null) {
|
||||||
$this->service = service('userservice');
|
$this->service = service('userservice');
|
||||||
}
|
}
|
||||||
$this->addActionPaths(self::PATH);
|
$this->addActionPaths('user');
|
||||||
}
|
}
|
||||||
//Action작업관련
|
//Action작업관련
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
|
|||||||
@ -12,11 +12,10 @@ use Psr\Log\LoggerInterface;
|
|||||||
|
|
||||||
abstract class AuthController extends AbstractWebController
|
abstract class AuthController extends AbstractWebController
|
||||||
{
|
{
|
||||||
public const PATH = 'auth';
|
|
||||||
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->addActionPaths(self::PATH);
|
$this->addActionPaths('auth');
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
16
app/Views/cells/mylog/dashboard.php
Normal file
16
app/Views/cells/mylog/dashboard.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">작업일</th>
|
||||||
|
<th class="text-center">작업내역</th>
|
||||||
|
<th class="text-center">작업자</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach ($myLogCellDatas['entities'] as $entity): ?>
|
||||||
|
<?php $myLogCellDatas['entity'] = $entity; ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center" nowrap><?= $myLogCellDatas['service']->getHelper()->getFieldView('created_at', $entity->created_at, $myLogCellDatas) ?></td>
|
||||||
|
<td class="text-start"><?= $myLogCellDatas['service']->getHelper()->getFieldView('title', $entity->title, $myLogCellDatas) ?></td>
|
||||||
|
<td class="text-center"><?= $myLogCellDatas['service']->getHelper()->getFieldView('user_uid', $entity->user_uid, $myLogCellDatas) ?></td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
32
app/Views/cells/part/disk_stock.php
Normal file
32
app/Views/cells/part/disk_stock.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">항목</th>
|
||||||
|
<th class="text-center text-nowrap" width="13%">사용</th>
|
||||||
|
<th class="text-center text-nowrap" width="13%">가능</th>
|
||||||
|
<th class="text-center text-nowrap" width="13%">포맷</th>
|
||||||
|
<th class="text-center text-nowrap" width="15%">총재고</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||||
|
<?php $partCellDatas['entity'] = $entity; ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-end text-nowrap">
|
||||||
|
<?=
|
||||||
|
form_label(
|
||||||
|
$entity->getTitle(),
|
||||||
|
'disk_modify',
|
||||||
|
[
|
||||||
|
"data-src" => "admin/part/disk/modify/" . $entity->getPK(),
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#modal_action_form",
|
||||||
|
"class" => "text-primary form-label-sm",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="text-center text-nowrap" 저장장치 재고><?= $entity->getUsed() ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= $entity->getAvailable() ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= $partCellDatas['service']->getHelper()->getFieldView('format', $entity->format, $partCellDatas) ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= $entity->getStock() ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
30
app/Views/cells/part/ram_stock.php
Normal file
30
app/Views/cells/part/ram_stock.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">항목</th>
|
||||||
|
<th class="text-center text-nowrap" width="13%">사용</th>
|
||||||
|
<th class="text-center text-nowrap" width="13%">가능</th>
|
||||||
|
<th class="text-center text-nowrap" width="17%">총재고</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||||
|
<?php $partCellDatas['entity'] = $entity; ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-end text-nowrap">
|
||||||
|
<?=
|
||||||
|
form_label(
|
||||||
|
$entity->getTitle(),
|
||||||
|
'disk_modify',
|
||||||
|
[
|
||||||
|
"data-src" => "admin/part/ram/modify/" . $entity->getPK(),
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#modal_action_form",
|
||||||
|
"class" => "text-primary form-label-sm",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="text-center text-nowrap"><?= $entity->getUsed() ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= $entity->getAvailable() ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= $entity->getStock() ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
24
app/Views/cells/payment/detail.php
Normal file
24
app/Views/cells/payment/detail.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<div class="rounded border border-gray p-2 mt-3">
|
||||||
|
<div style="font-size:15px">미지급 1회성정보</div>
|
||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr class="text-center">
|
||||||
|
<th style="width: 250px">서비스</th>
|
||||||
|
<th style="width: 120px">날자</th>
|
||||||
|
<th style="width: 120px">결제금액</th>
|
||||||
|
<th style="width: 250px">항목</th>
|
||||||
|
<th style="width: 250px">내용</th>
|
||||||
|
<th style="width: 250px">처리자</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach ($serviceCellDatas['entities'] as $entity): ?>
|
||||||
|
<?php $serviceCellDatas['entity'] = $entity ?>
|
||||||
|
<tr class="text-left">
|
||||||
|
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $serviceCellDatas) ?></td>
|
||||||
|
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('create_at', $entity->getCreatedAt(), $serviceCellDatas) ?></td>
|
||||||
|
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('amount', $entity->getAmount(), $serviceCellDatas) ?></td>
|
||||||
|
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('title', $entity->getTitle(), $serviceCellDatas) ?></td>
|
||||||
|
<td class="text-start"><?= $serviceCellDatas['service']->getHelper()->getFieldView('content', html_entity_decode($entity->getContent(), ENT_QUOTES, 'UTF-8'), $serviceCellDatas) ?></td>
|
||||||
|
<td class="text-center"><?= $serviceCellDatas['service']->getHelper()->getFieldView('user_uid', $entity->getUserUID(), $serviceCellDatas) ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
4
app/Views/cells/search/client.php
Normal file
4
app/Views/cells/search/client.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?= form_dropdown('client', $searchCellDatas['options'], $searchCellDatas['selected'], [
|
||||||
|
'class' => 'form-select w-auto d-inline-block select-field',
|
||||||
|
'onchange' => "if(this.value) window.location.href='/admin/customer/client/detail/' + this.value;"
|
||||||
|
]) ?>
|
||||||
16
app/Views/cells/server/stock.php
Normal file
16
app/Views/cells/server/stock.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">항목</th>
|
||||||
|
<th class="text-center text-nowrap" width="18%">사용</th>
|
||||||
|
<th class="text-center text-nowrap" width="18%">가능</th>
|
||||||
|
<th class="text-center text-nowrap" width="18%">총재고</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach (SERVER['CHASSISES'] as $key => $label): ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-end text-nowrap"><?= $label ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= array_key_exists($key, $partCellDatas['rows']) ? $partCellDatas['rows'][$key] : 0 ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= array_key_exists($key, $partCellDatas['rows']) ? SERVER['STOCKS'][$key] - $partCellDatas['rows'][$key] : SERVER['STOCKS'][$key] ?></td>
|
||||||
|
<td class="text-center text-nowrap"><?= SERVER['STOCKS'][$key] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
42
app/Views/cells/server/totalCountDashboard.php
Normal file
42
app/Views/cells/server/totalCountDashboard.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php foreach (array_keys(SITES) as $site): ?>
|
||||||
|
<tr class="text-center">
|
||||||
|
<td class="bg-light"><?= $site ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['normal']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['normal']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['defence']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['defence']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['dedicated']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['dedicated']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['alternative']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['alternative']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['vpn']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['vpn']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['event']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['event']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['test']['tokyo'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['test']['chiba'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['tokyo_summary'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['chiba_summary'] ?></td>
|
||||||
|
<td><?= $serviceCellDatas['totalCounts'][$site]['all_summary'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<tr class="text-center">
|
||||||
|
<td class="bg-light">총합계</td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['normal']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['normal']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['defence']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['defence']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['dedicated']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['dedicated']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['alternative']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['alternative']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['vpn']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['vpn']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['event']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['event']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['test']['tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['test']['chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['summary_tokyo'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['summary_chiba'] ?></td>
|
||||||
|
<td class="bg-light"><?= $serviceCellDatas['totalCounts']['all']['summary_all'] ?></td>
|
||||||
|
</tr>
|
||||||
29
app/Views/cells/serverpart/part_detail.php
Normal file
29
app/Views/cells/serverpart/part_detail.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<td>
|
||||||
|
<?php foreach (SERVERPART['SERVER_PARTTYPES'] as $type): ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities'][$type] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<div><?= $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas) ?></div>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities']['IP'] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<div><?= $serverPartCellDatas['service']->getHelper()->getFieldView('IP', $entity->getPK(), $serverPartCellDatas) ?></div>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities']['CS'] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<div><?= $serverPartCellDatas['service']->getHelper()->getFieldView('CS', $entity->getPK(), $serverPartCellDatas) ?></div>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
19
app/Views/cells/serverpart/partlist_server.php
Normal file
19
app/Views/cells/serverpart/partlist_server.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php $htmls = $texts = [] ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
|
||||||
|
<?php $htmls[$type] = [] ?>
|
||||||
|
<?php $texts[$type] = []; ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities'][$type] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<?php $htmls[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas) ?>
|
||||||
|
<?php $texts[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas, ['return' => 'onlyText']) ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php $view_texts = [] ?>
|
||||||
|
<?php foreach ($htmls as $type => $datas): ?><?php $view_texts[] = implode(',', $texts[$type]) ?><?php endforeach ?>
|
||||||
|
<?php $text = implode("/", $view_texts) ?>
|
||||||
|
<span class="serverparts" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||||
|
<?php $view_htmls = [] ?>
|
||||||
|
<?php foreach ($htmls as $type => $datas): ?><?php $view_htmls[] = implode(",", $datas) ?><?php endforeach ?>
|
||||||
|
<?= implode("/", $view_htmls) ?>
|
||||||
31
app/Views/cells/serverpart/partlist_service.php
Normal file
31
app/Views/cells/serverpart/partlist_service.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php $htmls = $texts = [] ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
|
||||||
|
<?php $htmls[$type] = [] ?>
|
||||||
|
<?php $texts[$type] = []; ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities'][$type] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<?php $htmls[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas) ?>
|
||||||
|
<?php $texts[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas, ['return' => 'onlyText']) ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php $view_htmls = [
|
||||||
|
$serverPartCellDatas['service']->getHelper()->getFieldView('SERVER', "", $serverPartCellDatas),
|
||||||
|
$serverPartCellDatas['serverEntity']->getIP(),
|
||||||
|
$serverPartCellDatas['serverEntity']->getSwitch(),
|
||||||
|
$serverPartCellDatas['serverEntity']->getOS()
|
||||||
|
] ?>
|
||||||
|
<?php foreach ($htmls as $type => $datas): ?><?php $view_htmls[] = implode(",", $datas) ?><?php endforeach ?>
|
||||||
|
<?php $view_texts = [
|
||||||
|
$serverPartCellDatas['serverEntity']->getCode(),
|
||||||
|
$serverPartCellDatas['serverEntity']->getIP(),
|
||||||
|
$serverPartCellDatas['serverEntity']->getSwitch(),
|
||||||
|
$serverPartCellDatas['serverEntity']->getOS()
|
||||||
|
] ?>
|
||||||
|
<?php foreach ($texts as $type => $datas): ?><?php $view_texts[] = implode(',', $datas) ?><?php endforeach ?>
|
||||||
|
<?php $text = implode("/", $view_texts) ?>
|
||||||
|
<div class="text-nowrap" style="font-size: 0.9em;">
|
||||||
|
<span class="serverparts" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
|
||||||
|
<?= implode("/", $view_htmls) ?>
|
||||||
|
</div>
|
||||||
26
app/Views/cells/serverpart/parttable.php
Normal file
26
app/Views/cells/serverpart/parttable.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php $htmls = [] ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
|
||||||
|
<?php $htmls[$type] = [] ?>
|
||||||
|
<?php foreach ($serverPartCellDatas['entities'][$type] as $entities): ?>
|
||||||
|
<?php foreach ($entities as $entity): ?>
|
||||||
|
<?php $serverPartCellDatas['entity'] = $entity ?>
|
||||||
|
<?php $htmls[$type][] = [
|
||||||
|
'view' => $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas),
|
||||||
|
'amount' => $entity->getTotalAmount(),
|
||||||
|
'entity' => $entity
|
||||||
|
] ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<table class="table table-bordered table-striped m-0 p-0">
|
||||||
|
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
|
||||||
|
<tr class="m-0 p-0">
|
||||||
|
<th class="text-end m-0 p-0" width="15%"><?= $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) ?></th>
|
||||||
|
<td class="text-start m-0 p-0">
|
||||||
|
<?php foreach ($htmls[$type] as $html): ?>
|
||||||
|
<?= $html['view'] ?>[<?= number_format($html['amount']) ?>원]<a href="/admin/equipment/serverpart/delete/<?= $html['entity']->getPK() ?>">❌</a><BR>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
30
app/Views/cells/service/detail.php
Normal file
30
app/Views/cells/service/detail.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<div class="rounded border border-gray p-2 mt-3">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr class="text-center">
|
||||||
|
<th style="width: 120px">서비스정보</th>
|
||||||
|
<th>서버</th>
|
||||||
|
<th style="width: 600px">서비스 비고</th>
|
||||||
|
<th style="width: 200px">결제처리</th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach ($serviceCellDatas['entities'] as $entity): ?>
|
||||||
|
<?php $serviceCellDatas['entity'] = $entity ?>
|
||||||
|
<tr class="text-left">
|
||||||
|
<td class="text-center" nowrap>
|
||||||
|
<div><?= $entity->getCode() ?></div>
|
||||||
|
<div><?= $entity->getTitle() ?></div>
|
||||||
|
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('site', $entity->getSite(), $serviceCellDatas) ?></div>
|
||||||
|
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('location', $entity->getLocation(), $serviceCellDatas) ?></div>
|
||||||
|
<div class="mt-3"><?= $serviceCellDatas['service']->getHelper()->getListButton('addServer', '대체서버추가', ['entity' => $entity], ['class' => 'btn btn-sm btn-primary']) ?></div>
|
||||||
|
</td>
|
||||||
|
<td class="text-center" nowrap><?= view('cells/service/server', ['serviceEntity' => $entity, 'serverEntities' => $serviceCellDatas['childServers'][$entity->getPK()]]) ?></td>
|
||||||
|
<td class="text-center" nowrap>
|
||||||
|
<?= form_open("/admin/customer/service/history/{$entity->getPK()}?return_url=" . urlencode(current_url()), ['method' => "post"]) ?>
|
||||||
|
<textarea name="history" class="form-control note-box"><?= $entity->getHistory() ?></textarea>
|
||||||
|
<?= form_submit('', '저장', array("class" => "btn btn-outline btn-primary m-3")); ?>
|
||||||
|
<?= form_close() ?>
|
||||||
|
</td>
|
||||||
|
<td><?= view('cells/service/payment', ['serviceEntity' => $entity]) ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
32
app/Views/cells/service/payment.php
Normal file
32
app/Views/cells/service/payment.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<table class="table m-0 p-0">
|
||||||
|
<tr>
|
||||||
|
<th class="fw-bold" nowrap>결제일</th>
|
||||||
|
<td nowrap><?= $serviceEntity->getBillingAT() ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="fw-bold" nowrap>결제금</th>
|
||||||
|
<td class="amount-green" nowrap><?= number_format(intval($serviceEntity->getAmount())) ?>원</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="fw-bold" nowrap>미납금</th>
|
||||||
|
<td class="amount-red" nowrap>
|
||||||
|
<?php if (array_key_exists($serviceEntity->getPK(), $serviceCellDatas['unPaids'])): ?>
|
||||||
|
<?=
|
||||||
|
form_label(
|
||||||
|
sprintf("총:%s건/%s원", $serviceCellDatas['unPaids'][$serviceEntity->getPK()]['cnt'], number_format($serviceCellDatas['unPaids'][$serviceEntity->getPK()]['amount'])),
|
||||||
|
'payment_unpaid',
|
||||||
|
[
|
||||||
|
"data-src" => "/admin/customer/payment?clientinfo_uid={$serviceEntity->getClientInfoUID()}&serviceinfo_uid={$serviceEntity->getPK()}&status=unpaid&ActionTemplate=popup",
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#modal_action_form",
|
||||||
|
"class" => "text-primary form-label-sm",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="text-center"><?= $serviceCellDatas['service']->getHelper()->getListButton('onetime', '일회성추가', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
30
app/Views/cells/service/server.php
Normal file
30
app/Views/cells/service/server.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<?php foreach ($serverEntities as $serverEntity): ?>
|
||||||
|
<tr class="text-center">
|
||||||
|
<th style="width: 250px">
|
||||||
|
<?= $serviceEntity->getServerInfoUID() == $serverEntity->getPK() ? "📌" : "<a href=\"/admin/customer/service/changeServer/{$serviceEntity->getPK()}?serverinfo_uid={$serverEntity->getPK()}\">✔️</a>" ?>
|
||||||
|
<?= $serviceCellDatas['serverPartHelper']->getFieldView('SERVER', "", ['serverEntity' => $serverEntity]) ?>
|
||||||
|
<?= $serviceEntity->getServerInfoUID() != $serverEntity->getPK() ? "<a href=\"/admin/customer/service/terminateServer/{$serviceEntity->getPK()}?serverinfo_uid={$serverEntity->getPK()}\">❌</a>" : "" ?>
|
||||||
|
</th>
|
||||||
|
<th style="width: 250px">
|
||||||
|
<?= $serviceCellDatas['serverPartHelper']->getListButton('CPU', 'CPU', ['serverinfo_uid' => $serverEntity->getPK()]) ?>
|
||||||
|
/ <?= $serviceCellDatas['serverPartHelper']->getListButton('RAM', 'RAM', ['serverinfo_uid' => $serverEntity->getPK()]) ?>
|
||||||
|
/ <?= $serviceCellDatas['serverPartHelper']->getListButton('DISK', 'DISK', ['serverinfo_uid' => $serverEntity->getPK()]) ?>
|
||||||
|
</th>
|
||||||
|
<th style="width: 200px"><?= $serviceCellDatas['serverPartHelper']->getListButton('IP', '추가IP', ['serverinfo_uid' => $serverEntity->getPK()]) ?></th>
|
||||||
|
<th style="width: 200px"><?= $serviceCellDatas['serverPartHelper']->getListButton('CS', 'CS', ['serverinfo_uid' => $serverEntity->getPK()]) ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr class="text-center">
|
||||||
|
<td nowrap>
|
||||||
|
<div><?= $serverEntity->getTitle() ?></div>
|
||||||
|
<div><?= $serverEntity->getIP() ?></div>
|
||||||
|
<div><?= $serverEntity->getOS() ?></div>
|
||||||
|
</td>
|
||||||
|
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||||
|
'serverinfo_uid' => $serverEntity->getPK(),
|
||||||
|
'types' => SERVERPART['ALL_PARTTYPES'],
|
||||||
|
'template' => 'part_detail'
|
||||||
|
]) ?>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
@ -7,6 +7,10 @@
|
|||||||
<a href="/admin"><?= ICONS["HOME"] ?> Main</a>
|
<a href="/admin"><?= ICONS["HOME"] ?> Main</a>
|
||||||
</div>
|
</div>
|
||||||
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?>
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?>
|
||||||
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/board'); ?>
|
||||||
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/customer'); ?>
|
||||||
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/equipment'); ?>
|
||||||
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/part'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="menu_button">메뉴열기</div>
|
<div id="menu_button">메뉴열기</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,12 +1,3 @@
|
|||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<a href="/admin/user"><?= ICONS['MEMBER'] ?> 계정 관리</a>
|
<a href="/admin/user"><?= ICONS['MEMBER'] ?> 계정 관리</a>
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/traffic"><?= ICONS['SETUP'] ?> 트래픽 관리</a>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/collector"><?= ICONS['SETUP'] ?> 수집 관리</a>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/mylog"><?= ICONS['SETUP'] ?> 로그 관리</a>
|
|
||||||
</div>
|
</div>
|
||||||
14
app/Views/layouts/admin/left_menu/board.php
Normal file
14
app/Views/layouts/admin/left_menu/board.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<h2 class="accordion-header">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#flush-board" aria-expanded="true"
|
||||||
|
aria-controls="flush-board"><b><?= ICONS['DEVICE'] ?>게시판관리 </b>
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div id="flush-board" class="accordion-collapse collapse" aria-labelledby="flush-board">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/board?category=<?= BOARD['CATEGORY']['NOTICE'] ?>"><?= ICONS['SERVICE_ITEM_LINE'] ?>공지사항</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/board?category=<?= BOARD['CATEGORY']['REQUESTTASK'] ?>"><?= ICONS['SERVICE_ITEM_SERVER'] ?>요청업무</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
17
app/Views/layouts/admin/left_menu/customer.php
Normal file
17
app/Views/layouts/admin/left_menu/customer.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<h2 class="accordion-header">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#flush-client" aria-expanded="false"
|
||||||
|
aria-controls="flush-client"><b><?= ICONS['CLOUD'] ?> 고객관리 </b>
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div id="flush-client" class="accordion-collapse collapse" aria-labelledby="flush-client">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/customer/client"><?= ICONS['SIGNPOST'] ?>고객정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/customer/service"><?= ICONS['SERVICE'] ?> 서비스내역</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/customer/payment?status=<?= STATUS['UNPAID'] ?>"><?= ICONS['PAYMENT'] ?> 결제내역</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
14
app/Views/layouts/admin/left_menu/equipment.php
Normal file
14
app/Views/layouts/admin/left_menu/equipment.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<h2 class="accordion-header">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#flush-equipment" aria-expanded="true"
|
||||||
|
aria-controls="flush-equipment"><b><?= ICONS['DEVICE'] ?> 장비관리 </b>
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div id="flush-equipment" class="accordion-collapse collapse" aria-labelledby="flush-equipment">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/equipment/line"><?= ICONS['SERVICE_ITEM_LINE'] ?>회선정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/equipment/server"><?= ICONS['SERVICE_ITEM_SERVER'] ?>Server정보</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
29
app/Views/layouts/admin/left_menu/part.php
Normal file
29
app/Views/layouts/admin/left_menu/part.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<h2 class="accordion-header">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#flush-part" aria-expanded="true"
|
||||||
|
aria-controls="flush-part"><b><?= ICONS['DEVICE'] ?> 파트관리 </b>
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div id="flush-part" class="accordion-collapse collapse" aria-labelledby="flush-part">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/switch"><?= ICONS['SETUP'] ?>SWITCH정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/ip"><?= ICONS['SERVICE_ITEM_IP'] ?>IP정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/cs"><?= ICONS['SERVICE_ITEM_DEFENCE'] ?>CS정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/cpu"><?= ICONS['SERVER_ITEM_CPU'] ?>CPU정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/ram"><?= ICONS['SERVER_ITEM_RAM'] ?>RAM정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/disk"><?= ICONS['SERVER_ITEM_DISK'] ?>DISK정보</a>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-item">
|
||||||
|
<a href="/admin/part/software"><?= ICONS['SERVER_ITEM_SOFTWARE'] ?>Software정보</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,8 +1,56 @@
|
|||||||
<!-- top start -->
|
<!-- top start -->
|
||||||
|
<style>
|
||||||
|
/* dropdown 크기 및 스크롤 개선 */
|
||||||
|
#noticeList {
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<nav class="navbar navbar-expand-lg fixed-top" style="background-color:#E7E7E7; border-top:1px solid darkgray; border-bottom:1px solid darkgray;">
|
<nav class="navbar navbar-expand-lg fixed-top" style="background-color:#E7E7E7; border-top:1px solid darkgray; border-bottom:1px solid darkgray;">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<nav class="nav"><a class="navbar-brand" href="/admin">Traffic Monitor 관리</a></nav>
|
<nav class="nav"><a class="navbar-brand" href="/admin">DBMS 관리</a></nav>
|
||||||
<ul class="nav justify-content-center"></ul>
|
<ul class="nav justify-content-center">
|
||||||
|
<li class="nav-item"><?= view_cell("\App\Cells\SearchCell::client", []) ?></li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<?= form_open("/admin/search", ['method' => 'GET', 'class' => 'd-flex gap-2']) ?>
|
||||||
|
<input type="text" name="keyword" placeholder="고객명/IP/서버명/기타 검색" id="search_keyword" class="form-control" />
|
||||||
|
<button type="submit" class="btn btn-default border border-dark"><?= ICONS['SEARCH'] ?></button>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||||
|
<!-- 🔔 공지 영역 -->
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="noticeDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
🔔 공지사항 <span id="notice-count" class="badge bg-danger">0</span>
|
||||||
|
</a>
|
||||||
|
<ol class="dropdown-menu dropdown-menu-end" aria-labelledby="noticeDropdown" id="noticeList">
|
||||||
|
<li class="dropdown-item text-muted">불러오는 중...</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- 🔔 공지 영역 -->
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||||
|
<!-- 🔔 업무요청 영역 -->
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="requesttaskDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
🔔 업무요청 <span id="requesttask-count" class="badge bg-danger">0</span>
|
||||||
|
</a>
|
||||||
|
<ol class="dropdown-menu dropdown-menu-end" aria-labelledby="requesttaskDropdown" id="requesttaskList">
|
||||||
|
<li class="dropdown-item text-muted">불러오는 중...</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- 🔔 업무요청 영역 -->
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||||
|
📋:클립보드COPY , 📌:실서비스서버 , ✔️:대체서버->실서비스서버 교체 , 🔄:대체서버등록 , <?= ICONS['MONTH'] ?>:월비용 , <?= ICONS['ONETIME'] ?>:일회성<BR>
|
||||||
|
<?= ICONS['SERVER_ITEM_SWITCH'] ?>:스위치 , <?= ICONS['SERVER_ITEM_IP'] ?>:IP , <?= ICONS['SERVER_ITEM_OS'] ?>:OS , <?= ICONS['SERVER_ITEM_SOFTWARE'] ?>:소프트웨어 , <?= ICONS['SERVER_ITEM_CS'] ?>:CS ,
|
||||||
|
<?= ICONS['SERVER_ITEM_CPU'] ?>:CPU , <?= ICONS['SERVER_ITEM_RAM'] ?>:RAM , <?= ICONS['SERVER_ITEM_DISK'] ?>:DISK
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<ul class="nav justify-content-end">
|
<ul class="nav justify-content-end">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<?php if ($viewDatas['authContext']->isLoggedIn()): ?>
|
<?php if ($viewDatas['authContext']->isLoggedIn()): ?>
|
||||||
@ -33,4 +81,65 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<script>
|
||||||
|
//전체검색용
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const params = new URLSearchParams(location.search);
|
||||||
|
const keyword = params.get('keyword');
|
||||||
|
if (keyword)
|
||||||
|
document.querySelector('input[name="keyword"]').value = keyword;
|
||||||
|
});
|
||||||
|
//공지사항용
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
async function loadNotices() {
|
||||||
|
try {
|
||||||
|
const res = await fetch("/admin/board/notice?category=<?= BOARD['CATEGORY']['NOTICE'] ?>");
|
||||||
|
const notices = await res.json();
|
||||||
|
const notice_list = document.getElementById("noticeList");
|
||||||
|
const notice_count = document.getElementById("notice-count");
|
||||||
|
notice_list.innerHTML = "";
|
||||||
|
if (notices.length === 0) {
|
||||||
|
notice_list.innerHTML = '<li class="dropdown-item text-muted">공지 없음</li>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
notice_count.innerHTML = notices.length;
|
||||||
|
notices.forEach(n => {
|
||||||
|
const item = document.createElement("li");
|
||||||
|
item.classList.add("dropdown-item");
|
||||||
|
item.innerHTML = `<small class="text-muted">[${n.user}/${n.created_at}]</small> ${n.title}<br>`;
|
||||||
|
notice_list.appendChild(item);
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.error("공지 불러오기 실패:", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function loadrequesttasks() {
|
||||||
|
try {
|
||||||
|
const res = await fetch("/admin/board/reqeusttask?category=<?= BOARD['CATEGORY']['REQUESTTASK'] ?>");
|
||||||
|
const requesttasks = await res.json();
|
||||||
|
const requesttask_list = document.getElementById("requesttaskList");
|
||||||
|
const requesttask_count = document.getElementById("requesttask-count");
|
||||||
|
requesttask_list.innerHTML = "";
|
||||||
|
if (requesttasks.length === 0) {
|
||||||
|
requesttask_list.innerHTML = '<li class="dropdown-item text-muted">업무요청 없음</li>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requesttask_count.innerHTML = requesttasks.length;
|
||||||
|
requesttasks.forEach(n => {
|
||||||
|
const item = document.createElement("li");
|
||||||
|
item.classList.add("dropdown-item");
|
||||||
|
item.innerHTML = `<small class="text-muted">[${n.user}/${n.created_at}]</small> ${n.title}<br>`;
|
||||||
|
requesttask_list.appendChild(item);
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.error("공지 불러오기 실패:", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadNotices(); // 최초 로드
|
||||||
|
loadrequesttasks(); // 최초 로드
|
||||||
|
setInterval(loadNotices, 10000); // 10초마다 갱신
|
||||||
|
setInterval(loadrequesttasks, 10000); // 10초마다 갱신
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- top end -->
|
||||||
@ -10,10 +10,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="nav justify-content-end">
|
<ul class="nav justify-content-end">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<?php if ($viewDatas['isLoggedIn']): ?>
|
<?php if ($viewDatas['authContext']->isLoggedIn()): ?>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
<button type="button" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
<b><?= ICONS['LOGIN'] . $viewDatas['myAuthName'] ?></b>
|
<b><?= ICONS['LOGIN'] . $viewDatas['authContext']->getName() ?></b>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-end">
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
<li><?= form_label(
|
<li><?= form_label(
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"modify",
|
"modify",
|
||||||
[
|
[
|
||||||
"class" => "dropdown-item form-label-sm",
|
"class" => "dropdown-item form-label-sm",
|
||||||
"data-src" => "/user/modify/" . $viewDatas['myAuthUID'],
|
"data-src" => "/admin/user/profile/" . $viewDatas['authContext']->getUID(),
|
||||||
"data-bs-toggle" => "modal",
|
"data-bs-toggle" => "modal",
|
||||||
"data-bs-target" => "#modal_action_form"
|
"data-bs-target" => "#modal_action_form"
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user