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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
81e4b620
Commit
81e4b620
authored
Mar 08, 2024
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: throw error in case of duplicated entries for software release.
parent
5e26669c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/gadget_erp5_page_slap_load_schema.js.js
...kins/slapos_cloud/gadget_erp5_page_slap_load_schema.js.js
+19
-0
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/gadget_erp5_page_slap_load_schema.js.js
View file @
81e4b620
...
...
@@ -70,6 +70,25 @@
throw
new
Error
(
"
Non valid JSON for software.cfg.json:
"
+
software_cfg_json
);
}
return
software_json
;
})
.
push
(
function
(
software_json
)
{
// Ensure you dont have duplicated entries
var
index
,
entry_list
=
[],
shared
,
software_type
;
for
(
index
in
software_json
[
'
software-type
'
])
{
if
(
software_json
[
'
software-type
'
].
hasOwnProperty
(
index
))
{
shared
=
software_json
[
'
software-type
'
][
index
].
shared
?
true
:
false
;
software_type
=
software_json
[
'
software-type
'
][
index
][
'
software-type
'
];
if
(
software_type
===
undefined
)
{
software_type
=
index
;
}
if
(
entry_list
.
includes
(
software_type
+
"
@
"
+
shared
))
{
throw
new
Error
(
"
Non valid JSON for software.cfg.json, duplicated entry (
"
+
software_type
+
"
, shared:
"
+
shared
+
"
):
"
+
software_cfg_json
);
}
entry_list
.
push
(
software_type
+
"
@
"
+
shared
);
}
}
return
software_json
;
});
});
});
...
...
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