Skip to content

Commit 5d30e1d

Browse files
committed
Adjusted NOC to show all portals
1 parent 84820a0 commit 5d30e1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

BrainPortal/app/controllers/noc_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def gather_info(since_when) #:nodoc:
198198
@refresh_every = nil if @refresh_every.present? && @refresh_every < 60
199199

200200
# RemoteResources, including the portal itself
201-
@myself = RemoteResource.current_resource
201+
@portals = BrainPortal.where(:online => true).all.to_a # includes the current portal and any other
202202
acttasks_bids = CbrainTask.active.group(:bourreau_id).pluck(:bourreau_id)
203203
updated_bids = Bourreau.where([ "updated_at > ?", offline_resource_limit.ago ]).pluck(:id) # must have been toggled within a month.
204204
@bourreaux = Bourreau.where(:id => (acttasks_bids | updated_bids)).order(:name).all
@@ -246,7 +246,7 @@ def gather_info(since_when) #:nodoc:
246246

247247
# We also scan the BrainPortal, although it has no tasks, because
248248
# the caching logic is the same.
249-
([ @myself ] + @bourreaux ).each do |b| # b is a BrainPortal once, and a Bourreau for the rest
249+
( @portals + @bourreaux ).each do |b| # b is a BrainPortal once, and a Bourreau for the rest
250250
info = @bourreau_info[b.id] = {}
251251

252252
# Sum of task workdir space

BrainPortal/app/views/noc/dashboard.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
111111
<h1>Execution Servers Caches And Tasks</h1>
112112
113-
<% ([ @myself ] + @bourreaux).each do |b| %>
113+
<% (@portals + @bourreaux).each do |b| %>
114114
<%
115115
info = @bourreau_info[b.id] || {}
116116
task_space = info[:task_space] || 0

0 commit comments

Comments
 (0)