Page 1 of 1

[0.8.0Alpha2] wrong CSS class name

Posted: June 17th, 2015, 6:26 am
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

Re: [0.8.0Alpha2] wrong CSS class name

Posted: June 17th, 2015, 12:51 pm
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?

Re: [0.8.0Alpha2] wrong CSS class name

Posted: June 17th, 2015, 3:17 pm
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)".

Re: [0.8.0Alpha2] wrong CSS class name

Posted: June 18th, 2015, 6:47 pm
by shypike
Hey guys, this too complex to answer from the beach :D
I'll look into this for Alpha3