docbrown/app/views/admin/secrets/index.html.erb
Ridhwana cf5207564f
RFC#50-P5 Prepares the admin restructure to be tested (#13114)
* feat: make the sidebar more dynamic

* refactor: use the action in the same controller instead of the whole path

* feat: remove hardcoded routes

* feat: move routes into file

* feat: use rails 6 draw for the admin routes

* add a helper method

* oops: fix super

* feat: add the hacky helper methods :( )

* WIP: created different path helpers for the new routes and point the old helpers to the new ones if the FF is toggled

* feat: update the module

* chore: add new paths

* feat: change link_to's use paths instead

* feat: feedback_messages to scoped admin route

* chore: update the feature flag urls helpers

* feat: feedback_messages issue

* chore: remove all the workarounds

* chore: rubucop

* fix: oops remove helper

* chore: comment out the tests that touch the tabbed navbar which is affected by the rails application needing to be reloaded

* feat: ensure that we chcek if the db table exists
2021-04-15 14:53:46 +02:00

28 lines
1 KiB
Text

<% unless @vault_enabled %>
<div class="crayons-notice crayons-notice--info mb-6" role="alert">
<p>
Vault is not currently setup for your application. This means your secrets are being stored as ENV variables and cannot be updated here. To update them you will need to update the appropriate files in your environment.
</p>
</div>
<% end %>
<table class="crayons-table" width="100%">
<thead>
<tr>
<th scope="col">Secret Name</th>
<th scope="col">Secret Value</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody class="crayons-card">
<% @secrets.each do |key, partial_value| %>
<tr>
<%= form_with(url: admin_secrets_path, method: "PUT", local: true) do %>
<td><%= label_tag key, key %></td>
<td><%= text_field_tag key, partial_value %></td>
<td><%= submit_tag("Update", data: { confirm: "My username is @#{current_user.username} and I want to update this Vault Secret." }, disabled: !@vault_enabled) %></td>
<% end %>
</tr>
<% end %>
</tbody>
</table>