openflighthpc / flight-control

0 stars 0 forks source link

Initial web application with costs breakdown page #1

Closed timalces closed 2 years ago

timalces commented 2 years ago

Adds initial web application with visualiser functionality, with one page /costs-breakdown showing costs chart and current node counts.

screencapture-localhost-3000-costs-breakdown-2022-02-04-11_28_36

Screenshot from 2022-02-04 11-29-02

screencapture-localhost-3000-costs-breakdown-2022-02-04-11_33_21

Screenshot from 2022-02-04 11-45-38

Other updates

Must run:

ColonelPanicks commented 2 years ago

Only issue I've managed to hit was when I was changing the budget policy, selected Dynamic, it asked for an End Date and I exited the modification as this was not the spend profile I wanted:

Must be one of: fixed, rolling, continuous, dynamic
Spend profile(fixed/rolling/continuous/dynamic): dynamic
Effective at (YYYY-MM-DD): 2022-01-01
Budget policy created
Warning: dynamic spend profile requires the project to have an end date.
Please specify an end date for the project:^Crake aborted!
Interrupt:
/root/flight-control/lib/project_manager.rb:518:in `gets'
/root/flight-control/lib/project_manager.rb:518:in `add_budget_policy'
/root/flight-control/lib/project_manager.rb:63:in `update_attributes'
/root/flight-control/lib/project_manager.rb:25:in `add_or_update_project'
/root/flight-control/lib/tasks/projects.rake:7:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.5.1/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
/usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => projects:manage
(See full trace by running task with --trace)

It ended up making the front-end funky as the project gets set to dynamic with no end date. This isn't a huge issue, setting it back to fixed removed the problems. I know the answer is "you probably shouldn't do that" so just a heads up!

One small improvement might be to add a Project Start indicator to the graph.

Screenshot 2022-02-08 at 11 32 45

Other than above, LGTM!

timalces commented 2 years ago

This isn't a huge issue, setting it back to fixed removed the problems. I know the answer is "you probably shouldn't do that" so just a heads up

Setting an end date would also have fixed it, but yeah there isn't really a way of handling that situation. If it's dynamic and there's no end date, the costs are effectively spread across an infinite number of cycles (though there is some logic in there to prevent looking for infinite cycles, as that would break accessing the project's pages).

Other than not doing it/ fixing it manually, the only thing I can think of is setting some sort of default end date (e.g. 1 year after start date). But maybe that would confuse things further.

One small improvement might be to add a Project Start indicator to the graph.

Make sense - have added it:

Screenshot from 2022-02-08 12-24-49

ColonelPanicks commented 2 years ago

Makes sense, any assumptions would add unnecessary complications. It was more from a data validation perspective but I'm well aware that was a silly thing I did to break input!

Thanks for adding that, looks good. Happy for this to be merged 👍