Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Alto
/
rkn
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 7ffe17b9
authored
2021-06-07 11:51:06 +0300
by
Скуратович Александр
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
правильный просмотр статусов
1 parent
01b11978
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
models/Host.php
views/host/view.php
models/Host.php
View file @
7ffe17b
...
@@ -57,7 +57,7 @@ class Host extends \yii\db\ActiveRecord
...
@@ -57,7 +57,7 @@ class Host extends \yii\db\ActiveRecord
{
{
return
[
return
[
[[
'domain'
],
'required'
],
[[
'domain'
],
'required'
],
[
'
status_id
'
,
'in'
,
'range'
=>
array_keys
(
self
::
getWisStatus
())],
[
'
wis_status
'
,
'in'
,
'range'
=>
array_keys
(
self
::
getWisStatus
())],
[[
'created_at'
,
'csv_date'
,
'wis_date'
,
'domain_expire'
],
'safe'
],
[[
'created_at'
,
'csv_date'
,
'wis_date'
,
'domain_expire'
],
'safe'
],
[[
'wis_status'
,
'tix'
,
'status'
],
'integer'
],
[[
'wis_status'
,
'tix'
,
'status'
],
'integer'
],
[[
'domain'
],
'string'
,
'max'
=>
256
],
[[
'domain'
],
'string'
,
'max'
=>
256
],
...
...
views/host/view.php
View file @
7ffe17b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\widgets\DetailView
;
use
app\models\Host
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model app\models\Host */
/* @var $model app\models\Host */
...
@@ -34,9 +35,24 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -34,9 +35,24 @@ $this->params['breadcrumbs'][] = $this->title;
'created_at'
,
'created_at'
,
'csv_date'
,
'csv_date'
,
'wis_date'
,
'wis_date'
,
'wis_status'
,
[
'attribute'
=>
'wis_status'
,
'filter'
=>
Host
::
getWisStatus
(),
'format'
=>
'raw'
,
'value'
=>
function
(
$model
)
{
return
$model
::
getWisStatus
(
$model
->
wis_status
);
},
],
'tix'
,
'tix'
,
'status'
[
'attribute'
=>
'status'
,
'filter'
=>
Host
::
getStatus
(),
'format'
=>
'raw'
,
'value'
=>
function
(
$model
)
{
return
$model
::
getStatus
(
$model
->
status
);
},
],
],
],
])
?>
])
?>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment