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
3fa3e14b
Commit
3fa3e14b
authored
Sep 07, 2020
by
AllForNothing
Browse files
Fix UI issues found on testing day
Signed-off-by:
AllForNothing
<
sshijun@vmware.com
>
parent
7cc3d7f8
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
84 additions
and
42 deletions
+84
-42
src/portal/src/app/config/auth/config-auth.component.ts
src/portal/src/app/config/auth/config-auth.component.ts
+1
-1
src/portal/src/app/project/create-project/create-project.component.html
.../app/project/create-project/create-project.component.html
+1
-1
src/portal/src/app/project/list-project/list-project.component.ts
...al/src/app/project/list-project/list-project.component.ts
+22
-11
src/portal/src/app/project/project-config/project-config.component.html
.../app/project/project-config/project-config.component.html
+1
-1
src/portal/src/app/project/project-config/project-config.component.ts
...rc/app/project/project-config/project-config.component.ts
+4
-1
src/portal/src/app/project/repository/artifact/artifact-summary.component.html
...oject/repository/artifact/artifact-summary.component.html
+1
-1
src/portal/src/app/project/repository/artifact/artifact-summary.component.ts
...project/repository/artifact/artifact-summary.component.ts
+4
-0
src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.html
...ository/artifact/artifact-tag/artifact-tag.component.html
+1
-1
src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts
...epository/artifact/artifact-tag/artifact-tag.component.ts
+2
-1
src/portal/src/app/project/repository/repository-gridview.component.ts
...c/app/project/repository/repository-gridview.component.ts
+23
-14
src/portal/src/app/project/tag-feature-integration/tag-retention/tag-retention.component.html
...re-integration/tag-retention/tag-retention.component.html
+1
-1
src/portal/src/global.scss
src/portal/src/global.scss
+1
-1
src/portal/src/i18n/lang/en-us-lang.json
src/portal/src/i18n/lang/en-us-lang.json
+3
-1
src/portal/src/i18n/lang/es-es-lang.json
src/portal/src/i18n/lang/es-es-lang.json
+3
-1
src/portal/src/i18n/lang/fr-fr-lang.json
src/portal/src/i18n/lang/fr-fr-lang.json
+3
-1
src/portal/src/i18n/lang/pt-br-lang.json
src/portal/src/i18n/lang/pt-br-lang.json
+3
-1
src/portal/src/i18n/lang/tr-tr-lang.json
src/portal/src/i18n/lang/tr-tr-lang.json
+3
-1
src/portal/src/i18n/lang/zh-cn-lang.json
src/portal/src/i18n/lang/zh-cn-lang.json
+3
-1
src/portal/src/i18n/lang/zh-tw-lang.json
src/portal/src/i18n/lang/zh-tw-lang.json
+3
-1
src/portal/src/lib/components/config/gc/gc-history/gc-history.component.html
...components/config/gc/gc-history/gc-history.component.html
+1
-1
No files found.
src/portal/src/app/config/auth/config-auth.component.ts
View file @
3fa3e14b
...
...
@@ -265,7 +265,7 @@ export class ConfigurationAuthComponent implements OnChanges, OnInit {
}
changeAutoOnBoard
()
{
if
(
!
this
.
currentConfig
.
oidc_auto_onboard
.
value
)
{
this
.
currentConfig
.
oidc_user_claim
.
value
=
null
;
this
.
currentConfig
.
oidc_user_claim
.
value
=
""
;
}
}
}
src/portal/src/app/project/create-project/create-project.component.html
View file @
3fa3e14b
...
...
@@ -91,7 +91,7 @@
<label
for=
"create_project_storage_limit"
class=
"clr-control-label"
></label>
<div
class=
"clr-control-container"
>
<div
class=
"clr-input-wrapper"
>
<label
class=
"clr-control-label endpoint"
>
{{ 'PROJECT.ENDPOINT' | translate }}
</label>
<label
class=
"clr-control-label endpoint
required
"
>
{{ 'PROJECT.ENDPOINT' | translate }}
</label>
<input
placeholder=
"http(s)://192.168.1.1"
[value]=
"getEndpoint()"
readonly
class=
"clr-input"
type=
"text"
id=
"endpoint"
autocomplete=
"off"
>
</div>
...
...
src/portal/src/app/project/list-project/list-project.component.ts
View file @
3fa3e14b
...
...
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import
{
Subscription
,
forkJoin
}
from
"
rxjs
"
;
import
{
Subscription
,
forkJoin
,
of
}
from
"
rxjs
"
;
import
{
Component
,
Output
,
...
...
@@ -35,6 +35,7 @@ import { calculatePage, CustomComparator, doFiltering, doSorting } from "../../.
import
{
OperationService
}
from
"
../../../lib/components/operation/operation.service
"
;
import
{
operateChanges
,
OperateInfo
,
OperationState
}
from
"
../../../lib/components/operation/operate
"
;
import
{
errorHandler
}
from
"
../../../lib/utils/shared/shared.utils
"
;
import
{
HttpErrorResponse
}
from
"
@angular/common/http
"
;
@
Component
({
selector
:
"
list-project
"
,
...
...
@@ -204,10 +205,22 @@ export class ListProjectComponent implements OnDestroy {
projects
.
forEach
(
data
=>
{
observableLists
.
push
(
this
.
delOperate
(
data
));
});
forkJoin
(...
observableLists
).
subscribe
(
item
=>
{
this
.
translate
.
get
(
"
BATCH.DELETED_SUCCESS
"
).
subscribe
(
res
=>
{
this
.
msgHandler
.
showSuccess
(
res
);
});
forkJoin
(...
observableLists
).
subscribe
(
resArr
=>
{
let
error
;
if
(
resArr
&&
resArr
.
length
)
{
resArr
.
forEach
(
item
=>
{
if
(
item
instanceof
HttpErrorResponse
)
{
error
=
errorHandler
(
item
);
}
});
}
if
(
error
)
{
this
.
msgHandler
.
handleError
(
error
);
}
else
{
this
.
translate
.
get
(
"
BATCH.DELETED_SUCCESS
"
).
subscribe
(
res
=>
{
this
.
msgHandler
.
showSuccess
(
res
);
});
}
let
st
:
State
=
this
.
getStateAfterDeletion
();
this
.
selectedRow
=
[];
if
(
!
st
)
{
...
...
@@ -216,8 +229,6 @@ export class ListProjectComponent implements OnDestroy {
this
.
clrLoad
(
st
);
this
.
statisticHandler
.
refresh
();
}
},
error
=>
{
this
.
msgHandler
.
handleError
(
error
);
});
}
}
...
...
@@ -237,10 +248,10 @@ export class ListProjectComponent implements OnDestroy {
}),
catchError
(
error
=>
{
const
message
=
errorHandler
(
error
);
this
.
translateService
.
get
(
message
).
subscribe
(
res
=>
operateChanges
(
operMessage
,
OperationState
.
failure
,
res
)
);
return
o
bservableThrowError
(
error
);
this
.
translateService
.
get
(
message
).
subscribe
(
res
=>
{
operateChanges
(
operMessage
,
OperationState
.
failure
,
res
)
;
}
);
return
o
f
(
error
);
}));
}
...
...
src/portal/src/app/project/project-config/project-config.component.html
View file @
3fa3e14b
<div
class=
"row"
>
<div
class=
"col-lg-12 col-md-12 col-sm-12 col-xs-12 config-top "
>
<hbr-project-policy-config
[projectId]=
"projectId"
[projectName]=
"projectName"
[hasSignedIn]=
"hasSignedIn"
></hbr-project-policy-config>
<hbr-project-policy-config
[projectId]=
"projectId"
[projectName]=
"projectName"
[isProxyCacheProject]=
"isProxyCacheProject"
[hasSignedIn]=
"hasSignedIn"
></hbr-project-policy-config>
</div>
</div>
\ No newline at end of file
src/portal/src/app/project/project-config/project-config.component.ts
View file @
3fa3e14b
...
...
@@ -28,7 +28,7 @@ export class ProjectConfigComponent implements OnInit {
projectName
:
string
;
currentUser
:
SessionUser
;
hasSignedIn
:
boolean
;
isProxyCacheProject
:
boolean
=
false
;
constructor
(
private
route
:
ActivatedRoute
,
private
router
:
Router
,
...
...
@@ -42,6 +42,9 @@ export class ProjectConfigComponent implements OnInit {
if
(
resolverData
)
{
let
pro
:
Project
=
<
Project
>
resolverData
[
'
projectResolver
'
];
this
.
projectName
=
pro
.
name
;
if
(
pro
.
registry_id
)
{
this
.
isProxyCacheProject
=
true
;
}
}
}
}
src/portal/src/app/project/repository/artifact/artifact-summary.component.html
View file @
3fa3e14b
...
...
@@ -26,7 +26,7 @@
</div>
<ng-container
*ngIf=
"!loading"
>
<!-- tags -->
<artifact-tag
[artifactDetails]=
"artifact"
[projectName]=
"projectName"
[projectId]=
"projectId"
[repositoryName]=
"repositoryName"
<artifact-tag
[artifactDetails]=
"artifact"
[projectName]=
"projectName"
[isProxyCacheProject]=
"isProxyCacheProject"
[projectId]=
"projectId"
[repositoryName]=
"repositoryName"
></artifact-tag>
<!-- Overview -->
...
...
src/portal/src/app/project/repository/artifact/artifact-summary.component.ts
View file @
3fa3e14b
...
...
@@ -30,6 +30,7 @@ export class ArtifactSummaryComponent implements OnInit {
@
Output
()
backEvt
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
projectName
:
string
;
isProxyCacheProject
:
boolean
=
false
;
loading
:
boolean
=
false
;
constructor
(
...
...
@@ -80,6 +81,9 @@ export class ArtifactSummaryComponent implements OnInit {
if
(
resolverData
)
{
const
pro
:
Project
=
<
Project
>
(
resolverData
[
'
artifactResolver
'
][
1
]);
this
.
projectName
=
pro
.
name
;
if
(
pro
.
registry_id
)
{
this
.
isProxyCacheProject
=
true
;
}
this
.
artifact
=
<
Artifact
>
(
resolverData
[
'
artifactResolver
'
][
0
]);
this
.
getIconFromBackEnd
();
}
...
...
src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.html
View file @
3fa3e14b
...
...
@@ -2,7 +2,7 @@
<clr-datagrid
[clrDgLoading]=
"loading"
(clrDgRefresh)=
"getCurrentArtifactTags($event)"
[(clrDgSelected)]=
"selectedRow"
>
<clr-dg-action-bar>
<button
id=
"new-tag"
type=
"button"
[disabled]=
"!hasCreateTagPermission"
class=
"btn btn-secondary"
(click)=
"addTag()"
>
<button
*ngIf=
"!isProxyCacheProject"
id=
"new-tag"
type=
"button"
[disabled]=
"!hasCreateTagPermission"
class=
"btn btn-secondary"
(click)=
"addTag()"
>
<clr-icon
shape=
"plus"
size=
"16"
></clr-icon>
{{'TAG.ADD_TAG' | translate}}
</button>
<button
id=
"delete-tag"
type=
"button"
class=
"btn btn-secondary"
[disabled]=
"!(selectedRow.length>=1&& !hasImmutableOnTag() && hasDeleteTagPermission)"
(click)=
"removeTag()"
>
...
...
src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts
View file @
3fa3e14b
...
...
@@ -34,7 +34,7 @@ class InitTag {
name
=
""
;
}
const
DeleteTagWithNotoryCommand1
=
'
notary -s https://
'
;
const
DeleteTagWithNotoryCommand2
=
'
:4443
-d ~/.docker/trust remove -p
'
;
const
DeleteTagWithNotoryCommand2
=
'
-d ~/.docker/trust remove -p
'
;
@
Component
({
selector
:
'
artifact-tag
'
,
templateUrl
:
'
./artifact-tag.component.html
'
,
...
...
@@ -43,6 +43,7 @@ const DeleteTagWithNotoryCommand2 = ':4443 -d ~/.docker/trust remove -p ';
export
class
ArtifactTagComponent
implements
OnInit
,
OnDestroy
{
@
Input
()
artifactDetails
:
Artifact
;
@
Input
()
projectName
:
string
;
@
Input
()
isProxyCacheProject
:
boolean
=
false
;
@
Input
()
projectId
:
number
;
@
Input
()
repositoryName
:
string
;
newTagName
=
new
InitTag
();
...
...
src/portal/src/app/project/repository/repository-gridview.component.ts
View file @
3fa3e14b
...
...
@@ -9,11 +9,11 @@ import {
SimpleChanges
,
Inject
,
OnDestroy
}
from
"
@angular/core
"
;
import
{
forkJoin
,
Subscription
}
from
"
rxjs
"
;
import
{
forkJoin
,
of
,
Subscription
}
from
"
rxjs
"
;
import
{
debounceTime
,
distinctUntilChanged
,
switchMap
}
from
"
rxjs/operators
"
;
import
{
TranslateService
}
from
"
@ngx-translate/core
"
;
import
{
map
,
catchError
}
from
"
rxjs/operators
"
;
import
{
Observable
,
throwError
as
observableThrowError
}
from
"
rxjs
"
;
import
{
Observable
}
from
"
rxjs
"
;
import
{
ClrDatagridStateInterface
}
from
"
@clr/angular
"
;
import
{
RepositoryService
as
NewRepositoryService
...
...
@@ -49,6 +49,7 @@ import { SessionService } from "../../shared/session.service";
import
{
GridViewComponent
}
from
"
./gridview/grid-view.component
"
;
import
{
Repository
as
NewRepository
}
from
"
../../../../ng-swagger-gen/models/repository
"
;
import
{
StrictHttpResponse
as
__StrictHttpResponse
}
from
'
../../../../ng-swagger-gen/strict-http-response
'
;
import
{
HttpErrorResponse
}
from
"
@angular/common/http
"
;
@
Component
({
...
...
@@ -192,8 +193,6 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
}
confirmDeletion
(
message
:
ConfirmationAcknowledgement
)
{
this
.
loading
=
true
;
// forkJoin(...repArr).subscribe(() => {
if
(
message
&&
message
.
source
===
ConfirmationTargets
.
REPOSITORY
&&
message
.
state
===
ConfirmationState
.
CONFIRMED
)
{
...
...
@@ -203,19 +202,29 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
repoLists
.
forEach
(
repo
=>
{
observableLists
.
push
(
this
.
delOperate
(
repo
));
});
forkJoin
(
observableLists
).
subscribe
((
item
)
=>
{
forkJoin
(
observableLists
).
subscribe
(
resArr
=>
{
let
error
;
if
(
resArr
&&
resArr
.
length
)
{
resArr
.
forEach
(
item
=>
{
if
(
item
instanceof
HttpErrorResponse
)
{
error
=
errorHandler
(
item
);
}
});
}
if
(
error
)
{
this
.
errorHandlerService
.
error
(
error
);
}
else
{
this
.
translateService
.
get
(
"
BATCH.DELETED_SUCCESS
"
).
subscribe
(
res
=>
{
this
.
errorHandlerService
.
info
(
res
);
});
}
this
.
selectedRow
=
[];
this
.
refresh
();
let
st
:
ClrDatagridStateInterface
=
this
.
getStateAfterDeletion
();
if
(
!
st
)
{
this
.
refresh
();
}
else
{
this
.
clrLoad
(
st
);
}
},
error
=>
{
this
.
errorHandlerService
.
error
(
error
);
this
.
loading
=
false
;
this
.
refresh
();
});
}
}
...
...
@@ -243,10 +252,10 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
});
}),
catchError
(
error
=>
{
const
message
=
errorHandler
(
error
);
this
.
translateService
.
get
(
message
).
subscribe
(
res
=>
operateChanges
(
operMessage
,
OperationState
.
failure
,
res
)
);
return
o
bservableThrowError
(
error
);
this
.
translateService
.
get
(
message
).
subscribe
(
res
=>
{
operateChanges
(
operMessage
,
OperationState
.
failure
,
res
)
;
}
);
return
o
f
(
error
);
}));
}
...
...
src/portal/src/app/project/tag-feature-integration/tag-retention/tag-retention.component.html
View file @
3fa3e14b
...
...
@@ -117,7 +117,7 @@
</clr-dg-cell>
<clr-dg-cell
class=
"hand"
(click)=
"openDetail(i,execution.id)"
>
{{execution.status}}
</clr-dg-cell>
<clr-dg-cell
class=
"hand"
(click)=
"openDetail(i,execution.id)"
>
{{execution.dry_run ? '
YES' : 'NO'
}}
</clr-dg-cell>
(click)=
"openDetail(i,execution.id)"
>
{{
(
execution.dry_run ? '
TAG_RETENTION.YES' : 'TAG_RETENTION.NO') | translate
}}
</clr-dg-cell>
<clr-dg-cell
class=
"hand"
(click)=
"openDetail(i,execution.id)"
>
{{execution.trigger}}
</clr-dg-cell>
<clr-dg-cell
class=
"hand"
...
...
src/portal/src/global.scss
View file @
3fa3e14b
...
...
@@ -85,7 +85,7 @@ body {
}
.color-green
{
color
:
#
1d5100
;
color
:
#
00d40f
;
}
.color-red
{
...
...
src/portal/src/i18n/lang/en-us-lang.json
View file @
3fa3e14b
...
...
@@ -1330,7 +1330,9 @@
"COUNT_LARGE"
:
"Parameter
\"
COUNT
\"
is too large"
,
"DAYS_LARGE"
:
"Parameter
\"
DAYS
\"
is too large"
,
"EXECUTION_TYPE"
:
"Execution Type"
,
"ACTION"
:
"ACTION"
"ACTION"
:
"ACTION"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"Immutability rules"
,
...
...
src/portal/src/i18n/lang/es-es-lang.json
View file @
3fa3e14b
...
...
@@ -1328,7 +1328,9 @@
"COUNT_LARGE"
:
"Parameter
\"
COUNT
\"
is too large"
,
"DAYS_LARGE"
:
"Parameter
\"
DAYS
\"
is too large"
,
"EXECUTION_TYPE"
:
"Execution Type"
,
"ACTION"
:
"ACTION"
"ACTION"
:
"ACTION"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"Immutability rules"
,
...
...
src/portal/src/i18n/lang/fr-fr-lang.json
View file @
3fa3e14b
...
...
@@ -1298,7 +1298,9 @@
"COUNT_LARGE"
:
"Parameter
\"
COUNT
\"
is too large"
,
"DAYS_LARGE"
:
"Parameter
\"
DAYS
\"
is too large"
,
"EXECUTION_TYPE"
:
"Execution Type"
,
"ACTION"
:
"ACTION"
"ACTION"
:
"ACTION"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"Immutability rules"
,
...
...
src/portal/src/i18n/lang/pt-br-lang.json
View file @
3fa3e14b
...
...
@@ -1326,7 +1326,9 @@
"COUNT_LARGE"
:
"Parameter
\"
COUNT
\"
is too large"
,
"DAYS_LARGE"
:
"Parameter
\"
DAYS
\"
is too large"
,
"EXECUTION_TYPE"
:
"Execution Type"
,
"ACTION"
:
"ACTION"
"ACTION"
:
"ACTION"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"Immutability rules"
,
...
...
src/portal/src/i18n/lang/tr-tr-lang.json
View file @
3fa3e14b
...
...
@@ -1330,7 +1330,9 @@
"COUNT_LARGE"
:
"Parameter
\"
COUNT
\"
is too large"
,
"DAYS_LARGE"
:
"Parameter
\"
DAYS
\"
is too large"
,
"EXECUTION_TYPE"
:
"Execution Type"
,
"ACTION"
:
"ACTION"
"ACTION"
:
"ACTION"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"Immutability rules"
,
...
...
src/portal/src/i18n/lang/zh-cn-lang.json
View file @
3fa3e14b
...
...
@@ -1327,7 +1327,9 @@
"COUNT_LARGE"
:
"参数“个数”太大"
,
"DAYS_LARGE"
:
"参数“天数”太大"
,
"EXECUTION_TYPE"
:
"执行类型"
,
"ACTION"
:
"操作"
"ACTION"
:
"操作"
,
"YES"
:
"是"
,
"NO"
:
"否"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"不可变的 Tag 规则"
,
...
...
src/portal/src/i18n/lang/zh-tw-lang.json
View file @
3fa3e14b
...
...
@@ -1314,7 +1314,9 @@
"COUNT_LARGE"
:
"參數“個數”太大"
,
"DAYS_LARGE"
:
"參數“天數”太大"
,
"EXECUTION_TYPE"
:
"執行類型"
,
"ACTION"
:
"操作"
"ACTION"
:
"操作"
,
"YES"
:
"Yes"
,
"NO"
:
"No"
},
"IMMUTABLE_TAG"
:
{
"IMMUTABLE_RULES"
:
"不可變的 Tag 規則"
,
...
...
src/portal/src/lib/components/config/gc/gc-history/gc-history.component.html
View file @
3fa3e14b
...
...
@@ -13,7 +13,7 @@
<clr-dg-row
*ngFor=
"let job of jobs"
[clrDgItem]=
'job'
>
<clr-dg-cell>
{{job.id }}
</clr-dg-cell>
<clr-dg-cell>
{{(job.type ? 'SCHEDULE.'+ job.type.toUpperCase() : '') | translate }}
</clr-dg-cell>
<clr-dg-cell>
{{isDryRun(job?.parameters)}}
</clr-dg-cell>
<clr-dg-cell>
{{isDryRun(job?.parameters)
| translate
}}
</clr-dg-cell>
<clr-dg-cell>
{{job.status.toUpperCase() | translate}}
</clr-dg-cell>
<clr-dg-cell>
{{job.createTime | date:'medium'}}
</clr-dg-cell>
<clr-dg-cell>
{{job.updateTime | date:'medium'}}
</clr-dg-cell>
...
...
Prev
1
2
Next
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