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
1
Issues
1
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
erp5
Commits
9a84f1f3
Commit
9a84f1f3
authored
Mar 26, 2024
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_monitoring: refine storage update on new app version
parent
01bd4c5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
...Item/web_page_module/gadget_officejs_monitoring_jio_js.js
+13
-5
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.xml
...tem/web_page_module/gadget_officejs_monitoring_jio_js.xml
+2
-2
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
View file @
9a84f1f3
...
...
@@ -62,13 +62,16 @@
.
declareAcquiredMethod
(
"
getSettingList
"
,
"
getSettingList
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
'
updateConfiguration
'
,
function
(
appcache_storage
,
migration_version
,
current_version
)
{
.
declareMethod
(
'
updateConfiguration
'
,
function
(
appcache_storage
,
migration_version
,
current_version
,
jio_storage
)
{
var
gadget
=
this
;
if
(
!
appcache_storage
)
{
return
;
}
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
appcache_storage
.
repair
(
current_version
);
})
.
push
(
function
()
{
return
jio_storage
.
repair
();
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
"
migration_version
"
,
current_version
);
});
...
...
@@ -83,6 +86,14 @@
.
push
(
function
(
result_list
)
{
//TODO fix missing router setting (it's set but get returns undefined)
migration_version
=
result_list
[
1
];
current_version
=
window
.
location
.
href
.
replace
(
window
.
location
.
hash
,
""
);
index
=
current_version
.
indexOf
(
window
.
location
.
host
)
+
window
.
location
.
host
.
length
;
current_version
=
current_version
.
substr
(
index
);
if
(
migration_version
!==
current_version
)
{
//XXX is this a dirty hack?
indexedDB
.
deleteDatabase
(
'
monitoring-configuration-hash
'
);
indexedDB
.
deleteDatabase
(
'
monitoring_local.db
'
);
}
manifest
=
"
gadget_officejs_monitoring.configuration
"
;
if
(
options
!==
undefined
)
{
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
options
);
...
...
@@ -141,12 +152,9 @@
};
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
monitoring_jio
);
}
current_version
=
window
.
location
.
href
.
replace
(
window
.
location
.
hash
,
""
);
index
=
current_version
.
indexOf
(
window
.
location
.
host
)
+
window
.
location
.
host
.
length
;
current_version
=
current_version
.
substr
(
index
);
if
(
migration_version
!==
current_version
)
{
appcache_storage
=
jIO
.
createJIO
(
appcache_jio
);
return
gadget
.
updateConfiguration
(
appcache_storage
,
migration_version
,
current_version
);
return
gadget
.
updateConfiguration
(
appcache_storage
,
migration_version
,
current_version
,
gadget
.
props
.
jio_storage
);
}
})
.
push
(
function
()
{
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.xml
View file @
9a84f1f3
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1015.
22775.37961.58163
</string>
</value>
<value>
<string>
1015.
31731.39115.52974
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>
171
0945940.66
</float>
<float>
171
1481527.41
</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