Community discussions

MikroTik App
 
helipos
Member Candidate
Member Candidate
Topic Author
Posts: 132
Joined: Sat Jun 25, 2016 11:32 am

Winbox export whitespace bug

Wed Nov 15, 2023 12:30 am

Just a heads up

Winbox 3.40 is adding fictitious whitespace on an export command with a narrowish winbox window width.
It only does it on certain sections like system scheduler and system script when the lines want to wrap to the next line.
Its been reported SUP-134432
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11932
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Winbox export whitespace bug

Wed Nov 15, 2023 1:39 am

Any concrete example? Only novels?

The users can not access the supout... (and is better on this way...)
 
helipos
Member Candidate
Member Candidate
Topic Author
Posts: 132
Joined: Sat Jun 25, 2016 11:32 am

Re: Winbox export whitespace bug

Sun Nov 19, 2023 11:04 pm

This should do it. The first export is from a narrow terminal window inside winbox. The second is a wider one.
/system scheduler
add interval=1d name=Daily on-event="system script run Wireless_Registration_table\r\
    \nsystem script run SFTP_Config_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-24 start-time=00:00:00
add interval=1w name="Sunday 0000hrs" on-event="system script run Autoupdater" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-26 start-time=\
    00:00:00
add interval=1w name="Saturday 0000hrs" on-event="system script run SFTP_Log_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-25 start-time=\
    00:00:00
add interval=1m name=Minute on-event="system script run Login_Ban" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2021-01-02 start-time=02:20:00
add interval=1h name="1 hour" on-event="system script run Health" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-09-23 start-time=00:00:00




/system scheduler
add interval=1d name=Daily on-event="system script run Wireless_Registration_table\r\
    \nsystem script run SFTP_Config_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-24 start-time=00:00:00
add interval=1w name="Sunday 0000hrs" on-event="system script run Autoupdater" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-26 start-time=00:00:00
add interval=1w name="Saturday 0000hrs" on-event="system script run SFTP_Log_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-25 start-time=00:00:00
add interval=1m name=Minute on-event="system script run Login_Ban" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2021-01-02 start-time=02:20:00
add interval=1h name="1 hour" on-event="system script run Health" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-09-23 start-time=00:00:00
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11932
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Winbox export whitespace bug

Mon Nov 20, 2023 10:20 am

I don't understand anything, not even what the problem is.
Especially since the forum itself changes the layout of the internal text.
On the surface everything seems fine.

Winbox 3.40 on 7.12: Where is, for you, the error?

export code

#********************************* WINDOW SIZE **********************************
add interval=1d name=Daily on-event="system script run Wireless_Registration_tab\
    le\r\
    \nsystem script run SFTP_Config_Backup" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=2018-08-24 start-time=00:00:00
add interval=1w name="Sunday 0000hrs" on-event="system script run Autoupdater" \
    policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=2018-08-26 start-time=00:00:00
add interval=1w name="Saturday 0000hrs" on-event=\
    "system script run SFTP_Log_Backup" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=2018-08-25 start-time=00:00:00
add interval=1m name=Minute on-event="system script run Login_Ban" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=2021-01-02 start-time=02:20:00
add interval=1h name="1 hour" on-event="system script run Health" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=2018-09-23 start-time=00:00:00
 
helipos
Member Candidate
Member Candidate
Topic Author
Posts: 132
Joined: Sat Jun 25, 2016 11:32 am

Re: Winbox export whitespace bug

Sun Nov 26, 2023 3:17 am

See between lines one and two of the codebox you made. There is space characters where it has split the word table.

Now if we go back to winbox. You can get it to add or remove those space characters depending on the width of the terminal window in the winbox session.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11932
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Winbox export whitespace bug

Mon Nov 27, 2023 1:21 am

I do not see any problem, is a export, and work as expected.
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1480
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: Winbox export whitespace bug

Mon Nov 27, 2023 8:31 am

@helipos Are you talking about what I circled in red?

Image

If that's he case, note that every command that is longer than one line has everything except the first line indented 4 characters. Makes it a hell of a lot easier to read.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11932
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Winbox export whitespace bug

Mon Nov 27, 2023 10:16 am

P.S.: All space character (space, carriage-return, new-line) after the \ are ignored. Are just use for format the text for readability.
Note that \r,\n (and \t when is present) are part of the script, is why are escaped on the export.
 
helipos
Member Candidate
Member Candidate
Topic Author
Posts: 132
Joined: Sat Jun 25, 2016 11:32 am

Re: Winbox export whitespace bug

Mon Dec 11, 2023 2:19 am

Yeah not sure what I was smoking the other day.
Anyway I figured out the cause, it's the export command with terse. On a wide enough screen you can get away with terse but on a narrow one where the export needs to wrap the lines around it makes a mess of it.
/system/scheduler/ export 
# 2023-12-11 08:16:38 by RouterOS 7.12.1
# model = RB4011iGS+5HacQ2HnD

/system scheduler
add interval=1d name=Daily on-event="system script run Wireless_Registration_table\r\
    \nsystem script run SFTP_Config_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-24 start-time=00:00:00
add interval=1w name="Sunday 0000hrs" on-event="system script run Autoupdater" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-26 start-time=\
    00:00:00
add interval=1w name="Saturday 0000hrs" on-event="system script run SFTP_Log_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-25 start-time=\
    00:00:00
add interval=1h name="1 hour" on-event="system script run Health" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-09-23 start-time=00:00:00
add interval=1m name="1 Minute" on-event="system script run Login_Ban" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2021-01-02 start-time=02:20:00



/system/scheduler/ export terse
# 2023-12-11 08:16:41 by RouterOS 7.12.1
# model = RB4011iGS+5HacQ2HnD
/system scheduler add interval=1d name=Daily on-event="system script run Wireless_Registration_table\r\
    \nsystem script run SFTP_Config_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-24 start-time=00:00:00
/system scheduler add interval=1w name="Sunday 0000hrs" on-event="system script run Autoupdater" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08-26 st
art-time=00:00:00
/system scheduler add interval=1w name="Saturday 0000hrs" on-event="system script run SFTP_Log_Backup" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-08
-25 start-time=00:00:00
/system scheduler add interval=1h name="1 hour" on-event="system script run Health" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2018-09-23 start-time=00:0
0:00
/system scheduler add interval=1m name="1 Minute" on-event="system script run Login_Ban" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2021-01-02 start-time
=02:20:00
[admin@East Victoria Park] > 

Who is online

Users browsing this forum: No registered users and 24 guests