[0.8.0Alpha2] wrong CSS class name

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
an3k
Newbie
Newbie
Posts: 31
Joined: June 16th, 2015, 10:49 am

[0.8.0Alpha2] wrong CSS class name

Post by an3k »

In the stylesheet are three classes for coloring subtext in History (eg. red when a job failed or green when a post-processing script succeeded or failed).

The corresponding class names are:
  • hvMessageFail (color red)
  • hvMessageAction (color blue)
  • hvMessageScript (color green)
Class "hvMessageScript" should be renamed to "hvMessageSuccess" to match the naming scheme. It is mentioned in these two locations only.

Line 982 in interfaces/Plush/templates/static/stylesheets/colorschemes/gold/gold.css
Line 80 in interfaces/Plush/templates/history.tmpl
User avatar
safihre
Administrator
Administrator
Posts: 5359
Joined: April 30th, 2015, 7:35 am
Contact:

Re: [0.8.0Alpha2] wrong CSS class name

Post by safihre »

Adding to that: can't we also make the result-code (Fail/Success) available so we can indicate with a different color in the script line if it was successful? Or did I miss that info somewhere in the API?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
an3k
Newbie
Newbie
Posts: 31
Joined: June 16th, 2015, 10:49 am

Re: [0.8.0Alpha2] wrong CSS class name

Post by an3k »

safihre wrote:Adding to that: can't we also make the result-code (Fail/Success) available so we can indicate with a different color in the script line if it was successful? Or did I miss that info somewhere in the API?
That is already implemented.

Image
"Exit(1)" is added by SABnzbd while "1" is the exit code returned from my script.
"Failure" is the last output of my script.
"(More)" is added by SABnzbd and links to the script log.
"Retry" is shown because I enabled "User script can flag job as failed"
"» Script exit code is 1" is added by SABnzbd.

I have to admit it looks awkward and somehow broken. I'm not a dev but I'm currently working to get this cleaned up. For sure I'll post my changes. I also noticed another bug. If you click "Retry" and does not specify a "Optional Supplemental NZB" the job immediately fails again with "» Download failed - Not on your server(s)" and all icons and script text is gone except the "down arrow" icon and its popup now just shows which category the movie is in.
So this part of SABnzbd is really in alpha state :)

As far as I saw in the code the green line is nzo.set_unpack_info and the red line is nzo.fail_msg but I couldn't find something like nzo.success_msg (which would cause a green line where the red line is in the screenshot) so I guess I have to rewrite much more. Maybe keeping the red line but having a general error shown without any return code (eg. "» Script Failed") and additionally a red line above which actually shows the script error but without all the SABnzbd additions like "(More)".
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: [0.8.0Alpha2] wrong CSS class name

Post by shypike »

Hey guys, this too complex to answer from the beach :D
I'll look into this for Alpha3
Post Reply