Commit 9d8a420d8faa127d43b246ef7f8a0b0864afe8b0

Thomas de Grivel 2024-06-22T07:54:18

[admin] remove disk usage (0.00 kB)

diff --git a/lib/kmxgit_web/templates/admin/organisation/index.html.heex b/lib/kmxgit_web/templates/admin/organisation/index.html.heex
index 07fd206..504c83e 100644
--- a/lib/kmxgit_web/templates/admin/organisation/index.html.heex
+++ b/lib/kmxgit_web/templates/admin/organisation/index.html.heex
@@ -15,7 +15,6 @@
         <th><%= link gettext("Id"), to: Routes.admin_organisation_path(@conn, :index, search: @search, sort: "id#{if @index.column == "id" && !@index.reverse, do: "-"}") %><%= if @index.column == "id" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Name"), to: Routes.admin_organisation_path(@conn, :index, search: @search, sort: "name#{if @index.column == "name" && !@index.reverse, do: "-"}") %><%= if @index.column == "name" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Slug"), to: Routes.admin_organisation_path(@conn, :index, search: @search, sort: "slug#{if @index.column == "slug" && !@index.reverse, do: "-"}") %><%= if @index.column == "slug" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
-        <th><%= link gettext("Disk usage"), to: Routes.admin_organisation_path(@conn, :index, search: @search, sort: "du#{if @index.column != "du" || (@index.column == "du" && !@index.reverse), do: "-"}") %><%= if @index.column == "du" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= gettext("Actions") %></th>
       </tr>
     </thead>
@@ -25,7 +24,6 @@
           <td><%= link org.id, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
           <td><%= link org.name, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
           <td><%= link org.slug_, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
-          <td><%= disk_usage(org.disk_usage) %></td>
           <td>
             <%= link gettext("Show"), to: Routes.slug_path(@conn, :show, org.slug_), class: "btn btn-sm btn-primary" %>
           </td>
diff --git a/lib/kmxgit_web/templates/admin/organisation/show.html.heex b/lib/kmxgit_web/templates/admin/organisation/show.html.heex
index 40a546f..bc0ce70 100644
--- a/lib/kmxgit_web/templates/admin/organisation/show.html.heex
+++ b/lib/kmxgit_web/templates/admin/organisation/show.html.heex
@@ -48,10 +48,6 @@
         </ul>
       </td>
     </tr>
-    <tr>
-      <th><%= gettext "Disk usage" %></th>
-      <td><%= disk_usage(@org.disk_usage) %></td>
-    </tr>
   </table>
 
   <%= link gettext("Delete organisation"),
diff --git a/lib/kmxgit_web/templates/admin/repository/index.html.heex b/lib/kmxgit_web/templates/admin/repository/index.html.heex
index 6e6554b..ea93ba3 100644
--- a/lib/kmxgit_web/templates/admin/repository/index.html.heex
+++ b/lib/kmxgit_web/templates/admin/repository/index.html.heex
@@ -9,7 +9,6 @@
         <th><%= link gettext("Owner"), to: Routes.admin_repository_path(@conn, :index, search: @search, sort: "owner#{if @index.column == "owner" && !@index.reverse, do: "-"}") %><%= if @index.column == "owner" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Public access ?"), to: Routes.admin_repository_path(@conn, :index, search: @search, sort: "slug#{if @index.column == "public_access" && !@index.reverse, do: "-"}") %><%= if @index.column == "public_access" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Slug"), to: Routes.admin_repository_path(@conn, :index, search: @search, sort: "slug#{if @index.column == "slug" && !@index.reverse, do: "-"}") %><%= if @index.column == "slug" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
-        <th><%= link gettext("Disk usage"), to: Routes.admin_repository_path(@conn, :index, search: @search, sort: "du#{if @index.column != "du" || (@index.column == "du" && !@index.reverse), do: "-"}") %><%= if @index.column == "du" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= gettext("Actions") %></th>
       </tr>
     </thead>
