trafficmonitor init...2
This commit is contained in:
parent
c18a8bb859
commit
80d15919ed
@ -33,7 +33,7 @@ abstract class AdminController extends CommonController
|
|||||||
protected function getTitle(): string
|
protected function getTitle(): string
|
||||||
{
|
{
|
||||||
if ($this->_title === null) {
|
if ($this->_title === null) {
|
||||||
$this->_title = lang("{$this->service->getClassPaths()}.title");
|
$this->_title = lang("{$this->service->getClassPaths(false)}.title");
|
||||||
}
|
}
|
||||||
return $this->_title;
|
return $this->_title;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,11 +21,11 @@ class CollectorController extends AdminController
|
|||||||
}
|
}
|
||||||
protected function createDTO(array $formDatas): CollectorDTO
|
protected function createDTO(array $formDatas): CollectorDTO
|
||||||
{
|
{
|
||||||
return parent::createDTO($formDatas);
|
return new CollectorDTO($formDatas);
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
$fields = ['trafficinfo_uid', 'in', 'out', 'raw_in', 'raw_out',];
|
$fields = ['trafficinfo_uid', 'in', 'out', 'raw_in', 'raw_out'];
|
||||||
$filters = ['trafficinfo_uid'];
|
$filters = ['trafficinfo_uid'];
|
||||||
parent::action_init_process($action);
|
parent::action_init_process($action);
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class MylogController extends AdminController
|
|||||||
}
|
}
|
||||||
protected function createDTO(array $formDatas): MylogDTO
|
protected function createDTO(array $formDatas): MylogDTO
|
||||||
{
|
{
|
||||||
return parent::createDTO($formDatas);
|
return new MylogDTO($formDatas);
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class TrafficController extends AdminController
|
|||||||
}
|
}
|
||||||
protected function createDTO(array $formDatas): TrafficDTO
|
protected function createDTO(array $formDatas): TrafficDTO
|
||||||
{
|
{
|
||||||
return parent::createDTO($formDatas);
|
return new TrafficDTO($formDatas);
|
||||||
}
|
}
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class UserController extends AdminController
|
|||||||
}
|
}
|
||||||
protected function createDTO(array $formDatas): UserDTO
|
protected function createDTO(array $formDatas): UserDTO
|
||||||
{
|
{
|
||||||
return parent::createDTO($formDatas);
|
return new UserDTO($formDatas);
|
||||||
}
|
}
|
||||||
//Action작업관련
|
//Action작업관련
|
||||||
protected function action_init_process(string $action): void
|
protected function action_init_process(string $action): void
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class CollectorForm extends CommonForm
|
|||||||
foreach (service('trafficservice')->getEntities() as $entity) {
|
foreach (service('trafficservice')->getEntities() as $entity) {
|
||||||
$tempOptions[$entity->getPK()] = $entity->getTitle();
|
$tempOptions[$entity->getPK()] = $entity->getTitle();
|
||||||
}
|
}
|
||||||
$options[$field]['options'] = $tempOptions;
|
$options['options'] = $tempOptions;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$options = parent::getFormOption($field, $options);
|
$options = parent::getFormOption($field, $options);
|
||||||
|
|||||||
@ -10,26 +10,17 @@ class UserForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
protected function getValidationRule(string $field, string $rule): array
|
// protected function getValidationRule(string $field, string $rule): array
|
||||||
{
|
|
||||||
switch ($field) {
|
|
||||||
case 'role':
|
|
||||||
$field = "{$field}.*";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return parent::getValidationRule($field, $rule);
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
return array($field, $rule);
|
|
||||||
}
|
|
||||||
// public function getFormFieldLabel(string $field, ?string $label = null): string
|
|
||||||
// {
|
// {
|
||||||
// switch ($field) {
|
// switch ($field) {
|
||||||
// default:
|
// case 'role':
|
||||||
// $label = parent::getFormFieldLabel($field, $label);
|
// $field = "{$field}.*";
|
||||||
// break;
|
// break;
|
||||||
|
// default:
|
||||||
|
// return parent::getValidationRule($field, $rule);
|
||||||
|
// // break;
|
||||||
// }
|
// }
|
||||||
// return $label;
|
// return array($field, $rule);
|
||||||
// }
|
// }
|
||||||
public function getFormRule(string $action, string $field): string
|
public function getFormRule(string $action, string $field): string
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'title' => "수집정보",
|
'title' => "트랙픽수집정보",
|
||||||
'label' => [
|
'label' => [
|
||||||
'trafficinfo_uid' => "고객명",
|
'trafficinfo_uid' => "트래픽정보",
|
||||||
'in' => "IN Kbit/s",
|
'in' => "IN Kbit/s",
|
||||||
'out' => "OUT Kbit/s",
|
'out' => "OUT Kbit/s",
|
||||||
'raw_in' => "IN Octets",
|
'raw_in' => "IN Octets",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user