Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
Changed layout when multiple servers are reporting metrics for one
project to a tabbed layout. This allows for easier navigation between
the different servers.

By default, the tabs will rotate every 10 seconds. This can be changed
by setting ?interval=4 in the URL. This will change the interval to 4
seconds between tab changes.
  • Loading branch information
kobaltz committed Feb 10, 2024
1 parent 758058e commit 09c6106
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
mission_control-servers (0.2.0)
mission_control-servers (0.2.1)
importmap-rails
rails (>= 7.1.3)
stimulus-rails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default class extends Controller {
connect() {
this.showInitialTab();
this.loopThroughTabs();
console.log(this.refreshIntervalValue);
}

showInitialTab() {
Expand Down
4 changes: 2 additions & 2 deletions app/views/mission_control/servers/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
</span>
</div>
</div>

<%= tag.div data: { controller: "tabs", "tabs-refresh-interval-value": (params[:interval].to_i * 1000 || 10_000 ) } do %>
<% interval = params[:interval].present? ? params[:interval].to_i * 1000 : 10_000 %>
<%= tag.div data: { controller: "tabs", "tabs-refresh-interval-value": interval } do %>
<div class="mt-3">
<div class="">
<!-- Current: "text-gray-900", Default: "text-gray-500 hover:text-gray-700" -->
Expand Down
2 changes: 1 addition & 1 deletion lib/mission_control/servers/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MissionControl
module Servers
VERSION = "0.2.0"
VERSION = "0.2.1"
end
end

0 comments on commit 09c6106

Please sign in to comment.