diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 21:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 21:07:51 +0000 |
commit | d74fcc9b69746c4d9582299c370a95aafe2ac3ac (patch) | |
tree | 8230bdf94ff004521422c9986062278dd3bc5b3f /app/views | |
parent | 8a7efa45c38ed3200d173d2c3207a8154e583c16 (diff) | |
download | gitlab-ce-d74fcc9b69746c4d9582299c370a95aafe2ac3ac.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/serverless/domains/_form.html.haml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/admin/serverless/domains/_form.html.haml b/app/views/admin/serverless/domains/_form.html.haml index 8c1c1d41caa..9e7990ef8ca 100644 --- a/app/views/admin/serverless/domains/_form.html.haml +++ b/app/views/admin/serverless/domains/_form.html.haml @@ -66,3 +66,34 @@ = _("Upload a private key for your certificate") = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "btn btn-success js-serverless-domain-submit", disabled: @domain.persisted? + - if @domain.persisted? + %button.btn.btn-remove{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } + = _('Delete domain') + +-# haml-lint:disable NoPlainNodes +- if @domain.persisted? + - domain_attached = @domain.serverless_domain_clusters.count > 0 + .modal{ id: "modal-delete-domain", tabindex: -1 } + .modal-dialog + .modal-content + .modal-header + %h3.page-title= _('Delete serverless domain?') + %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } + %span{ "aria-hidden": true } × + + .modal-body + - if domain_attached + = _("You must disassociate %{domain} from all clusters it is attached to before deletion.").html_safe % { domain: "<code>#{@domain.domain}</code>".html_safe } + - else + = _("You are about to delete %{domain} from your instance. This domain will no longer be available to any Knative application.").html_safe % { domain: "<code>#{@domain.domain}</code>".html_safe } + + .modal-footer + %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' } + = _('Cancel') + + = link_to _('Delete domain'), + admin_serverless_domain_path(@domain.id), + title: _('Delete'), + method: :delete, + class: "btn btn-remove", + disabled: domain_attached |