admin: Use relative path to call API
This commit is contained in:
parent
8f1b44e3dd
commit
29607981e4
5 changed files with 87 additions and 87 deletions
|
|
@ -1 +1 @@
|
|||
../../frontend/static/fonts/
|
||||
../../admin/static/fonts/
|
||||
|
|
@ -535,8 +535,8 @@
|
|||
<div class="carousel-inner" style="height: inherit">
|
||||
<div class="carousel-item">
|
||||
<div class="carousel-caption" style="display: table; width: 100%">
|
||||
<a href="http://www.epita.fr/" class="align-middle text-center" style="display: table-cell; width: 55%"><img src="/img/epita.png" alt="Epita" style="height:100px"></a>
|
||||
<a href="http://www.epita.fr/" class="align-middle text-center" style="display: table-cell; width: 45%"><img src="/img/comcyber.png" alt="Réserves de cyberdéfense" style="height:100px"></a>
|
||||
<a href="http://www.epita.fr/" class="align-middle text-center" style="display: table-cell; width: 55%"><img src="img/epita.png" alt="Epita" style="height:100px"></a>
|
||||
<a href="http://www.epita.fr/" class="align-middle text-center" style="display: table-cell; width: 45%"><img src="img/comcyber.png" alt="Réserves de cyberdéfense" style="height:100px"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
|
|
@ -563,7 +563,7 @@
|
|||
<div class="carousel-item active">
|
||||
<div class="carousel-caption" style="padding: 5px; display: table;">
|
||||
<div class="align-middle" style="display: table-cell; width: 30%">
|
||||
<a href="https://srs.epita.fr/"><img src="/img/srs.png" alt="Laboratoire SRS" style="max-width:100%; max-height:90px"></a>
|
||||
<a href="https://srs.epita.fr/"><img src="img/srs.png" alt="Laboratoire SRS" style="max-width:100%; max-height:90px"></a>
|
||||
</div>
|
||||
<p class="text-bold align-middle" style="font-size: 110%; display: table-cell; width: 70%;">
|
||||
Les challenges ont été réalisés par les étudiants de la
|
||||
|
|
@ -577,7 +577,7 @@
|
|||
Avec le parrainage du commandement de la cyberdéfense
|
||||
</p>
|
||||
<div class="align-middle" style="display: table-cell; width: 30%">
|
||||
<img src="/img/comcyber.png" alt="Réserves de cyberdéfense" style="max-width:100%; max-height: 80px">
|
||||
<img src="img/comcyber.png" alt="Réserves de cyberdéfense" style="max-width:100%; max-height: 80px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
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
|
||||
if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers()["last-modified"])
|
||||
return;
|
||||
|
|
@ -90,7 +90,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
var refreshSceneInterval = $interval(refreshScene, 900);
|
||||
|
||||
var refreshSettings = function() {
|
||||
$http.get("/settings.json").then(function(response) {
|
||||
$http.get("../settings.json").then(function(response) {
|
||||
$rootScope.recvTime(response);
|
||||
response.data.start = new Date(response.data.start);
|
||||
response.data.end = new Date(response.data.end);
|
||||
|
|
@ -104,14 +104,14 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
|
||||
|
||||
$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"])
|
||||
return;
|
||||
$scope.lastmyetag = response.headers()["last-modified"];
|
||||
|
||||
$scope.my = response.data;
|
||||
});
|
||||
$http.get("/settings.json").then(function(response) {
|
||||
$http.get("../settings.json").then(function(response) {
|
||||
$rootScope.recvTime(response);
|
||||
response.data.start = new Date(response.data.start);
|
||||
response.data.end = new Date(response.data.end);
|
||||
|
|
@ -119,7 +119,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
response.data.awards = new Date("2019-01-23T15:00:00Z");
|
||||
$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"])
|
||||
return;
|
||||
$scope.lastthemeetag = response.headers()["last-modified"];
|
||||
|
|
@ -139,7 +139,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
$scope.max_gain += theme.gain;
|
||||
}, 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"])
|
||||
return;
|
||||
$scope.lastteametag = response.headers()["last-modified"];
|
||||
|
|
@ -165,7 +165,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
})
|
||||
.controller("TeamController", function($scope, $http, $interval) {
|
||||
$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;
|
||||
});
|
||||
})
|
||||
|
|
@ -191,7 +191,7 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||
$scope.s.params.teams.forEach(function (teamid) {
|
||||
var deferred = $q.defer();
|
||||
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;
|
||||
rows.sort(function (a,b) { return a.time > b.time ? 1 : -1 })
|
||||
var nrows = {};
|
||||
|
|
|
|||
Reference in a new issue