Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
b4c4c727
Commit
b4c4c727
authored
Sep 26, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] project view: dont update when corpus is pending deletion + longer start interval
parent
06b8a2eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
project.html
templates/pages/projects/project.html
+14
-6
No files found.
templates/pages/projects/project.html
View file @
b4c4c727
...
...
@@ -127,7 +127,14 @@
<ul>
<li
onclick="
garganrest.nodes.delete({{corpus.id}}, function(){$('#corpus_'+{{corpus.id}}).remove()});
trashedIds[{{corpus.id}}] = true ;
garganrest.nodes.delete(
{{corpus.id}},
function(){
$('#corpus_'+{{corpus.id}}).remove()
delete trashedIds[{{corpus.id}}]
}
);
$(this).parent().parent().remove();
">
<a href='#'>Delete this</a>
...
...
@@ -313,6 +320,9 @@
var
corporaIds
=
[]
// for corpora ids whose delete is pending
var
trashedIds
=
{}
for
(
var
i
=
0
;
i
<
corporaDivs
.
length
;
i
++
)
{
// ex: corpus_1198
divId
=
corporaDivs
[
i
].
id
...
...
@@ -329,7 +339,6 @@
keepCheckingProjectStatus
()
}
// cookie ajax helper ==================================
function
getCookie
(
name
)
{
var
cookieValue
=
null
;
...
...
@@ -969,9 +978,8 @@
var
activeCorporaIds
=
[]
for
(
var
i
in
corporaIds
)
{
var
crid
=
corporaIds
[
i
]
if
(
!
document
.
getElementById
(
'corpus_'
+
crid
+
'_status_ok'
)
)
{
if
((
!
document
.
getElementById
(
'corpus_'
+
crid
+
'_status_ok'
))
&&
(
!
trashedIds
[
crid
]))
{
activeCorporaIds
.
push
(
crid
)
}
}
...
...
@@ -1002,7 +1010,7 @@
}
else
{
// decreasing intervals (preserving DB while "loosing interest")
nextTime
=
nChecks
*
3000
nextTime
=
(
nChecks
+
1
)
*
3000
// schedule next check
setTimeout
(
keepCheckingProjectStatus
,
nextTime
)
console
.
log
(
"next status check in"
,
nextTime
/
1000
,
"s"
)
...
...
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