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 @@ ...@@ -262,7 +262,7 @@
div_input = document.createElement("div"); div_input = document.createElement("div");
div_input.setAttribute("class", "input"); div_input.setAttribute("class", "input");
if (json_field.properties[key].type === 'object') { 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], div_input = render_subform(json_field.properties[key],
default_dict[key], default_dict[key],
div_input, div_input,
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
} }
for (key in default_dict) { for (key in default_dict) {
if (default_dict.hasOwnProperty(key)) { if (default_dict.hasOwnProperty(key)) {
if (default_used_list.indexOf(key) < 0 ) { if (default_used_list.indexOf(key) < 0) {
div = document.createElement("div"); div = document.createElement("div");
div.title = key; div.title = key;
if (restricted === true) { if (restricted === true) {
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
div.appendChild(label); div.appendChild(label);
div_input = document.createElement("div"); div_input = document.createElement("div");
div_input.setAttribute("class", "input"); 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.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter"); input.setAttribute("class", "slapos-parameter");
input.setAttribute("placeholder", " "); input.setAttribute("placeholder", " ");
......
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>975.40310.53592.2542</string> </value> <value> <string>976.40089.29410.21896</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1558534050.09</float> <float>1561393541.64</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
div.appendChild(label); div.appendChild(label);
div_input = document.createElement("div"); div_input = document.createElement("div");
div_input.setAttribute("class", "input"); 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.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter"); input.setAttribute("class", "slapos-parameter");
div_input.appendChild(input); div_input.appendChild(input);
...@@ -929,4 +929,4 @@ ...@@ -929,4 +929,4 @@
}); });
}); });
}(window, document, rJS, $, XMLSerializer, jQuery, vkbeautify)); }(window, document, rJS, $, XMLSerializer, jQuery, vkbeautify));
\ No newline at end of file
...@@ -40,7 +40,7 @@ fi ...@@ -40,7 +40,7 @@ fi
# Warn users who aren't on an explicitly supported distro, but allow them to # Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``export FORCE=yes`` # 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" echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes" 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 ...@@ -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 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/ 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/ mv /usr/share/ansible_plugins/mitogen/mitogen-*/* /usr/share/ansible_plugins/mitogen/
fi fi
\ No newline at end of file
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