Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acf-postgresql
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACF
acf-postgresql
Commits
cb12a51c
Commit
cb12a51c
authored
Mar 04, 2014
by
Ted Trask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sort by filesize in logfiles/status
parent
36de5feb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
postgresql-listfiles-html.lsp
postgresql-listfiles-html.lsp
+15
-1
No files found.
postgresql-listfiles-html.lsp
View file @
cb12a51c
...
...
@@ -3,6 +3,20 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
<%
function convertsize(size)
if string.find(size, "k$") then
return tonumber(string.match(size, "[%d.]*")) * 1024.0
elseif string.find(size, "M$") then
return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0
elseif string.find(size, "G$") then
return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0
else
return tonumber(string.match(size, "[%d.]*"))
end
end
%>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
...
...
@@ -38,7 +52,7 @@ end %>
<% for i,file in ipairs(data.value) do %>
<tr>
<td><%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></td>
<td><%= html.html_escape(file.filesize) %></td>
<td><
span style="display:none"><%= convertsize(file.filesize) %>b</span><
%= html.html_escape(file.filesize) %></td>
<td><%= html.html_escape(file.mtime) %></td>
</tr>
<% end %>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment