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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
6b04cb82
Commit
6b04cb82
authored
Nov 04, 2024
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Only force reconfig for old app versions
See merge request
!1998
parents
5d126a25
f63dcfc7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
45 deletions
+65
-45
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_opml_delete_js.js
...m/web_page_module/gadget_erp5_page_ojsm_opml_delete_js.js
+5
-8
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_opml_delete_js.xml
.../web_page_module/gadget_erp5_page_ojsm_opml_delete_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
...Item/web_page_module/gadget_officejs_monitoring_jio_js.js
+39
-23
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
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.js
...TemplateItem/web_page_module/monitoring_jio_storage_js.js
+7
-0
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.xml
...emplateItem/web_page_module/monitoring_jio_storage_js.xml
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring.xml
.../PathTemplateItem/web_site_module/officejs_monitoring.xml
+3
-3
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring/app.xml
...hTemplateItem/web_site_module/officejs_monitoring/app.xml
+3
-3
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring/hateoas_appcache.xml
.../web_site_module/officejs_monitoring/hateoas_appcache.xml
+3
-3
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_opml_delete_js.js
View file @
6b04cb82
...
...
@@ -10,23 +10,20 @@
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_remove
"
,
"
jio_remove
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
jio_remove
(
options
.
jio_key
);
})
return
gadget
.
jio_remove
(
options
.
jio_key
)
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
"
Document Deleted
"
,
status
:
"
success
"
});
return
gadget
.
notifySubmitted
({
message
:
"
Document Deleted
"
,
status
:
"
success
"
})
},
function
(
error
)
{
return
gadget
.
notifySubmitted
({
message
:
error
.
message
,
status
:
"
error
"
})
})
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
'
change
'
,
options
:
{
page
:
options
.
return_url
||
'
settings_configurator
'
}});
});
});
}
,
{
mutex
:
'
render
'
}
);
}(
window
,
rJS
));
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_opml_delete_js.xml
View file @
6b04cb82
...
...
@@ -260,7 +260,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
16.7854.16646.24046
</string>
</value>
<value>
<string>
10
20.22291.41890.38485
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -280,7 +280,7 @@
</tuple>
<state>
<tuple>
<float>
17
13981022.3
8
</float>
<float>
17
30318970.2
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
View file @
6b04cb82
...
...
@@ -120,8 +120,8 @@
.
declareAcquiredMethod
(
"
setSettingList
"
,
"
setSettingList
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
'
updateConfiguration
'
,
function
(
appcache_storage
,
current_version
,
jio_storage
)
{
var
gadget
=
this
;
.
declareMethod
(
'
updateConfiguration
'
,
function
(
appcache_storage
,
current_version
,
jio_storage
,
force_reconfig
)
{
var
gadget
=
this
,
setting_dict
=
{
'
migration_version
'
:
current_version
}
;
if
(
!
appcache_storage
)
{
return
;
}
return
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -131,9 +131,11 @@
return
jio_storage
.
repair
();
})
.
push
(
function
()
{
return
gadget
.
setSettingList
({
'
migration_version
'
:
current_version
,
'
master_url_list
'
:
undefined
,
'
master_url_list_updated
'
:
false
});
if
(
force_reconfig
)
{
setting_dict
.
master_url_list
=
undefined
;
setting_dict
.
master_url_list_updated
=
false
;
}
return
gadget
.
setSettingList
(
setting_dict
);
});
})
...
...
@@ -149,7 +151,7 @@
.
declareMethod
(
'
createJio
'
,
function
(
options
)
{
var
gadget
=
this
,
current_version
,
index
,
appcache_storage
,
appcache_jio
,
migration_version
,
manifest
,
monitoring_jio
,
origin_url
=
window
.
location
.
href
;
origin_url
=
window
.
location
.
href
,
force_reconfig
=
false
;
return
gadget
.
getSettingList
([
'
configuration_manifest
'
,
'
migration_version
'
])
.
push
(
function
(
result_list
)
{
...
...
@@ -207,37 +209,51 @@
};
return
gadget
.
createStorage
(
options
,
monitoring_jio
);
})
//backward compatibility: old app versions had badnamed data
.
push
(
function
()
{
if
(
migration_version
!==
current_version
)
{
if
(
gadget
.
props
.
jio_storage
)
{
return
gadget
.
props
.
jio_storage
.
allDocs
();
return
gadget
.
props
.
jio_storage
.
allDocs
({
query
:
'
(portal_type:promise)
'
});
}
}
})
.
push
(
function
(
all_docs
)
{
var
remove_queue
=
new
RSVP
.
Queue
(),
i
;
function
remove_doc
(
id
)
{
remove_queue
.
push
(
function
()
{
return
gadget
.
props
.
jio_storage
.
remove
(
id
);
.
push
(
function
(
result
)
{
function
remove_all
()
{
return
gadget
.
props
.
jio_storage
.
allDocs
()
.
push
(
function
(
all_docs
)
{
var
remove_queue
=
new
RSVP
.
Queue
(),
i
;
function
remove_doc
(
id
)
{
remove_queue
.
push
(
function
()
{
return
gadget
.
props
.
jio_storage
.
remove
(
id
);
});
}
if
(
all_docs
&&
all_docs
.
data
.
total_rows
)
{
//iterate all docs, jio_remove, and recreate
for
(
i
=
0
;
i
<
all_docs
.
data
.
total_rows
;
i
+=
1
)
{
remove_doc
(
all_docs
.
data
.
rows
[
i
].
id
);
}
return
RSVP
.
all
([
remove_queue
,
gadget
.
createStorage
(
options
,
monitoring_jio
),
gadget
.
setSetting
(
"
latest_import_date
"
,
undefined
)
]);
}
});
}
if
(
all_docs
&&
all_docs
.
data
.
total_rows
)
{
//iterate all docs, jio_remove, and recreate
for
(
i
=
0
;
i
<
all_docs
.
data
.
total_rows
;
i
+=
1
)
{
re
move_doc
(
all_docs
.
data
.
rows
[
i
].
id
);
if
(
result
&&
result
.
data
.
rows
.
length
>
0
)
{
force_reconfig
=
true
;
if
(
gadget
.
props
.
jio_storage
)
{
re
turn
remove_all
(
);
}
return
RSVP
.
all
([
remove_queue
,
gadget
.
createStorage
(
options
,
monitoring_jio
),
gadget
.
setSetting
(
"
latest_import_date
"
,
undefined
)
]);
}
})
.
push
(
function
()
{
if
(
migration_version
!==
current_version
)
{
appcache_storage
=
jIO
.
createJIO
(
appcache_jio
);
return
gadget
.
updateConfiguration
(
appcache_storage
,
current_version
,
gadget
.
props
.
jio_storage
);
return
gadget
.
updateConfiguration
(
appcache_storage
,
current_version
,
gadget
.
props
.
jio_storage
,
force_reconfig
);
}
})
.
push
(
function
()
{
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.xml
View file @
6b04cb82
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
19.25813.42370.5614
</string>
</value>
<value>
<string>
10
20.20652.1827.11417
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>
17
26682335.1
</float>
<float>
17
30218508.62
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.js
View file @
6b04cb82
...
...
@@ -257,6 +257,13 @@
});
}
return
removeOPMLTree
(
id
);
},
function
(
error
)
{
if
(
error
&&
error
.
status_code
===
404
)
{
//opml already removed
return
;
}
else
{
throw
error
;
}
});
};
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.xml
View file @
6b04cb82
...
...
@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>
17
27445979.03
</float>
<float>
17
30318820.81
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring.xml
View file @
6b04cb82
...
...
@@ -104,7 +104,7 @@
<dictionary>
<item>
<key>
<string>
_defined_in_class
</string>
</key>
<value>
<
bool>
True
</bool
>
</value>
<value>
<
int>
1
</int
>
</value>
</item>
<item>
<key>
<string>
_hookname
</string>
</key>
...
...
@@ -544,7 +544,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
5.32811.46439.54528
</string>
</value>
<value>
<string>
101
9.37281.47800.48247
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -564,7 +564,7 @@
</tuple>
<state>
<tuple>
<float>
17
16562039.61
</float>
<float>
17
30218552.03
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring/app.xml
View file @
6b04cb82
...
...
@@ -104,7 +104,7 @@
<dictionary>
<item>
<key>
<string>
_defined_in_class
</string>
</key>
<value>
<
bool>
True
</bool
>
</value>
<value>
<
int>
1
</int
>
</value>
</item>
<item>
<key>
<string>
_hookname
</string>
</key>
...
...
@@ -579,7 +579,7 @@ WebSection_getMonitorPrecacheManifestList</string> </value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
5.45944.11619.3520
8
</string>
</value>
<value>
<string>
101
9.37281.53022.3107
8
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -599,7 +599,7 @@ WebSection_getMonitorPrecacheManifestList</string> </value>
</tuple>
<state>
<tuple>
<float>
17
16562039.61
</float>
<float>
17
30218556.13
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_site_module/officejs_monitoring/hateoas_appcache.xml
View file @
6b04cb82
...
...
@@ -69,7 +69,7 @@
<dictionary>
<item>
<key>
<string>
_defined_in_class
</string>
</key>
<value>
<
bool>
True
</bool
>
</value>
<value>
<
int>
1
</int
>
</value>
</item>
<item>
<key>
<string>
_hookname
</string>
</key>
...
...
@@ -339,7 +339,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
4.3364.27014.6423
80
</string>
</value>
<value>
<string>
101
9.25707.33677.140
80
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -359,7 +359,7 @@
</tuple>
<state>
<tuple>
<float>
17
16562039.61
</float>
<float>
17
30218552.03
</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