Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
43e91313
Commit
43e91313
authored
Mar 15, 2023
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! erp5_forge: Add new console gadget to run command lines from ERP5JS UI
add translation
parent
3a436f56
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_html.html
...emplateItem/web_page_module/gadget_erp5_console_html.html
+4
-0
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_html.xml
...TemplateItem/web_page_module/gadget_erp5_console_html.xml
+2
-2
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_js.js
...athTemplateItem/web_page_module/gadget_erp5_console_js.js
+12
-2
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_js.xml
...thTemplateItem/web_page_module/gadget_erp5_console_js.xml
+2
-2
No files found.
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_html.html
View file @
43e91313
<!DOCTYPE html>
<html>
<!--
data-i18n=Command is empty
data-i18n=Status
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
...
...
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_html.xml
View file @
43e91313
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1007.461
0.39707.47223
</string>
</value>
<value>
<string>
1007.461
4.37615.65501
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16789
15367.0
1
</float>
<float>
16789
20333.8
1
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_js.js
View file @
43e91313
...
...
@@ -6,6 +6,7 @@
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
...
...
@@ -20,12 +21,21 @@
})
.
onEvent
(
"
submit
"
,
function
(
evt
)
{
var
gadget
=
this
,
translation_list
,
input_value
=
evt
.
target
.
querySelector
(
"
input
"
).
value
,
output
=
gadget
.
element
.
querySelector
(
"
output
"
);
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
this
.
getTranslationList
([
"
Command is empty
"
,
"
Status
"
]);
})
.
push
(
function
(
result_list
)
{
translation_list
=
result_list
;
if
(
!
input_value
.
trim
())
{
throw
new
Error
(
"
Command is empty
"
);
throw
new
Error
(
translation_list
[
0
]
);
}
return
jIO
.
util
.
ajax
({
url
:
gadget
.
state
.
context_url
+
"
/
"
+
input_value
,
...
...
@@ -46,7 +56,7 @@
}
}
else
{
// XXX - when response is empty, what we should display?
output
.
innerText
=
"
Status
:
"
+
response
.
target
.
status
;
output
.
innerText
=
translation_list
[
1
]
+
"
:
"
+
response
.
target
.
status
;
}
})
.
push
(
undefined
,
function
(
error
)
{
...
...
bt5/erp5_forge/PathTemplateItem/web_page_module/gadget_erp5_console_js.xml
View file @
43e91313
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1007.46
72.15553.53981
</string>
</value>
<value>
<string>
1007.46
83.37103.23125
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
16789
19733.9
6
</float>
<float>
16789
20218.8
6
</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