dbmsv3 init...1
This commit is contained in:
parent
4b64262234
commit
318bc09494
@ -15,13 +15,45 @@ class ServerCell extends EquipmentCell
|
||||
//서비스 방식에 따른 서비스별 Count
|
||||
final public function totalCountDashboard(array $params): string
|
||||
{
|
||||
$totalCounts = $this->getService()->getTotalServiceCount(array_key_exists('where', $params) ? $params['where'] : []);
|
||||
$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(),
|
||||
'label' => $params['where']['serviceinfo.site'],
|
||||
'totalCounts' => $totalCounts,
|
||||
]
|
||||
]);
|
||||
|
||||
@ -31,17 +31,9 @@ class BoardController extends AdminController
|
||||
//전달값정의
|
||||
$this->getService()->setFormDatas($this->request->getGet());
|
||||
$formDatas = $this->getSErvice()->getFormDatas();
|
||||
$datas = [];
|
||||
foreach (
|
||||
$this->getService()->latest(
|
||||
[
|
||||
'category' => array_key_exists('category', $formDatas) && $formDatas['category'] ? $formDatas['category'] : 'notice'
|
||||
],
|
||||
array_key_exists('limit', $formDatas) ? $formDatas['limit'] : 3
|
||||
) as $entity
|
||||
) {
|
||||
$datas[] = $entity->toArray();
|
||||
}
|
||||
return $this->response->setJSON($datas);
|
||||
return $this->response->setJSON($this->getService()->latest(
|
||||
['category' => array_key_exists('category', $formDatas) && $formDatas['category'] ? $formDatas['category'] : 'notice'],
|
||||
array_key_exists('limit', $formDatas) ? $formDatas['limit'] : 3
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,8 +74,7 @@ class Home extends AdminController
|
||||
$this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval);
|
||||
$this->newServiceCount = count($this->newServiceEntities);
|
||||
//서비스별 미납 Count
|
||||
$totalUnPaidCount = 0;
|
||||
$totalUnPaidAmount = 0;
|
||||
$totalUnPaidCount = $totalUnPaidAmount = 0;
|
||||
foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid') as $key => $datas) {
|
||||
$totalUnPaidCount += $datas['cnt'];
|
||||
$totalUnPaidAmount += $datas['amount'];
|
||||
|
||||
@ -62,29 +62,11 @@ class SearchController extends AdminController
|
||||
if (!$keyword) {
|
||||
throw new \Exception("[{$keyword}] 검색어가 지정되지 않았습니다. ");
|
||||
}
|
||||
$db = \Config\Database::connect();
|
||||
$builder = $db->table('serverinfo s')
|
||||
->distinct()
|
||||
->select('s.serviceinfo_uid AS serviceinfo_uid')
|
||||
->join('clientinfo c', 'c.uid = s.clientinfo_uid')
|
||||
->join('serverpartinfo sp', 'sp.clientinfo_uid = c.uid', 'left')
|
||||
->groupStart()
|
||||
->like('c.name', $keyword, 'both', null, true) // escape=true
|
||||
->orLike('s.code', $keyword, 'both', null, true)
|
||||
->orLike('s.ip', $keyword, 'both', null, true)
|
||||
->orLike('s.title', $keyword, 'both', null, true)
|
||||
->orLike('sp.title', $keyword, 'both', null, true)
|
||||
->groupEnd();
|
||||
// SQL 확인용 (실제 운영에서는 주석 처리)
|
||||
// echo $builder->getCompiledSelect();
|
||||
// exit;
|
||||
$results = $builder->get()->getResultArray();
|
||||
if (!count($results)) {
|
||||
return [];
|
||||
}
|
||||
//검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다.
|
||||
$rows = $this->getServerService()->getSearchServices($keyword);
|
||||
$uids = [];
|
||||
foreach ($results as $result) {
|
||||
$uids[] = "'{$result['serviceinfo_uid']}'";
|
||||
foreach ($rows as $row) {
|
||||
$uids[] = "'{$row->serviceinfo_uid}'";
|
||||
}
|
||||
//서비스별 서버리스트
|
||||
$childServers = [];
|
||||
|
||||
@ -10,4 +10,8 @@ class BoardEntity extends CommonEntity
|
||||
const PK = Model::PK;
|
||||
const TITLE = Model::TITLE;
|
||||
const DEFAULT_STATUS = STATUS['AVAILABLE'];
|
||||
final public function getUserUID(): int|null
|
||||
{
|
||||
return $this->attributes['user_uid'] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ return [
|
||||
'title' => "게시판정보",
|
||||
'label' => [
|
||||
'uid' => "번호",
|
||||
'user_uid' => "작성자",
|
||||
'category' => "구분",
|
||||
'title' => "제목",
|
||||
'content' => "내용",
|
||||
|
||||
@ -14,6 +14,7 @@ class BoardModel extends CommonModel
|
||||
protected $returnType = BoardEntity::class;
|
||||
protected $allowedFields = [
|
||||
"uid",
|
||||
"user_uid",
|
||||
"category",
|
||||
"title",
|
||||
"content",
|
||||
@ -34,6 +35,9 @@ class BoardModel extends CommonModel
|
||||
case "title":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "user_uid":
|
||||
$rule = "required|number";
|
||||
break;
|
||||
case "content":
|
||||
$rule = "permit_empty|string";
|
||||
break;
|
||||
@ -43,4 +47,10 @@ class BoardModel extends CommonModel
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
final public function create(array $formDatas): BoardEntity
|
||||
{
|
||||
// 관리자 UID는 현재 인증된 사용자로 설정
|
||||
$formDatas['user_uid'] = $this->getMyAuth()->getUIDByAuthInfo();
|
||||
return parent::create($formDatas);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ class BoardService extends CommonService
|
||||
public function getFormFilters(): array
|
||||
{
|
||||
return [
|
||||
'user_uid',
|
||||
'category',
|
||||
'status',
|
||||
];
|
||||
@ -33,18 +34,29 @@ class BoardService extends CommonService
|
||||
return [
|
||||
'category',
|
||||
'title',
|
||||
'user_uid',
|
||||
'status',
|
||||
'created_at',
|
||||
];
|
||||
}
|
||||
public function getBatchjobFields(): array
|
||||
{
|
||||
return ['category', 'status'];
|
||||
return ['user_uid', 'category', 'status'];
|
||||
}
|
||||
public function latest(array $where, int $limit = 3): array
|
||||
{
|
||||
//관리자정보
|
||||
$userEntities = $this->getUserService()->getEntities();
|
||||
$this->getModel()->limit($limit);
|
||||
return $this->getEntities($where);
|
||||
$datas = [];
|
||||
foreach ($this->getEntities($where) as $entity) {
|
||||
$datas[] = [
|
||||
'title' => "<label for=\"view\" data-src=\"/admin/board/view/{$entity->getPK()}\" data-bs-toggle=\"modal\" data-bs-target=\" #modal_action_form\" class=\"text-primary form-label-sm\">{$entity->getTitle()}</label>",
|
||||
'created_at' => date('Y-m-d H:m', strtotime($entity->getCreatedAT())),
|
||||
'user' => $userEntities[$entity->getUserUID()]->getTitle(),
|
||||
];
|
||||
}
|
||||
return $datas;
|
||||
}
|
||||
//기본 기능부분
|
||||
}
|
||||
|
||||
@ -191,14 +191,14 @@ abstract class CommonService
|
||||
throw new \Exception($message);
|
||||
}
|
||||
} //
|
||||
public function getUserService(): UserService
|
||||
final public function getUserService(): UserService
|
||||
{
|
||||
if (!$this->_userService) {
|
||||
$this->_userService = new UserService();
|
||||
}
|
||||
return $this->_userService;
|
||||
}
|
||||
public function getClientService(): ClientService
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService();
|
||||
|
||||
@ -11,7 +11,6 @@ use App\Services\PaymentService;
|
||||
|
||||
class ClientService extends CustomerService
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
private ?PaymentService $_paymentService = null;
|
||||
@ -58,13 +57,6 @@ class ClientService extends CustomerService
|
||||
{
|
||||
return ['site', 'role', 'status'];
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService();
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
final public function getServiceService(): ServiceService
|
||||
{
|
||||
if ($this->_serviceService === null) {
|
||||
|
||||
@ -122,25 +122,26 @@ class ServerService extends EquipmentService implements ServiceInterface
|
||||
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
];
|
||||
$rows = $this->getModel()
|
||||
->select("serverinfo.type,
|
||||
$builder = $this->getModel()->select("serverinfo.type,
|
||||
COUNT(CASE WHEN serviceinfo.location = 'chiba' THEN 1 END) AS chiba,
|
||||
COUNT(CASE WHEN serviceinfo.location = 'tokyo' THEN 1 END) AS tokyo,
|
||||
COUNT(CASE WHEN serviceinfo.location IN ('chiba', 'tokyo') THEN 1 END) AS summary")
|
||||
->join('serviceinfo', 'serviceinfo.uid = serverinfo.serviceinfo_uid') // JOIN 조건
|
||||
->join('serviceinfo', 'serviceinfo.uid = serverinfo.serviceinfo_uid')
|
||||
->where($where)
|
||||
->groupBy('serverinfo.type')
|
||||
->get()
|
||||
->getResult();
|
||||
->builder();
|
||||
// echo $builder->getCompiledSelect(false) . "<BR>"; //초기화 없이 SQL만 보고 싶을 때: getCompiledSelect(false) ← 꼭 false!
|
||||
$rows = $builder->get()->getResult();
|
||||
// dd($rows);
|
||||
foreach ($rows as $row) {
|
||||
$totalCounts[$row->type]['chiba'] = $row->chiba;
|
||||
$totalCounts[$row->type]['tokyo'] = $row->tokyo;
|
||||
$totalCounts[$row->type]['summary'] = $row->summary;
|
||||
$totalCounts[$row->type]['summary'] += $row->summary;
|
||||
$totalCounts['chiba_summary'] += $row->chiba;
|
||||
$totalCounts['tokyo_summary'] += $row->tokyo;
|
||||
$totalCounts['all_summary'] = $totalCounts['chiba_summary'] + $totalCounts['tokyo_summary'];
|
||||
@ -148,6 +149,27 @@ class ServerService extends EquipmentService implements ServiceInterface
|
||||
// dd($totalCounts);
|
||||
return $totalCounts;
|
||||
}
|
||||
//검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다.
|
||||
final public function getSearchServices(string $keyword): array
|
||||
{
|
||||
$builder = $this->getModel()->distinct()->select('serverinfo.serviceinfo_uid AS serviceinfo_uid')
|
||||
->join('clientinfo', 'clientinfo.uid = serverinfo.clientinfo_uid')
|
||||
->join('serverpartinfo', 'serverpartinfo.clientinfo_uid = clientinfo.uid', 'left')
|
||||
->groupStart()
|
||||
->like('clientinfo.name', $keyword, 'both', null, true) // escape=true
|
||||
->orLike('serverinfo.code', $keyword, 'both', null, true)
|
||||
->orLike('serverinfo.ip', $keyword, 'both', null, true)
|
||||
->orLike('serverinfo.title', $keyword, 'both', null, true)
|
||||
->orLike('serverpartinfo.title', $keyword, 'both', null, true)
|
||||
->groupEnd()
|
||||
->builder();
|
||||
// echo $builder->getCompiledSelect(false); //초기화 없이 SQL만 보고 싶을 때: getCompiledSelect(false) ← 꼭 false!
|
||||
$rows = $builder->get()->getResult();
|
||||
if (!count($rows)) {
|
||||
return [];
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
//서비스정보 설정
|
||||
public function setService(string $action, ServiceEntity $serviceEntity, array $serviceFormDatas): ServiceEntity
|
||||
{
|
||||
|
||||
@ -6,13 +6,11 @@ use App\Entities\Equipment\ServerPartEntity;
|
||||
use App\Entities\Part\CSEntity;
|
||||
use App\Helpers\Part\CSHelper;
|
||||
use App\Models\Part\CSModel;
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
|
||||
class CSService extends PartService
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
public function __construct()
|
||||
@ -58,13 +56,6 @@ class CSService extends PartService
|
||||
{
|
||||
return ['type', 'status'];
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService();
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
public function getServiceService(): ServiceService
|
||||
{
|
||||
if (!$this->_serviceService) {
|
||||
|
||||
@ -8,7 +8,6 @@ use App\Entities\Part\IPEntity;
|
||||
use App\Helpers\Part\IPHelper;
|
||||
use App\Interfaces\Equipment\ServerInterface;
|
||||
use App\Models\Part\IPModel;
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\LineService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
@ -17,7 +16,6 @@ use App\Services\Part\PartService;
|
||||
class IPService extends PartService implements ServerInterface
|
||||
{
|
||||
private ?LineService $_lineService = null;
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
public function __construct()
|
||||
@ -67,13 +65,6 @@ class IPService extends PartService implements ServerInterface
|
||||
}
|
||||
return $this->_lineService;
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService();
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
public function getServiceService(): ServiceService
|
||||
{
|
||||
if (!$this->_serviceService) {
|
||||
|
||||
@ -78,20 +78,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
'invoice' => '청구서 발행',
|
||||
];
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService();
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
final public function getUSerService(): UserService
|
||||
{
|
||||
if (!$this->_userService) {
|
||||
$this->_userService = new UserService();
|
||||
}
|
||||
return $this->_userService;
|
||||
}
|
||||
final public function getServiceService(): ServiceService
|
||||
{
|
||||
if ($this->_serviceService === null) {
|
||||
|
||||
@ -64,33 +64,27 @@
|
||||
</style>
|
||||
</head>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="card dashboard-card bg-blue">
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-blue card-clickable" onclick="document.location.href='/admin/board?category=requesttask';">
|
||||
<div class=" card-body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<i class="fa fa-comments fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-4"><i class="fa fa-comments fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge">0</div>
|
||||
<div class="bg-blue">새 쪽지 알림</div>
|
||||
<div class="bg-blue">요청업무 알림</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_blue_font">자세히보기</span>
|
||||
<i class="fa fa-arrow-circle-right bg_blue_font"></i>
|
||||
<div class=" card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_blue_font">자세히보기</span><i class="fa fa-arrow-circle-right bg_blue_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-yellow card-clickable" onclick="document.location.href='/admin/customer/service';">
|
||||
<div class="card-body">
|
||||
<div class=" card-body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<i class="fa fa-plus-square-o fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-4"><i class="fa fa-plus-square-o fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge"><?= $viewDatas['newServiceCount'] ?></div>
|
||||
<div>최근 <?= $viewDatas['interval'] ?>일간 신규서버수</div>
|
||||
@ -98,48 +92,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_yellow_font">자세히보기</span>
|
||||
<i class="fa fa-arrow-circle-right bg_yellow_font"></i>
|
||||
<span class="bg_yellow_font">자세히보기</span><i class="fa fa-arrow-circle-right bg_yellow_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="card dashboard-card bg-green">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<i class="fa fa-tasks fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge">0</div>
|
||||
<div>요청업무 알림</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_green_font">자세히보기</span>
|
||||
<i class="fa fa-arrow-circle-right bg_green_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-red card-clickable" onclick="document.location.href='/admin/customer/payment';">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<i class="fa fa-support fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-4"><i class="fa fa-support fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="fs-2"><?= number_format($viewDatas['totalUnPaidCount']) ?>건/<?= number_format($viewDatas['totalUnPaidAmount']) ?>원</div>
|
||||
<div class="huge"><?= number_format($viewDatas['totalUnPaidCount']) ?>건/<?= number_format($viewDatas['totalUnPaidAmount']) ?>원</div>
|
||||
<div><?= date("Y-m-d") ?> 금일 기준 미납 서비스</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_red_font">자세히보기</span>
|
||||
<i class="fa fa-arrow-circle-right bg_red_font"></i>
|
||||
<a href="/admin/customer/payment'"><span class="bg_red_font">자세히보기</span></a><i class="fa fa-arrow-circle-right bg_red_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -8,52 +8,38 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<table class="table table-bordered table-hover table-align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
<th rowspan="2" class="bg-light">사이트</th>
|
||||
<th colspan="2" class="bg-light">일반</th>
|
||||
<th colspan="2" class="bg-light">방어</th>
|
||||
<th colspan="2" class="bg-light">전용</th>
|
||||
<th colspan="2" class="bg-light">대체</th>
|
||||
<th colspan="2" class="bg-light">VPN</th>
|
||||
<th colspan="2" class="bg-light">이벤트</th>
|
||||
<th colspan="2" class="bg-light">테스트</th>
|
||||
<th colspan="3" class="bg-light">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'PRIME']]) ?>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'ITSOLUTION']]) ?>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'GDIDC']]) ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">합계</th>
|
||||
</tr>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard") ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,17 +1,42 @@
|
||||
<tr class="text-center">
|
||||
<td><?= $serviceCellDatas['label'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['normal']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['normal']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['defence']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['defence']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['dedicated']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['alternative']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['alternative']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['tokyo_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['chiba_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['all_summary'] ?></td>
|
||||
</tr>
|
||||
<?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>
|
||||
@ -24,9 +24,9 @@
|
||||
<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>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="noticeDropdown" id="noticeList">
|
||||
<ol class="dropdown-menu dropdown-menu-end" aria-labelledby="noticeDropdown" id="noticeList">
|
||||
<li class="dropdown-item text-muted">불러오는 중...</li>
|
||||
</ul>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- 🔔 공지 영역 -->
|
||||
@ -93,7 +93,7 @@
|
||||
notices.forEach(n => {
|
||||
const item = document.createElement("li");
|
||||
item.classList.add("dropdown-item");
|
||||
item.innerHTML = `<small class="text-muted">[${n.created_at.date.replace(/\.\d+$/, '')}]</small> ${n.title}<br>`;
|
||||
item.innerHTML = `<small class="text-muted">[${n.user}/${n.created_at}]</small> ${n.title}<br>`;
|
||||
notice_list.appendChild(item);
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user