Refactor view logic out of Ci::Minutes::Quota

The following discussion from !67024 (merged) should be addressed:

  • @allison.browne started a discussion:

    non-blocking: Definitely would be a follow-up but I wonder if we should be using a presenter or another class for methods that only get called from the view here. It's a bit hard to decipher which methods are UI only versus used to control other business logic(like sending notifications or blocking new builds). Especially now that the UI is diverging from the other buisness logic, I wonder if it makes sense to seperate the UI concerns more.

    • monthly_minutes_report (view only)
    • monthly_percent_used (view only)
    • purchased_minutes_report (view only)
    • purchased_percent_used (view only)
    • minutes_used_up? (factors into other buisness logic)
    • total_minutes (factors into other buisness logic)
    • total_minutes_used (factors into other buisness logic)
    • percent_total_minutes_remaining (factors into other buisness logic)

    What do you think about this idea?

Note: it would be good to address the use of the Namespace, Project, etc #shared_runners_minutes_limit_enabled? methods as part of this issue, since they also seem to be only used for UI logic

Edited by Avielle Wolfe