Hide MikroTik API/SSH features from UI
Temporarily disable all MikroTik-related UI elements using false guards. Code is preserved and can be re-enabled by removing the guards. Hidden: org settings tab/panel, device form config section, device show backups/timeline tabs, site form config section, help page nav item.
This commit is contained in:
parent
6d678b6d17
commit
866715fdcc
5 changed files with 11 additions and 7 deletions
|
|
@ -624,7 +624,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= if @live_action == :edit and @is_mikrotik_device do %>
|
||||
<%= if false and @live_action == :edit and @is_mikrotik_device do %>
|
||||
<!-- MikroTik API Configuration -->
|
||||
<div
|
||||
class="grid max-w-7xl grid-cols-1 gap-x-8 gap-y-6 px-4 py-8 sm:px-6 md:grid-cols-3 lg:px-8"
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@
|
|||
</.link>
|
||||
<% end %>
|
||||
|
||||
<%= if @device.mikrotik_enabled do %>
|
||||
<%= if false and @device.mikrotik_enabled do %>
|
||||
<.link
|
||||
patch={~p"/devices/#{@device.id}?tab=backups"}
|
||||
class={[
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
</.link>
|
||||
<% end %>
|
||||
|
||||
<%= if @device.mikrotik_enabled do %>
|
||||
<%= if false and @device.mikrotik_enabled do %>
|
||||
<.link
|
||||
navigate={~p"/devices/#{@device.id}/config-timeline"}
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 border-transparent font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"
|
||||
|
|
@ -624,7 +624,7 @@
|
|||
<% end %>
|
||||
|
||||
<%!-- Recent Config Changes mini-card --%>
|
||||
<%= if @device.mikrotik_enabled && assigns[:recent_config_changes] && Enum.any?(@recent_config_changes) do %>
|
||||
<%= if false && @device.mikrotik_enabled && assigns[:recent_config_changes] && Enum.any?(@recent_config_changes) do %>
|
||||
<div class="bg-white dark:bg-gray-800/50 rounded-lg border border-gray-200 dark:border-white/10">
|
||||
<div class="px-4 py-3 border-b border-gray-200 dark:border-white/10 flex items-center justify-between">
|
||||
<h3 class="text-sm font-semibold text-gray-900 dark:text-white flex items-center gap-1.5">
|
||||
|
|
@ -1856,7 +1856,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% "backups" -> %>
|
||||
<%= if @device.mikrotik_enabled do %>
|
||||
<%= if false and @device.mikrotik_enabled do %>
|
||||
<div class="bg-white dark:bg-gray-800/50 rounded-lg border border-gray-200 dark:border-white/10">
|
||||
<div class="px-4 py-3 border-b border-gray-200 dark:border-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ defmodule ToweropsWeb.HelpLive.Index do
|
|||
Integrations
|
||||
</.link>
|
||||
</li>
|
||||
<%= if false do %>
|
||||
<li>
|
||||
<.link
|
||||
patch={~p"/help?section=mikrotik"}
|
||||
|
|
@ -267,6 +268,7 @@ defmodule ToweropsWeb.HelpLive.Index do
|
|||
MikroTik
|
||||
</.link>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<.link
|
||||
patch={~p"/help?section=graphs"}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
</.link>
|
||||
</li>
|
||||
<%= if @current_scope.user.is_superuser do %>
|
||||
<%= if false do %>
|
||||
<li>
|
||||
<.link
|
||||
patch={~p"/orgs/#{@organization.slug}/settings?tab=mikrotik"}
|
||||
|
|
@ -54,6 +55,7 @@
|
|||
{t("MikroTik")}
|
||||
</.link>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li>
|
||||
<.link
|
||||
|
|
@ -365,7 +367,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= if @active_tab == "mikrotik" && @current_scope.user.is_superuser do %>
|
||||
<%= if false && @active_tab == "mikrotik" && @current_scope.user.is_superuser do %>
|
||||
<!-- MikroTik API Configuration Section -->
|
||||
<div class="grid max-w-7xl grid-cols-1 gap-x-8 gap-y-6 px-4 py-8 sm:px-6 md:grid-cols-3 lg:px-8">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= if @current_scope.user.is_superuser do %>
|
||||
<%= if false and @current_scope.user.is_superuser do %>
|
||||
<div class="mt-6 border-t pt-6">
|
||||
<h3 class="text-base font-medium mb-4">
|
||||
{t("MikroTik API Configuration")}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue