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
02d8b9a5
Commit
02d8b9a5
authored
Mar 25, 2024
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_monitoring: fixes (configuration and jio storage)
parent
7fafd79a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
119 deletions
+108
-119
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
...Item/web_page_module/gadget_officejs_monitoring_jio_js.js
+91
-54
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
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.xml
...emplateItem/web_page_module/monitoring_jio_storage_js.xml
+2
-2
bt5/erp5_web_monitoring/SkinTemplateItem/portal_skins/erp5_web_monitoring/Promise_viewForMonitoring/listbox.xml
...erp5_web_monitoring/Promise_viewForMonitoring/listbox.xml
+11
-59
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_jio_js.js
View file @
02d8b9a5
...
...
@@ -62,18 +62,30 @@
.
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
);
});
})
.
declareMethod
(
'
createStorage
'
,
function
(
options
,
monitoring_jio
)
{
var
gadget
=
this
;
if
(
options
!==
undefined
)
{
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
options
);
}
else
{
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
monitoring_jio
);
}
})
.
declareMethod
(
'
createJio
'
,
function
(
options
)
{
var
gadget
=
this
,
current_version
,
index
,
appcache_storage
,
monitoring_jio
,
appcache_jio
,
migration_version
,
manifest
,
...
...
@@ -83,70 +95,95 @@
.
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
);
manifest
=
"
gadget_officejs_monitoring.configuration
"
;
if
(
options
!==
undefined
)
{
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
options
);
}
else
{
monitoring_jio
=
{
type
:
"
replicatedopml
"
,
remote_storage_unreachable_status
:
"
WARNING
"
,
remote_opml_check_time_interval
:
86400000
,
request_timeout
:
25000
,
// timeout is to 25 second
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
monitoring_local.db
"
}
}
}
};
appcache_jio
=
{
type
:
"
replicate
"
,
parallel_operation_attachment_amount
:
10
,
parallel_operation_amount
:
1
,
conflict_handling
:
2
,
//keep remote
signature_hash_key
:
'
hash
'
,
check_remote_attachment_modification
:
true
,
check_remote_attachment_creation
:
true
,
check_remote_attachment_deletion
:
true
,
check_remote_deletion
:
true
,
check_local_creation
:
false
,
check_local_deletion
:
false
,
check_local_modification
:
false
,
signature_sub_storage
:
{
type
:
"
query
"
,
monitoring_jio
=
{
type
:
"
replicatedopml
"
,
remote_storage_unreachable_status
:
"
WARNING
"
,
remote_opml_check_time_interval
:
86400000
,
request_timeout
:
25000
,
// timeout is to 25 second
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
monitoring
-configuration-hash
"
database
:
"
monitoring
_local.db
"
}
},
local_sub_storage
:
JSON
.
parse
(
JSON
.
stringify
(
monitoring_jio
)),
remote_sub_storage
:
{
type
:
"
saferepair
"
,
}
}
};
appcache_jio
=
{
type
:
"
replicate
"
,
parallel_operation_attachment_amount
:
10
,
parallel_operation_amount
:
1
,
conflict_handling
:
2
,
//keep remote
signature_hash_key
:
'
hash
'
,
check_remote_attachment_modification
:
true
,
check_remote_attachment_creation
:
true
,
check_remote_attachment_deletion
:
true
,
check_remote_deletion
:
true
,
check_local_creation
:
false
,
check_local_deletion
:
false
,
check_local_modification
:
false
,
signature_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
monitoring-configuration-hash
"
}
},
local_sub_storage
:
JSON
.
parse
(
JSON
.
stringify
(
monitoring_jio
)),
remote_sub_storage
:
{
type
:
"
saferepair
"
,
sub_storage
:
{
type
:
"
configuration
"
,
origin_url
:
origin_url
,
hateoas_appcache
:
"
hateoas_appcache
"
,
manifest
:
manifest
,
sub_storage
:
{
type
:
"
configuration
"
,
type
:
"
appcache
"
,
origin_url
:
origin_url
,
hateoas_appcache
:
"
hateoas_appcache
"
,
manifest
:
manifest
,
sub_storage
:
{
type
:
"
appcache
"
,
origin_url
:
origin_url
,
manifest
:
manifest
}
manifest
:
manifest
}
}
};
gadget
.
props
.
jio_storage
=
jIO
.
createJIO
(
monitoring_jio
);
}
};
return
gadget
.
createStorage
(
options
,
monitoring_jio
);
})
.
push
(
function
()
{
if
(
migration_version
!==
current_version
)
{
if
(
gadget
.
props
.
jio_storage
)
{
return
gadget
.
props
.
jio_storage
.
allDocs
();
}
}
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
);
})
.
push
(
function
(
all_docs
)
{
if
(
all_docs
&&
all_docs
.
data
.
total_rows
)
{
//iterate all docs, jio_remove, and recreate
var
remove_queue
=
new
RSVP
.
Queue
(),
i
;
function
remove_doc
(
id
)
{
remove_queue
.
push
(
function
()
{
return
gadget
.
props
.
jio_storage
.
remove
(
id
);
});
}
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
)
]);
}
})
.
push
(
function
()
{
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 @
02d8b9a5
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1015.
22775.37961.58163
</string>
</value>
<value>
<string>
1015.
32779.62576.10939
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>
171
0945940.6
6
</float>
<float>
171
1544405.4
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.js
View file @
02d8b9a5
...
...
@@ -155,10 +155,10 @@
return
storage
.
get
(
id
)
.
push
(
function
(
doc
)
{
if
(
doc
.
portal_type
!==
'
opml
'
)
{
throw
new
TypeError
(
"
Object with portal_type
"
+
doc
.
portal_type
+
"
is frozen, cannot remove it.
"
);
return
storage
.
remove
(
id
);
}
function
removeOPMLTree
(
url
)
{
console
.
log
(
"
portal_type 'opml'! complex opml remove
"
);
var
remove_id_list
=
[],
remove_signature_id_list
=
[];
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.xml
View file @
02d8b9a5
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
4.13769.50435.48776
</string>
</value>
<value>
<string>
101
5.31816.24445.1945
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>
17
06644494.36
</float>
<float>
17
11544040.72
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/SkinTemplateItem/portal_skins/erp5_web_monitoring/Promise_viewForMonitoring/listbox.xml
View file @
02d8b9a5
...
...
@@ -12,7 +12,6 @@
<list>
<string>
all_columns
</string>
<string>
columns
</string>
<string>
default_params
</string>
<string>
domain_root_list
</string>
<string>
domain_tree
</string>
<string>
editable_columns
</string>
...
...
@@ -85,10 +84,6 @@
<key>
<string>
portal_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
...
...
@@ -134,63 +129,20 @@
<value>
<list>
<tuple>
<string>
title
</string>
<string>
Title
</string>
</tuple>
<tuple>
<string>
source_reference
</string>
<string>
Software Type
</string>
</tuple>
<tuple>
<string>
aggregate_parent_subordination_title
</string>
<string>
Computer Network
</string>
</tuple>
<tuple>
<string>
aggregate_parent_title
</string>
<string>
Compute Node
</string>
</tuple>
<tuple>
<string>
aggregate_parent_reference
</string>
<string>
Compute Node Reference
</string>
</tuple>
<tuple>
<string>
aggregate_title
</string>
<string>
Compute Partition
</string>
</tuple>
<tuple>
<string>
SoftwareInstance_getComputePartitionIPv6
</string>
<string>
IPv6
</string>
<string>
status
</string>
<string>
Status
</string>
</tuple>
<tuple>
<string>
is_slav
e
</string>
<string>
Slav
e
</string>
<string>
start_dat
e
</string>
<string>
Report Dat
e
</string>
</tuple>
<tuple>
<string>
translated_validation_state_titl
e
</string>
<string>
Validation St
ate
</string>
<string>
change_dat
e
</string>
<string>
Status D
ate
</string>
</tuple>
<tuple>
<string>
slap_state_title
</string>
<string>
Request State
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<list>
<tuple>
<string>
channel
</string>
<string>
channel
</string>
</tuple>
<tuple>
<string>
channel_item
</string>
<string>
channel_item
</string>
</tuple>
<tuple>
<string>
title
</string>
<string>
title
</string>
<string>
message
</string>
<string>
Promise Output
</string>
</tuple>
</list>
</value>
...
...
@@ -254,7 +206,7 @@
<value>
<list>
<tuple>
<string>
titl
e
</string>
<string>
change_dat
e
</string>
<string>
descending
</string>
</tuple>
</list>
...
...
@@ -265,8 +217,8 @@
<value>
<list>
<tuple>
<string>
titl
e
</string>
<string>
Titl
e
</string>
<string>
change_dat
e
</string>
<string>
Status Dat
e
</string>
</tuple>
</list>
</value>
...
...
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