Icinga / icingadb-web

Icinga DB Web – UI for Icinga DB – Provides a graphical interface to your Icinga monitoring
GNU General Public License v2.0
66 stars 21 forks source link

History vertical page pagination doesn't work on Safari #1082

Closed yhabteab closed 2 hours ago

yhabteab commented 3 hours ago

Describe the bug

The Load More feature for the history views no longer functions on Safari, although it still works correctly on Chrome. When I click on the Load More button, I got a bad request error. However, performing the same action in Chrome works without any issues.

Bildschirmfoto 2024-10-24 um 10 41 16

Your Environment

Include as many relevant details about the environment you experienced the problem in.

Bildschirmfoto 2024-10-24 um 10 43 45

Additional context

Add any other context about the problem here.

nilmerg commented 3 hours ago

Please include a dump of the request in question.

yhabteab commented 2 hours ago
GET /icingadb/history HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
Accept-Language: de-DE,de;q=0.9
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Safari/605.1.15
Referer: http://10.27.1.158/icingadb/history
Connection: keep-alive
Cookie: Icingaweb2=lfafge2lidv609m2fnokql71oc; icingaweb2-session=1729761405; icingaweb2-tzo=7200-1
X-Requested-With: XMLHttpRequest
Priority: u=3, i
X-Icinga-WindowId: bcjktyzsiogu
X-Icinga-Accept: text/html
{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "WebKit Web Inspector",
      "version": "1.0"
    },
    "pages": [
      {
        "startedDateTime": "2024-10-24T09:23:23.285Z",
        "id": "page_0",
        "title": "http://10.27.1.158/icingadb/history",
        "pageTimings": {
          "onContentLoad": 4656.312374980189,
          "onLoad": 4802.940458321245
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_0",
        "startedDateTime": "2024-10-24T09:23:30.525Z",
        "time": 22.92415517149493,
        "request": {
          "method": "GET",
          "url": "http://10.27.1.158/icingadb/history?before=1729761803&page=2&showCompact#page-2",
          "httpVersion": "HTTP/1.1",
          "cookies": [
            {
              "name": "Icingaweb2",
              "value": "lfafge2lidv609m2fnokql71oc"
            },
            {
              "name": "icingaweb2-session",
              "value": "1729761405"
            },
            {
              "name": "icingaweb2-tzo",
              "value": "7200-1"
            }
          ],
          "headers": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded; charset=UTF-8"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Accept-Language",
              "value": "de-DE,de;q=0.9"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Safari/605.1.15"
            },
            {
              "name": "Referer",
              "value": "http://10.27.1.158/icingadb/history"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "Icingaweb2=lfafge2lidv609m2fnokql71oc; icingaweb2-session=1729761405; icingaweb2-tzo=7200-1"
            },
            {
              "name": "X-Requested-With",
              "value": "XMLHttpRequest"
            },
            {
              "name": "Priority",
              "value": "u=3, i"
            },
            {
              "name": "X-Icinga-WindowId",
              "value": "bcjktyzsiogu"
            },
            {
              "name": "X-Icinga-Accept",
              "value": "text/html"
            }
          ],
          "queryString": [
            {
              "name": "before",
              "value": "1729761803"
            },
            {
              "name": "page",
              "value": "2"
            },
            {
              "name": "showCompact",
              "value": ""
            }
          ],
          "headersSize": 674,
          "bodySize": 0
        },
        "response": {
          "status": 400,
          "statusText": "Bad Request",
          "httpVersion": "HTTP/1.1",
          "cookies": [],
          "headers": [
            {
              "name": "Content-Type",
              "value": "text/html; charset=iso-8859-1"
            },
            {
              "name": "Content-Length",
              "value": "304"
            },
            {
              "name": "Date",
              "value": "Thu, 24 Oct 2024 09:23:30 GMT"
            },
            {
              "name": "Server",
              "value": "Apache/2.4.62 (Debian)"
            }
          ]
...
nilmerg commented 2 hours ago

And you are sure this is not related to your environment? Have you tried accessing a different server with Safari?

yhabteab commented 2 hours ago

Have you tried accessing a different server with Safari?

Yes, and it works fine! I'm not sure why it's not working on that server, it's not Icinga DB Web bug - so I'm closing the issue.