Skip to content

Commit

Permalink
comment out the folder size until a more efficient solution is devised
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmcmichael committed Apr 7, 2016
1 parent 33fd7e4 commit 5cdd369
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/filesystem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def safe_path? (path)
# Get the disk usage of a path in bytes, nil if path is invalid
def path_size (path)
if Dir.exist? path
Integer(`du -s #{path}`.split('/')[0]) * 1024
Integer(`du -s -b #{path}`.split('/')[0])
end
end
end
12 changes: 8 additions & 4 deletions app/views/osc_jobs/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div class="col-md-7">
<div id="job-list-view" class="panel panel-default">
<div class="panel-body">

<div class="panel-body">
<a class="btn btn-default btn-sm" id="open_dir_button" target="_blank" data-toggle="tooltip" title="Open Directory in File Manager" role="button" disabled><span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> Open Dir</a>
<a class="btn btn-default btn-sm" id="copy_button" data-toggle="tooltip" title="Copy Job" role="button" data-method="get" disabled><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span></a>
Expand All @@ -29,7 +29,7 @@
<a class="btn btn-danger btn-sm" id="destroy_button" data-toggle="tooltip" title="Delete Job" data-method="get" data-confirm="Are you sure?" role="button" disabled><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
</div>

<div class="panel-body col-sm-12" style="overflow-x: auto;">
<div class="panel-body" style="overflow-x: auto;">
<table id="job-list-table" class="table data-table">
<thead>
<tr>
Expand All @@ -38,7 +38,9 @@
<th>PBS ID</th>
<th>Cluster</th>
<th>Status</th>
<!-- FILE_SIZE_FEATURE
<th>Size</th>
-->
</tr>
</thead>

Expand All @@ -50,13 +52,15 @@
<td><%= osc_job.pbsid %></td>
<td><%= osc_job.batch_host.titleize %></td>
<td id="status_label_<%= osc_job.id %>"><%= status_label(osc_job) %></td>
<td><%= number_to_human_size(Filesystem.new.path_size(osc_job.staged_dir)) %></td>
<!-- FILE_SIZE_FEATURE
<td><%# number_to_human_size(Filesystem.new.path_size(osc_job.staged_dir)) %></td>
-->
</tr>
<% end %>
</tbody>
</table>
</div>
</div>

</div>
</div>

Expand Down

0 comments on commit 5cdd369

Please sign in to comment.