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
小 白蛋
Harbor
Commits
a8f773e6
Commit
a8f773e6
authored
5 years ago
by
AllForNothing
Browse files
Options
Download
Email Patches
Plain Diff
fix cve-whitelist bugs
Signed-off-by:
AllForNothing
<
sshijun@vmware.com
>
parent
b3abd031
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/portal/lib/src/config/system/system-settings.component.scss
+0
-2
...rtal/lib/src/config/system/system-settings.component.scss
src/portal/lib/src/project-policy-config/project-policy-config.component.html
+9
-9
...roject-policy-config/project-policy-config.component.html
src/portal/lib/src/project-policy-config/project-policy-config.component.scss
+0
-2
...roject-policy-config/project-policy-config.component.scss
src/portal/lib/src/project-policy-config/project-policy-config.component.ts
+3
-0
.../project-policy-config/project-policy-config.component.ts
with
12 additions
and
13 deletions
+12
-13
src/portal/lib/src/config/system/system-settings.component.scss
+
0
-
2
View file @
a8f773e6
...
...
@@ -27,8 +27,6 @@
width
:
222px
;
color
:
#0079bb
;
overflow-y
:
auto
;
white-space
:
nowrap
;
li
{
height
:
24px
;
line-height
:
24px
;
...
...
This diff is collapsed.
Click to expand it.
src/portal/lib/src/project-policy-config/project-policy-config.component.html
+
9
-
9
View file @
a8f773e6
...
...
@@ -89,12 +89,12 @@
</div>
<clr-radio-container
clrInline
>
<clr-radio-wrapper>
<input
type=
"radio"
clrRadio
name=
"systemWhitelistOrProjectWhitelist"
required
value=
"true"
<input
[disabled]=
"!hasChangeConfigRole"
type=
"radio"
clrRadio
name=
"systemWhitelistOrProjectWhitelist"
required
value=
"true"
[(ngModel)]=
"systemWhitelistOrProjectWhitelist"
/>
<label>
{{'CVE_WHITELIST.SYS_WHITELIST'|translate}}
</label>
</clr-radio-wrapper>
<clr-radio-wrapper>
<input
type=
"radio"
clrRadio
name=
"systemWhitelistOrProjectWhitelist"
required
value=
"false"
<input
[disabled]=
"!hasChangeConfigRole"
type=
"radio"
clrRadio
name=
"systemWhitelistOrProjectWhitelist"
required
value=
"false"
[(ngModel)]=
"systemWhitelistOrProjectWhitelist"
/>
<label>
{{'CVE_WHITELIST.PRO_WHITELIST'|translate}}
</label>
</clr-radio-wrapper>
...
...
@@ -102,10 +102,10 @@
<div
class=
"clr-row width-70per"
>
<div
class=
"clr-col position-relative"
>
<div>
<button
[disabled]=
"isUseSystemWhitelist()"
<button
[disabled]=
"isUseSystemWhitelist()
|| !hasChangeConfigRole
"
(click)=
"showAddModal=!showAddModal"
class=
"btn btn-link"
>
{{'CVE_WHITELIST.ADD'|translate}}
</button>
<button
[disabled]=
"isUseSystemWhitelist()"
(click)=
"addSystem()"
<button
[disabled]=
"isUseSystemWhitelist()
|| !hasChangeConfigRole
"
(click)=
"addSystem()"
class=
"btn btn-link ml-1"
>
{{'CVE_WHITELIST.ADD_SYSTEM'|translate}}
</button>
</div>
<div
class=
"add-modal"
*ngIf=
"showAddModal && !isUseSystemWhitelist()"
>
...
...
@@ -144,17 +144,17 @@
<label
for=
"expires"
>
{{'CVE_WHITELIST.EXPIRES_AT'|translate}}
</label>
<div
class=
"underline"
>
<input
#dateSystemInput
readonly
type=
"date"
[(clrDate)]=
"systemExpiresDate"
>
<input
*ngIf=
"!isUseSystemWhitelist()"
#dateInput
<input
[disabled]=
"!hasChangeConfigRole"
*ngIf=
"!isUseSystemWhitelist()"
#dateInput
placeholder=
"{{'CVE_WHITELIST.NEVER_EXPIRES'|translate}}"
readonly
type=
"date"
[(clrDate)]=
"expiresDate"
newFormLayout=
"true"
>
<input
*ngIf=
"isUseSystemWhitelist()"
<input
[disabled]=
"!hasChangeConfigRole"
*ngIf=
"isUseSystemWhitelist()"
placeholder=
"{{'CVE_WHITELIST.NEVER_EXPIRES'|translate}}"
readonly
type=
"text"
value=
"{{systemExpiresDateString}}"
>
</div>
</div>
<div
class=
"form-group padding-left-80"
>
<clr-checkbox-wrapper>
<input
[disabled]=
"isUseSystemWhitelist()"
[checked]=
"neverExpires"
<input
[disabled]=
"isUseSystemWhitelist()
|| !hasChangeConfigRole
"
[checked]=
"neverExpires"
[(ngModel)]=
"neverExpires"
type=
"checkbox"
clrCheckbox
name=
"neverExpires"
id=
"neverExpires"
/>
<label>
...
...
@@ -168,10 +168,10 @@
</div>
</div>
<button
type=
"button"
class=
"btn btn-primary"
(click)=
"save()"
[disabled]=
"(!isValid() || !hasChanges()
|| !hasChangeConfigRole
) && !hasWhitelistChanged"
>
{{'BUTTON.SAVE'
[disabled]=
"(
(
!isValid() || !hasChanges()) && !hasWhitelistChanged
) || !hasChangeConfigRole
"
>
{{'BUTTON.SAVE'
| translate}}
</button>
<button
type=
"button"
class=
"btn btn-outline"
(click)=
"cancel()"
[disabled]=
"(!isValid() || !hasChanges()
|| !hasChangeConfigRole
) && !hasWhitelistChanged"
>
{{'BUTTON.CANCEL'
[disabled]=
"(
(
!isValid() || !hasChanges()) && !hasWhitelistChanged
) || !hasChangeConfigRole
"
>
{{'BUTTON.CANCEL'
| translate}}
</button>
<confirmation-dialog
#cfgConfirmationDialog
(confirmAction)=
"confirmCancel($event)"
></confirmation-dialog>
</section>
...
...
This diff is collapsed.
Click to expand it.
src/portal/lib/src/project-policy-config/project-policy-config.component.scss
+
0
-
2
View file @
a8f773e6
...
...
@@ -17,8 +17,6 @@
width
:
222px
;
color
:
#0079bb
;
overflow-y
:
auto
;
white-space
:
nowrap
;
li
{
height
:
24px
;
line-height
:
24px
;
...
...
This diff is collapsed.
Click to expand it.
src/portal/lib/src/project-policy-config/project-policy-config.component.ts
+
3
-
0
View file @
a8f773e6
...
...
@@ -170,6 +170,9 @@ export class ProjectPolicyConfigComponent implements OnInit {
if
(
!
response
.
cve_whitelist
[
'
expires_at
'
])
{
response
.
cve_whitelist
[
'
expires_at
'
]
=
null
;
}
if
(
!
response
.
metadata
.
reuse_sys_cve_whitelist
)
{
response
.
metadata
.
reuse_sys_cve_whitelist
=
"
true
"
;
}
if
(
response
&&
response
.
cve_whitelist
)
{
this
.
projectWhitelist
=
clone
(
response
.
cve_whitelist
);
this
.
projectWhitelistOrigin
=
clone
(
response
.
cve_whitelist
);
...
...
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