Skip to content
Snippets Groups Projects
Commit a14b4a0d authored by Sanjeevani Avasthi's avatar Sanjeevani Avasthi
Browse files

Replace Sports.js

parent 1d724e6d
Branches
No related tags found
No related merge requests found
...@@ -3,11 +3,13 @@ var counts = []; ...@@ -3,11 +3,13 @@ var counts = [];
var sports_by_city = []; var sports_by_city = [];
var counts_by_city = []; var counts_by_city = [];
var baseUrl = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
var response_value = function(){ var response_value = function(){
$.ajax({ $.ajax({
async: false, async: false,
url: 'http://172.26.131.9/couchdb/live_demo2/_design/sports_count/_view/sports_count?group=true&group_level=1', url: baseUrl+'/couchdb/live_demo2/_design/sports_count/_view/sports_count?group=true&group_level=1',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
headers: { headers: {
...@@ -43,7 +45,7 @@ function setByCity(){ ...@@ -43,7 +45,7 @@ function setByCity(){
$.ajax({ $.ajax({
async: false, async: false,
crossDomain: true, crossDomain: true,
url: 'http://172.26.131.9/couchdb/live_demo2/_design/sports_count/_view/sports_count?group=true&group_level=2', url: baseUrl+'/couchdb/live_demo2/_design/sports_count/_view/sports_count?group=true&group_level=2',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
headers: { headers: {
...@@ -101,7 +103,7 @@ function sendSport(){ ...@@ -101,7 +103,7 @@ function sendSport(){
$.ajax({ $.ajax({
async: false, async: false,
crossDomain: true, crossDomain: true,
url: 'http://172.26.131.9/couchdb/live_demo2/_design/retweets_followers/_view/retweets_followers?group=true', url: baseUrl+'/couchdb/live_demo2/_design/retweets_followers/_view/retweets_followers?group=true',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
headers: { headers: {
...@@ -164,7 +166,7 @@ function networkGraph() ...@@ -164,7 +166,7 @@ function networkGraph()
$.ajax({ $.ajax({
async: false, async: false,
crossDomain: true, crossDomain: true,
url: 'http://172.26.131.9/couchdb/live_demo/_design/replies/_view/replies?group=true', url: baseUrl+'/couchdb/live_demo/_design/replies/_view/replies?group=true',
type: 'get', type: 'get',
dataType: 'json', dataType: 'json',
headers: { headers: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment