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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
erp5
Commits
d728c49b
Commit
d728c49b
authored
Mar 03, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_monitoring: Apply JSLint
parent
0eec8a72
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
58 deletions
+59
-58
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_resources_view_js.js
...eb_page_module/gadget_erp5_page_ojsm_resources_view_js.js
+24
-24
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_settings_configurator_js.js
..._page_module/gadget_erp5_page_settings_configurator_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_hosting_subscription_view_js.js
...odule/gadget_officejs_jio_hosting_subscription_view_js.js
+10
-10
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_opml_view_js.js
...eItem/web_page_module/gadget_officejs_jio_opml_view_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
...em/web_page_module/gadget_officejs_jio_promise_view_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_opml_edit_js.js
...eb_page_module/gadget_officejs_monitoring_opml_edit_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_panel_js.js
...em/web_page_module/gadget_officejs_monitoring_panel_js.js
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.js
...TemplateItem/web_page_module/monitoring_jio_storage_js.js
+15
-14
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_web_storage_js.js
...lateItem/web_page_module/monitoring_jio_web_storage_js.js
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/ojsm_gadget_erp5_statusfield_js.js
...teItem/web_page_module/ojsm_gadget_erp5_statusfield_js.js
+3
-3
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_ojsm_resources_view_js.js
View file @
d728c49b
...
@@ -74,21 +74,21 @@
...
@@ -74,21 +74,21 @@
//"date, io rw counter, io cycles counter, disk used"
//"date, io rw counter, io cycles counter, disk used"
line_list
=
[
"
io rw count (Kb/s)
"
,
"
io cycles count (/1000)
"
];
//, "disk used"];
line_list
=
[
"
io rw count (Kb/s)
"
,
"
io cycles count (/1000)
"
];
//, "disk used"];
axis_list
.
push
({
axis_list
.
push
({
"
0
"
:
{
"
0
"
:
{
"
title
"
:
"
IO read/write counter
"
,
"
title
"
:
"
IO read/write counter
"
,
"
scale_type
"
:
"
linear
"
,
"
scale_type
"
:
"
linear
"
,
"
value_type
"
:
"
date
"
,
"
value_type
"
:
"
date
"
,
"
zoom_range
"
:
date_window
"
zoom_range
"
:
date_window
}
}
});
});
axis_list
.
push
({
axis_list
.
push
({
"
0
"
:
{
"
0
"
:
{
"
title
"
:
"
IO cycles counter
"
,
"
title
"
:
"
IO cycles counter
"
,
"
scale_type
"
:
"
linear
"
,
"
scale_type
"
:
"
linear
"
,
"
value_type
"
:
"
date
"
,
"
value_type
"
:
"
date
"
,
"
zoom_range
"
:
date_window
"
zoom_range
"
:
date_window
}
}
});
});
for
(
i
=
0
;
i
<
line_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
line_list
.
length
;
i
+=
1
)
{
line_list
[
i
]
=
line_list
[
i
].
trim
();
line_list
[
i
]
=
line_list
[
i
].
trim
();
data_list
.
push
({
data_list
.
push
({
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
})
})
.
push
(
function
()
{
.
push
(
function
()
{
//return gadget.element.querySelector('form button[type="submit"]').click();
//return gadget.element.querySelector('form button[type="submit"]').click();
return
gadget
.
getDeclaredGadget
(
'
form_cpu_graph
'
)
return
gadget
.
getDeclaredGadget
(
'
form_cpu_graph
'
)
.
push
(
function
(
form_gadget
)
{
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
return
form_gadget
.
getContent
();
})
})
...
@@ -433,14 +433,14 @@
...
@@ -433,14 +433,14 @@
"
left
"
,
"
left
"
,
[[
"
my_graph_auto_update
"
],
[
"
my_cpu_graph_select
"
]]
[[
"
my_graph_auto_update
"
],
[
"
my_cpu_graph_select
"
]]
],
],
[
[
"
right
"
,
"
right
"
,
[]
[]
],
],
[
[
"
bottom
"
,
"
bottom
"
,
[]
[]
]]
]]
}
}
});
});
})
})
...
@@ -479,7 +479,7 @@
...
@@ -479,7 +479,7 @@
updateGraph
(
gadget
,
true
);
updateGraph
(
gadget
,
true
);
}
}
if
(
evt
.
target
.
getAttribute
(
"
name
"
)
===
"
graph_auto_update_key
"
)
{
if
(
evt
.
target
.
getAttribute
(
"
name
"
)
===
"
graph_auto_update_key
"
)
{
if
(
evt
.
target
.
value
==
"
on
"
)
{
if
(
evt
.
target
.
value
==
=
"
on
"
)
{
gadget
.
property_dict
.
disable_update
=
false
;
gadget
.
property_dict
.
disable_update
=
false
;
}
else
{
}
else
{
gadget
.
property_dict
.
disable_update
=
true
;
gadget
.
property_dict
.
disable_update
=
true
;
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_page_settings_configurator_js.js
View file @
d728c49b
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
doc
;
doc
;
return
gadget
.
notifySubmitting
()
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
})
.
push
(
function
(
form_gadget
)
{
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
return
form_gadget
.
getContent
();
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_hosting_subscription_view_js.js
View file @
d728c49b
...
@@ -194,17 +194,17 @@
...
@@ -194,17 +194,17 @@
.
value
.
aggregate_reference
===
undefined
)
{
.
value
.
aggregate_reference
===
undefined
)
{
// Instance is not Synchronized!
// Instance is not Synchronized!
promise_list
.
push
(
false
);
promise_list
.
push
(
false
);
continue
;
}
else
{
gadget_element
=
document
.
createElement
(
"
div
"
);
element
.
appendChild
(
gadget_element
);
promise_list
.
push
(
gadget
.
declareGadget
(
"
gadget_officejs_monitoring_parameter_view.html
"
,
{
element
:
gadget_element
,
scope
:
'
p_
'
+
gadget
.
state
.
instance_dict
.
data
.
rows
[
i
].
id
,
sandbox
:
"
public
"
}
)
);
}
}
gadget_element
=
document
.
createElement
(
"
div
"
);
element
.
appendChild
(
gadget_element
);
promise_list
.
push
(
gadget
.
declareGadget
(
"
gadget_officejs_monitoring_parameter_view.html
"
,
{
element
:
gadget_element
,
scope
:
'
p_
'
+
gadget
.
state
.
instance_dict
.
data
.
rows
[
i
].
id
,
sandbox
:
"
public
"
}
)
);
}
}
return
RSVP
.
all
(
promise_list
);
return
RSVP
.
all
(
promise_list
);
})
})
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_opml_view_js.js
View file @
d728c49b
/*global window, rJS, RSVP, Handlebars */
/*global window, rJS, RSVP,
Rusha,
Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Rusha
)
{
(
function
(
window
,
rJS
,
RSVP
,
Rusha
)
{
"
use strict
"
;
"
use strict
"
;
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
View file @
d728c49b
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
start
;
start
;
function
addUTCTimezone
(
date_string
)
{
function
addUTCTimezone
(
date_string
)
{
if
(
new
RegExp
(
/
[
+-
][\d]{2}\:?[\d]{2}
$/
).
test
(
date_string
))
{
if
(
new
RegExp
(
/
[
+
\
-][\d]{2}\:?[\d]{2}
$/
).
test
(
date_string
))
{
return
date_string
;
return
date_string
;
}
}
return
date_string
+
"
+0000
"
;
return
date_string
+
"
+0000
"
;
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_opml_edit_js.js
View file @
d728c49b
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
})
})
.
push
(
undefined
,
function
(
error
)
{
.
push
(
undefined
,
function
(
error
)
{
var
message_text
,
var
message_text
,
code
=
0
;
code
=
0
;
if
(
error
instanceof
jIO
.
util
.
jIOError
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
)
{
message_text
=
error
.
message
;
message_text
=
error
.
message
;
code
=
error
.
status_code
;
code
=
error
.
status_code
;
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_monitoring_panel_js.js
View file @
d728c49b
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
}
}
return
context
.
getUrlParameter
(
'
editable
'
)
return
context
.
getUrlParameter
(
'
editable
'
)
.
push
(
function
()
{
.
push
(
function
()
{
return
context
.
registerSync
();
return
context
.
registerSync
hronisation
();
})
})
.
push
(
function
(
editable
)
{
.
push
(
function
(
editable
)
{
return
context
.
changeState
({
return
context
.
changeState
({
...
@@ -273,7 +273,7 @@
...
@@ -273,7 +273,7 @@
window
.
dispatchEvent
(
event
);
window
.
dispatchEvent
(
event
);
return
result
;
return
result
;
})
})
.
declareJob
(
'
registerSync
'
,
function
()
{
.
declareJob
(
'
registerSync
hronisation
'
,
function
()
{
return
this
.
getDeclaredGadget
(
"
sync_gadget
"
)
return
this
.
getDeclaredGadget
(
"
sync_gadget
"
)
.
push
(
function
(
sync_gadget
)
{
.
push
(
function
(
sync_gadget
)
{
return
sync_gadget
.
register
();
return
sync_gadget
.
register
();
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_storage_js.js
View file @
d728c49b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/lgpl.html
* http://www.gnu.org/licenses/lgpl.html
*/
*/
/*jslint nomen: true
*/
/*jslint nomen: true
, indent: 2, maxerr: 3
*/
/*global jIO, RSVP, Rusha, console, Blob */
/*global jIO, RSVP, Rusha, console, Blob */
(
function
(
jIO
,
RSVP
,
Rusha
,
Blob
,
console
)
{
(
function
(
jIO
,
RSVP
,
Rusha
,
Blob
,
console
)
{
...
@@ -402,6 +402,15 @@
...
@@ -402,6 +402,15 @@
});
});
}
}
function
fixDateTimezone
(
date_string
)
{
// set default timezone offset to UTC
// XXX should be removed later
if
(
ZONE_LIST
.
indexOf
(
date_string
.
slice
(
-
5
))
===
-
1
)
{
return
date_string
+
"
+0000
"
;
}
return
date_string
;
}
function
updateHostingSubscriptionState
(
hosting
,
element
)
{
function
updateHostingSubscriptionState
(
hosting
,
element
)
{
var
status
=
element
.
status
.
toUpperCase
();
var
status
=
element
.
status
.
toUpperCase
();
...
@@ -410,22 +419,15 @@
...
@@ -410,22 +419,15 @@
}
}
if
(
hosting
.
status
===
"
ERROR
"
)
{
if
(
hosting
.
status
===
"
ERROR
"
)
{
return
;
return
;
}
else
if
(
status
===
"
ERROR
"
)
{
}
if
(
status
===
"
ERROR
"
)
{
hosting
.
status
=
status
;
hosting
.
status
=
status
;
}
else
if
(
status
===
"
WARNING
"
)
{
}
else
if
(
status
===
"
WARNING
"
)
{
hosting
.
status
=
status
;
hosting
.
status
=
status
;
}
if
(
status
===
"
OK
"
&&
hosting
.
status
!==
status
)
{
hosting
.
status
=
status
;
}
}
}
if
(
status
===
"
OK
"
&&
hosting
.
status
!==
status
)
{
hosting
.
status
=
status
;
function
fixDateTimezone
(
date_string
)
{
// set default timezone offset to UTC
// XXX should be removed later
if
(
ZONE_LIST
.
indexOf
(
date_string
.
slice
(
-
5
))
===
-
1
)
{
return
date_string
+
"
+0000
"
;
}
}
return
date_string
;
}
}
function
getOpmlTree
(
context
,
opml_url
,
opml_spec
,
basic_login
,
opml_title
)
{
function
getOpmlTree
(
context
,
opml_url
,
opml_spec
,
basic_login
,
opml_title
)
{
...
@@ -702,8 +704,7 @@
...
@@ -702,8 +704,7 @@
name
:
result_list
[
i
].
url
,
name
:
result_list
[
i
].
url
,
doc
:
result_list
[
i
].
current_signature
doc
:
result_list
[
i
].
current_signature
});
});
}
}
else
if
(
context
.
_remote_storage_unreachable_status
!==
undefined
)
{
else
if
(
context
.
_remote_storage_unreachable_status
!==
undefined
)
{
if
(
result_list
[
i
].
type
===
"
webhttp
"
)
{
if
(
result_list
[
i
].
type
===
"
webhttp
"
)
{
// In case it was impossible to get software Instance
// In case it was impossible to get software Instance
// Add an empty Software Instance with unreachable status
// Add an empty Software Instance with unreachable status
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/monitoring_jio_web_storage_js.js
View file @
d728c49b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/lgpl.html
* http://www.gnu.org/licenses/lgpl.html
*/
*/
/*jslint nomen: true*/
/*jslint nomen: true
, indent: 2, maxerr: 3
*/
/*global jIO, RSVP */
/*global jIO, RSVP */
(
function
(
jIO
,
RSVP
)
{
(
function
(
jIO
,
RSVP
)
{
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/ojsm_gadget_erp5_statusfield_js.js
View file @
d728c49b
/*global window, rJS, Handlebars */
/*global window, rJS, Handlebars */
/*jslint indent: 2, maxerr: 3 */
/*jslint
nomen: true,
indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
Handlebars
)
{
(
function
(
window
,
rJS
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
templater
=
gadget_klass
.
__template_element
,
templater
=
gadget_klass
.
__template_element
,
status_field_template
=
Handlebars
.
compile
(
status_field_template
=
Handlebars
.
compile
(
templater
.
getElementById
(
"
template-status-field
"
).
innerHTML
templater
.
getElementById
(
"
template-status-field
"
).
innerHTML
);
);
gadget_klass
gadget_klass
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
()
{
if
(
this
.
state
.
hidded
)
{
if
(
this
.
state
.
hidded
)
{
this
.
element
.
innerHTML
=
""
;
this
.
element
.
innerHTML
=
""
;
}
else
{
}
else
{
...
...
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