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
Roque
slapos.core
Commits
a75d6273
Commit
a75d6273
authored
May 12, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Request instance uses putAttachment
In short, use PUT rather them GET to request instance
parent
10166bb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
30 deletions
+26
-30
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_intent_js.js
...em/web_page_module/rjs_gadget_erp5_page_slap_intent_js.js
+24
-28
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_intent_js.xml
...m/web_page_module/rjs_gadget_erp5_page_slap_intent_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_intent_js.js
View file @
a75d6273
/*global window, rJS, RSVP */
/*global window, rJS, RSVP
, JSON , jIO
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
(
function
(
window
,
rJS
,
RSVP
,
JSON
,
jIO
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -42,7 +42,8 @@
...
@@ -42,7 +42,8 @@
"
New service created.
"
,
"
New service created.
"
,
"
Intent not supported
"
,
"
Intent not supported
"
,
"
Requesting a service…
"
,
"
Requesting a service…
"
,
"
Instance
"
"
Instance
"
,
];
];
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -135,33 +136,28 @@
...
@@ -135,33 +136,28 @@
}
}
return
gadget
.
notifySubmitting
()
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
.
push
(
function
()
{
var
query
=
[];
return
gadget
.
getSetting
(
"
hateoas_url
"
)
query
.
push
(
"
title=
"
+
encodeURIComponent
(
doc
.
title
));
.
push
(
function
(
url
)
{
return
gadget
.
jio_putAttachment
(
doc
.
relative_url
,
if
(
doc
.
software_type
)
{
url
+
doc
.
relative_url
+
"
/SoftwareRelease_requestInstanceTree
"
,
doc
);
query
.
push
(
"
software_type=
"
+
encodeURIComponent
(
doc
.
software_type
));
})
}
if
(
doc
.
shared
)
{
.
push
(
function
(
attachment
)
{
query
.
push
(
"
shared:int=
"
+
encodeURIComponent
(
doc
.
shared
));
return
jIO
.
util
.
readBlobAsText
(
attachment
.
target
.
response
);
}
})
if
(
doc
.
text_content
)
{
.
push
(
function
(
response
)
{
query
.
push
(
"
text_content=
"
+
encodeURIComponent
(
doc
.
text_content
));
return
JSON
.
parse
(
response
.
target
.
result
);
}
})
if
(
doc
.
sla_xml
)
{
.
push
(
function
(
relative_url
)
{
query
.
push
(
"
sla_xml=
"
+
encodeURIComponent
(
doc
.
sla_xml
));
return
gadget
.
notifySubmitted
({
message
:
gadget
.
message_translation
,
status
:
'
success
'
})
}
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
doc
.
relative_url
,
// Workaround, find a way to open document without break gadget.
url
+
doc
.
relative_url
+
"
/SoftwareRelease_requestInstanceTree?
"
+
query
.
join
(
"
&
"
));
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
})
"
options
"
:
{
"
jio_key
"
:
relative_url
,
"
page
"
:
"
slap_controller
"
}});
.
push
(
function
(
key
)
{
});
return
gadget
.
notifySubmitted
({
message
:
gadget
.
message_tranlation
,
status
:
'
success
'
})
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
jio_key
"
:
key
,
"
page
"
:
"
slap_controller
"
}});
});
});
});
});
});
});
});
});
});
});
}(
window
,
rJS
,
RSVP
));
}(
window
,
rJS
,
RSVP
,
JSON
,
jIO
));
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_intent_js.xml
View file @
a75d6273
...
@@ -283,7 +283,7 @@
...
@@ -283,7 +283,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1008.
12332.26729.18090
</string>
</value>
<value>
<string>
1008.
22835.52422.8345
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -303,7 +303,7 @@
...
@@ -303,7 +303,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1683
224657.13
</float>
<float>
1683
854663.4
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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