Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vmusicchart-cms
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
vmusicchart-cms
Commits
0a48c48f
Commit
0a48c48f
authored
May 26, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tích hợp lấy data từ elasticsearch
parent
dcdfb3f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
CmsRanking.php
application/controllers/backend/CmsRanking.php
+4
-20
history_chart_view.php
...ion/views/backend/ajax/cms_ranking/history_chart_view.php
+1
-0
No files found.
application/controllers/backend/CmsRanking.php
View file @
0a48c48f
...
...
@@ -358,9 +358,9 @@ class CmsRanking extends CI_Controller
// Ghi log
$this
->
actionlog_model
->
add
(
'SHOW_HISTORY'
,
'Xem lịch sử lượt nghe'
,
null
,
null
,
$track_id
);
$histories
=
$this
->
crawler_listen_history_model
->
getByTrackId
(
$track_id
);
$data
=
[];
$histories
=
$this
->
crawler_listen_history_model
->
getByTrackId
(
$track_id
);
if
(
$histories
)
{
foreach
(
$histories
as
$key
=>
$track
)
{
$data
[
$key
][
'date'
]
=
$track
[
'date_log'
];
...
...
@@ -370,24 +370,8 @@ class CmsRanking extends CI_Controller
}
}
/*$histories_view = $this->crawler_listen_history_model->getByTrackIdFromView($track_id);
$date_list = $histories_view[0]['date_log_list'];
$zing_list = $histories_view[0]['zing_count_list'];
$nct_list = $histories_view[0]['nct_count_list'];
$keeng_list = $histories_view[0]['keeng_count_list'];
//
$array_date = explode(',', $date_list);
$array_zing = explode(',', $zing_list);
$array_nct = explode(',', $nct_list);
$array_keeng = explode(',', $keeng_list);
//
$data = [];
foreach ($array_date as $key => $val) {
$data[$key]['date'] = $val;
$data[$key]['zing'] = intval($array_zing[$key]);
$data[$key]['nct'] = intval($array_nct[$key]);
$data[$key]['keeng'] = intval($array_keeng[$key]);
}*/
/*$url = 'http://edupham.com/api/v1/vmusicchart/get-listen-history-by-track-id?track_id=1644&type=chart';
$data = file_get_contents($url);*/
$response
[
'response'
]
=
$data
;
$response
[
'track_title'
]
=
$track_title
;
...
...
application/views/backend/ajax/cms_ranking/history_chart_view.php
View file @
0a48c48f
...
...
@@ -19,6 +19,7 @@
// Add data
//chart.data = generateChartData();
//chart.data =
<?php
//echo ($response) ?>;
chart
.
data
=
<?
php
echo
json_encode
(
$response
)
?>
;
// Create axes
...
...
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