Automation init...4
This commit is contained in:
parent
d35a2124b8
commit
29cbb53e04
@ -176,7 +176,6 @@ define('ICONS', [
|
||||
'FLAG' => '<i class="bi bi-send"></i>',
|
||||
'SEARCH' => '<i class="bi bi-search"></i>',
|
||||
'EXCEL' => '<img src="/images/common/excel.png"/>',
|
||||
'HOME' => '<i class="bi bi-house-door-fill"></i>',
|
||||
'PLAY' => '<i class="bi bi-play-fill"></i>',
|
||||
'CART' => '<i class="bi bi-cart4"></i>',
|
||||
'CARD' => '<i class="bi bi-credit-card"></i>',
|
||||
|
||||
@ -36,6 +36,7 @@ $routes->group('cloudflare', ['namespace' => 'App\Controllers\Cloudflare'], func
|
||||
$routes->group('account', function ($routes) {
|
||||
$routes->get('/', 'AccountController::index');
|
||||
$routes->get('create', 'AccountController::create_form');
|
||||
$routes->post('create', 'AccountController::create');
|
||||
});
|
||||
$routes->group('zone', function ($routes) {
|
||||
$routes->get('/', 'ZoneController::index');
|
||||
|
||||
@ -26,8 +26,8 @@ abstract class MVController extends CommonController
|
||||
throw new \Exception(__FUNCTION__ . "에서 {$field}의 데이터가 array가 아닙니다.\n" . var_export($temps, true));
|
||||
}
|
||||
$options = [
|
||||
["" => lang($this->class_name . '.label.' . $field) . ' 선택'],
|
||||
lang($this->class_name . '.' . strtoupper($field)),
|
||||
"" => lang($this->class_name . '.label.' . $field) . ' 선택',
|
||||
...lang($this->class_name . '.' . strtoupper($field)),
|
||||
];
|
||||
break;
|
||||
}
|
||||
@ -87,10 +87,10 @@ abstract class MVController extends CommonController
|
||||
protected function validateFormData(): void
|
||||
{
|
||||
//변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요
|
||||
$validation = \Config\Services::validation();
|
||||
$validation = service('validation');
|
||||
$validation->setRules($this->getModel()->getFieldRules($this->fields));
|
||||
if (!$validation->withRequest($this->request)->run()) {
|
||||
throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $this->validator->getErrors()));
|
||||
throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $validation->getErrors()));
|
||||
}
|
||||
}
|
||||
//전송된 데이터
|
||||
|
||||
@ -37,16 +37,17 @@ class Account extends MyCloudflare
|
||||
// ]
|
||||
protected function getArrayByResult($result): array
|
||||
{
|
||||
$formDatas[$this->getMyStorage()->getPKField()] = $result->id;
|
||||
$formDatas[$this->getMyStorage()->getPKField()] = $result->id;
|
||||
$formDatas[$this->getMyStorage()->getTitleField()] = $result->name;
|
||||
$formDatas['type'] = $result->type;
|
||||
$formDatas['status'] = 'use';
|
||||
$formDatas['updated_at'] = $result->created_on;
|
||||
$formDatas['created_at'] = $result->created_on;
|
||||
$formDatas['type'] = $result->type;
|
||||
$formDatas['status'] = 'use';
|
||||
$formDatas['updated_at'] = $result->created_on;
|
||||
$formDatas['created_at'] = $result->created_on;
|
||||
return $formDatas;
|
||||
}
|
||||
public function create(array $formDatas): AccountEntity
|
||||
{
|
||||
throw new \Exception(var_dump($formDatas));
|
||||
//Socket용
|
||||
$cf = $this->getMySocket()->request($formDatas['apikey'])
|
||||
->post('accounts', [
|
||||
@ -59,7 +60,7 @@ class Account extends MyCloudflare
|
||||
}
|
||||
//Storage용
|
||||
$formDatas = $this->getArrayByResult($cf->result);
|
||||
$entity = $this->getMyStorage()->create($formDatas);
|
||||
$entity = $this->getMyStorage()->create($formDatas);
|
||||
log_message("notice", "Account::" . __FUNCTION__ . "=> 작업을 완료하였습니다.");
|
||||
return $entity;
|
||||
}
|
||||
|
||||
@ -24,25 +24,19 @@
|
||||
|
||||
<body>
|
||||
<div class="layout">
|
||||
<div class="row">
|
||||
<div class="head col-12">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/head'); ?>
|
||||
</div>
|
||||
<div class="head">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/head'); ?>
|
||||
</div>
|
||||
<div class="row" style="background-color:white;">
|
||||
<div class="left_menu col-1">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu'); ?>
|
||||
</div>
|
||||
<div class="content col-11">
|
||||
<div class="center">
|
||||
<div class="left_menu"><?= $this->include($viewDatas['layout']['path'] . '/left_menu'); ?></div>
|
||||
<div class="content">
|
||||
<div class="header"><?= $this->include('templates/admin/header'); ?></div>
|
||||
<div class="center"><?= $this->renderSection('content') ?></div>
|
||||
<div class="footer"><?= $this->include('templates/admin/footer'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" row">
|
||||
<div class="tail col-12">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/tail'); ?>
|
||||
</div>
|
||||
<div class="tail">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/tail'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
<!-- left menu start -->
|
||||
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/admin/side_menu.js"></script>
|
||||
<div id="menu" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
|
||||
<div id="menu_button"><?= ICONS['MENU'] ?>메뉴</div>
|
||||
<div id="left_menu" class="shadow-lg rounded">
|
||||
<div class="accordion accordion-flush">
|
||||
<div class="accordion-item" style="background-color: #eaeaea;">
|
||||
<h2><a href=" /admin"><i class="fa fa-home"></i>Main</a></h2>
|
||||
</div>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/site'); ?>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/shoppingmall'); ?>
|
||||
<div id="left_menu" class="shadow-lg rounded" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
|
||||
<div id="accordion" class="accordion accordion-flush">
|
||||
<div class="accordion-item" style="background-color: #eaeaea;">
|
||||
<h2><a href=" /admin"><i class="fa fa-home"></i>Main</a></h2>
|
||||
</div>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/site'); ?>
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/shoppingmall'); ?>
|
||||
</div>
|
||||
<div id="menu_button">메뉴열기</div>
|
||||
</div>
|
||||
@ -5,23 +5,22 @@
|
||||
* Updated :
|
||||
------------------------------------------------------------ */
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
div.layout {
|
||||
body {
|
||||
height: 100vw; /* 화면 넓이의 100% */
|
||||
height: 100vh; /* 화면 높이의 100% */
|
||||
border: 1px solid red;
|
||||
background-color: #efefef;
|
||||
/* border:1px solid blue; */
|
||||
}
|
||||
|
||||
div.layout > div.row > div.head {
|
||||
div.layout > div.head {
|
||||
height: 51px;
|
||||
border: 1px solid blue;
|
||||
background-color: #e3f2fd;
|
||||
border: 1px solid gray;
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
div.layout > div.row > div.tail {
|
||||
div.layout > div.tail {
|
||||
height: 51px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
@ -31,34 +30,37 @@ div.layout > div.row > div.tail {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
div.layout > div.row > div.left_menu {
|
||||
padding-left: 10px;
|
||||
border: 1px solid green;
|
||||
div.layout > div.center > div.content {
|
||||
margin-top: 20px;
|
||||
margin-left: 25px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
div.layout > div.row > div.content > div.header {
|
||||
div.layout > div.center > div.content > div.header {
|
||||
/*content 헤더라인*/
|
||||
height: 50px;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
div.layout > div.row > div.content > div.header > ul.nav {
|
||||
div.layout > div.center > div.content > div.header > ul.nav {
|
||||
/*nav-tabs 헤더라인*/
|
||||
border-top: 1px solid red;
|
||||
border-left: 1px solid red;
|
||||
border-right: 1px solid red;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
border-top: 1px solid gray;
|
||||
border-left: 1px solid gray;
|
||||
border-right: 1px solid gray;
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
}
|
||||
div.layout > div.row > div.content > div.center {
|
||||
div.layout > div.center > div.content > div.center {
|
||||
/*content 부분*/
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
/* border: 1px solid red; */
|
||||
border-left: 1px solid red;
|
||||
border-right: 1px solid red;
|
||||
background-color: sivler;
|
||||
padding: 15px;
|
||||
/* border: 1px solid gray; */
|
||||
border-left: 1px solid gray;
|
||||
border-right: 1px solid gray;
|
||||
background-color: white;
|
||||
}
|
||||
div.layout > div.row > div.content div.footer {
|
||||
div.layout > div.center > div.content div.footer {
|
||||
/*content 하단라인*/
|
||||
height: 20px;
|
||||
border-bottom: 1px solid red;
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
border-left: 1px solid gray;
|
||||
border-right: 1px solid gray;
|
||||
border-bottom: 1px solid gray;
|
||||
border-radius: 0px 0px 15px 15px;
|
||||
}
|
||||
|
||||
@ -1,38 +1,34 @@
|
||||
div#menu {
|
||||
div#left_menu {
|
||||
position: fixed;
|
||||
margin-top: 10px;
|
||||
z-index: 100;
|
||||
width: 20px;
|
||||
border: 1px solid #e7e7e7;
|
||||
padding: 0px;
|
||||
}
|
||||
div#menu > div#menu_button {
|
||||
float: right;
|
||||
div#left_menu > div#menu_button {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: -20px;
|
||||
height: 100px;
|
||||
width: 20px;
|
||||
cursor: ew-resize;
|
||||
writing-mode: vertical-rl; /* 세로로 글자를 출력 */
|
||||
text-orientation: upright; /* 글자가 직립되도록 설정 */
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
border: 1px solid silver;
|
||||
background-color: #eaeaea;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div#menu > div#left_menu {
|
||||
z-index: 100;
|
||||
width: 160px;
|
||||
border: 1px solid silver;
|
||||
display: none;
|
||||
}
|
||||
div#menu > div#left_menu > div.accordion {
|
||||
div#left_menu > div.accordion {
|
||||
/* display:none; */
|
||||
background-color: white;
|
||||
width: 20px;
|
||||
display: none;
|
||||
}
|
||||
div#menu > div#left_menu > div.accordion > div.accordion-item:hover {
|
||||
div#left_menu > div.accordion > div.accordion-item:hover {
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
div#menu > div#left_menu > div.accordion > div.accordion-item > a {
|
||||
div#left_menu > div.accordion > div.accordion-item > a {
|
||||
padding-left: 10px;
|
||||
}
|
||||
div#menu > div#left_menu > div.accordion > div.accordion-collapse > a {
|
||||
div#left_menu > div.accordion > div.accordion-collapse > a {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
function sideMenuToggle (menu_id){
|
||||
var accordion = $(".accordion")[0];
|
||||
// alert(accordion.clientWidth);
|
||||
function sideMenuToggle(left_menu) {
|
||||
$accordion = $("#accordion")[0];
|
||||
if (accordion.clientWidth == 0){
|
||||
accordion.style.display = "block";
|
||||
$("#"+menu_id).css({ "width": '250px' })
|
||||
$("#button"+menu_id).html("메뉴닫기");
|
||||
$("#accordion").css({ "width": '160px' })
|
||||
$("#menu_button").html("메뉴닫기");
|
||||
}
|
||||
else {
|
||||
accordion.style.display = "none";
|
||||
$("#"+menu_id).css({"width":'28px'})
|
||||
$("#button"+menu_id).html("메뉴열기");
|
||||
$("#accordion").css({"width":'20px'})
|
||||
$("#menu_button").html("메뉴열기");
|
||||
}
|
||||
}//toggleMenu
|
||||
Loading…
Reference in New Issue
Block a user