rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
611 stars 71 forks source link

Link from mission control back to the main rails application #155

Open volodymyr-mykhailyk opened 2 months ago

volodymyr-mykhailyk commented 2 months ago

Currently, when opening mission control - there is no easy way to return to your app.

While it is possible to override one of the templates and implement this in your app:

Create File app/views/layouts/mission_control/jobs/_application_selection.html.erb

<nav class="navbar" role="navigation" aria-label="main navigation">
  <div class="navbar-menu is-active mb-4">
    <div class="navbar-start">
      <!-- This is main application link-->
      <h4 class="title is-4">
        <%= link_to 'My Cool App', '/' %>
      </h4>
    </div>

    <div class="navbar-end">
      <%= render "layouts/mission_control/jobs/application_selection/servers", application: @application %>
      <%= render "layouts/mission_control/jobs/application_selection/applications" if selectable_applications.any? %>
    </div>
  </div>
</nav>

Would it be better to support it as part of a configuration? I am happy to submit a pull request if you think it is a needed functionality.

virolea commented 4 weeks ago

I came here to suggest it as well, that'd be swell.

I could see this using main_app.root_path as a default and allowing a configuration override.

rosa commented 2 weeks ago

Sorry for the delay!

I am happy to submit a pull request if you think it is a needed functionality.

Yes, I think it'd be useful! Maybe not even allowing a configuration override by default, just using main_app.root_path to start with would be enough.