Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
d72eff0c
Commit
d72eff0c
authored
Jan 25, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил в конфиг отчетов параметры запросов к API
parent
66fc9497
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
feeds.global.php
src/config/autoload/feeds.global.php
+4
-0
Cabinet.php
src/src/App/Action/User/Cabinet.php
+1
-2
Statistics.php
src/src/App/Model/Statistics.php
+4
-4
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+6
-6
No files found.
src/config/autoload/feeds.global.php
View file @
d72eff0c
...
...
@@ -29,6 +29,8 @@ return [
'reports'
=>
[
'common'
=>
[
'title'
=>
'Сводный отчет'
,
'type'
=>
'feed_stat'
,
'fields'
=>
[
'Views'
,
'Clicks'
,
'Orders'
,
'OrderSum'
],
'cats'
=>
[
'Views'
=>
'Показы'
,
'Clicks'
=>
'Клики'
,
...
...
@@ -39,6 +41,8 @@ return [
],
'transaction'
=>
[
'title'
=>
'Транзакции'
,
'type'
=>
'feed_stat'
,
'fields'
=>
[
'Views'
,
'Clicks'
,
'Orders'
,
'OrderSum'
],
'cats'
=>
[
'Views'
=>
'Показы'
,
'Clicks'
=>
'Клики'
,
...
...
src/src/App/Action/User/Cabinet.php
View file @
d72eff0c
...
...
@@ -130,13 +130,12 @@ class Cabinet extends Common
}
$data
[
'feeds'
]
=
$feeds
;
$data
[
'report'
]
=
$report_type
;
$data
[
'
current_
report'
]
=
$report_type
;
$data
[
'current_period'
]
=
$current_period
;
$data
[
'dates'
]
=
$dates
;
$data
[
'periodStats'
]
=
$periodStats
;
//$data['campaignStats'] = $campaignStats;
$data
[
'report_conf'
]
=
$report_conf
;
//$data['cats'] = $report_conf['cats'];
$data
[
'reports_list'
]
=
$reports_list
;
$data
[
'periods_list'
]
=
$this
->
container
->
get
(
'config'
)[
'feed_conf'
][
'periods_list'
];
$data
[
'colors_active_lines'
]
=
$this
->
container
->
get
(
'config'
)[
'feed_conf'
][
'colors_active_lines'
];
...
...
src/src/App/Model/Statistics.php
View file @
d72eff0c
...
...
@@ -38,12 +38,12 @@ class Statistics
// Параметры запроса по типу отчета:
switch
(
$report_type
)
{
case
'common'
:
$type
=
'feed_stat'
;
$fields
=
[
'Views'
,
'Clicks'
,
'Orders'
,
'OrderSum
'
];
$type
=
$report_conf
[
'type'
]
;
$fields
=
$report_conf
[
'fields
'
];
break
;
case
'transaction'
:
$type
=
'feed_stat'
;
$fields
=
[
'Views'
,
'Clicks'
,
'Orders'
,
'OrderSum
'
];
$type
=
$report_conf
[
'type'
]
;
$fields
=
$report_conf
[
'fields
'
];
break
;
}
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
d72eff0c
...
...
@@ -61,7 +61,7 @@ if (!$error) {
//$campaignStats = $this->campaignStats;
$current_period
=
$this
->
current_period
;
$dates
=
$this
->
dates
;
$
report
=
$this
->
report
;
$
current_report
=
$this
->
current_
report
;
$report_conf
=
$this
->
report_conf
;
$report_title
=
$report_conf
[
'title'
];
$report_cats
=
$report_conf
[
'cats'
];
...
...
@@ -69,7 +69,7 @@ if (!$error) {
$periods_list
=
$this
->
periods_list
;
$colors_active_lines
=
$this
->
colors_active_lines
;
$data_request_link
=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
$report
]);
$data_request_link
=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
$
current_
report
]);
$system_link
=
$this
->
url
(
'adm.system.actions'
);
}
...
...
@@ -125,7 +125,7 @@ if (!$error) {
</button>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenu"
>
<?php
foreach
(
$reports_list
as
$report_name
=>
$report_title
)
:
?>
<li><a
href=
"
<?=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
$report_name
])
?>
"
<?php
if
(
$report
==
$report_name
)
:
?>
class=
"current"
<?php
endif
;
?>
report=
"
<?=
$report_name
?>
"
>
<?=
_t
(
$report_title
)
?>
</a></li>
<li><a
href=
"
<?=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
$report_name
])
?>
"
<?php
if
(
$
current_
report
==
$report_name
)
:
?>
class=
"current"
<?php
endif
;
?>
report=
"
<?=
$report_name
?>
"
>
<?=
_t
(
$report_title
)
?>
</a></li>
<?php
endforeach
;
?>
</ul>
</div>
...
...
@@ -157,7 +157,7 @@ if (!$error) {
</div>
<?php
/* График */
?>
<?php
if
(
$report
==
'common'
)
:
?>
<?php
if
(
$
current_
report
==
'common'
)
:
?>
<div
id=
"chart-graph-stat"
style=
"height: 370px;"
data-colors=
<?=
(
$colors_active_lines
?
json_encode
(
$colors_active_lines
)
:
''
)
?>
>
</div
>
<?php
endif
?>
...
...
@@ -168,7 +168,7 @@ if (!$error) {
<thead
class=
"metric sortable"
>
<tr>
<th>
<?php
if
(
$report
==
'common'
)
:
?>
<?php
if
(
$
current_
report
==
'common'
)
:
?>
<b
class=
"main-cat date selected"
>
<?=
_t
(
'Дата'
)
?>
</b>
<?php
/* ?>/ <b class="main-cat campaign"><?= _t('Кампания')?></b><?php */
?>
<?php
else
:
?>
...
...
@@ -177,7 +177,7 @@ if (!$error) {
</th>
<?php
foreach
(
$report_cats
as
$name
=>
$title
)
:
?>
<th>
<?php
if
(
$report
==
'common'
)
:
?>
<?php
if
(
$
current_
report
==
'common'
)
:
?>
<span
style=
"border-color:
<?=
$colors_active_lines
[
$name
]
?>
;"
>
<input
type=
"checkbox"
data-field=
"
<?=
$name
?>
"
checked
/>
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment