Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AHelps in SS14.Admin #69

Open
juliangiebel opened this issue Jun 4, 2024 · 0 comments
Open

AHelps in SS14.Admin #69

juliangiebel opened this issue Jun 4, 2024 · 0 comments

Comments

@juliangiebel
Copy link
Contributor

Allow admins to see and reply to ahelps from multiple servers in SS14.Admin

SS14 Ahelp API idea if

Rewrite BwoinkSystem into a manager, move integrations into their own integration classes and raise an event for integrations to queue a new message.
Add server API endpoint for sending an ahelp message

Image

Postgres Notify as an alternative

When AHelps get stored in the database SS14.Admin could subscribe to new AHelps by using the subscribe and notify feature of postgres.
This removes the need for some kind of webhook.
https://www.postgresql.org/docs/current/sql-notify.html

SS14.Admin Blazor component for the ahelp client

To have SignalR in blazor not be a massive pita it needs to automatically reconnect and not have a massive fucking banner when doing so.
Also only the interactive elements should get grayed out and not the entire page.

Code example for better automatic reconnect (Taken from old code. Needs adapting)

https://github.com/Megabit/Blazorise/blob/4502b4d6dc6ae6ec0e6619afbed561a40bd70707/Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml#L52

        Blazor.start({
            reconnectionHandler: {
                onConnectionDown: (options, error) => {
                    var isReloading = false;

                    async function attemptReload() {

                        if (!isReloading) {
                            isReloading = true;
                            var request = new Request({
                                url: '/healthcheck',
                                method: 'GET'
                            });
                            var result = await fetch(request);

                            if (result.status == 200) {
                                document.location.reload();
                            }
                            isReloading = false;
                        }
                    }
                    setInterval(attemptReload, 1500);
                }
            }
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant