Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mynij
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
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
Mynij
mynij
Commits
c22bb2a4
Commit
c22bb2a4
authored
Oct 23, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_mynij_search: show building progress bar when index build start
parent
faae774a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
121 additions
and
20 deletions
+121
-20
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_html.xml
...lateItem/web_page_module/gadget_erp5_mynij_panel_html.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
...emplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
+3
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
...mplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.html.html
...emplateItem/web_page_module/gadget_mynij_parser.html.html
+11
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.html.xml
...TemplateItem/web_page_module/gadget_mynij_parser.html.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.js.js
...athTemplateItem/web_page_module/gadget_mynij_parser.js.js
+31
-10
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.js.xml
...thTemplateItem/web_page_module/gadget_mynij_parser.js.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
...thTemplateItem/web_page_module/gadget_mynij_style.css.css
+66
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
...thTemplateItem/web_page_module/gadget_mynij_style.css.xml
+2
-2
No files found.
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_html.xml
View file @
c22bb2a4
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.
16121.1326.57685
</string>
</value>
<value>
<string>
987.
31511.24484.17578
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1603
297250.59
</float>
<float>
1603
442016.65
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
View file @
c22bb2a4
...
...
@@ -109,6 +109,9 @@
.
allowPublicAcquisition
(
"
save_index
"
,
function
(
args
)
{
return
this
.
props
.
model_gadget
.
save_index
(
args
[
0
]);
})
.
allowPublicAcquisition
(
'
getParentElement
'
,
function
()
{
return
this
.
element
.
querySelector
(
"
.ui-content
"
);
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
View file @
c22bb2a4
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.
29116.51782.25139
</string>
</value>
<value>
<string>
987.
31529.454.41710
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1603
354044.58
</float>
<float>
1603
443338.99
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.html.html
View file @
c22bb2a4
...
...
@@ -6,6 +6,17 @@
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_mynij_parser.js"
type=
"text/javascript"
></script>
<script
src=
"mynij_rss-parser.min.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"mynij-style.css"
>
<script
id=
"panel-template-progress"
type=
"text/x-handlebars-template"
>
<
p
>
Building
<
span
class
=
"
build-title
"
>
{{
title
}}
...
<
/span></
p
>
<
div
class
=
"
anbar bar1
"
><
/div
>
<
div
class
=
"
anbar bar2
"
><
/div
>
<
div
class
=
"
anbar bar3
"
><
/div
>
<
div
class
=
"
anbar bar4
"
><
/div
>
<
div
class
=
"
anbar bar5
"
><
/div
>
</script>
</head>
<body>
</body>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.html.xml
View file @
c22bb2a4
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
5.52218.28049.9915
</string>
</value>
<value>
<string>
98
7.31553.14164.37563
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1
597156386.4
</float>
<float>
1
603444183.66
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.js.js
View file @
c22bb2a4
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global window, RSVP, rJS, jIO*/
(
function
(
window
,
RSVP
,
rJS
,
jIO
)
{
/*global window, RSVP, rJS, jIO
, Handlebars
*/
(
function
(
window
,
RSVP
,
rJS
,
jIO
,
Handlebars
)
{
"
use strict
"
;
var
concurrent_requests
=
3
,
var
gadget_klass
=
rJS
(
window
),
template_element
=
gadget_klass
.
__template_element
,
concurrent_requests
=
3
,
proxies
=
[
"
https://softinst116265.host.vifib.net/erp5/ERP5Site_getHTTPResource
"
,
"
https://softinst116446.host.vifib.net/erp5/ERP5Site_getHTTPResource
"
];
],
panel_template_progress
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
panel-template-progress
"
)
.
innerHTML
);
function
get_random_id
()
{
return
'
_
'
+
Math
.
random
().
toString
(
36
).
substr
(
2
,
9
);
...
...
@@ -17,7 +22,7 @@
console
.
log
(
error_message
);
}
rJS
(
window
)
gadget_klass
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
...
...
@@ -33,10 +38,12 @@
.
declareAcquiredMethod
(
"
add_to_index
"
,
"
add_to_index
"
)
.
declareAcquiredMethod
(
"
save_index
"
,
"
save_index
"
)
.
declareAcquiredMethod
(
"
getParentElement
"
,
"
getParentElement
"
)
//declare service to build index in background
.
declareService
(
function
()
{
var
gadget
=
this
;
var
gadget
=
this
,
parent_content
;
function
build
()
{
var
entry
;
...
...
@@ -45,13 +52,20 @@
return
gadget
.
getSetting
(
'
build_list
'
);
})
.
push
(
function
(
build_list
)
{
var
link_list
;
var
link_list
,
tmp_element
;
if
(
!
build_list
||
!
build_list
.
length
)
// wait 5s and check again if there is something to build
return
RSVP
.
delay
(
5000
);
else
{
entry
=
build_list
[
0
];
link_list
=
entry
.
links
.
split
(
"
\n
"
).
filter
(
l
=>
l
.
length
>
0
);
tmp_element
=
document
.
createElement
(
'
div
'
);
tmp_element
.
className
=
'
building
'
;
tmp_element
.
innerHTML
=
panel_template_progress
({
title
:
entry
.
index_name
})
parent_content
.
appendChild
(
tmp_element
);
return
gadget
.
build_index
(
link_list
,
entry
.
index_name
)
.
push
(
function
(
result
)
{
console
.
log
(
"
done building index
"
);
...
...
@@ -72,6 +86,9 @@
});
})
.
push
(
function
()
{
var
indicator
=
parent_content
.
querySelector
(
'
.building
'
);
if
(
indicator
)
parent_content
.
removeChild
(
indicator
);
return
gadget
.
getSetting
(
'
build_list
'
);
})
.
push
(
function
(
current
)
{
...
...
@@ -88,8 +105,12 @@
});
}
return
gadget
.
getParentElement
()
.
push
(
function
(
element
)
{
parent_content
=
element
;
return
build
();
})
})
/*.declareMethod("parse_user_entry_list", function (list, index_name) {
var gadget = this,
...
...
@@ -262,4 +283,4 @@
return
gadget
.
add_to_index
(
result
,
index_name
);
});
}(
window
,
RSVP
,
rJS
,
jIO
));
}(
window
,
RSVP
,
rJS
,
jIO
,
Handlebars
));
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_parser.js.xml
View file @
c22bb2a4
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.
29976.13991.60689
</string>
</value>
<value>
<string>
987.
31551.51611.38178
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1603
350351.31
</float>
<float>
1603
444202.17
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
View file @
c22bb2a4
...
...
@@ -492,3 +492,69 @@ input[type="button"]:hover{
}
}
/** END Tabs CSS **/
/* Building indicator */
.building
{
margin
:
10px
;
}
.building
:after
{
content
:
""
;
clear
:
both
;
}
.build-title
{
display
:
inline
;
text-align
:
left
;
font-weight
:
700
;
}
.anbar
{
background-color
:
#83da41
;
background-image
:
linear-gradient
(
45deg
,
#71e721
25%
,
#cbecc5
);
border-left
:
1px
solid
#175f05
;
border-top
:
1px
solid
#35a21a
;
border-right
:
1px
solid
#35a21a
;
border-bottom
:
1px
solid
#35a21a
;
width
:
10px
;
height
:
10px
;
margin
:
10px
0
;
float
:
left
;
margin-left
:
5px
;
opacity
:
0.1
;
transform
:
scale
(
0.7
);
animation
:
move
1s
infinite
linear
;
}
.bar1
{
animation-delay
:
.4s
;
}
.bar2
{
animation-delay
:
.3s
;
}
.bar3
{
animation-delay
:
.2s
;
}
.bar4
{
animation-delay
:
.3s
;
}
.bar5
{
animation-delay
:
.4s
;
}
@keyframes
move
{
0
%
{
transform
:
scale
(
1.2
);
opacity
:
1
;
}
100
%
{
transform
:
scale
(
0.7
);
opacity
:
0.1
;
}
}
/* END Building indicator */
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
View file @
c22bb2a4
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.
27174.65288.50875
</string>
</value>
<value>
<string>
987.
31506.15184.56388
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1603
184533.69
</float>
<float>
1603
444297.3
</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