Project

General

Profile

Refactor #14566

Replace show_console_action with a simple if statement

Added by Tomer Brisker about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The show_console_action in the CR helper is simply checks a condition and displays the link if the condition is met.
This causes the link to be generated in any case so it can be passed into the function, instead of just checking the condition.
When fixing this, need to check if any CR plugin uses this helper.

Associated revisions

Revision 46adbbba (diff)
Added by Tomer Brisker about 6 years ago

Fixes #14566 - remove show_console_action function

The `show_console_action` function is just a trenary operator, no sense
making this a function. This also causes the link to be generated even
if it is not needed, as it is passed to the function as a parameter.

History

#1 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/3418 added

#2 Updated by Anonymous about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal about 6 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF