Projects tigase _server tigase-http-api Issues #171
Make the new Dashboard the default page (#171)
Wojciech Kapcia (Tigase) opened 2 months ago

Currently, by default we show "index" page that lists all the available module.

In order to improve user experience new Dashboard should be the default view while the rest of the modules should be listed under "advanced menu" somewhere in the dashboard. To avoid problems with routings/paths Dashboard should still be served under /dashboard path but facilitate the default experience / path should redirect to /dashboard automatically

  • Andrzej Wójcik (Tigase) commented 4 weeks ago

    I've implemented new redirect module and make it default on / with redirection to /dashboard. That should resolve this issue.

    I had to slightly modify requestUri calculation (see RedirectServlet) as code for X-Forward-Prefix was not behaving correctly for redirects for /favicon.ico. Please review if my changes are correct.

    IndexModule is now disabled, but I was wondering if we shouldn't just move it.

  • Andrzej Wójcik (Tigase) changed state to 'In QA' 4 weeks ago
    Previous Value Current Value
    Open
    In QA
  • Andrzej Wójcik (Tigase) commented 4 weeks ago

    As for adding advanced menu, I can work on that, but I wanted to confirm that current behavior is correct. Also, dashboard is not only for admins, so I wonder who should see this advanced menu, or if we should point/link to /index/ path with IndexModule being deployed there?

  • Wojciech Kapcia (Tigase) commented 4 weeks ago

    I've implemented new redirect module and make it default on / with redirection to /dashboard. That should resolve this issue.

    Works like a charm

    I had to slightly modify requestUri calculation (see RedirectServlet) as code for X-Forward-Prefix was not behaving correctly for redirects for /favicon.ico. Please review if my changes are correct.

    The substring? Seems fine.

    IndexModule is now disabled, but I was wondering if we shouldn't just move it.

    Hmm... could be useful.

    As for adding advanced menu, I can work on that, but I wanted to confirm that current behavior is correct. Also, dashboard is not only for admins, so I wonder who should see this advanced menu, or if we should point/link to /index/ path with IndexModule being deployed there?

    In general previous behaviour with index listing everything even wasn't too good as it could expose regular user to "admin stuff".

    Maybe, for now, to limit the scope (Dashboard could be improved in the future) just add a link to /index/ (that would maybe only be visible to admin users) in the left hand menu (below "Server info")?

  • Wojciech Kapcia (Tigase) changed fields 4 weeks ago
    Name Previous Value Current Value
    Assignee
    wojtek
    andrzej.wojcik
  • Andrzej Wójcik (Tigase) commented 1 week ago

    I've applied changes in the recent commit.

    Moved "index" to /index from /, added link in dashboard called "endpoints" on the sidebar (visible only to admin).

    While working in this, I've encountered an issue with accessing Server info in the sidebar. Sometimes I got HTML web page and in some cases I've got JSON file. Results was always consistent and changed only when server was restarted.

    I've narrowed it down to JaxRsRequestHandler::test(HttpServerRequest, String) implementation that was responsible for selecting method to run by checking if produced content type matches Accept header. As handlers were kept in Set and Accept header always at the end had */* it caused random method to be returned.

    To solve that I've added a new method JaxRsRequestHandler::match(HttpServerRequest, String), that returns RequestHandlerMatcher which contains "handler, preference, and matcher (instead of just matcher) allowing us to gather RequestHandlerMatcher for all matching handlers and select the best one based on preference. That resolve the issue, but I've made a few minor changes (including deprecations) to make API more consistent.

  • Wojciech Kapcia (Tigase) commented 5 days ago

    Works great.

  • Wojciech Kapcia (Tigase) changed state to 'Closed' 5 days ago
    Previous Value Current Value
    In QA
    Closed
issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/tigase-http-api#171
Please wait...
Page is in error, reload to recover