MOdified : Removed the unused old charts code
This commit is contained in:
parent
cd51b9720b
commit
b5474a4224
1 changed files with 0 additions and 107 deletions
|
@ -558,113 +558,6 @@ $.ajax({
|
|||
}
|
||||
};
|
||||
|
||||
var ChartsWorker = function(options){
|
||||
this.options = options;
|
||||
|
||||
this.getUsersStatistics = function(callback){
|
||||
var self = this;
|
||||
var ajaxCall = $.ajax({
|
||||
url: "charts/reports/dashboard/get_users_data.php",
|
||||
type: "POST",
|
||||
data:"videos=videos",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
callback.call(self, data);
|
||||
},
|
||||
error: function() {
|
||||
//alert('error');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.getVideosStatistics = function(callback){
|
||||
var self = this;
|
||||
var ajaxCall = $.ajax({
|
||||
url: "charts/reports/dashboard/get_videos_data.php",
|
||||
type: "POST",
|
||||
data:"videos=videos",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
callback.call(self, data);
|
||||
},
|
||||
error: function() {
|
||||
//alert('error');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.getFlaggedStatistics = function(callback){
|
||||
var self = this;
|
||||
var ajaxCall = $.ajax({
|
||||
url: "charts/reports/dashboard/get_flagged_objects_data.php",
|
||||
type: "POST",
|
||||
data:"videos=videos",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
callback.call(self, data);
|
||||
},
|
||||
error: function() {
|
||||
//alert('error');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.getOverallStatistics = function(callback){
|
||||
var self = this;
|
||||
var ajaxCall = $.ajax({
|
||||
url: "charts/reports/dashboard/get_total_status_data.php",
|
||||
type: "POST",
|
||||
data:"videos=videos",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
callback.call(self, data);
|
||||
},
|
||||
error: function() {
|
||||
//alert('error');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
var chartsWorker = new ChartsWorker(options);
|
||||
|
||||
chartsWorker.getUsersStatistics(function(data){
|
||||
var today = data.today;
|
||||
var week = data.this_week;
|
||||
var month = data.this_month;
|
||||
$.plot("#nusers #weekly_users", [week] , this.options);
|
||||
$.plot("#nusers #monthly_users", [month] , this.options);
|
||||
$.plot("#nusers #daily_users", [today], this.options);
|
||||
});
|
||||
|
||||
chartsWorker.getVideosStatistics(function(data){
|
||||
var today = data.today;
|
||||
var week = data.this_week;
|
||||
var month = data.this_month;
|
||||
$.plot("#mvideos #weekly_users", [week] , this.options);
|
||||
$.plot("#mvideos #monthly_users", [month] , this.options);
|
||||
$.plot("#mvideos #daily_users", [today], this.options);
|
||||
});
|
||||
|
||||
chartsWorker.getFlaggedStatistics(function(data){
|
||||
var today = data.today;
|
||||
var week = data.this_week;
|
||||
var month = data.this_month;
|
||||
$.plot("#fobjects #weekly_users", [week] , this.options);
|
||||
$.plot("#fobjects #monthly_users", [month] , this.options);
|
||||
$.plot("#fobjects #daily_users", [today], this.options);
|
||||
});
|
||||
|
||||
chartsWorker.getOverallStatistics(function(data){
|
||||
var today = data.today;
|
||||
var week = data.this_week;
|
||||
var month = data.this_month;
|
||||
$.plot("#statistics #weekly_stats", [week] , this.options);
|
||||
$.plot("#statistics #monthly_stats", [month] , this.options);
|
||||
$.plot("#statistics #daily_stats", [today], this.options);
|
||||
});
|
||||
|
||||
// $.plot("#placeholder", data, options);
|
||||
|
||||
var iteration = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue