From 50646613a0e90b93a1aa8b0f1868a52fc43813a5 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Tue, 18 Feb 2020 13:47:19 +0100 Subject: [PATCH] Add UI button for deleting a WDS client --- app/models/wds_server.rb | 1 - app/views/wds_servers/clients/_list.html.erb | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/wds_server.rb b/app/models/wds_server.rb index b1f6294..2169206 100644 --- a/app/models/wds_server.rb +++ b/app/models/wds_server.rb @@ -204,7 +204,6 @@ class WdsServer < ApplicationRecord end.errcode.zero? end - def images(type, name = nil) raise ArgumentError, 'Type must be :boot or :install' unless %i[boot install].include? type diff --git a/app/views/wds_servers/clients/_list.html.erb b/app/views/wds_servers/clients/_list.html.erb index a7c294d..293e5e6 100644 --- a/app/views/wds_servers/clients/_list.html.erb +++ b/app/views/wds_servers/clients/_list.html.erb @@ -9,6 +9,7 @@ <th><%= s_("Client|Architecture") %></th> <th><%= s_("Client|Boot Image") %></th> <th><%= s_("Client|Unattend") %></th> + <th><%= s_("Client|Actions") %></th> </tr> </thead> <tbody> @@ -30,6 +31,12 @@ <td><%= client[:architecture] %></td> <td><%= client[:boot_image_path] %></td> <td><%= client[:wds_client_unattend] %></td> + <td><%= host && action_buttons( + display_link_if_authorized( + _('Delete'), + hash_for_delete_wds_client_wds_server_path(id: @wds_server, client: host) + ) + ) %></td> </tr> <%- end -%> </tbody> -- GitLab