25 lines
1.0 KiB
JavaScript
25 lines
1.0 KiB
JavaScript
export const SIGNAL_ROLE_OPTIONS = [
|
|
{ value: "", label: "Unset" },
|
|
{ value: "remote_status", label: "Remote Status" },
|
|
{ value: "run_status", label: "Run Status" },
|
|
{ value: "fault_status", label: "Fault Status" },
|
|
{ value: "ready_status", label: "Ready Status" },
|
|
{ value: "alarm_status", label: "Alarm Status" },
|
|
{ value: "interlock_status", label: "Interlock Status" },
|
|
{ value: "auto_enable", label: "Auto Enable" },
|
|
{ value: "mode_auto", label: "Auto Mode" },
|
|
{ value: "mode_manual", label: "Manual Mode" },
|
|
{ value: "start_cmd", label: "Start Command" },
|
|
{ value: "stop_cmd", label: "Stop Command" },
|
|
{ value: "reset_cmd", label: "Reset Command" },
|
|
{ value: "runtime_value", label: "Runtime Value" },
|
|
{ value: "counter_value", label: "Counter Value" },
|
|
];
|
|
|
|
export function renderRoleOptions(selected = "") {
|
|
return SIGNAL_ROLE_OPTIONS.map((item) => {
|
|
const isSelected = item.value === selected ? "selected" : "";
|
|
return `<option value="${item.value}" ${isSelected}>${item.label}</option>`;
|
|
}).join("");
|
|
}
|