Commit 566eb7db3a25b4010e7bf2420706bb560070dbae

Thomas de Grivel 2022-08-02T17:49:10

remove disk_usage

diff --git a/lib/kmxgit_web/controllers/admin/dashboard_controller.ex b/lib/kmxgit_web/controllers/admin/dashboard_controller.ex
index 206d1d1..f34894d 100644
--- a/lib/kmxgit_web/controllers/admin/dashboard_controller.ex
+++ b/lib/kmxgit_web/controllers/admin/dashboard_controller.ex
@@ -8,7 +8,6 @@ defmodule KmxgitWeb.Admin.DashboardController do
 
   def index(conn, _params) do
     conn
-    |> assign(:disk_usage, Git.du_ks("priv/git/"))
     |> assign(:org_count, OrganisationManager.count_organisations())
     |> assign(:page_title, gettext "Dashboard")
     |> assign(:repo_count, RepositoryManager.count_repositories())
diff --git a/lib/kmxgit_web/controllers/page_controller.ex b/lib/kmxgit_web/controllers/page_controller.ex
index 6140a29..eeaa347 100644
--- a/lib/kmxgit_web/controllers/page_controller.ex
+++ b/lib/kmxgit_web/controllers/page_controller.ex
@@ -36,7 +36,6 @@ defmodule KmxgitWeb.PageController do
     else
       conn
       |> assign(:discord, Application.get_env(:kmxgit, :discord))
-      |> assign(:disk_usage, Git.du_ks("priv/git/"))
       |> assign(:git_ssh_url, Application.get_env(:kmxgit, :git_ssh_url))
       |> assign(:org_count, OrganisationManager.count_organisations())
       |> assign(:repo_count, RepositoryManager.count_repositories())
diff --git a/lib/kmxgit_web/templates/admin/dashboard/index.html.heex b/lib/kmxgit_web/templates/admin/dashboard/index.html.heex
index 35bb5d1..6667dd7 100644
--- a/lib/kmxgit_web/templates/admin/dashboard/index.html.heex
+++ b/lib/kmxgit_web/templates/admin/dashboard/index.html.heex
@@ -8,10 +8,6 @@
     <div class="col col-12 col-md-5">
       <table class="table">
         <tr>
-          <th><%= gettext "Disk usage" %></th>
-          <td><%= disk_usage(@disk_usage) %></td>
-        </tr>
-        <tr>
           <th><%= gettext "Users" %></th>
           <td><%= @user_count %></td>
         </tr>
diff --git a/lib/kmxgit_web/templates/page/index.html.heex b/lib/kmxgit_web/templates/page/index.html.heex
index b432f5b..cb825b0 100644
--- a/lib/kmxgit_web/templates/page/index.html.heex
+++ b/lib/kmxgit_web/templates/page/index.html.heex
@@ -77,10 +77,6 @@ git push -u kmx master</code></pre>
         <div class="col col-12 col-md-5">
           <table class="table">
             <tr>
-              <th><%= gettext "Disk usage" %></th>
-              <td><%= disk_usage(@disk_usage) %></td>
-            </tr>
-            <tr>
               <th><%= gettext "Users" %></th>
               <td><%= @user_count %></td>
             </tr>