Commit d86f8047 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Always show the button to display raw parameters

   This feature isn't used or required anymore.
parent 8dc14833
...@@ -676,9 +676,6 @@ ...@@ -676,9 +676,6 @@
show_raw_button = g.element.querySelector("button.slapos-show-raw-parameter"), show_raw_button = g.element.querySelector("button.slapos-show-raw-parameter"),
show_form_button = g.element.querySelector("button.slapos-show-form"); show_form_button = g.element.querySelector("button.slapos-show-form");
if (g.disable_raw_edit === true) {
return fieldset;
}
if (show_raw_button !== null) { if (show_raw_button !== null) {
$(show_raw_button).addClass("hidden-button"); $(show_raw_button).addClass("hidden-button");
} }
...@@ -751,12 +748,10 @@ ...@@ -751,12 +748,10 @@
var gadget = this, var gadget = this,
to_hide = gadget.element.querySelector("button.slapos-show-form"), to_hide = gadget.element.querySelector("button.slapos-show-form"),
to_show = gadget.element.querySelector("button.slapos-show-raw-parameter"), to_show = gadget.element.querySelector("button.slapos-show-raw-parameter"),
disable_raw_edit = options.value.parameter.disable_raw_edit,
softwaretype, softwaretype,
json_url = options.value.parameter.json_url; json_url = options.value.parameter.json_url;
gadget.options = options; gadget.options = options;
gadget.disable_raw_edit = disable_raw_edit;
if (options.value.parameter.parameter_hash !== undefined) { if (options.value.parameter.parameter_hash !== undefined) {
// A JSON where provided via gadgetfield // A JSON where provided via gadgetfield
...@@ -767,22 +762,12 @@ ...@@ -767,22 +762,12 @@
throw new Error("undefined json_url"); throw new Error("undefined json_url");
} }
if (disable_raw_edit === true) { if (to_hide !== null) {
if (to_hide !== null) { $(to_hide).addClass("hidden-button");
$(to_hide).addClass("hidden-button"); }
}
if (to_show !== null) {
$(to_show).addClass("hidden-button");
}
} else {
if (to_hide !== null) {
$(to_hide).addClass("hidden-button");
}
if (to_show !== null) { if (to_show !== null) {
$(to_show).removeClass("hidden-button"); $(to_show).removeClass("hidden-button");
}
} }
return gadget.loadSoftwareJSON(json_url) return gadget.loadSoftwareJSON(json_url)
.push(function (json) { .push(function (json) {
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>999.17518.32039.54869</string> </value> <value> <string>999.21909.45114.57719</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1649100821.17</float> <float>1649101735.33</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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