Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
64175d1c
Commit
64175d1c
authored
Apr 06, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: Include failover and more css friendly tags on gadget rendering
parent
05e60c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.xml
...lateItem/web_page_module/rjs_slapos_parameter_form_js.xml
+24
-15
No files found.
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.xml
View file @
64175d1c
...
...
@@ -238,24 +238,22 @@
for (default_value in default_dict) {\n
if (default_dict.hasOwnProperty(default_value)) {\n
default_div = document.createElement("div");\n
default_div.setAttribute("class", "slapos-parameter-dict-key");\n
label = document.createElement("label");\n
label.textContent = default_value;\n
label.setAttribute("class", "slapos-parameter-dict-key");\n
default_div.appendChild(label);\n
default_div = render_subform(\n
json_field.patternProperties[\'.*\'],\n
default_dict[default_value],\n
default_div,\n
path + "/" + default_value);\n
path + "/" + default_value\n
);\n
div.appendChild(default_div);\n
}\n
}\n
root.appendChild(div);\n
\n
\n
return div;\n
\n
\n
\n
return root;\n
}\n
}\n
...
...
@@ -357,13 +355,16 @@
return
false;\n
}\n
\n
div.setAttribute("class",
"slapos-parameter-dict-key");\n
label =
document.createElement("label");\n
label.textContent =
input_text.value;\n
label.setAttribute("class",
"slapos-parameter-dict-key");\n
div.appendChild(label);\n
\n
div =
render_subform(subform_json,
{},
div,
element.name
+
"/"
+
input_text.value);\n
\n
element.parentNode.parentNode.appendChild(div);\n
element.parentNode.parentNode.insertBefore(div,
element.parentNode.parentNode.children[1]);\n
//
element.parentNode.parentNode.appendChild(div);\n
\n
return
div;\n
}\n
...
...
@@ -558,11 +559,6 @@
softwaretype;\n
\n
this.options =
options;\n
\n
function
updateParameterForm(evt)
{\n
options.parameter.softwaretype =
evt.srcElement.value;\n
return
g.render(options);\n
}\n
\n
return
g.loadSoftwareJSON(g.options.json_url).push(function
(json)
{\n
var
option_index,\n
...
...
@@ -691,7 +687,20 @@
})\n
.declareService(function
()
{\n
var
g =
this;\n
return
g.processValidation(g.options.json_url);\n
return
g.processValidation(g.options.json_url)\n
.fail(function
(error)
{\n
var
parameter_xml =
\'\';\n
console.log("FAIL
CALLED");\n
console.log(error.stack);\n
if
(g.options.parameter.parameter_hash
!==
undefined)
{\n
parameter_xml =
atob(g.options.parameter.parameter_hash);\n
}\n
return
g.renderFailoverTextArea(parameter_xml,
error.toString())\n
.push(function
()
{\n
error =
undefined;\n
return
g;\n
});\n
});\n
});\n
\n
}(window,
document,
rJS,
loopEventListener,
$,
XMLSerializer,
jQuery,
vkbeautify));
...
...
@@ -831,7 +840,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
1.58456.37859.54289
</string>
</value>
<value>
<string>
94
2.10806.29939.62481
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -849,7 +858,7 @@
</tuple>
<state>
<tuple>
<float>
142
7289240.71
</float>
<float>
142
8362362.95
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment