dashboard: In prod, we don't use ../
This commit is contained in:
parent
094deeab51
commit
a9ba784e58
@ -12,7 +12,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
ev.since = now - ev.time;
|
ev.since = now - ev.time;
|
||||||
});
|
});
|
||||||
|
|
||||||
$http.get("../events.json").then(function(response) {
|
$http.get("./events.json").then(function(response) {
|
||||||
// Don't make anything if the page hasn't changed
|
// Don't make anything if the page hasn't changed
|
||||||
if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers()["last-modified"])
|
if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
@ -90,7 +90,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
var refreshSceneInterval = $interval(refreshScene, 900);
|
var refreshSceneInterval = $interval(refreshScene, 900);
|
||||||
|
|
||||||
var refreshSettings = function() {
|
var refreshSettings = function() {
|
||||||
$http.get("../settings.json").then(function(response) {
|
$http.get("./settings.json").then(function(response) {
|
||||||
$rootScope.recvTime(response);
|
$rootScope.recvTime(response);
|
||||||
response.data.start = new Date(response.data.start);
|
response.data.start = new Date(response.data.start);
|
||||||
response.data.end = new Date(response.data.end);
|
response.data.end = new Date(response.data.end);
|
||||||
@ -103,7 +103,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
var refreshSettingsInterval = $interval(refreshSettings, 4200);
|
var refreshSettingsInterval = $interval(refreshSettings, 4200);
|
||||||
|
|
||||||
var refreshChallengeInfo = function() {
|
var refreshChallengeInfo = function() {
|
||||||
$http.get("../challenge.json").then(function(response) {
|
$http.get("./challenge.json").then(function(response) {
|
||||||
$rootScope.challenge = response.data;
|
$rootScope.challenge = response.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -112,14 +112,14 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
|
|
||||||
|
|
||||||
$rootScope.refresh = function() {
|
$rootScope.refresh = function() {
|
||||||
$http.get("../my.json").then(function(response) {
|
$http.get("./my.json").then(function(response) {
|
||||||
if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers()["last-modified"])
|
if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastmyetag = response.headers()["last-modified"];
|
$scope.lastmyetag = response.headers()["last-modified"];
|
||||||
|
|
||||||
$scope.my = response.data;
|
$scope.my = response.data;
|
||||||
});
|
});
|
||||||
$http.get("../settings.json").then(function(response) {
|
$http.get("./settings.json").then(function(response) {
|
||||||
$rootScope.recvTime(response);
|
$rootScope.recvTime(response);
|
||||||
response.data.start = new Date(response.data.start);
|
response.data.start = new Date(response.data.start);
|
||||||
response.data.end = new Date(response.data.end);
|
response.data.end = new Date(response.data.end);
|
||||||
@ -127,7 +127,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
response.data.awards = new Date("2019-01-23T15:30:00Z");
|
response.data.awards = new Date("2019-01-23T15:30:00Z");
|
||||||
$rootScope.settings = response.data;
|
$rootScope.settings = response.data;
|
||||||
});
|
});
|
||||||
$http.get("../themes.json").then(function(response) {
|
$http.get("./themes.json").then(function(response) {
|
||||||
if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers()["last-modified"])
|
if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastthemeetag = response.headers()["last-modified"];
|
$scope.lastthemeetag = response.headers()["last-modified"];
|
||||||
@ -147,7 +147,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
$scope.max_gain += theme.gain;
|
$scope.max_gain += theme.gain;
|
||||||
}, themes);
|
}, themes);
|
||||||
});
|
});
|
||||||
$http.get("../teams.json").then(function(response) {
|
$http.get("./teams.json").then(function(response) {
|
||||||
if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers()["last-modified"])
|
if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastteametag = response.headers()["last-modified"];
|
$scope.lastteametag = response.headers()["last-modified"];
|
||||||
@ -173,7 +173,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
})
|
})
|
||||||
.controller("TeamController", function($scope, $http, $interval) {
|
.controller("TeamController", function($scope, $http, $interval) {
|
||||||
$scope.mystats = null;
|
$scope.mystats = null;
|
||||||
$http.get("../api/teams/" + $scope.team.id + "/stats.json").then(function(response) {
|
$http.get("./api/teams/" + $scope.team.id + "/stats.json").then(function(response) {
|
||||||
$scope.mystats = response.data;
|
$scope.mystats = response.data;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -199,7 +199,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
$scope.s.params.teams.forEach(function (teamid) {
|
$scope.s.params.teams.forEach(function (teamid) {
|
||||||
var deferred = $q.defer();
|
var deferred = $q.defer();
|
||||||
loopPromises.push(deferred.promise);
|
loopPromises.push(deferred.promise);
|
||||||
d3.json("../api/teams/" + teamid + "/score-grid.json", function (rows) {
|
d3.json("./api/teams/" + teamid + "/score-grid.json", function (rows) {
|
||||||
if (rows == null) return;
|
if (rows == null) return;
|
||||||
rows.sort(function (a,b) { return a.time > b.time ? 1 : -1 })
|
rows.sort(function (a,b) { return a.time > b.time ? 1 : -1 })
|
||||||
var nrows = {};
|
var nrows = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user