forked from M-Labs/web2019
Leave opt-out option only to the first kasli
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
cd780b83e4
commit
2480b9ad54
|
@ -443,9 +443,10 @@ export function OptionsSummaryPopup({id, options, data}) {
|
||||||
|
|
||||||
export function FillExtData(data, index) {
|
export function FillExtData(data, index) {
|
||||||
return {
|
return {
|
||||||
|
has_previous_carrier: data.filter((value, item_index) => index > item_index && value.name === "Carrier").length > 0,
|
||||||
has_other_dio: data.filter((value, item_index) => index !== item_index && value.name.endsWith("-TTL")).length > 0,
|
has_other_dio: data.filter((value, item_index) => index !== item_index && value.name.endsWith("-TTL")).length > 0,
|
||||||
has_dds: data.filter(((value, _) => value.name === "DDS" && (!value.options_data || !value.options_data.mono_eem))).length > 0,
|
has_dds: data.filter(((value, _) => value.name === "DDS" && (!value.options_data || !value.options_data.mono_eem))).length > 0,
|
||||||
has_sampler: data.filter(((value, _) => value.name === "Sampler" && (!value.options_data || !value.options_data.mono_eem))).length > 0
|
has_sampler: data.filter(((value, _) => value.name === "Sampler" && (!value.options_data || !value.options_data.mono_eem))).length > 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,10 @@ const shop_data = {
|
||||||
{type: "Line", args: {title: "IPv4", outvar: "ipv4", fallback: "192.168.1.75/24", tip: "Set up IPv4 address used by core device"}},
|
{type: "Line", args: {title: "IPv4", outvar: "ipv4", fallback: "192.168.1.75/24", tip: "Set up IPv4 address used by core device"}},
|
||||||
{type: "SwitchLine", args: {title: "IPv6", outvar: "ipv6"}},
|
{type: "SwitchLine", args: {title: "IPv6", outvar: "ipv6"}},
|
||||||
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}, tip: "Use external clock reference: 10, 80 (beta), 100 or 125 MHz. Other variants may be provided if needed."}},
|
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}, tip: "Use external clock reference: 10, 80 (beta), 100 or 125 MHz. Other variants may be provided if needed."}},
|
||||||
{type: "Switch", args: {title: "Opt out from promotional USB-stick", outvar: "usb_opt_out", tip: "Do not ship a promotional USB-stick"}},
|
{"if": [
|
||||||
|
{"!": {"var": "ext_data.has_previous_carrier"}},
|
||||||
|
{type: "Switch", args: {title: "Opt out from promotional USB-stick", outvar: "usb_opt_out", tip: "Do not ship a promotional USB-stick"}}
|
||||||
|
]}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{type: "Switch", args: {title: "Optic fiber", outvar: "optics", tip: "Use optic fiber instead of direct attach copper cable"}}
|
{type: "Switch", args: {title: "Optic fiber", outvar: "optics", tip: "Use optic fiber instead of direct attach copper cable"}}
|
||||||
|
@ -163,7 +166,10 @@ const shop_data = {
|
||||||
{type: "Line", args: {title: "IPv4", outvar: "ipv4", fallback: "192.168.1.75/24", tip: "Set up IPv4 address used by core device"}},
|
{type: "Line", args: {title: "IPv4", outvar: "ipv4", fallback: "192.168.1.75/24", tip: "Set up IPv4 address used by core device"}},
|
||||||
{type: "SwitchLine", args: {title: "IPv6", outvar: "ipv6"}},
|
{type: "SwitchLine", args: {title: "IPv6", outvar: "ipv6"}},
|
||||||
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}, tip: "Use external clock reference: 10, 80 (beta), 100 or 125 MHz. Other variants may be provided if needed."}},
|
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}, tip: "Use external clock reference: 10, 80 (beta), 100 or 125 MHz. Other variants may be provided if needed."}},
|
||||||
{type: "Switch", args: {title: "Opt out from promotional USB-stick", outvar: "usb_opt_out", tip: "Do not ship a promotional USB-stick"}},
|
{"if": [
|
||||||
|
{"!": {"var": "ext_data.has_previous_carrier"}},
|
||||||
|
{type: "Switch", args: {title: "Opt out from promotional USB-stick", outvar: "usb_opt_out", tip: "Do not ship a promotional USB-stick"}}
|
||||||
|
]}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{type: "Switch", args: {title: "Optic fiber", outvar: "optics", tip: "Use optic fiber instead of direct attach copper cable"}}
|
{type: "Switch", args: {title: "Optic fiber", outvar: "optics", tip: "Use optic fiber instead of direct attach copper cable"}}
|
||||||
|
|
Loading…
Reference in New Issue