hop icon indicating copy to clipboard operation
hop copied to clipboard

[Feature Request]: Unable to Copy the Transform from one Pipeline to Another Pipeline

Open kirana-ks opened this issue 1 year ago • 3 comments

What would you like to happen?

Apache Hop version? 2.9.0

Java version? 11

Operating system Docker Container

What happened?

While working with HOP Web (Docker Installation Setup), when the user tries to copy the Transform from one Pipeline to Another Pipeline, we face the following error:

There was an unexpected error while copying data to the clipboard. org.eclipse.swt.SWTError: Cannot set data in clipboard at org.eclipse.swt.dnd.DND.error(DND.java:263) at org.eclipse.swt.dnd.DND.error(DND.java:219) at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:272) at org.apache.hop.ui.core.gui.GuiResource.toClipboard(GuiResource.java:1318) at org.apache.hop.ui.hopgui.file.pipeline.delegates.HopGuiPipelineClipboardDelegate.toClipboard(HopGuiPipelineClipboardDelegate.java:63) at org.apache.hop.ui.hopgui.file.pipeline.delegates.HopGuiPipelineClipboardDelegate.copySelected(HopGuiPipelineClipboardDelegate.java:340) at org.apache.hop.ui.hopgui.file.pipeline.HopGuiPipelineGraph.copySelectedToClipboard(HopGuiPipelineGraph.java:5221) at org.apache.hop.ui.hopgui.HopGui.menuEditCopySelected(HopGui.java:896) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.hop.ui.core.gui.GuiMenuWidgets.executeMenuItem(GuiMenuWidgets.java:173) at org.apache.hop.ui.core.gui.GuiMenuWidgets.lambda$addMenuWidgets$0(GuiMenuWidgets.java:121) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594) at org.eclipse.swt.widgets.MenuItem.handleAcceleratorActivation(MenuItem.java:687) at org.eclipse.swt.widgets.AcceleratorBinding.handleEvent(AcceleratorBinding.java:35) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1819) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:685) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594) at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1216) at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1197) at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1172) at org.eclipse.rap.rwt.application.AbstractEntryPoint.createUI(AbstractEntryPoint.java:69) at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177) at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:290) at java.base/java.lang.Thread.run(Thread.java:829) at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107)

Why? To minimize the development effort, an already configured Transform needs to be reused across multiple Pipelines. There is a need to copy/paste the Transform ('s) from one Pipeline to another Pipeline. However, on the HOP Web Ctrl+C / Ctrl+V OR Copy to Clipboard/Paste from the Clipboard is giving errors.

Reproduction Steps:-

  1. Open HOP Web on the Web browser.

  2. Open any existing Pipeline.

  3. Select an existing Transform from the Canva and click the option Copy to Clipboard or Ctrl+C

  4. Create a New Pipeline and click on the Canva and select option Paste from the Clipboard or Ctrl+V

HOP Web gives an Error message as shown below:

Copy Paste Issue

Note: The issue doesn't exist in the HOP client GUI

Issue Priority

Priority: 3

Issue Component

Component: Hop Gui, Component: Hop Web

kirana-ks avatar Jun 26 '24 13:06 kirana-ks

Could you try the following: Normally the first time you try to copy it will give you an option to allow it. But as it is marked as an unsecured website you might have to manually enable it.

https://stackoverflow.com/questions/64060102/how-to-change-the-site-setting-of-unsecuredhttp-websites-on-chrome

hansva avatar Jun 26 '24 16:06 hansva

Ah, I just noticed you are not on localhost. You will have to enable HTTPS it seems. Or use a workaround to mark the website as "secure"

hansva avatar Jun 26 '24 16:06 hansva

Sure thing. Let us check that workaround and update the status.

kirana-ks avatar Jun 28 '24 11:06 kirana-ks