trafficmonitor init...2

This commit is contained in:
choi.jh 2025-11-12 12:22:58 +09:00
parent c18a8bb859
commit 80d15919ed
8 changed files with 16 additions and 25 deletions

View File

@ -33,7 +33,7 @@ abstract class AdminController extends CommonController
protected function getTitle(): string
{
if ($this->_title === null) {
$this->_title = lang("{$this->service->getClassPaths()}.title");
$this->_title = lang("{$this->service->getClassPaths(false)}.title");
}
return $this->_title;
}

View File

@ -21,11 +21,11 @@ class CollectorController extends AdminController
}
protected function createDTO(array $formDatas): CollectorDTO
{
return parent::createDTO($formDatas);
return new CollectorDTO($formDatas);
}
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'];
parent::action_init_process($action);
switch ($action) {

View File

@ -21,7 +21,7 @@ class MylogController extends AdminController
}
protected function createDTO(array $formDatas): MylogDTO
{
return parent::createDTO($formDatas);
return new MylogDTO($formDatas);
}
protected function action_init_process(string $action): void
{

View File

@ -21,7 +21,7 @@ class TrafficController extends AdminController
}
protected function createDTO(array $formDatas): TrafficDTO
{
return parent::createDTO($formDatas);
return new TrafficDTO($formDatas);
}
protected function action_init_process(string $action): void
{

View File

@ -21,7 +21,7 @@ class UserController extends AdminController
}
protected function createDTO(array $formDatas): UserDTO
{
return parent::createDTO($formDatas);
return new UserDTO($formDatas);
}
//Action작업관련
protected function action_init_process(string $action): void

View File

@ -35,7 +35,7 @@ class CollectorForm extends CommonForm
foreach (service('trafficservice')->getEntities() as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle();
}
$options[$field]['options'] = $tempOptions;
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);

View File

@ -10,26 +10,17 @@ class UserForm extends CommonForm
{
parent::__construct();
}
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
// protected function getValidationRule(string $field, string $rule): array
// {
// switch ($field) {
// default:
// $label = parent::getFormFieldLabel($field, $label);
// case 'role':
// $field = "{$field}.*";
// break;
// default:
// return parent::getValidationRule($field, $rule);
// // break;
// }
// return $label;
// return array($field, $rule);
// }
public function getFormRule(string $action, string $field): string
{

View File

@ -1,8 +1,8 @@
<?php
return [
'title' => "수집정보",
'title' => "트랙픽수집정보",
'label' => [
'trafficinfo_uid' => "고객명",
'trafficinfo_uid' => "트래픽정보",
'in' => "IN Kbit/s",
'out' => "OUT Kbit/s",
'raw_in' => "IN Octets",