Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
container-manager
Commits
2682f810
Commit
2682f810
authored
Nov 06, 2018
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
fix entry point error_detail if pod not available
parent
9dc8bd05
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/routes.js
View file @
2682f810
...
...
@@ -111,8 +111,16 @@ module.exports = function (app, redirect, config, proxyServer, proxyRouter, k8,
}
else
if
(
podInfo
.
status
.
phase
===
'
Pending
'
||
podInfo
.
status
.
phase
===
'
Running
'
)
{
let
error_detail
=
''
let
secondsSinceCreation
=
(
Date
.
now
()
-
Date
.
parse
(
podInfo
.
metadata
.
creationTimestamp
))
/
1000.0
const
error
=
{
error
:
"
not ready
"
,
msg
:
"
pod not yet ready
"
,
status
:
podInfo
.
status
,
host
:
podIp
,
pod
:
podInfo
,
secondsSinceCreation
:
secondsSinceCreation
}
if
(
!
secondsSinceCreation
||
secondsSinceCreation
>
15
)
error_detail
=
stringify
(
err
,
null
,
2
)
error_detail
=
stringify
(
err
or
,
null
,
2
)
let
repl
=
{
refreshEachS
:
config
.
app
.
pageReloadTime
,
error_detail
:
error_detail
...
...
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