Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Neo4jsource
Commits
555df3e9
Commit
555df3e9
authored
11 years ago
by
Chris Vest
Browse files
Options
Download
Plain Diff
Merge pull request #2503 from cleishm/browser-relaxed-status
relaxed heartbeat to server
parents
7080a3a0
c30ae628
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
community/browser/app/scripts/init/commandInterpreters.coffee
+1
-4
...unity/browser/app/scripts/init/commandInterpreters.coffee
community/browser/app/scripts/init/statusCheck.coffee
+2
-2
community/browser/app/scripts/init/statusCheck.coffee
community/browser/app/scripts/services/Server.coffee
+2
-2
community/browser/app/scripts/services/Server.coffee
community/browser/app/scripts/settings.coffee
+2
-2
community/browser/app/scripts/settings.coffee
with
7 additions
and
10 deletions
+7
-10
community/browser/app/scripts/init/commandInterpreters.coffee
+
1
-
4
View file @
555df3e9
...
...
@@ -207,10 +207,7 @@ angular.module('neo4jApp')
return
q
.
promise
if
(
verb
is
'post'
or
verb
is
'put'
)
if
not
data
q
.
reject
(
error
(
"Method needs data"
))
return
q
.
promise
else
if
data
# insist that data is parseable JSON
try
JSON
.
parse
(
data
.
replace
(
/\n/g
,
""
))
...
...
This diff is collapsed.
Click to expand it.
community/browser/app/scripts/init/statusCheck.coffee
+
2
-
2
View file @
555df3e9
...
...
@@ -36,11 +36,11 @@ angular.module('neo4jApp').run([
Server
.
status
(
'?t='
+
ts
).
then
(
->
$scope
.
offline
=
no
timer
=
$timeout
(
check
,
Settings
.
hearbeat
)
timer
=
$timeout
(
check
,
Settings
.
hear
t
beat
*
1000
)
,
->
$scope
.
offline
=
yes
timer
=
$timeout
(
check
,
Settings
.
hearbeat
)
timer
=
$timeout
(
check
,
Settings
.
hear
t
beat
*
1000
)
)
check
()
])
This diff is collapsed.
Click to expand it.
community/browser/app/scripts/services/Server.coffee
+
2
-
2
View file @
555df3e9
...
...
@@ -29,7 +29,7 @@ angular.module('neo4jApp.services')
# http://docs.angularjs.org/api/ng.$http
httpOptions
=
timeout
:
Settings
.
maxExecutionTime
timeout
:
(
Settings
.
maxExecutionTime
*
1000
)
returnAndUpdate
=
(
Type
,
promise
)
->
rv
=
new
Type
()
...
...
@@ -123,7 +123,7 @@ angular.module('neo4jApp.services')
status
:
(
params
=
''
)
->
# User a smaller timeout for status requests so IE10 detects when the
# server goes down faster.
@
options
'/db/data'
,
{
timeout
:
Settings
.
heartbeat
}
@
options
'/db/data'
,
{
timeout
:
(
Settings
.
heartbeat
*
1000
)
}
log
:
(
path
)
->
@
get
(
path
).
then
((
r
)
->
console
.
log
(
r
))
...
...
This diff is collapsed.
Click to expand it.
community/browser/app/scripts/settings.coffee
+
2
-
2
View file @
555df3e9
...
...
@@ -32,8 +32,8 @@ angular.module('neo4jApp.settings', [])
cypher
:
"
#{
restAPI
}
/cypher"
transaction
:
"
#{
restAPI
}
/transaction"
host
:
baseURL
maxExecutionTime
:
3600
000
heartbeat
:
60
000
maxExecutionTime
:
3600
# in seconds
heartbeat
:
60
# in seconds
maxFrames
:
50
maxHistory
:
100
maxNeighbours
:
100
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help