Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
c926bae2
Commit
c926bae2
authored
7 months ago
by
Max Frederiksen
Browse files
Options
Downloads
Patches
Plain Diff
Refactor to include AbortError
parent
0ccc4395
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!542
Prepare 4.1.0
,
!531
CE-3097: Error fallback for console stream + fix undefined loading variable
Pipeline
#196579
passed
7 months ago
Stage: setup
Stage: check
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/common/Loki/LokiPanel.js
+10
-8
10 additions, 8 deletions
src/components/common/Loki/LokiPanel.js
with
10 additions
and
8 deletions
src/components/common/Loki/LokiPanel.js
+
10
−
8
View file @
c926bae2
...
@@ -13,6 +13,7 @@ import {
...
@@ -13,6 +13,7 @@ import {
formatDateAndTime
formatDateAndTime
}
from
"
@ess-ics/ce-ui-common
"
;
}
from
"
@ess-ics/ce-ui-common
"
;
import
Convert
from
"
ansi-to-html
"
;
import
Convert
from
"
ansi-to-html
"
;
import
{
getErrorMessage
}
from
"
../Helper
"
;
const
TIME_RANGE_VALUES
=
[
const
TIME_RANGE_VALUES
=
[
{
{
...
@@ -237,19 +238,20 @@ export function LokiPanel({ hostName, iocName, isSyslog, isDeployed }) {
...
@@ -237,19 +238,20 @@ export function LokiPanel({ hostName, iocName, isSyslog, isDeployed }) {
return
sysLogData
||
procServLog
;
return
sysLogData
||
procServLog
;
};
};
const
hasLogError
=
sysLogError
?.
error
||
procServLogError
?.
error
;
const
isAbortError
=
(
sysLogError
&&
sysLogError
?.
name
===
"
AbortError
"
)
||
(
procServLogError
&&
procServLogError
?.
name
===
"
AbortError
"
);
const
logError
=
sysLogError
||
procServLogError
;
const
logError
=
sysLogError
||
procServLogError
;
const
logDataReceived
=
sysLogData
||
procServLog
||
!
isDeployed
;
const
hasLogData
=
!!
sysLogData
||
!!
procServLog
||
!
isDeployed
;
const
hasLogError
=
!
isAbortError
&&
!!
logError
;
if
(
hasLogError
)
{
if
(
hasLogError
)
{
return
(
getProcServLogAbort
();
<
Alert
severity
=
"
error
"
>
getSysLogDataAbort
();
{
logError
?.
error
}:
{
logError
?.
description
}
return
<
Alert
severity
=
"
error
"
>
{
getErrorMessage
(
logError
)}
<
/Alert>
;
<
/Alert
>
);
}
}
if
(
!
l
ogData
Received
)
{
if
(
!
hasL
ogData
&&
!
hasLogError
)
{
return
(
return
(
<
div
style
=
{{
width
:
"
100%
"
}}
>
<
div
style
=
{{
width
:
"
100%
"
}}
>
<
LinearProgress
color
=
"
primary
"
/>
<
LinearProgress
color
=
"
primary
"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment