dashboard: use last-modified field instead of etag
This commit is contained in:
parent
e9fd9c4e9a
commit
46aaa7cb4a
@ -10,9 +10,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
|
|
||||||
$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().etag)
|
if ($scope.lasteventsetag != undefined && $scope.lasteventsetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lasteventsetag = response.headers().etag;
|
$scope.lasteventsetag = response.headers()["last-modified"];
|
||||||
|
|
||||||
var events = response.data;
|
var events = response.data;
|
||||||
|
|
||||||
@ -72,18 +72,18 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
pathname = "/public0.html"
|
pathname = "/public0.html"
|
||||||
var refreshScene = function() {
|
var refreshScene = function() {
|
||||||
$http.get(pathname.replace(".html", ".json")).then(function(response) {
|
$http.get(pathname.replace(".html", ".json")).then(function(response) {
|
||||||
if ($scope.lastpublicetag != undefined && $scope.lastpublicetag == response.headers().etag)
|
if ($scope.lastpublicetag != undefined && $scope.lastpublicetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastpublicetag = response.headers().etag;
|
$scope.lastpublicetag = response.headers()["last-modified"];
|
||||||
|
|
||||||
$scope.scene = response.data;
|
$scope.scene = response.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var refreshData = function() {
|
var refreshData = function() {
|
||||||
$http.get("/my.json").then(function(response) {
|
$http.get("/my.json").then(function(response) {
|
||||||
if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers().etag)
|
if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastmyetag = response.headers().etag;
|
$scope.lastmyetag = response.headers()["last-modified"];
|
||||||
|
|
||||||
$scope.my = response.data;
|
$scope.my = response.data;
|
||||||
});
|
});
|
||||||
@ -98,9 +98,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
$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().etag)
|
if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastthemeetag = response.headers().etag;
|
$scope.lastthemeetag = response.headers()["last-modified"];
|
||||||
|
|
||||||
var themes = response.data;
|
var themes = response.data;
|
||||||
$scope.themes = themes;
|
$scope.themes = themes;
|
||||||
@ -118,9 +118,9 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
|
|||||||
}, themes);
|
}, themes);
|
||||||
});
|
});
|
||||||
$http.get("/teams.json").then(function(response) {
|
$http.get("/teams.json").then(function(response) {
|
||||||
if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers().etag)
|
if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers()["last-modified"])
|
||||||
return;
|
return;
|
||||||
$scope.lastteametag = response.headers().etag;
|
$scope.lastteametag = response.headers()["last-modified"];
|
||||||
|
|
||||||
var teams = response.data;
|
var teams = response.data;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user