Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CSAN
Csan
Commits
71852f62
Commit
71852f62
authored
Jul 27, 2020
by
AllForNothing
Browse files
Fix css bugs with label target 2.1.0
Signed-off-by:
AllForNothing
<
sshijun@vmware.com
>
parent
3445608e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
23 deletions
+40
-23
src/portal/src/app/project/robot-account/robot.ts
src/portal/src/app/project/robot-account/robot.ts
+2
-3
src/portal/src/i18n/lang/en-us-lang.json
src/portal/src/i18n/lang/en-us-lang.json
+1
-1
src/portal/src/i18n/lang/es-es-lang.json
src/portal/src/i18n/lang/es-es-lang.json
+1
-1
src/portal/src/i18n/lang/fr-fr-lang.json
src/portal/src/i18n/lang/fr-fr-lang.json
+1
-1
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html
.../config/vulnerability/vulnerability-config.component.html
+6
-2
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.scss
.../config/vulnerability/vulnerability-config.component.scss
+14
-11
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts
...ts/config/vulnerability/vulnerability-config.component.ts
+9
-0
src/portal/src/lib/components/operation/operate.ts
src/portal/src/lib/components/operation/operate.ts
+1
-1
src/portal/src/lib/components/operation/operation.component.css
...rtal/src/lib/components/operation/operation.component.css
+2
-2
src/portal/src/lib/components/operation/operation.component.ts
...ortal/src/lib/components/operation/operation.component.ts
+2
-0
src/portal/src/lib/components/operation/operation.service.spec.ts
...al/src/lib/components/operation/operation.service.spec.ts
+1
-1
No files found.
src/portal/src/app/project/robot-account/robot.ts
View file @
71852f62
...
...
@@ -16,11 +16,10 @@ export class Robot {
constructor
()
{
this
.
access
=
<
any
>
{};
// this.access[0].action = true;
this
.
access
.
isPullImage
=
false
;
this
.
access
.
isPushOrPullImage
=
true
;
this
.
access
.
isPushChart
=
fals
e
;
this
.
access
.
isPullChart
=
fals
e
;
this
.
access
.
isPushChart
=
tru
e
;
this
.
access
.
isPullChart
=
tru
e
;
}
}
src/portal/src/i18n/lang/en-us-lang.json
View file @
71852f62
...
...
@@ -1164,7 +1164,7 @@
"DAY_AGO"
:
" day(s) ago"
,
"HOUR_AGO"
:
" hour(s) ago"
,
"MINUTE_AGO"
:
" minute(s) ago"
,
"SECOND_AGO"
:
"less 1 minute"
,
"SECOND_AGO"
:
"less
than
1 minute"
,
"EVENT_LOG"
:
"EVENT LOG"
},
"UNKNOWN_ERROR"
:
"Unknown errors have occurred. Please try again later."
,
...
...
src/portal/src/i18n/lang/es-es-lang.json
View file @
71852f62
...
...
@@ -1158,7 +1158,7 @@
"DAY_AGO"
:
" day(s) ago"
,
"HOUR_AGO"
:
" hour(s) ago"
,
"MINUTE_AGO"
:
" minute(s) ago"
,
"SECOND_AGO"
:
"less 1 minute"
,
"SECOND_AGO"
:
"less
than
1 minute"
,
"EVENT_LOG"
:
"EVENT LOG"
},
"UNKNOWN_ERROR"
:
"Ha ocurrido un error desconocido. Por favor, inténtelo de nuevo más tarde."
,
...
...
src/portal/src/i18n/lang/fr-fr-lang.json
View file @
71852f62
...
...
@@ -1129,7 +1129,7 @@
"DAY_AGO"
:
" day(s) ago"
,
"HOUR_AGO"
:
" hour(s) ago"
,
"MINUTE_AGO"
:
" minute(s) ago"
,
"SECOND_AGO"
:
"less 1 minute"
,
"SECOND_AGO"
:
"less
than
1 minute"
,
"EVENT_LOG"
:
"EVENT LOG"
},
"UNKNOWN_ERROR"
:
"Des erreurs inconnues sont survenues. Veuillez réessayer plus tard."
,
...
...
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html
View file @
71852f62
...
...
@@ -35,8 +35,12 @@
</div>
<div
class=
"state-container"
[style.width]=
"totalWidth+'px'"
>
<div
class=
"clr-row m-0"
*ngFor=
"let item of scanningMetrics?.metrics | keyvalue"
>
<div
class=
"state"
>
{{getI18nKey(item?.key)|translate}}
</div>
<div
class=
"value"
>
{{item?.value}}
</div>
<div
class=
"state"
>
<span
class=
"badge"
[ngClass]=
"{ error: isError(item?.key),
finished: isFinished(item?.key),
'in-progress': isInProgress(item?.key)}"
>
{{item?.value}}
</span>
</div>
<div
class=
"value"
>
{{getI18nKey(item?.key)|translate}}
</div>
</div>
</div>
</div>
...
...
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.scss
View file @
71852f62
...
...
@@ -80,18 +80,9 @@
height
:
18px
;
display
:
flex
;
background-color
:
#eee
;
.error
{
background-color
:
#e62700
;
}
.finished
{
background-color
:
#62a420
;
}
.in-progress
{
background-color
:
#0079b8
;
}
}
.state
{
flex
:
2
;
flex
:
1
;
padding-left
:
3px
;
}
.value
{
...
...
@@ -102,4 +93,16 @@
}
.display-flex
{
display
:
flex
;
}
\ No newline at end of file
}
.error
{
background-color
:
#e62700
;
}
.finished
{
background-color
:
#62a420
;
}
.in-progress
{
background-color
:
#0079b8
;
}
.badge
{
min-width
:
30px
;
}
src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts
View file @
71852f62
...
...
@@ -332,4 +332,13 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy {
);
}
}
isError
(
status
:
string
):
boolean
{
return
status
===
VULNERABILITY_SCAN_STATUS
.
ERROR
;
}
isFinished
(
status
:
string
):
boolean
{
return
status
===
VULNERABILITY_SCAN_STATUS
.
SUCCESS
;
}
isInProgress
(
status
:
string
):
boolean
{
return
status
===
VULNERABILITY_SCAN_STATUS
.
RUNNING
;
}
}
src/portal/src/lib/components/operation/operate.ts
View file @
71852f62
...
...
@@ -9,7 +9,7 @@ export class OperateInfo {
this
.
state
=
''
;
this
.
data
=
{
id
:
-
1
,
name
:
''
,
errorInf
:
''
};
this
.
timeStamp
=
new
Date
().
getTime
();
this
.
timeDiff
=
'
less 1 minute
'
;
this
.
timeDiff
=
'
OPERATION.SECOND_AGO
'
;
}
}
...
...
src/portal/src/lib/components/operation/operation.component.css
View file @
71852f62
...
...
@@ -13,7 +13,7 @@
.infoArea
{
margin-left
:
10px
;
width
:
270px
;}
.eventName
{
display
:
block
;
margin-bottom
:
-5px
;
font-size
:
16px
;
}
.eventErrorInf
{
display
:
block
;
font-size
:
12px
;
color
:
red
;
line-height
:
.6rem
;}
.eventTarget
{
display
:
inline-flex
;
width
:
1
72
px
;
font-size
:
12px
;
flex-shrink
:
1
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;}
.eventTarget
{
display
:
inline-flex
;
width
:
1
60
px
;
font-size
:
12px
;
flex-shrink
:
1
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;}
.eventTime
{
float
:
right
;
font-size
:
12px
;}
:host
>>>
.nav
{
padding-left
:
38px
;}
...
...
@@ -75,4 +75,4 @@
}
.margin-left-5
{
margin-left
:
5px
;
}
\ No newline at end of file
}
src/portal/src/lib/components/operation/operation.component.ts
View file @
71852f62
...
...
@@ -130,6 +130,8 @@ export class OperationComponent implements OnInit, OnDestroy {
this
.
animationState
=
this
.
animationState
===
'
out
'
?
'
in
'
:
'
out
'
;
if
(
this
.
animationState
===
'
in
'
)
{
this
.
resetNewMessageCount
();
// refresh when open
this
.
TabEvent
();
}
}
...
...
src/portal/src/lib/components/operation/operation.service.spec.ts
View file @
71852f62
...
...
@@ -18,6 +18,6 @@ describe('OperationService', () => {
operateInfo
=
res
;
});
operationService
.
publishInfo
(
new
OperateInfo
());
expect
(
operateInfo
.
timeDiff
).
toEqual
(
"
less 1 minute
"
);
expect
(
operateInfo
.
timeDiff
).
toEqual
(
"
OPERATION.SECOND_AGO
"
);
});
});
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