Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
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
Alain Takoudjou
jio
Commits
594bb104
Commit
594bb104
authored
Mar 18, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add useful functions to jio dashboard
parent
4fe2c534
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
examples/jio_dashboard.html
examples/jio_dashboard.html
+19
-4
No files found.
examples/jio_dashboard.html
View file @
594bb104
...
...
@@ -268,10 +268,6 @@ function createJIO() {
}
}
function
printLocalStorage
()
{
log
(
"
localStorage content
\n
"
+
JSON
.
stringify
(
localStorage
,
null
,
"
"
));
}
function
logError
(
begin_date
,
err
)
{
log
(
'
time :
'
+
(
Date
.
now
()
-
begin_date
));
error
(
'
return :
'
+
JSON
.
stringify
(
err
,
null
,
"
"
));
...
...
@@ -365,6 +361,25 @@ function check() {
function
repair
()
{
return
doCommandNTimes
(
"
repair
"
);
}
//////////////////////////////////////////////////////////////////////
// scripts
function
scriptLogLocalStorage
()
{
log
(
"
localStorage content
\n
"
+
JSON
.
stringify
(
localStorage
,
null
,
"
"
));
}
function
scriptRemoveAllDocs
()
{
var
original_metadata_value
=
select
(
'
#metadata
'
).
value
;
return
command
(
"
allDocs
"
).
then
(
function
(
answer
)
{
return
RSVP
.
all
(
answer
.
data
.
rows
.
map
(
function
(
row
)
{
select
(
"
#metadata
"
).
value
=
JSON
.
stringify
({
"
_id
"
:
row
.
id
});
return
command
(
"
remove
"
);
}));;
}).
then
(
function
()
{
select
(
'
#metadata
'
).
value
=
original_metadata_value
;
});
}
//-->
</script>
</body>
...
...
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