Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F904843
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 29, 3:27 PM
Size
6 KB
Mime Type
text/x-diff
Expires
Sun, Aug 31, 3:27 PM (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
252275
Attached To
rARCHIVING archiving
View Options
diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb
index 974489f..b619ec0 100644
--- a/app/controllers/admin/base_controller.rb
+++ b/app/controllers/admin/base_controller.rb
@@ -1,42 +1,42 @@
class Admin::BaseController < ApplicationController
before_action :require_admin, except: [:login]
# GET /admin
# POST /admin
def index
@client_ids = Client.pluck(:ClientId)
get_charts
@global_stats = GlobalStats.new.stats
- @jobs = Job.includes(:file_set, :logs, :client).
+ @jobs = Job.includes(:file_set, :client).
where('EndTime > ?', days_ago.days.ago).
order(EndTime: :desc)
render 'admin/index'
end
# GET /admin/login
def login
render 'admin/login'
end
# GET /admin/raiser
# Raises an exception on demand, for sentry testing
def raiser
raise 'Error on Demand'
end
protected
def get_charts
@job_status = ChartGenerator.job_statuses(@client_ids, days_ago)
@job_stats = ChartGenerator.job_stats(@client_ids, days_ago - 1)
end
def require_admin
return if current_user.try(:has_admin_access?)
flash[:alert] = 'You need to log in first'
redirect_to admin_login_path
end
end
diff --git a/app/views/admin/clients/_recent_job.html.erb b/app/views/admin/clients/_recent_job.html.erb
index e5f5331..a7ff17c 100644
--- a/app/views/admin/clients/_recent_job.html.erb
+++ b/app/views/admin/clients/_recent_job.html.erb
@@ -1,14 +1,12 @@
<tr class="<%= success_class(recent_job.job_status) %>">
<td><%= recent_job.name %></td>
<td><%= recent_job.job_id %></td>
<td><%= recent_job.level_human %></td>
<td><%= recent_job.fileset %></td>
<td><%= recent_job.start_time_formatted %></td>
<td><%= recent_job.end_time_formatted %></td>
<td><%= recent_job.duration %></td>
<td><%= number_to_human_size(recent_job.job_bytes) %></td>
<td><%= number_by_magnitude(recent_job.job_files) %></td>
<td><%= recent_job.status_human %></td>
- <td><%= recent_job.encryption %></td>
- <td><%= recent_job.compression %></td>
</tr>
diff --git a/app/views/admin/clients/_recent_jobs.html.erb b/app/views/admin/clients/_recent_jobs.html.erb
index dd35d54..443cfa1 100644
--- a/app/views/admin/clients/_recent_jobs.html.erb
+++ b/app/views/admin/clients/_recent_jobs.html.erb
@@ -1,25 +1,23 @@
<div class="col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Name</th>
<th>JobId</th>
<th>Level</th>
<th>Fileset</th>
<th>Started At</th>
<th>Finished At</th>
<th>Duration</th>
<th>Bytes</th>
<th>Files</th>
<th>Status</th>
- <th>Encryption</th>
- <th>Compression</th>
</tr>
</thead>
<tbody>
<%= render partial: 'recent_job', collection: @jobs %>
</tbody>
</table>
</div>
</div>
diff --git a/app/views/admin/jobs/_recent_job.html.erb b/app/views/admin/jobs/_recent_job.html.erb
index 1c4c8e5..f66139b 100644
--- a/app/views/admin/jobs/_recent_job.html.erb
+++ b/app/views/admin/jobs/_recent_job.html.erb
@@ -1,18 +1,16 @@
<tr class="<%= success_class(recent_job.job_status) %>">
<td><%= recent_job.name %></td>
<td><%= recent_job.client.name %></td>
<td>
<%= link_to recent_job.job_id,
logs_admin_client_path(recent_job.client, job_id: recent_job.id) %>
</td>
<td><%= recent_job.level_human %></td>
<td><%= recent_job.fileset %></td>
<td><%= recent_job.start_time_formatted %></td>
<td><%= recent_job.end_time_formatted %></td>
<td><%= recent_job.duration %></td>
<td><%= number_to_human_size(recent_job.job_bytes) %></td>
<td><%= number_by_magnitude(recent_job.job_files) %></td>
<td><%= recent_job.status_human %></td>
- <td><%= recent_job.encryption %></td>
- <td><%= recent_job.compression %></td>
</tr>
diff --git a/app/views/admin/jobs/_recent_jobs.html.erb b/app/views/admin/jobs/_recent_jobs.html.erb
index 0f7ffbe..aadace0 100644
--- a/app/views/admin/jobs/_recent_jobs.html.erb
+++ b/app/views/admin/jobs/_recent_jobs.html.erb
@@ -1,26 +1,24 @@
<div class="col-xs-12">
<div class="table-responsive">
<table id="admin_jobs" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Client</th>
<th>JobId</th>
<th class="no-search">Level</th>
<th class="no-search">Fileset</th>
<th class="no-search">Started At</th>
<th class="no-search">Finished At</th>
<th class="no-search">Duration</th>
<th class="no-search">Bytes</th>
<th class="no-search">Files</th>
<th class="no-search">Status</th>
- <th class="no-search">Encryption</th>
- <th class="no-search">Compression</th>
</tr>
</thead>
<tbody>
<%= render partial: 'admin/jobs/recent_job', collection: @jobs %>
</tbody>
</table>
</div>
</div>
diff --git a/app/views/clients/_recent_job.html.erb b/app/views/clients/_recent_job.html.erb
index e5f5331..a7ff17c 100644
--- a/app/views/clients/_recent_job.html.erb
+++ b/app/views/clients/_recent_job.html.erb
@@ -1,14 +1,12 @@
<tr class="<%= success_class(recent_job.job_status) %>">
<td><%= recent_job.name %></td>
<td><%= recent_job.job_id %></td>
<td><%= recent_job.level_human %></td>
<td><%= recent_job.fileset %></td>
<td><%= recent_job.start_time_formatted %></td>
<td><%= recent_job.end_time_formatted %></td>
<td><%= recent_job.duration %></td>
<td><%= number_to_human_size(recent_job.job_bytes) %></td>
<td><%= number_by_magnitude(recent_job.job_files) %></td>
<td><%= recent_job.status_human %></td>
- <td><%= recent_job.encryption %></td>
- <td><%= recent_job.compression %></td>
</tr>
diff --git a/app/views/clients/_recent_jobs.html.erb b/app/views/clients/_recent_jobs.html.erb
index da33da0..9a173a2 100644
--- a/app/views/clients/_recent_jobs.html.erb
+++ b/app/views/clients/_recent_jobs.html.erb
@@ -1,25 +1,23 @@
<div class="col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Name</th>
<th>JobId</th>
<th>Level</th>
<th>Fileset</th>
<th>Started At</th>
<th>Finished At</th>
<th>Duration</th>
<th>Bytes</th>
<th>Files</th>
<th>Status</th>
- <th>Encryption</th>
- <th>Compression</th>
</tr>
</thead>
<tbody>
<%= render partial: 'clients/recent_job', collection: @jobs %>
</tbody>
</table>
</div>
</div>
Event Timeline
Log In to Comment