Expaso / hassos-addons

Home Assistant Add-ons
Apache License 2.0
46 stars 14 forks source link

Paste from macOS clipboard not working within pgadmin SQL window #40

Closed 42Network closed 3 months ago

42Network commented 3 months ago

Describe the bug Paste from macOS clipboard not working within SQL window

To Reproduce Steps to reproduce the behavior:

  1. Launch pgadmin4
  2. Open a SQL terminal window
  3. Try to paste some text via Cmd-V or Right-click->Paste
  4. Nothing happens

Expected behavior Text should be pasted

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

I am unable to copy/paste the examples provided for setting up Timescale, such as the following. I've tried with both Chrome and Firefox. Pasting into other browser tabs, such as the Home Assistant SSH app, work just fine.

Any clues appreciated.

CREATE OR REPLACE FUNCTION public.isnumeric(
    text)
    RETURNS boolean
    LANGUAGE 'plpgsql'
    COST 100
    IMMUTABLE STRICT PARALLEL UNSAFE
AS $BODY$
DECLARE x NUMERIC;
BEGIN
    x = $1::NUMERIC;
    RETURN TRUE;
EXCEPTION WHEN others THEN
    RETURN FALSE;
END;
$BODY$;

ALTER FUNCTION public.isnumeric(text)
    OWNER TO postgres;
Expaso commented 3 months ago

Hmm.. That is strange... On Windows at least it seams to work on my side, but that won't help you of course.

Can you perhaps try this:

1) Open-up the addon on a port on your homeassistant by setting a port in the configuration of the addon:

image

2) Access pgAdmin on that port by browsing to your homeassistant, given that specific port:

image

It should load pgAdmin full-screen in the browser:

image

Can you now use copy/paste?

Expaso commented 3 months ago

Closing issue, marked as stale. Please reopen if still an issue.

42Network commented 3 months ago

Hi. Thanks for the suggestion and sorry for the delay. I made mine look like yours, using port 12346, and saved and restarted pgAdmin (a few times). However, trying to browse to that new port( homeassistant:12346) fails, and when I use "Open Web UI" from within the pgAdmin Addon, it still opens pgAdmin at the default URL of homeassistant:8123/hassio/ingress/77b2833f_pgadmin4. Also, when I view the YAML version of the pgAdmin config, this new custom port is not mentioned. Somehow it isn't sticking...ideas?

Also, I'm slightly new to GitHub. Hope you see this comment. I don't see a way to reopen this issue now that it is closed. Should I open a new issue and link to this closed one?