Commit 7d34d957 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

[slapos_jio]: display unknown parameters with a textarea field

parent 74aa0db6
......@@ -262,7 +262,7 @@
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
if (json_field.properties[key].type === 'object') {
label.setAttribute("class", "slapos-parameter-dict-key");
label.setAttribute("class", "slapos-parameter-dict-key");
div_input = render_subform(json_field.properties[key],
default_dict[key],
div_input,
......@@ -290,7 +290,7 @@
}
for (key in default_dict) {
if (default_dict.hasOwnProperty(key)) {
if (default_used_list.indexOf(key) < 0 ) {
if (default_used_list.indexOf(key) < 0) {
div = document.createElement("div");
div.title = key;
if (restricted === true) {
......@@ -308,7 +308,7 @@
div.appendChild(label);
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
input = render_field({"type": "string"}, default_dict[key]);
input = render_field({"type": "string", "textarea": true}, default_dict[key]);
input.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter");
input.setAttribute("placeholder", " ");
......
......@@ -274,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.40310.53592.2542</string> </value>
<value> <string>976.40089.29410.21896</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -292,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1558534050.09</float>
<float>1561393541.64</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -291,7 +291,7 @@
div.appendChild(label);
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
input = render_field({"type": "string"}, default_dict[key]);
input = render_field({"type": "string", "textarea": true}, default_dict[key]);
input.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter");
div_input.appendChild(input);
......@@ -929,4 +929,4 @@
});
});
}(window, document, rJS, $, XMLSerializer, jQuery, vkbeautify));
\ No newline at end of file
}(window, document, rJS, $, XMLSerializer, jQuery, vkbeautify));
......@@ -40,7 +40,7 @@ fi
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``export FORCE=yes``
if [[ ! ${DISTRO} =~ (wheezy|jessie|trusty|vivid|xenial|bionic|rhel7|rhel6|LinuxMint-17.2|f20|f19|f26|artful|stretch) ]]; then
if [[ ! ${DISTRO} =~ (jessie|stretch|xenial|artful|bionic|rhel7|LinuxMint-17.2|f20|f19|f26) ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
......@@ -244,4 +244,4 @@ if [ ! -f /usr/share/ansible_plugins/mitogen.zip ]; then
wget -O /usr/share/ansible_plugins/mitogen.zip https://github.com/dw/mitogen/archive/2d7821b824a77930812847c87ea385cf37198c3f.zip
unzip /usr/share/ansible_plugins/mitogen.zip -d /usr/share/ansible_plugins/mitogen/
mv /usr/share/ansible_plugins/mitogen/mitogen-*/* /usr/share/ansible_plugins/mitogen/
fi
\ No newline at end of file
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment