Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
0835e6d7
Commit
0835e6d7
authored
Nov 20, 2017
by
Alain Takoudjou
Committed by
Alain Takoudjou
Nov 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_monitoring] when needed import opml configuration before run dispatch
parent
726595d1
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
35 deletions
+72
-35
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_dispatch_js.js
...Item/web_page_module/gadget_erp5_page_ojsm_dispatch_js.js
+37
-15
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_dispatch_js.xml
...tem/web_page_module/gadget_erp5_page_ojsm_dispatch_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_erp5_configurator_html.html
..._module/gadget_erp5_page_ojsm_erp5_configurator_html.html
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_erp5_configurator_html.xml
...e_module/gadget_erp5_page_ojsm_erp5_configurator_html.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js
...web_page_module/gadget_erp5_page_ojsm_import_export_js.js
+7
-4
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml
...eb_page_module/gadget_erp5_page_ojsm_import_export_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_software_instance_list_js.js
...module/gadget_erp5_page_ojsm_software_instance_list_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_software_instance_list_js.xml
...odule/gadget_erp5_page_ojsm_software_instance_list_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_synchronize_js.js
...m/web_page_module/gadget_erp5_page_ojsm_synchronize_js.js
+16
-4
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_synchronize_js.xml
.../web_page_module/gadget_erp5_page_ojsm_synchronize_js.xml
+2
-2
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_dispatch_js.js
View file @
0835e6d7
...
...
@@ -74,6 +74,7 @@
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
/////////////////////////////////////////////////////////////////
// declared methods
...
...
@@ -118,15 +119,22 @@
}
else
{
portal_type
=
pt_result
[
1
];
}
}
else
{
portal_type
=
"
promise
"
;
}
return
gadget
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
'
ojsm_status_list
'
}})
.
push
(
function
(
back_url
)
{
return
gadget
.
updateHeader
({
page_title
:
page_title
,
back_url
:
back_url
});
})
.
push
(
function
()
{
return
gadget
.
changeState
({
original_query
:
original_query
,
query
:
options
.
query
,
page_title
:
page_title
,
portal_type
:
portal_type
portal_type
:
portal_type
||
"
promise
"
,
import_opml
:
portal_type
===
undefined
?
false
:
options
.
import_opml
||
true
});
});
})
.
onStateChange
(
function
()
{
...
...
@@ -134,13 +142,27 @@
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
'
ojsm_status_list
'
}});
if
(
gadget
.
state
.
import_opml
)
{
return
gadget
.
getSetting
(
'
latest_import_date
'
)
.
push
(
function
(
import_date
)
{
// If import was never done, or was done more than 2 weeks ago
// 1209600000 = 1000*60*60*24*14
var
current_date
=
new
Date
().
getTime
();
if
(
import_date
===
undefined
||
(
import_date
+
1209600000
)
<
current_date
)
{
return
gadget
.
setSetting
(
'
sync_redirect_options
'
,
{
query
:
gadget
.
state
.
original_query
,
page
:
'
ojsm_dispatch
'
})
.
push
(
function
(
back_url
)
{
return
gadget
.
updateHeader
({
page_title
:
gadget
.
state
.
page_title
,
back_url
:
back_url
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
'
change
'
,
options
:
{
page
:
"
ojsm_erp5_configurator
"
,
type
:
"
erp5
"
}});
});
}
});
}
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
erp5_searchfield
'
);
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_dispatch_js.xml
View file @
0835e6d7
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.3
3811.1739.59187
</string>
</value>
<value>
<string>
963.3
8063.22401.1996
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
151
0935658.24
</float>
<float>
151
1190866.88
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_erp5_configurator_html.html
View file @
0835e6d7
...
...
@@ -19,7 +19,7 @@
Your ERP5 Connection parameters
</h3>
</section>
<p>
You have to be logged in this ERP5 prior to
synchronising
</p>
<p>
You have to be logged in this ERP5 prior to
import OPML
</p>
</article>
<br>
<form
class=
"save_form ui-body-c"
novalidate
>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_erp5_configurator_html.xml
View file @
0835e6d7
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.54628.50882.58453
</string>
</value>
<value>
<string>
96
3.27666.8050.30907
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
15
08258766.54
</float>
<float>
15
11257051.71
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.js
View file @
0835e6d7
...
...
@@ -590,10 +590,13 @@
status
:
"
error
"
});
}
return
gadget
.
notifySubmitted
({
return
RSVP
.
all
([
gadget
.
setSetting
(
"
latest_import_date
"
,
new
Date
().
getTime
()),
gadget
.
notifySubmitted
({
message
:
"
Configuration Saved!
"
,
status
:
"
success
"
});
})
]);
})
.
push
(
function
()
{
if
(
!
has_failed
)
{
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_import_export_js.xml
View file @
0835e6d7
...
...
@@ -250,7 +250,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.
27984.14453.52343
</string>
</value>
<value>
<string>
963.
37770.32649.6058
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>
151
0833881.21
</float>
<float>
151
1174176.26
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_software_instance_list_js.js
View file @
0835e6d7
...
...
@@ -110,7 +110,7 @@
"
lines
"
:
lines_limit
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22
"
+
"
Software
Instance
"
+
"
%22
"
,
"
Software
%20
Instance
"
+
"
%22
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_software_instance_list_js.xml
View file @
0835e6d7
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.3
2354.21099.305
4
</string>
</value>
<value>
<string>
963.3
3701.38666.6304
4
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
151
0928975.35
</float>
<float>
151
1187464.03
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_synchronize_js.js
View file @
0835e6d7
...
...
@@ -9,6 +9,8 @@
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
...
...
@@ -22,10 +24,20 @@
return
sync_gadget
.
register
({
now
:
true
});
});
})
.
push
(
function
()
{
var
redirect_options
=
{
"
page
"
:
"
ojsm_status_list
"
};
return
gadget
.
getSetting
(
'
sync_redirect_options
'
)
.
push
(
function
(
redirect_dict
)
{
if
(
redirect_options
)
{
redirect_options
=
redirect_dict
;
return
gadget
.
setSetting
(
"
sync_redirect_options
"
,
undefined
);
}
})
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
"
change
"
,
options
:
{
page
:
"
ojsm_status_list
"
}
"
command
"
:
"
display
"
,
"
options
"
:
redirect_options
});
});
});
});
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_synchronize_js.xml
View file @
0835e6d7
...
...
@@ -250,7 +250,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.
29336.22296.43468
</string>
</value>
<value>
<string>
963.
37808.2626.47837
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>
151
0668189.5
4
</float>
<float>
151
1175451.3
4
</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