Giter Site home page Giter Site logo

Comments (3)

DL6ER avatar DL6ER commented on July 17, 2024 1

FTL is sending the data correctly, the issue must be in the web interface code

from ftl.

DL6ER avatar DL6ER commented on July 17, 2024 1

You are right, this is actually a regression of #1649.

The fix is very simple. It comes done to that FTL added the exact/deny (etc.) arguments only when it exactly knew what you were requesting (hence, your observation that /api/domains/deny/exact works). However, any wildcard requests (like everything or all regex, or all allowed entries, ...) returned NULLs because they have not been considered in the corresponding switch.

I will move this issue into FTL space and put up a bugfix for it.

from ftl.

rdwebdesign avatar rdwebdesign commented on July 17, 2024

FTL is sending the data correctly

I'm not sure this is the case.

I added domains as a test. The domain is added (the domain count increases), but they still are not shown on the table.

The POST request is sent and the response returns the new item (every parameter is returned correctly), BUT the request /api/domains returns incomplete data:

{
  "domains": [
    {
      "domain": "domain.com",
      "type": null,
      "kind": null,
      "comment": null,
      "groups": [ 0 ],
      "enabled": true,
      "id": 1,
      "date_added": 1697081542,
      "date_modified": 1697081542
    },
    {
      "domain": "domain2.com",
      "type": null,
      "kind": null,
      "comment": "comment",
      "groups": [ 0 ],
      "enabled": true,
      "id": 2,
      "date_added": 1697081745,
      "date_modified": 1697081745
    },
    {
      "domain": "domain3.com",
      "type": null,
      "kind": null,
      "comment": "comment",
      "groups": [ 0 ],
      "enabled": true,
      "id": 3,
      "date_added": 1697081810,
      "date_modified": 1697081810
    }
  ]
}

All these entries are type=deny and kind=exact, but the response for /api/domains returns type and kind as NULL.

If I try to filter by type using /api/domains/deny, the same response is shown (with nulls).

If I try /api/domains/deny/exact, type and kind are returned correctly (strange).

Details:
{
  "domains": [
    {
      "domain": "domain.com",
      "type": "deny",
      "kind": "exact",
      "comment": null,
      "groups": [
        0
      ],
      "enabled": true,
      "id": 1,
      "date_added": 1697081542,
      "date_modified": 1697081542
    },
    {
      "domain": "domain2.com",
      "type": "deny",
      "kind": "exact",
      "comment": "comment",
      "groups": [
        0
      ],
      "enabled": true,
      "id": 2,
      "date_added": 1697081745,
      "date_modified": 1697081745
    },
    {
      "domain": "domain3.com",
      "type": "deny",
      "kind": "exact",
      "comment": "comment",
      "groups": [
        0
      ],
      "enabled": true,
      "id": 3,
      "date_added": 1697081810,
      "date_modified": 1697081810
    }
  ]
}

from ftl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.