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
Arnaud Véron
slapos.core
Commits
c1fa452d
Commit
c1fa452d
authored
May 04, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: Improve error message/handling when software type is not a part of the json.
parent
d4727173
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.js
...plateItem/web_page_module/rjs_slapos_parameter_form_js.js
+13
-0
No files found.
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.js
View file @
c1fa452d
...
...
@@ -396,6 +396,13 @@
software_type
=
getSoftwareTypeFromForm
(
g
.
props
.
element
),
json_dict
=
getFormValuesAsJSONDict
(
g
.
props
.
element
),
serialisation_type
=
getSerialisationTypeFromForm
(
g
.
props
.
element
);
if
(
software_type
===
""
)
{
if
(
g
.
options
.
parameter
.
shared
)
{
throw
new
Error
(
"
The software type is not part of the json (
"
+
software_type
+
"
as slave)
"
);
}
throw
new
Error
(
"
The software type is not part of the json (
"
+
software_type
+
"
)
"
);
}
return
g
.
validateJSONForSoftwareType
(
json_url
,
software_type
,
json_dict
)
.
push
(
function
(
validation
)
{
...
...
@@ -627,6 +634,12 @@
if
(
softwaretype
===
undefined
)
{
softwaretype
=
option_selected
;
}
if
(
input
.
children
.
length
===
0
)
{
if
(
options
.
parameter
.
shared
)
{
throw
new
Error
(
"
The software type is not part of the json (
"
+
softwaretype
+
"
as slave)
"
);
}
throw
new
Error
(
"
The software type is not part of the json (
"
+
softwaretype
+
"
)
"
);
}
if
(
json
[
'
software-type
'
][
softwaretype
]
===
undefined
)
{
throw
new
Error
(
"
The sotware type is not part of the json (
"
+
softwaretype
+
"
)
"
);
}
...
...
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