daemon-idc init
This commit is contained in:
parent
ab52c7787f
commit
4dde9cde70
@ -24,6 +24,8 @@ class Pager extends BaseConfig
|
|||||||
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
||||||
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
||||||
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
||||||
|
'bootstrap_full' => 'Pagers/bootstrap_full',
|
||||||
|
'bootstrap_simple' => 'Pagers/bootstrap_simple',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -41,4 +41,21 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
|||||||
$routes->post('batchjob_delete', 'UserController::batchjob_delete', ['filter' => 'authFilter:master']);
|
$routes->post('batchjob_delete', 'UserController::batchjob_delete', ['filter' => 'authFilter:master']);
|
||||||
$routes->get('download/(:alpha)', 'UserController::download/$1');
|
$routes->get('download/(:alpha)', 'UserController::download/$1');
|
||||||
});
|
});
|
||||||
|
$routes->group('search', function ($routes) {
|
||||||
|
$routes->get('/', 'SearchController::index');
|
||||||
|
});
|
||||||
|
$routes->group('board', function ($routes) {
|
||||||
|
$routes->get('/', 'BoardController::index');
|
||||||
|
$routes->get('create', 'BoardController::create_form');
|
||||||
|
$routes->post('create', 'BoardController::create');
|
||||||
|
$routes->get('modify/(:num)', 'BoardController::modify_form/$1');
|
||||||
|
$routes->post('modify/(:num)', 'BoardController::modify/$1');
|
||||||
|
$routes->get('view/(:num)', 'BoardController::view/$1');
|
||||||
|
$routes->get('delete/(:num)', 'BoardController::delete/$1');
|
||||||
|
$routes->get('toggle/(:num)/(:any)', 'BoardController::toggle/$1/$2');
|
||||||
|
$routes->post('batchjob', 'BoardController::batchjob');
|
||||||
|
$routes->post('batchjob_delete', 'BoardController::batchjob_delete');
|
||||||
|
$routes->get('download/(:alpha)', 'BoardController::download/$1');
|
||||||
|
$routes->get('latest/(:alpha)', 'BoardController::latest/$1');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
47
app/Controllers/Admin/SearchController.php
Normal file
47
app/Controllers/Admin/SearchController.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers\Admin;
|
||||||
|
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
|
class SearchController extends AdminController
|
||||||
|
{
|
||||||
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
parent::initController($request, $response, $logger);
|
||||||
|
if ($this->service === null) {
|
||||||
|
$this->service = service('customer_serviceservice');
|
||||||
|
}
|
||||||
|
$this->addActionPaths('service');
|
||||||
|
}
|
||||||
|
//Action작업관련
|
||||||
|
//기본 함수 작업
|
||||||
|
//Custom 추가 함수
|
||||||
|
protected function index_entities_process(array $entities = []): array
|
||||||
|
{
|
||||||
|
$keyword = $this->request->getGet('keyword'); // 검색어
|
||||||
|
if (!$keyword) {
|
||||||
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 [{$keyword}] 검색어가 지정되지 않았습니다. ");
|
||||||
|
}
|
||||||
|
//검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다.
|
||||||
|
$rows = service('equipment_serverservice')->getSearchServices($keyword);
|
||||||
|
$uids = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$uids[] = "'{$row->serviceinfo_uid}'";
|
||||||
|
}
|
||||||
|
if (count($uids) === 0) {
|
||||||
|
return $entities;
|
||||||
|
}
|
||||||
|
//서비스별 서버리스트
|
||||||
|
// $childServers = [];
|
||||||
|
foreach ($this->service->getEntities([sprintf("uid IN (%s)", implode(",", $uids)) => null]) as $entity) {
|
||||||
|
$entities[] = $entity;
|
||||||
|
// $childServers[$entity->getPK()] = $this->getService()->getServerService()->getEntities(['serviceinfo_uid' => $entity->getPK()]);
|
||||||
|
}
|
||||||
|
// $this->childServers = $childServers;
|
||||||
|
return $entities;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -87,39 +87,6 @@ UNLOCK TABLES;
|
|||||||
-- Table structure for table `clientinfo`
|
-- Table structure for table `clientinfo`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `clientinfo`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `clientinfo` (
|
|
||||||
`uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '고객정보',
|
|
||||||
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
|
|
||||||
`id` varchar(20) DEFAULT NULL,
|
|
||||||
`passwd` varchar(255) DEFAULT NULL,
|
|
||||||
`site` varchar(20) NOT NULL DEFAULT 'prime' COMMENT 'Site구분',
|
|
||||||
`role` varchar(50) NOT NULL DEFAULT 'user',
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
`phone` varchar(50) DEFAULT NULL,
|
|
||||||
`email` varchar(50) NOT NULL,
|
|
||||||
`history` text DEFAULT NULL COMMENT 'history',
|
|
||||||
`account_balance` int(11) NOT NULL DEFAULT 0 COMMENT '예치금',
|
|
||||||
`coupon_balance` int(11) NOT NULL DEFAULT 0 COMMENT '쿠폰수',
|
|
||||||
`point_balance` int(11) NOT NULL DEFAULT 0 COMMENT '포인트',
|
|
||||||
`status` varchar(20) NOT NULL DEFAULT 'available',
|
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
|
||||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
||||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`uid`),
|
|
||||||
UNIQUE KEY `unique_site_name` (`site`,`name`),
|
|
||||||
UNIQUE KEY `uk_id` (`id`),
|
|
||||||
KEY `FK_user_TO_clientinfo` (`user_uid`),
|
|
||||||
CONSTRAINT `FK_user_TO_clientinfo` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='고객정보';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `clientinfo`
|
|
||||||
--
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
|||||||
@ -165,7 +165,7 @@ abstract class CommonHelper
|
|||||||
if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) {
|
if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다.");
|
||||||
}
|
}
|
||||||
$value = !$value ? "" : "<a href=\"/admin/customer/client/detail/{$value}\">{$viewDatas['formOptions'][$field]['options'][$value]}</a>";
|
$value = !$value ? "" : "<a href=\"/admin/user/detail/{$value}\">{$viewDatas['formOptions'][$field]['options'][$value]}</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'role':
|
case 'role':
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?= form_dropdown('client', $searchCellDatas['options'], $searchCellDatas['selected'], [
|
<?= form_dropdown('client', $searchCellDatas['options'], $searchCellDatas['selected'], [
|
||||||
'class' => 'form-select w-auto d-inline-block select-field',
|
'class' => 'form-select w-auto d-inline-block select-field',
|
||||||
'onchange' => "if(this.value) window.location.href='/admin/customer/client/detail/' + this.value;"
|
'onchange' => "if(this.value) window.location.href='/admin/user/detail/' + this.value;"
|
||||||
]) ?>
|
]) ?>
|
||||||
@ -8,9 +8,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/base'); ?>
|
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/base'); ?>
|
||||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/board'); ?>
|
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/board'); ?>
|
||||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/customer'); ?>
|
|
||||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/equipment'); ?>
|
|
||||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/part'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="menu_button">메뉴열기</div>
|
<div id="menu_button">메뉴열기</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +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>
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/payment?status=<?= STATUS['UNPAID'] ?>"><?= ICONS['PAYMENT'] ?> 결제내역</a>
|
|
||||||
</div>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<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['FOLDER'] ?> 고객관리 </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['CLIENT'] ?>고객정보</a>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/customer/service"><?= ICONS['SERVICE'] ?> 서비스내역</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<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['FOLDER'] ?> 장비관리 </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 class="accordion-item">
|
|
||||||
<a href="/admin/equipment/chassis"><?= ICONS['SETUP'] ?>서버샷시정보</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
<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['FOLDER'] ?> 파트관리 </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['SERVER_ITEM_SWITCH'] ?>SWITCH정보</a>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/part/ip"><?= ICONS['SERVER_ITEM_IP'] ?>IP정보</a>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item">
|
|
||||||
<a href="/admin/part/cs"><?= ICONS['SERVER_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>
|
|
||||||
@ -8,67 +8,11 @@
|
|||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<span class="nav-item navbar-brand" aria-current="page">
|
<span class="nav-item navbar-brand" aria-current="page">
|
||||||
<h4> <?= \App\Helpers\IconHelper::ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?? "" ?> </h4>
|
<h4> <?= ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?? "" ?> </h4>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
||||||
href="/admin/customer/client">고객정보</a></span>
|
href="/admin/customer/client">고객정보</a></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/customer/wallet/account">예치금정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/customer/wallet/coupon">쿠폰정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/customer/wallet/point">포인트정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/customer/service">서비스정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/payment?status=<?= STATUS['UNPAID'] ?>">결제정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/equipment/server">서버정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/equipment/line">회선정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/part/ip">IP정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/part/switch">SWITCH정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/part/cs">CS정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/equipment/chassis">서버샷시정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/part/cpu">CPU정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a href="/admin/part/ram">RAM정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/part/disk">DISK정보</a></span>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<span class="nav-link active" aria-current="page" style="cursor:pointer;"><a
|
|
||||||
href="/admin/part/software">SOFTWARE정보</a></span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
Loading…
Reference in New Issue
Block a user