🚧 Work on connection parameters vs. available ports
This commit is contained in:
1 parent
fe1bd0131b
commit
1c05cd2304
9 files changed
+274
-173
No files matched your search
@@ -83,15 +83,27 @@ class SerialTransport(Transport):
|
||||
|
||||
@classmethod
|
||||
def get_connection_options(cls):
|
||||
ports_by_name = cls.get_available_serial_ports("port")
|
||||
ports_by_usbid = cls.get_available_serial_ports("usbid")
|
||||
ports_by_usbserial = cls.get_available_serial_ports("usbserial")
|
||||
ports_by_usbport = cls.get_available_serial_ports("usbloc")
|
||||
|
||||
baudrates = cls.get_available_baudrates()
|
||||
|
||||
no_serial_ports_found = gettext("No serial ports found")
|
||||
# incomplete = gettext(
|
||||
# "No serial port found, are you sure your printer is physically connected and supports serial communication? Try refreshing and if that doesn't help please see the [FAQ](https://faq.octoprint.org/no-candidates)."
|
||||
# )
|
||||
|
||||
return [
|
||||
ConditionalGroup(
|
||||
"connect_via",
|
||||
gettext("Connect via"),
|
||||
[
|
||||
Value("port", title=gettext("Port & baudrate")),
|
||||
Value("port", title=gettext("Port name & baudrate")),
|
||||
Value("usbid", title=gettext("USB ID & baudrate")),
|
||||
Value("usbserial", title=gettext("USB serial number")),
|
||||
Value("usbloc", title=gettext("USB port")),
|
||||
Value("usbserial", title=gettext("USB serial no. & baudrate")),
|
||||
Value("usbloc", title=gettext("USB port & baudrate")),
|
||||
Value("url", title=gettext("URL")),
|
||||
],
|
||||
{
|
||||
@@ -99,12 +111,13 @@ class SerialTransport(Transport):
|
||||
ChoiceType(
|
||||
"port",
|
||||
gettext("Port"),
|
||||
cls.get_available_serial_ports("port"),
|
||||
ports_by_name,
|
||||
placeholder=no_serial_ports_found,
|
||||
),
|
||||
ChoiceType(
|
||||
"baudrate",
|
||||
gettext("Baudrate"),
|
||||
cls.get_available_baudrates(),
|
||||
baudrates,
|
||||
default=0,
|
||||
),
|
||||
],
|
||||
@@ -112,12 +125,13 @@ class SerialTransport(Transport):
|
||||
ChoiceType(
|
||||
"usbid",
|
||||
gettext("USB ID"),
|
||||
cls.get_available_serial_ports("usbid"),
|
||||
ports_by_usbid,
|
||||
placeholder=no_serial_ports_found,
|
||||
),
|
||||
ChoiceType(
|
||||
"baudrate",
|
||||
gettext("Baudrate"),
|
||||
cls.get_available_baudrates(),
|
||||
baudrates,
|
||||
default=0,
|
||||
),
|
||||
],
|
||||
@@ -125,12 +139,13 @@ class SerialTransport(Transport):
|
||||
ChoiceType(
|
||||
"usbserial",
|
||||
gettext("USB serial number"),
|
||||
cls.get_available_serial_ports("usbserial"),
|
||||
ports_by_usbserial,
|
||||
placeholder=no_serial_ports_found,
|
||||
),
|
||||
ChoiceType(
|
||||
"baudrate",
|
||||
gettext("Baudrate"),
|
||||
cls.get_available_baudrates(),
|
||||
baudrates,
|
||||
default=0,
|
||||
),
|
||||
],
|
||||
@@ -138,12 +153,13 @@ class SerialTransport(Transport):
|
||||
ChoiceType(
|
||||
"usbloc",
|
||||
gettext("USB port"),
|
||||
cls.get_available_serial_ports("usbloc"),
|
||||
ports_by_usbport,
|
||||
placeholder=no_serial_ports_found,
|
||||
),
|
||||
ChoiceType(
|
||||
"baudrate",
|
||||
gettext("Baudrate"),
|
||||
cls.get_available_baudrates(),
|
||||
baudrates,
|
||||
default=0,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -237,13 +237,19 @@ class BooleanType(ParamType):
|
||||
class ChoiceType(ParamType):
|
||||
type = "choice"
|
||||
|
||||
def __init__(self, name, title, choices, **kwargs):
|
||||
def __init__(self, name, title, choices, placeholder=None, **kwargs):
|
||||
self.choices = choices
|
||||
self.placeholder = placeholder
|
||||
ParamType.__init__(self, name, title, **kwargs)
|
||||
|
||||
def as_dict(self):
|
||||
result = ParamType.as_dict(self)
|
||||
result.update({"choices": list(map(lambda x: x.as_dict(), self.choices))})
|
||||
result.update(
|
||||
{
|
||||
"choices": list(map(lambda x: x.as_dict(), self.choices)),
|
||||
"placeholder": self.placeholder,
|
||||
}
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,126 @@ $(function () {
|
||||
return result;
|
||||
};
|
||||
|
||||
var extendOption = function (option, valueNode, additional) {
|
||||
if (!valueNode) {
|
||||
valueNode = {};
|
||||
}
|
||||
|
||||
if (option.type === "group") {
|
||||
_.each(option.params, function (param) {
|
||||
extendOption(param, valueNode[option.name], additional);
|
||||
});
|
||||
|
||||
option.modified = ko.pureComputed(function () {
|
||||
return _.any(option.params, function (p) {
|
||||
return p.modified();
|
||||
});
|
||||
});
|
||||
|
||||
option.advancedParameters =
|
||||
option.advanced ||
|
||||
_.any(option.params, function (p) {
|
||||
return p.advanced;
|
||||
});
|
||||
option.expertParameters =
|
||||
option.expert ||
|
||||
_.any(option.params, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
} else {
|
||||
if (option.type === "presetchoice") {
|
||||
_.each(option.group.params, function (option) {
|
||||
extendOption(option, valueNode[option.name], additional); // TODO
|
||||
});
|
||||
}
|
||||
|
||||
if (option.type === "conditionalgroup") {
|
||||
option.expertParameters = {};
|
||||
_.each(option.groups, function (group, key) {
|
||||
_.each(group, function (option) {
|
||||
extendOption(option, valueNode[option.name], additional); // TODO
|
||||
});
|
||||
option.expertParameters[key] = _.any(group, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var defaultValue = convertValueFromBackend(option.default, option);
|
||||
option.defaultValue = ko.observable(defaultValue);
|
||||
|
||||
if (valueNode && _.isFunction(valueNode)) {
|
||||
option.value = ko.pureComputed({
|
||||
read: function () {
|
||||
return convertValueFromBackend(valueNode(), option);
|
||||
},
|
||||
write: function (value) {
|
||||
valueNode(convertValueToBackend(value, option));
|
||||
},
|
||||
owner: this
|
||||
});
|
||||
option.reset = function () {
|
||||
valueNode(defaultValue);
|
||||
};
|
||||
} else {
|
||||
option.value = ko.observable(defaultValue);
|
||||
option.reset = function () {
|
||||
option.value(defaultValue);
|
||||
};
|
||||
}
|
||||
option.modified = ko.pureComputed(function () {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
return option.value() != option.defaultValue();
|
||||
});
|
||||
|
||||
if (option.type === "presetchoice" && option.defaults) {
|
||||
option.group.advancedParameters =
|
||||
option.group.advanced ||
|
||||
_.any(option.group.params, function (p) {
|
||||
return p.advanced;
|
||||
});
|
||||
option.group.expertParameters =
|
||||
option.group.expert ||
|
||||
_.any(option.group.params, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
|
||||
var updateDefaults = function (keepValue) {
|
||||
keepValue = !!keepValue;
|
||||
|
||||
var choice = _.find(option.choices, function (c) {
|
||||
return c.value === option.value();
|
||||
});
|
||||
if (choice) {
|
||||
_.each(option.group.params, function (p) {
|
||||
if (option.defaults[choice.value]) {
|
||||
var d = option.defaults[choice.value][p.name];
|
||||
if (d !== undefined) {
|
||||
p.defaultValue(convertValueFromBackend(d, p));
|
||||
if (!keepValue) {
|
||||
p.value(p.defaultValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
option.value.subscribe(function () {
|
||||
updateDefaults();
|
||||
});
|
||||
updateDefaults(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (option.type === "choice") {
|
||||
option.caption = option.choices.length ? undefined : option.placeholder;
|
||||
}
|
||||
|
||||
if (additional !== undefined) {
|
||||
additional(option);
|
||||
}
|
||||
};
|
||||
|
||||
function EditedConnectionProfile(connectionViewModel) {
|
||||
var self = this;
|
||||
|
||||
@@ -651,115 +771,15 @@ $(function () {
|
||||
};
|
||||
|
||||
self.fromOptionsResponse = function (options) {
|
||||
var extendOption = function (option, valueNode) {
|
||||
if (!valueNode) {
|
||||
valueNode = {};
|
||||
}
|
||||
|
||||
if (option.type === "group") {
|
||||
_.each(option.params, function (param) {
|
||||
extendOption(param, valueNode[option.name]);
|
||||
var additionalExtensions = function (option) {
|
||||
if (option.type === "choice") {
|
||||
option.enabled = ko.pureComputed(function () {
|
||||
return !!option.choices;
|
||||
});
|
||||
|
||||
option.modified = ko.pureComputed(function () {
|
||||
return _.any(option.params, function (p) {
|
||||
return p.modified();
|
||||
});
|
||||
});
|
||||
|
||||
option.advancedParameters =
|
||||
option.advanced ||
|
||||
_.any(option.params, function (p) {
|
||||
return p.advanced;
|
||||
});
|
||||
option.expertParameters =
|
||||
option.expert ||
|
||||
_.any(option.params, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
} else {
|
||||
if (option.type === "presetchoice") {
|
||||
_.each(option.group.params, function (option) {
|
||||
extendOption(option, valueNode[option.name]); // TODO
|
||||
});
|
||||
}
|
||||
|
||||
if (option.type === "conditionalgroup") {
|
||||
option.expertParameters = {};
|
||||
_.each(option.groups, function (group, key) {
|
||||
_.each(group, function (option) {
|
||||
extendOption(option, valueNode[option.name]); // TODO
|
||||
});
|
||||
option.expertParameters[key] = _.any(group, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var defaultValue = convertValueFromBackend(option.default, option);
|
||||
option.defaultValue = ko.observable(defaultValue);
|
||||
|
||||
if (valueNode && _.isFunction(valueNode)) {
|
||||
option.value = ko.pureComputed({
|
||||
read: function () {
|
||||
return convertValueFromBackend(valueNode(), option);
|
||||
},
|
||||
write: function (value) {
|
||||
valueNode(convertValueToBackend(value, option));
|
||||
},
|
||||
owner: this
|
||||
});
|
||||
option.reset = function () {
|
||||
valueNode(defaultValue);
|
||||
};
|
||||
} else {
|
||||
option.value = ko.observable(defaultValue);
|
||||
option.reset = function () {
|
||||
option.value(defaultValue);
|
||||
};
|
||||
}
|
||||
option.modified = ko.pureComputed(function () {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
return option.value() != option.defaultValue();
|
||||
option.enabled = ko.pureComputed(function () {
|
||||
return true;
|
||||
});
|
||||
|
||||
if (option.type === "presetchoice" && option.defaults) {
|
||||
option.group.advancedParameters =
|
||||
option.group.advanced ||
|
||||
_.any(option.group.params, function (p) {
|
||||
return p.advanced;
|
||||
});
|
||||
option.group.expertParameters =
|
||||
option.group.expert ||
|
||||
_.any(option.group.params, function (p) {
|
||||
return p.expert;
|
||||
});
|
||||
|
||||
var updateDefaults = function (keepValue) {
|
||||
keepValue = !!keepValue;
|
||||
|
||||
var choice = _.find(option.choices, function (c) {
|
||||
return c.value === option.value();
|
||||
});
|
||||
if (choice) {
|
||||
_.each(option.group.params, function (p) {
|
||||
if (option.defaults[choice.value]) {
|
||||
var d = option.defaults[choice.value][p.name];
|
||||
if (d !== undefined) {
|
||||
p.defaultValue(convertValueFromBackend(d, p));
|
||||
if (!keepValue) {
|
||||
p.value(p.defaultValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
option.value.subscribe(function () {
|
||||
updateDefaults();
|
||||
});
|
||||
updateDefaults(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -769,10 +789,14 @@ $(function () {
|
||||
var node = settings[i.key];
|
||||
|
||||
_.each(i.options, function (option) {
|
||||
extendOption(option);
|
||||
extendOption(option, undefined, additionalExtensions);
|
||||
});
|
||||
_.each(i.settings, function (option) {
|
||||
extendOption(option, node ? node[option.name] : {});
|
||||
extendOption(
|
||||
option,
|
||||
node ? node[option.name] : {},
|
||||
additionalExtensions
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<legend data-bind="text: name"></legend>
|
||||
<!-- ko if: settings.length -->
|
||||
<!-- ko foreach: settings -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $root.isErrorOrClosed() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- ko if: settings.length === 0 -->
|
||||
@@ -57,7 +57,7 @@
|
||||
<legend data-bind="text: name"></legend>
|
||||
<!-- ko if: settings.length -->
|
||||
<!-- ko foreach: settings -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $root.isErrorOrClosed() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- ko if: settings.length === 0 -->
|
||||
|
||||
@@ -1,142 +1,165 @@
|
||||
<script type="text/html" id="parameter_template_controls_text">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_url">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_integer">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<!-- ko if: $data.unit -->
|
||||
<div class="input-append">
|
||||
<input class="input-small" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-small" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<span class="add-on" data-bind="text: $data.unit"></span>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko ifnot: $data.unit -->
|
||||
<input class="input-small" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-small" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<!-- /ko -->
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_float">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<!-- ko if: $data.unit -->
|
||||
<div class="input-append">
|
||||
<input class="input-small" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-small" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<span class="add-on" data-bind="text: $data.unit"></span>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko ifnot: $data.unit -->
|
||||
<input class="input-small" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input class="input-small" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<!-- /ko -->
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_choice">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', optionsCaption: $data.caption, value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></select>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_presetchoice">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></select>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ko template: { name: 'parameter_template_controls_group', data: group } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_group', data: { data: group, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_smallchoice">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<!-- ko foreach: choices -->
|
||||
<label class="radio">
|
||||
<input type="radio" data-bind="attr: { name: 'connectionprofile_editor_' + $parent.name + '_group' }, value: $data.value, checked: $parent.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"> <span data-bind="markdownInline: $data.title"></span> <span class="label label-important" data-bind="visible: $data.warning">{{ _('Warning') }}</span> <!-- ko foreach: $data.labels --><span class="label" data-bind="text: $data"></span><!-- /ko -->
|
||||
<input type="radio" data-bind="attr: { name: 'connectionprofile_editor_' + $parent.name + '_group' }, value: $data.value, checked: $parent.value, css: {disabled: !$parents[1].enabled()}, enable: $parents[1].enabled"> <span data-bind="markdownInline: $data.title"></span> <span class="label label-important" data-bind="visible: $data.warning">{{ _('Warning') }}</span> <!-- ko foreach: $data.labels --><span class="label" data-bind="text: $data"></span><!-- /ko -->
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</label>
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_boolean">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"> <span data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></span> <span class="label label-important" data-bind="visible: $data.warning">{{ _('Warning') }}</span> <!-- ko foreach: $data.labels --><span class="label" data-bind="text: $data"></span><!-- /ko -->
|
||||
<input type="checkbox" data-bind="checked: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"> <span data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></span> <span class="label label-important" data-bind="visible: $data.warning">{{ _('Warning') }}</span> <!-- ko foreach: $data.labels --><span class="label" data-bind="text: $data"></span><!-- /ko -->
|
||||
</label>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_suggestion">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<select class="input-block-level" data-bind="options: $data.suggestions, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<select class="input-block-level" data-bind="options: $data.suggestions, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></select>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_list">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<textarea data-bind="value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></textarea>
|
||||
<textarea data-bind="value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></textarea>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_smalllist">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input type="text" class="input-block-level" data-bind="value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_group">
|
||||
<!-- ko with: data -->
|
||||
<fieldset>
|
||||
<legend data-bind="markdownInline: $data.title"></legend>
|
||||
<p data-bind="visible: $data.help, markdownInline: $data.help"></p>
|
||||
<!-- ko foreach: params -->
|
||||
<!-- ko if: !expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
|
||||
@@ -145,26 +168,28 @@
|
||||
<div class="hide">
|
||||
<!-- ko foreach: params -->
|
||||
<!-- ko if: expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_controls_conditionalgroup">
|
||||
<!-- ko with: data -->
|
||||
<div class="control-group" data-bind="css: { 'control-changed': $data.modified }">
|
||||
<a href="javascript:void(0)" class="fa fa-undo control-undo" title="Reset to default" data-bind="click: reset, visible: $data.modified() && $root.isErrorOrClosed()"></a>
|
||||
<label class="control-label" data-bind="markdownInline: $data.title, css: { 'control-changed': $data.modified }"></label>
|
||||
<div class="controls">
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></select>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ko foreach: $data.groups[$data.value()] -->
|
||||
<!-- ko if: !expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
|
||||
@@ -173,9 +198,10 @@
|
||||
<div class="hide">
|
||||
<!-- ko foreach: $data.groups[$data.value()] -->
|
||||
<!-- ko if: expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
@@ -1,33 +1,46 @@
|
||||
<script type="text/html" id="parameter_template_form_description">
|
||||
<!-- ko with: data -->
|
||||
<p data-bind="markdownInline: $data.value"></p>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_text">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_url">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<input class="input-block-level" type="text" data-bind="value: $data.value, attr: {placeholder: $data.default}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_integer">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<input class="input-block-level" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<input class="input-block-level" type="number" step="1" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_float">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<input class="input-block-level" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<input class="input-block-level" type="number" data-bind="value: $data.value, attr: {placeholder: $data.default, min: $data.min, max: $data.max}, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_choice">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled() }, enable: $parent.enabled"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, optionsCaption: $data.caption, css: {disabled: !$parent.enabled() }, enable: $parent.enabled"></select>
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_smallchoice">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<!-- ko foreach: choices -->
|
||||
<label class="radio">
|
||||
<input type="radio" data-bind="attr: { name: 'connection_dialog_' + $parent.name + '_group' }, value: $data.value, checked: $parent.value"> <span data-bind="text: $data.title"></span>
|
||||
@@ -35,18 +48,22 @@
|
||||
</label>
|
||||
<!-- /ko -->
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_boolean">
|
||||
<!-- ko with: data -->
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"> <span data-bind="text: $data.title"></span>
|
||||
<input type="checkbox" data-bind="checked: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"> <span data-bind="text: $data.title"></span>
|
||||
<span class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></span>
|
||||
</label>
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_suggestion">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<div class="input-append">
|
||||
<input type="text" data-bind="value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<input type="text" data-bind="value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<div class="btn-group">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" data-bind="foreach: $data.suggestions">
|
||||
@@ -55,42 +72,54 @@
|
||||
</div>
|
||||
</div>
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_list">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<textarea data-bind="value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></textarea>
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<textarea data-bind="value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></textarea>
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_smalllist">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<input type="text" class="input-block-level" data-bind="value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: {disabled: !$parent.enabled()}, enable: $parent.enabled"></label>
|
||||
<input type="text" class="input-block-level" data-bind="value: $data.value, css: {disabled: !$parent.enabled()}, enable: $parent.enabled">
|
||||
<small class="help-block" data-bind="visible: $data.help, markdownInline: $data.help"></small>
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_group">
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title"></label>
|
||||
<!-- ko foreach: params -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_presetchoice">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<!-- ko with: data -->
|
||||
<span data-bind="text: $parent.enabled"></span>
|
||||
<label data-bind="text: $data.title, css: { disabled: !$parent.enabled() }, enable: $parent.enabled"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: { disabled: !$parent.enabled() }, enable: $parent.enabled"></select>
|
||||
<!-- ko if: !$data.group.advanced -->
|
||||
<label data-bind="text: $data.group.title"></label>
|
||||
<!-- ko foreach: $data.group.params -->
|
||||
<!-- ko if: !advanced -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<script type="text/html" id="parameter_template_form_conditionalgroup">
|
||||
<label data-bind="text: $data.title, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: {disabled: !$root.isErrorOrClosed()}, enable: $root.isErrorOrClosed()"></select>
|
||||
<!-- ko with: data -->
|
||||
<label data-bind="text: $data.title, css: { disabled: !$parent.enabled() }, enable: $parent.enabled"></label>
|
||||
<select class="input-block-level" data-bind="options: $data.choices, optionsText: 'title', optionsValue: 'value', value: $data.value, css: { disabled: !$parent.enabled() }, enable: $parent.enabled"></select>
|
||||
|
||||
<!-- ko foreach: $data.groups[$data.value()] -->
|
||||
<!-- ko if: !advanced -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $parents[1].enabled() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
@@ -16,7 +16,7 @@
|
||||
<select class="input-block-level" data-test-id="connection-protocols" data-bind="options: availableProtocols, optionsText: 'name', value: selectedProtocol, css: {disabled: !isErrorOrClosed()}, enable: isErrorOrClosed()"></select>
|
||||
<!-- ko foreach: protocolParameters -->
|
||||
<!-- ko if: !advanced -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $root.isErrorOrClosed() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- ko if: advancedProtocolParameters -->
|
||||
@@ -29,7 +29,7 @@
|
||||
<select class="input-block-level" data-test-id="connection-transports" data-bind="options: availableTransports, optionsText: 'name', value: selectedTransport, css: {disabled: !isErrorOrClosed()}, enable: isErrorOrClosed()"></select>
|
||||
<!-- ko foreach: transportParameters -->
|
||||
<!-- ko if: !advanced -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_form_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $root.isErrorOrClosed() && $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- ko if: advancedTransportParameters -->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- ko foreach: profile.protocolParameters -->
|
||||
<!-- ko if: !expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="hide">
|
||||
<!-- ko foreach: profile.protocolParameters -->
|
||||
<!-- ko if: expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: ko.pureComputed(function() { return $data.enabled() }) } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- ko foreach: profile.transportParameters -->
|
||||
<!-- ko if: !expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: $data.enabled } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="hide">
|
||||
<!-- ko foreach: profile.transportParameters -->
|
||||
<!-- ko if: expert -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: $data } --><!-- /ko -->
|
||||
<!-- ko template: { name: 'parameter_template_controls_' + $data.type, data: { data: $data, enabled: $data.enabled } } --><!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user