@@ -33,7 +32,6 @@
             <% end %>
           </td>
           <td><%= link Repository.full_slug(repo), to: Routes.admin_repository_path(@conn, :show, repo) %></td>
-          <td><%= disk_usage(repo.disk_usage) %></td>
           <td>
             <%= link gettext("Show"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(repo), Repository.splat(repo)), class: "btn btn-sm btn-primary" %>
           </td>
diff --git a/lib/kmxgit_web/templates/admin/repository/show.html.heex b/lib/kmxgit_web/templates/admin/repository/show.html.heex
index d0eff16..a7d4be5 100644
--- a/lib/kmxgit_web/templates/admin/repository/show.html.heex
+++ b/lib/kmxgit_web/templates/admin/repository/show.html.heex
@@ -66,10 +66,6 @@
       </td>
     </tr>
     <tr>
-      <th><%= gettext "Disk usage" %></th>
-      <td><%= disk_usage(@repo.disk_usage) %></td>
-    </tr>
-    <tr>
       <th><%= gettext "Deploy keys (read-only)" %></th>
       <td><pre class="admin_ssh_keys"><%= @repo.deploy_keys %></pre></td>
     </tr>
diff --git a/lib/kmxgit_web/templates/admin/user/index.html.heex b/lib/kmxgit_web/templates/admin/user/index.html.heex
index 0737836..f307e7e 100644
--- a/lib/kmxgit_web/templates/admin/user/index.html.heex
+++ b/lib/kmxgit_web/templates/admin/user/index.html.heex
@@ -16,7 +16,6 @@
         <th><%= link gettext("Name"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "name#{if @index.column == "name" && !@index.reverse, do: "-"}") %><%= if @index.column == "name" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Email"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "email#{if @index.column == "email" && !@index.reverse, do: "-"}") %><%= if @index.column == "email" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Login"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "login#{if @index.column == "login" && !@index.reverse, do: "-"}") %><%= if @index.column == "login" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
-        <th><%= link gettext("Disk usage"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "du#{if @index.column != "du" || (@index.column == "du" && !@index.reverse), do: "-"}") %><%= if @index.column == "du" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("2FA"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "mfa#{if @index.column == "mfa" && !@index.reverse, do: "-"}") %><%= if @index.column == "mfa" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Admin"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "admin#{if @index.column == "admin" && !@index.reverse, do: "-"}") %><%= if @index.column == "admin" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
         <th><%= link gettext("Deploy"), to: Routes.admin_user_path(@conn, :index, search: @search, sort: "deploy#{if @index.column == "deploy" && !@index.reverse, do: "-"}") %><%= if @index.column == "deploy" do %><%= if @index.reverse do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
@@ -30,7 +29,6 @@
           <td><%= link user.name, to: Routes.admin_user_path(@conn, :show, user) %></td>
           <td><%= link user.email, to: "mailto:#{user.email}" %></td>
           <td><%= link User.login(user), to: Routes.admin_user_path(@conn, :show, user) %></td>
-          <td><%= disk_usage(user.disk_usage) %></td>
           <td><%= if user.totp_last != 0, do: "TOTP", else: "none" %></td>
           <td><%= user.is_admin %></td>
           <td><%= user.deploy_only %></td>
diff --git a/lib/kmxgit_web/templates/admin/user/show.html.heex b/lib/kmxgit_web/templates/admin/user/show.html.heex
index 289feae..92ed886 100644
--- a/lib/kmxgit_web/templates/admin/user/show.html.heex
+++ b/lib/kmxgit_web/templates/admin/user/show.html.heex
@@ -49,10 +49,6 @@
       </td>
     </tr>
     <tr>
-      <th><%= gettext "Disk usage" %></th>
-      <td><%= disk_usage(@user.disk_usage) %></td>
-    </tr>
-    <tr>
       <th><%= gettext "2FA" %></th>
       <td><%= if @user.totp_last != 0, do: "TOTP", else: "none" %></td>
     </tr>