Community discussions

MikroTik App
 
tihovsky
newbie
Topic Author
Posts: 47
Joined: Mon Aug 13, 2012 11:11 pm

Winbox copy table contents to the clipboard

Wed Nov 23, 2022 12:44 pm

Winbox is getting better by the day, but seems I am still missing a function to copy contents of the table (or selected rows) to the clipboard.

Yes, I can export config to a file or copy terminal contents but in both cases I need to filter and cleanse it afterwards manually.
Often I want just to copy a table of entries to excel, so a tab-separated table copied to clipboard with column names for easy pasting would be very useful feature I believe.

Examples of use for this are DHCP leases, arp entries, hotspot hosts, address lists, and similar long-lists where you always need to do some data crunching with
or to prepare a RouterOS script using exported values to copy script back into Winbox terminal ... so getting formatted data out easily would really speed things up and reduce mistakes.

As a separate note, I didn't investigate if this would be easier to achieve in webfig already today, although I keep webfig off on all my routers so turning it on each time also seems clumsy, but it might help someone so just mentioning.

Another feature related to the above, but a more complex one, would be ability to copy/paste items between two winboxes connected to different routers.
Like copy a firewall rule, DHCP lease, bridge VLANs, QOS, or anything really, but this would definitely require more work to support and standardizing copy/paste formats.
Goal is maintaining same rules on multiple Mikrotiks for redundancy, until you decide to automate using export/import.
But in general it would help also with configuration migration and testing.

Thx!
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Winbox copy table contents to the clipboard

Wed Nov 23, 2022 9:19 pm

I had this idea before:

viewtopic.php?p=811672#p811672

Sadly, it got much fewer excited "oh wow, I must have that!" than I hoped for. I mean, at least one would have been nice...
 
tihovsky
newbie
Topic Author
Posts: 47
Joined: Mon Aug 13, 2012 11:11 pm

Re: Winbox copy table contents to the clipboard

Thu Nov 24, 2022 3:17 pm

I learned that maintaining primary and secondary backup router in production is much easier with daily export/import scripts copied over FTP or SSH.
To make it more reliable you can split export/imports into multiple parts, so to allow partial import in case of particular issue of single section config part.
Also prior to deletion of config part in destination router script can check if fresh file for particular section is exported properly, bigger than empty file etc.
To assure no issues, maybe another script would export both router configs daily after import and compare files then email notification if found to be different...

But for smaller things and repetitive requirements to quickly copy part of setup between other routers it would for sure be handy.
I acknowledge your idea and ask precedence here :) and thank you for the reference. Too bad original thread is closed so we cannot cross-reference it.

This gives me additional idea to have a winbox CLI command logging toggle option, so to log all internally executed CLI commands for every Winbox GUI action taken.

But just the ability to copy data out of Winbox table would be even more useful, used more often and easier to implement IMHO.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Winbox copy table contents to the clipboard

Thu Nov 24, 2022 11:15 pm

Reading your first post again, you want something slighly different (copying csv-like data). My idea is to copy data in same format as export exports them (if you do e.g. /ip firewall filter export). The only difference would be that it would take only selected items and not all. To implement this would be extremely easy. But in fact, copying your csv-like data wouldn't be much harder, it's the same thing, just presented differently.

Pasting can be more challenging, mainly because of needed sanity checks. In general, it could work the same as when pasting things in terminal. Paste nonsense, get error, simple. But additionally it would have to check that it's data only for selected section, e.g. when pasting something in firewall filter, it should process only that and not data from other sections, if they happen to be in clipboard. But it's surely doable too.

And if pasting would be too difficult, even copying alone would be useful. I'd use it all the time just for this forum, when I test something and want to post resulting config. It would be much easier than finding it in long export with tons of other unrelated stuff.
 
tihovsky
newbie
Topic Author
Posts: 47
Joined: Mon Aug 13, 2012 11:11 pm

Re: Winbox copy table contents to the clipboard

Fri Nov 25, 2022 1:02 am

Yes, I get what you mean and I do believe both copy options should be implemented.
Of course that's my advice and for what's it worth ... but this is something I'm repetitively bumping into, so my guess was I'm not alone :)
I do see table tabbed data copying as a "low hanging fruit", which would also help to copy/paste logfiles and check them in any text editor so it would open convenience doors for many things.

The other copy function would be more work but it would also have lots of benefits - from maintenance of backup routers, setting up different environments, debugging across different versions, easily extending config to peer routers, exposing CLI commands to expedite learning, so let's just hope it gets prioritized.

Either way when it comes to ease of use of Mikrotik management tools, I cannot figure any other vendor that's nearly on par even today.
Just the fact that we have Webfig, Winbox, CLI + SSH, mobile app and set of APIs + dude NMS, all included and free, is beyond what others offer so I am really grateful in these regards.

Who is online

Users browsing this forum: AkosGergely, araqiel, Bing [Bot], GoogleOther [Bot], Marc1963, miks and 90 guests