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
27f4c3c9
Commit
27f4c3c9
authored
Nov 09, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Серия графиков, правки в табл.
parent
82178927
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
46 deletions
+41
-46
styles-feeds-stat.css
src/public/css/styles-feeds-stat.css
+6
-0
script-feeds-stat-charts.js
src/public/js/script-feeds-stat-charts.js
+11
-1
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+2
-21
script-feeds-stat.js
src/public/js/script-feeds-stat.js
+1
-1
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+21
-23
No files found.
src/public/css/styles-feeds-stat.css
View file @
27f4c3c9
...
@@ -136,3 +136,9 @@
...
@@ -136,3 +136,9 @@
text-align
:
center
;
text-align
:
center
;
}
}
.b-table_wrapp
{
display
:
none
;
margin-top
:
30px
;
}
src/public/js/script-feeds-stat-charts.js
View file @
27f4c3c9
...
@@ -90,6 +90,7 @@ $(document).ready(function(){
...
@@ -90,6 +90,7 @@ $(document).ready(function(){
ChartStat
:
{
ChartStat
:
{
DateStat
:
function
(
dataLineChartStat
)
{
DateStat
:
function
(
dataLineChartStat
)
{
var
activeLines
=
[
'shows'
,
'clicks'
,
'transactions'
,
'salemoney'
,
'admoney'
];
activeLine
=
'shows'
;
activeLine
=
'shows'
;
activeDays
=
'day'
;
activeDays
=
'day'
;
console
.
log
(
'AAA DateStat: '
,
dataLineChartStat
);
console
.
log
(
'AAA DateStat: '
,
dataLineChartStat
);
...
@@ -116,10 +117,19 @@ $(document).ready(function(){
...
@@ -116,10 +117,19 @@ $(document).ready(function(){
axes
=
{};
axes
=
{};
// Определяем названия в легенде:
// Определяем названия в легенде:
/*
dataColumnsTemp.push(['data'].concat(dataValue));
dataColumnsTemp.push(['data'].concat(dataValue));
names['data'] = activeLine;
names['data'] = activeLine;
types['data'] = 'area-spline';
types['data'] = 'area-spline';
axes['data'] = 'y';
axes['data'] = 'y';
*/
for
(
var
i
=
1
;
i
<=
activeLines
.
length
;
i
++
)
{
dataColumnsTemp
.
push
([
'data'
+
i
].
concat
(
dataLineChartStat
[
activeLines
[
i
-
1
]]));
names
[
'data'
+
i
]
=
activeLines
[
i
-
1
],
types
[
'data'
+
i
]
=
'area-spline'
;
axes
[
'data'
+
i
]
=
'y'
;
}
console
.
log
(
'AAA dataColumnsTemp '
,
dataColumnsTemp
);
console
.
log
(
'AAA dataColumnsTemp '
,
dataColumnsTemp
);
...
@@ -165,7 +175,7 @@ $(document).ready(function(){
...
@@ -165,7 +175,7 @@ $(document).ready(function(){
value
:
valueFormat
value
:
valueFormat
}
}
},
},
legend
:
{
show
:
fals
e
},
legend
:
{
show
:
tru
e
},
});
});
// Подсвечиваем Определяем индексы воскресенья:
// Подсвечиваем Определяем индексы воскресенья:
...
...
src/public/js/script-feeds-stat-table.js
View file @
27f4c3c9
...
@@ -2,19 +2,11 @@ $(document).ready(function(){
...
@@ -2,19 +2,11 @@ $(document).ready(function(){
var
var
$table
=
$
(
'#table-line'
),
$table
=
$
(
'#table-line'
),
$tableHeader
=
$
(
'<thead>'
),
$tableContent
=
$
(
'<tbody>'
),
$tableContent
=
$
(
'<tbody>'
),
$tableBody
=
$table
.
find
(
'tbody'
).
first
(),
$tableBody
=
$table
.
find
(
'tbody'
).
first
(),
activeLinesSwitchSelector
=
'.b-filter__switch.current-metric:not(.metric-data) .b-filter__switch-item'
,
$activeLinesSwitch
=
$
(
activeLinesSwitchSelector
),
selectorTableTimeSwitch
=
'.b-filter__switch.time-table .m-filter__switch-item_active'
,
selectorActiveData
=
'.b-filter__switch.metric-data .m-filter__switch-item_active'
,
timeTableType
,
activeLines
=
[],
activeLines
=
[],
currentActiveLine
,
currentActiveLine
,
metric
,
dataTable
;
dataTable
,
bySiteState
=
false
;
function
valueFormat
(
value
)
function
valueFormat
(
value
)
{
{
...
@@ -83,10 +75,6 @@ $(document).ready(function(){
...
@@ -83,10 +75,6 @@ $(document).ready(function(){
dataTable
[
item
]
=
[];
dataTable
[
item
]
=
[];
});
});
$table
.
removeClass
(
'compare'
);
$
(
'thead'
,
$table
).
removeClass
(
'sortable'
);
if
(
dataLineChartStat
.
type
==
'interval'
)
{
if
(
dataLineChartStat
.
type
==
'interval'
)
{
RenderInterval
(
dataLineChartStat
);
RenderInterval
(
dataLineChartStat
);
}
}
...
@@ -108,14 +96,7 @@ $(document).ready(function(){
...
@@ -108,14 +96,7 @@ $(document).ready(function(){
})
})
return
(
listSites
.
length
==
0
)
?
false
:
listSites
;
return
(
listSites
.
length
==
0
)
?
false
:
listSites
;
},
},
// Устанавливаем состояние "по сайту" (при клике на сайт в таблице)
SetSiteState
:
function
(
state
)
{
bySiteState
=
state
;
},
// Получаем состояние "по сайту"
GetSiteState
:
function
()
{
return
bySiteState
;
},
}
}
});
});
...
...
src/public/js/script-feeds-stat.js
View file @
27f4c3c9
...
@@ -28,7 +28,7 @@ $(document).ready(function(){
...
@@ -28,7 +28,7 @@ $(document).ready(function(){
var
var
$chartStat
=
$
(
'#chart-graph-stat'
),
$chartStat
=
$
(
'#chart-graph-stat'
),
$chartTable
=
$
(
'#
b-content__traffic-table
'
),
$chartTable
=
$
(
'#
table-stat
'
),
$chartStatInfo
=
$
(
'.chart-graph-stat-info'
),
$chartStatInfo
=
$
(
'.chart-graph-stat-info'
),
$chartStatError
=
$
(
'.chart-graph-stat-error'
),
$chartStatError
=
$
(
'.chart-graph-stat-error'
),
$chartStatLoading
=
$
(
'.chart-graph-stat-loading'
),
$chartStatLoading
=
$
(
'.chart-graph-stat-loading'
),
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
27f4c3c9
...
@@ -133,34 +133,32 @@ $dates = $this->dates;
...
@@ -133,34 +133,32 @@ $dates = $this->dates;
<div
class=
"message"
></div>
<div
class=
"message"
></div>
</div>
</div>
<?php
/* График */
?>
<div
id=
"chart-graph-stat"
style=
"height: 370px;"
></div>
<div
id=
"chart-graph-stat"
style=
"height: 370px;"
></div>
<div
class=
"chart-graph-stat-loading"
></div>
<div
class=
"chart-graph-stat-loading"
></div>
<?php
/* Таблица */
?>
<?php
/* Таблица */
?>
<
section
id=
"b-content__traffic-table"
class=
"b-content__traffic metrics"
style=
"display: none;
"
>
<
div
id=
"table-stat"
class=
"b-table_wrapp
"
>
<div
class=
"b-content__loading"
></div>
<div
class=
"b-content__loading"
></div>
<div
class=
"wrapp"
>
<table
id=
"table-line"
class=
"table table-striped admin"
>
<table
id=
"table-line"
class=
"table table-striped admin"
>
<thead
class=
"metric sortable"
>
<thead
class=
"metric"
>
<tr
data-metric=
"
<?=
$metric
?>
"
<?=
$current_style
?>
>
<tr
data-metric=
"
<?=
$metric
?>
"
<?=
$current_style
?>
>
<th>
<?=
_t
(
'Дата/Компания'
)
?>
</th>
<th>
<?=
_t
(
'Дата/Компания'
)
?>
</th>
<?php
foreach
([
'shows'
,
'clicks'
,
'transactions'
,
'salemoney'
,
'admoney'
]
as
$name
)
:
?>
<?php
foreach
([
'shows'
,
'clicks'
,
'transactions'
,
'salemoney'
,
'admoney'
]
as
$name
)
:
?>
<th>
<th>
<b
id=
"
<?=
$name
?>
"
>
<b
id=
"
<?=
$name
?>
"
>
<?=
_t
(
$name
)
?>
<?=
_t
(
$name
)
?>
<b
class=
"arrow asc"
>
∧
</b>
<b
class=
"arrow asc"
>
∧
</b>
<b
class=
"arrow desc"
>
∨
</b>
<b
class=
"arrow desc"
>
∨
</b>
</b>
</b>
</th>
</th>
<?php
endforeach
?>
<?php
endforeach
?>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
</section>
...
...
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