Skip to content

Commit

Permalink
Merge pull request #1568 from UrbanOS-Public/976
Browse files Browse the repository at this point in the history
976
  • Loading branch information
c-m-duncan authored Jan 3, 2023
2 parents d813faa + cde67ef commit 96e85da
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ defmodule AndiWeb.EditLiveView.KeyValueEditor do
<%= hidden_input(f, :id) %>
<tr class="url-form-table__row url-form-table__row--bordered">
<td class="url-form-table__cell url-form-table__cell--bordered">
<%= text_input(f, :key, class: "input full-width url-form__#{@css_label}-key-input #{input_value(f, :id)}") %>
<%= text_input(f, :key, [aria_label: "S3 Key", class: "input full-width url-form__#{@css_label}-key-input #{input_value(f, :id)}"]) %>
</td>
<td class="url-form-table__cell url-form-table__cell--bordered">
<%= text_input(f, :value, class: "input full-width url-form__#{@css_label}-value-input #{input_value(f, :id)}") %>
<%= text_input(f, :value, [aria_label: "S3 Value" ,class: "input full-width url-form__#{@css_label}-value-input #{input_value(f, :id)}"]) %>
</td>
<td class="url-form-table__cell url-form-table__cell--delete">
<button type="button" class="url-form__<%= @css_label %>-delete-btn url-form-table__btn" phx-click="remove" phx-target="<%= event_handler_target %>" phx-value-id="<%= input_value(f, :id) %>" phx-value-field="<%= @field %>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,35 @@ defmodule AndiWeb.ExtractSteps.ExtractAuthStepForm do
<div class="extract-auth-step-form-edit-section form-grid">
<div class="extract-auth-step-form__destination">
<%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required") %>
<%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required", for: "step_#{@id}__auth_destination") %>
<%= text_input(f, :destination, [id: "step_#{@id}__auth_destination", class: "input", required: true]) %>
<%= ErrorHelpers.error_tag(f, :destination, bind_to_input: false) %>
</div>
<div class="extract-auth-step-form__url">
<%= label(f, :url, DisplayNames.get(:url), class: "label label--required") %>
<%= label(f, :url, DisplayNames.get(:url), class: "label label--required", for: "step_#{@id}__auth_url") %>
<%= text_input(f, :url, [id: "step_#{@id}__auth_url", class: "input full-width", required: true]) %>
<%= ErrorHelpers.error_tag(f, :url, bind_to_input: false) %>
</div>
<%= live_component(@socket, KeyValueEditor, id: "step_#{@id}__key_value_editor_headers" <> @extract_step.id, css_label: "source-headers", form: f, field: :headers, target: "step-" <> @id) %>
<div class="extract-auth-step-form__body">
<%= label(f, :body, DisplayNames.get(:body), class: "label") %>
<%= textarea(f, :body, id: "step_#{@id}__auth_url", class: "input full-width", phx_hook: "prettify") %>
<%= label(f, :body, DisplayNames.get(:body), class: "label", for: "step_#{@id}__auth_body") %>
<%= textarea(f, :body, id: "step_#{@id}__auth_body", class: "input full-width", phx_hook: "prettify") %>
<%= ErrorHelpers.error_tag(f, :body, bind_to_input: false) %>
</div>
<div class="extract-auth-step-form__path">
<%= label(f, :path, DisplayNames.get(:path), class: "label label--required") %>
<%= label(f, :path, DisplayNames.get(:path), class: "label label--required", for: "step_#{@id}__auth_path") %>
<% form_path = input_value(f, :path) %>
<%= text_input(f, :path, [id: "step_#{@id}__auth_path", class: "input", value: path_to_string(form_path), required: true]) %>
<span class="input__help-text">Separate response path keys with a period (.) (e.g. 'data.token' for response {"data": {"token": "abc123"}}) </span>
<%= ErrorHelpers.error_tag(f, :path, bind_to_input: false) %>
</div>
<div class="extract-auth-step-form__cacheTtl">
<%= label(f, :cacheTtl, DisplayNames.get(:cacheTtl), class: "label label--required") %>
<%= label(f, :cacheTtl, DisplayNames.get(:cacheTtl), class: "label label--required", for: "step_#{@id}__auth_cache_ttl") %>
<% form_ttl = input_value(f, :cacheTtl) %>
<%= text_input(f, :cacheTtl, [id: "step_#{@id}__auth_cache_ttl", class: "input", value: milliseconds_to_minutes(form_ttl), required: true]) %>
<span class="input__help-text">Time in minutes that credentials are stored (defaults to 15 minutes)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule AndiWeb.ExtractSteps.ExtractS3StepForm do
<div class="extract-s3-step-form-edit-section form-grid">
<div class="extract-s3-step-form__url">
<%= label(f, :url, DisplayNames.get(:url), class: "label label--required") %>
<%= label(f, :url, DisplayNames.get(:url), class: "label label--required", for: "step_#{@id}__s3_url") %>
<%= text_input(f, :url, [id: "step_#{@id}__s3_url", class: "input full-width", required: true]) %>
<%= ErrorHelpers.error_tag(f, :url, bind_to_input: false) %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ defmodule AndiWeb.ExtractSteps.ExtractSecretStepForm do
<div class="extract-secret-step-form-edit-section form-grid">
<div class="extract-secret-step-form__destination">
<%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required") %>
<%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required", for: "step_#{@id}__secret_destination") %>
<%= text_input(f, :destination, [id: "step_#{@id}__secret_destination", class: "extract-secret-step-form__destination input", phx_target: "#step-#{@id}", required: true]) %>
<%= ErrorHelpers.error_tag(f, :destination) %>
</div>
<div class="extract-secret-step-form__value">
<%= label(f, :secret_value, DisplayNames.get(:secret_value), class: "label label--required") %>
<%= label(f, :secret_value, DisplayNames.get(:secret_value), class: "label label--required", for: "step_#{@id}__secret_value") %>
<div class="secret_value_add">
<%= text_input(f, :secret_value, [id: "step_#{@id}__secret_destination", type: "password", class: "extract-secret-step-form__secret-value input", phx_target: "#step-#{@id}", placeholder: "Secrets are not displayed after being saved", required: true]) %>
<%= text_input(f, :secret_value, [id: "step_#{@id}__secret_value", type: "password", class: "extract-secret-step-form__secret-value input", phx_target: "#step-#{@id}", placeholder: "Secrets are not displayed after being saved", required: true]) %>
<% secret_value = FormData.input_value(nil, f, :secret_value) %>
<button type="button" class="btn btn--action" phx-click="save_secret" <%= disable_add_button(@changeset, secret_value) %> phx-target='<%="#step-#{@id}"%>' phx-value-secret="<%= secret_value %>">Add</button>
<span class="secret__status-msg <%= save_success_class(@save_success) %>"><%= @save_secret_message %></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,28 @@ defmodule AndiWeb.IngestionLiveView.FinalizeForm do
<div class="finalize-form__schedule-input">
<div class="finalize-form__schedule-input-field">
<label>Second</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="second" value="<%= @crontab_list[:second] %>" />
<label for="finalize-form-schedule-input__second">Second</label>
<input id="finalize-form-schedule-input__second" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="second" value="<%= @crontab_list[:second] %>" />
</div>
<div class="finalize-form__schedule-input-field">
<label>Minute</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="minute" value="<%= @crontab_list[:minute] %>" />
<label for="finalize-form-schedule-input__minute">Minute</label>
<input id="finalize-form-schedule-input__minute" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="minute" value="<%= @crontab_list[:minute] %>" />
</div>
<div class="finalize-form__schedule-input-field">
<label>Hour</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="hour" value="<%= @crontab_list[:hour] %>" />
<label for="finalize-form-schedule-input__hour">Hour</label>
<input id="finalize-form-schedule-input__hour" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="hour" value="<%= @crontab_list[:hour] %>" />
</div>
<div class="finalize-form__schedule-input-field">
<label>Day</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="day" value="<%= @crontab_list[:day] %>" />
<label for="finalize-form-schedule-input__day">Day</label>
<input id="finalize-form-schedule-input__day" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="day" value="<%= @crontab_list[:day] %>" />
</div>
<div class="finalize-form__schedule-input-field">
<label>Month</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="month" value="<%= @crontab_list[:month] %>" />
<label for="finalize-form-schedule-input__month">Month</label>
<input id="finalize-form-schedule-input__month" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="month" value="<%= @crontab_list[:month] %>" />
</div>
<div class="finalize-form__schedule-input-field">
<label>Week</label>
<input class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="week" value="<%= @crontab_list[:week] %>" />
<label for="finalize-form-schedule-input__week">Week</label>
<input id="finalize-form-schedule-input__week" class="finalize-form-schedule-input__field" phx-keyup="set_schedule" phx-value-input-field="week" value="<%= @crontab_list[:week] %>" />
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ defmodule AndiWeb.DataDictionary.FieldEditor do
<%= if editing_ingestion? do %>
<div class="data-dictionary-field-editor__selector">
<%= if DataDictionaryHelpers.is_source_format_xml(@source_format) do %>
<%= label(@form, :selector, "Selector", class: "label label--required", for: id <> "_name") %>
<%= label(@form, :selector, "Selector", class: "label label--required", for: id <> "_selector") %>
<% else %>
<%= label(@form, :selector, "Selector", class: "label", for: id <> "_name") %>
<%= label(@form, :selector, "Selector", class: "label", for: id <> "_selector") %>
<% end %>
<%= text_input(@form, :selector, [id: id <> "_name", class: "data-dictionary-field-editor__selector input", disabled: !DataDictionaryHelpers.is_source_format_xml(@source_format), required: true]) %>
<%= text_input(@form, :selector, [id: id <> "_selector", class: "data-dictionary-field-editor__selector input", disabled: !DataDictionaryHelpers.is_source_format_xml(@source_format), required: true]) %>
<%= ErrorHelpers.error_tag(form_with_errors, :selector) %>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion apps/andi/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Andi.MixProject do
def project do
[
app: :andi,
version: "2.4.29",
version: "2.4.30",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ defmodule AndiWeb.ExtractHttpStepFormTest do
"secret",
%{
destination: "secret",
value: "value",
key: "secret1-key",
sub_key: "secret1-sub-key"
}
Expand All @@ -260,6 +261,7 @@ defmodule AndiWeb.ExtractHttpStepFormTest do
"secret",
%{
destination: "secret2",
value: "value",
key: "secret2-key",
sub_key: "secret2-sub-key"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule AndiWeb.ExtractSecretFormTest do

default_context = %{
destination: "bob_field",
secret_value: "value",
sub_key: "secret-key"
}

Expand Down

0 comments on commit 96e85da

Please sign in to comment.