OPNsense Forum

English Forums => Development and Code Review => Topic started by: opnsenseuser on May 15, 2018, 06:07:33 pm

Title: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 15, 2018, 06:07:33 pm
Hi Franco!

in the course of my training in the mvc of opnsense, I found the file, which is responsible for the firewall scheduler. I came across the problem when creating the cicada template, but ignored it for lack of time.

So that this value is not always displayed in white when deactivating a cell, it would be sufficient to set the value to "inherit" instead of "#FFF".

This would make the scheduler independent of the WEB template (GUI) and above all readable.

I attached a modified code screenshot and the screenshot of the original code.  Incidentally, I've already tried it and it works flawlessly.

What do you think ?

best regards rené
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: fabian on May 15, 2018, 06:11:35 pm
I would suggest to make the code independent from colors but this change is very large, so I did not change that code.
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 15, 2018, 06:22:23 pm
I would suggest to make the code independent from colors but this change is very large, so I did not change that code.

A pity.
This leaves the problem that under templates such as cicada, rebellion the scheduler is difficult to read when deleting scheduler entries.

best regards rené
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: franco on May 15, 2018, 07:35:22 pm
Hi guys,

Ideally, the ancient JS code surrounding the scheduler edit page should be replaced and adhere to bootstrap colour classes. But since we are not in an ideal world:

https://github.com/opnsense/core/commit/319a8bc

René, can you attach screenshots of one of your themes with and without the patch in place, I'm not entirely sure what it should look like.


Thank you,
Franco
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 15, 2018, 07:59:32 pm
Hi guys,

Ideally, the ancient JS code surrounding the scheduler edit page should be replaced and adhere to bootstrap colour classes. But since we are not in an ideal world:

https://github.com/opnsense/core/commit/319a8bc

René, can you attach screenshots of one of your themes with and without the patch in place, I'm not entirely sure what it should look like.


Thank you,
Franco

as desired the screenshot of cicada and rebellion theme.

And if you would change the value to "inherit" in the source code, then the cell will be displayed in the same background color after a double-click as the template specified. then the field would be readable again.

in tukan theme it is not so bad, because the foreground text is black and the background is very bright anyway.

best regards
rené
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 15, 2018, 08:17:45 pm
I think I just declared it bad.

But Fabian knows what I mean.

rené
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: fabian on May 15, 2018, 09:03:58 pm
@rene: try my patch here: https://github.com/opnsense/core/pull/2407 - you only have to patch your sass file to support the selectors as well. Then you can theme it however you like.
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 15, 2018, 10:51:21 pm
great work guys!!!! :-) incredible fast -> it is almost world record!  ;)

Thanks to Franco, Fabian and Martin for the professional support.
I have sent martin the changes for tukan and cicada.

I think we made 3 really good themes for opnsense. although that's certainly not the most important thing for a firewall. but an important step.

best regards,
rené

Above all, I have to thank Martin very much, who is really always helpful and without him all my zeal would not be worth anything.
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: fabian on May 16, 2018, 06:36:06 pm
I hope your last theme problems are fixed now ;)

kind regards from Vorarlberg

Fabian
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 16, 2018, 06:45:42 pm
I hope your last theme problems are fixed now ;)

kind regards from Vorarlberg

Fabian

I hope so ;-)

regards from vienna
Rene
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: franco on May 17, 2018, 08:26:40 am
Fabian's change was merged to master. Thanks!
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 17, 2018, 10:55:40 am
Great work guys i Sent The latest fixed scheduler Updates for tukan and cicada to Martin.

Would be Great if we can get this Versions to the current update.

Best regards
Rene
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 17, 2018, 11:03:15 am
The scheduler fix for cicada and tukan will come later.
Thx Franco, Fabian and Martin for your Support.

Best regards
Rene
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: marjohn56 on May 18, 2018, 07:29:01 am
I'll try and PR these over the weekend.. Busy with real work the last few days.
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 18, 2018, 01:39:13 pm
no problem martin. there are more important things ->  do not stress!!!!
Title: Re: firewall-scheduler - disable cell (background-color)?
Post by: opnsenseuser on May 19, 2018, 01:10:53 am
thx martin

Regards rene