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 c14a8453
authored
2021-06-04 17:57:59 +0300
by
Скуратович Александр
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
статистика
1 parent
e56f9384
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
controllers/SiteController.php
controllers/SiteController.php
View file @
c14a845
...
@@ -68,11 +68,16 @@ class SiteController extends Controller
...
@@ -68,11 +68,16 @@ class SiteController extends Controller
//var_dump(Yii::$app->user->isGuest);
//var_dump(Yii::$app->user->isGuest);
//var_dump(Yii::$app->user->identity);
//var_dump(Yii::$app->user->identity);
$statistics
=
[
'csv_date'
=>
''
];
$statistics
=
[
'csv_date'
=>
''
];
$statistics
[
'c_status'
]
=
Host
::
find
()
->
select
([
'COUNT(*) AS cnt'
,
'wis_status'
])
->
groupBy
(
'wis_status'
)
->
all
();
$statistics
[
'c_status'
]
=
(
new
yii\db\Query
())
->
select
([
'COUNT(*) AS cnt'
,
'wis_status'
])
->
from
(
'{{%host}}'
)
->
groupBy
([
'csv_date'
])
->
all
();
$csv
=
Host
::
find
()
->
select
([
'csv_date'
])
->
orderBy
(
'csv_date ASC'
)
->
one
();
$csv
=
Host
::
find
()
->
select
([
'csv_date'
])
->
orderBy
(
'csv_date ASC'
)
->
one
();
if
(
$csv
)
{
if
(
$csv
)
{
$statistics
[
'csv_date'
]
=
$csv
[
'csv_date'
];
$statistics
[
'csv_date'
]
=
$csv
[
'csv_date'
];
}
}
return
$this
->
render
(
'index'
,
compact
(
'statistics'
));
return
$this
->
render
(
'index'
,
compact
(
'statistics'
));
}
}
...
...
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