Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
179cacb0
Commit
179cacb0
authored
Mar 20, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard repairAllDocs script added
parent
4f9d1ca6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
examples/jio_dashboard.html
examples/jio_dashboard.html
+13
-0
No files found.
examples/jio_dashboard.html
View file @
179cacb0
...
...
@@ -77,6 +77,7 @@
<button
onclick=
"scriptLogLocalStorage()"
>
log localStorage
</button>
<button
onclick=
"localStorage.clear()"
>
clear localStorage
</button>
<button
onclick=
"scriptRemoveAllDocs()"
>
removeAllDocs
</button>
<button
onclick=
"scriptRepairAllDocs()"
>
repairAllDocs
</button>
</div>
<hr
/>
<button
onclick=
"clearlog()"
>
Clear Log
</button>
...
...
@@ -383,6 +384,18 @@ function scriptRemoveAllDocs() {
}));
});
}
function
scriptRepairAllDocs
()
{
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
});
var
ret
=
command
(
"
repair
"
);
select
(
'
#metadata
'
).
value
=
original_metadata_value
;
return
ret
;
}));
});
}
//-->
</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