Parameter Management

Configure and manage terminal parameters across your device fleet

Total Parameters Pushed

<%= @job_statistics.total || 0 %>

All time

Successful Pushes

<%= @job_statistics.completed || 0 %>

Success rate: <%= if @job_statistics.total > 0, do: round((@job_statistics.completed || 0) / @job_statistics.total * 100), else: 0 %>%

Active Templates

<%= length(@parameter_templates) %>

Ready to use

Device Groups

<%= length(@terminal_groups) %>

Configured groups

Quick Actions

Push Configuration

Apply parameter templates or send custom configurations to devices

Bulk Operations

Push multiple parameter templates across device groups efficiently

Device Groups

Manage and organize devices into groups for easier parameter management

<.link navigate={~p"/terminals/groups"} class="w-full bg-teal-50 hover:bg-teal-100 text-teal-700 px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200 inline-flex items-center justify-center"> Open Device Groups Manager

Recent Parameter Jobs

Latest parameter push activities and their status

<%= if @parameter_jobs != [] do %> <%= for job <- @parameter_jobs do %> <% end %>
Request ID Device Template Status Timestamp
<%= job.request_id %>
<%= job.device_serial || "N/A" %>
<%= job.template_name || "Custom" %>
<%= case job.status do %> <% "completed" -> %> Completed <% "failed" -> %> Failed <% "pending" -> %> Pending <% _ -> %> Unknown <% end %> <%= if job.inserted_at do %> <%= Calendar.strftime(job.inserted_at, "%Y-%m-%d %H:%M") %> <% else %> N/A <% end %>
<% else %>

No parameter jobs found

Start by pushing parameters or applying templates to see job history here.

<% end %>
<%= if @show_parameter_form do %> <.slide_over origin="right" title="Push Terminal Configuration">

Push Terminal Configuration

Apply parameter templates or send custom configuration parameters

Configuration Mode

<%= if @parameter_mode != "custom" do %>

Parameter Templates

<%= if @selected_template do %>

Template Preview: <%= @selected_template.name %>

<%= @selected_template.description %>

<%= if @template_preview && length(@template_preview) > 0 do %>
Parameters:
<%= for param <- Enum.take(@template_preview, 6) do %>
<%= param.parameter_key %>: <%= param.parameter_value %>
<% end %> <%= if length(@template_preview) > 6 do %>
... and <%= length(@template_preview) - 6 %> more parameters
<% end %>
<% end %>
<% end %>
<% end %> <%= if @parameter_mode == "custom" do %>

Custom Parameters

<% end %>

Target Devices

Enter multiple device serials separated by commas, semicolons, or spaces

<%= if @parameter_mode == "template" && @selected_template do %>
<%= if @device_compatibility != %{} do %>

Compatibility Check Results

Total devices: <%= @device_compatibility.total %>

Compatible: <%= @device_compatibility.compatible %>

Incompatible: <%= @device_compatibility.incompatible %>

<% end %> <% end %>

Scheduling Options

<%= if @parameter_mode == "custom" do %> <% else %> <%= if @selected_template do %> <% else %> <% end %> <% end %>
<% end %> <%= if @show_bulk_operations do %> <.slide_over origin="right" title="Bulk Parameter Operations">

Bulk Parameter Operations

Push multiple parameter templates across device groups efficiently

Select Multiple Templates

Select one or more parameter templates to apply in bulk operation

<%= for template <- @parameter_templates do %> <% end %>
<%= if (@selected_bulk_templates || []) != [] do %>

Selected Templates (<%= length(@selected_bulk_templates || []) %>)

<%= for template_id <- @selected_bulk_templates || [] do %> <% template = Enum.find(@parameter_templates, &(&1.id == template_id)) %> <%= if template do %>
• <%= template.name %>
<% end %> <% end %>
<% end %>

Target Device Groups

Select device groups to apply the templates to

<%= for group <- @terminal_groups do %> <% end %>
<%= if @show_custom_device_input do %>

Enter device serial numbers separated by commas

<% end %>

Operation Settings

I confirm this bulk operation will be applied to multiple devices
<%= if (@selected_bulk_templates || []) != [] and ((@selected_bulk_groups || []) != [] or @show_custom_device_input) do %>

Operation Preview

Templates to apply: <%= length(@selected_bulk_templates || []) %> template(s)
Target groups: <%= length(@selected_bulk_groups || []) %> group(s)
Estimated devices affected: <%= Enum.reduce(@selected_bulk_groups || [], 0, fn group_id, acc -> group = Enum.find(@terminal_groups, &(&1.id == group_id)) acc + (group && group.device_count || 0) end) %> device(s)
<% end %>
<.link navigate={~p"/terminals/groups"} class="inline-flex items-center px-4 py-2 bg-teal-600 hover:bg-teal-700 text-white font-medium rounded-lg shadow-sm transition-colors duration-200 mr-3"> Manage Groups
<% end %> <%= if @show_template_manager do %>

Parameter Template Manager

Create, edit, and manage parameter templates

Create New Template

Existing Templates

<%= if @parameter_templates && length(@parameter_templates) > 0 do %>
<%= for template <- @parameter_templates do %> <% end %>
Template Vendor/Model Parameters Created Actions
<%= template.name %>
<%= template.description %>
<%= if template.vendor || template.model do %> <%= template.vendor %><%= if template.vendor && template.model, do: " - " %><%= template.model %> <% else %> Generic <% end %> <%= Map.get(template, :parameter_count, 0) %> params <%= Calendar.strftime(template.inserted_at, "%m/%d/%y") %>
<% else %>

No templates found

Get started by creating your first parameter template.

<% end %>
<% end %> <%= if @show_job_management do %>

Parameter Job Management

Monitor and manage parameter push job executions

Total Jobs
<%= @job_stats.total || 0 %>
Completed
<%= @job_stats.completed || 0 %>
Running
<%= @job_stats.running || 0 %>
Failed
<%= @job_stats.failed || 0 %>

Filter Jobs

Recent Parameter Jobs

<%= if @parameter_jobs && length(@parameter_jobs) > 0 do %>
<%= for job <- @parameter_jobs do %> <% end %>
Job ID Template Devices Status Progress Created Actions
#<%= job.id %> <%= Map.get(job, :template_name, "Custom") %> <%= Map.get(job, :device_count, 0) %> devices <%= case job.status do %> <% "completed" -> %> Completed <% "running" -> %> Running <% "failed" -> %> Failed <% "pending" -> %> Pending <% _ -> %> Unknown <% end %>
<%= Map.get(job, :progress, 0) %>%
<%= Calendar.strftime(job.inserted_at, "%m/%d %H:%M") %> <%= if job.status == "running" do %> <% end %> <%= if job.status == "failed" do %> <% end %>
<% else %>

No parameter jobs found

Parameter push jobs will appear here once you start pushing parameters.

<% end %>
<% end %>