mirror of
https://github.com/goharbor/harbor
synced 2025-04-22 19:10:40 +00:00
Add deploy and add additional info on action bar
This commit is contained in:
parent
0d576fb19b
commit
4788a9fe3a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "harbor-ui",
|
"name": "harbor-ui",
|
||||||
"version": "0.6.67",
|
"version": "0.6.72",
|
||||||
"description": "Harbor shared UI components based on Clarity and Angular4",
|
"description": "Harbor shared UI components based on Clarity and Angular4",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json",
|
"start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "harbor-ui",
|
"name": "harbor-ui",
|
||||||
"version": "0.6.67",
|
"version": "0.6.72",
|
||||||
"description": "Harbor shared UI components based on Clarity and Angular4",
|
"description": "Harbor shared UI components based on Clarity and Angular4",
|
||||||
"author": "VMware",
|
"author": "VMware",
|
||||||
"module": "index.js",
|
"module": "index.js",
|
||||||
|
@ -21,6 +21,8 @@ export const REPOSITORY_GRIDVIEW_TEMPLATE = `
|
|||||||
<div *ngIf="!isCardView" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
<div *ngIf="!isCardView" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
<clr-datagrid (clrDgRefresh)="clrLoad($event)" [clrDgLoading]="loading" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="selectedChange()">
|
<clr-datagrid (clrDgRefresh)="clrLoad($event)" [clrDgLoading]="loading" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="selectedChange()">
|
||||||
<clr-dg-action-bar>
|
<clr-dg-action-bar>
|
||||||
|
<button *ngIf="withAdmiral" type="button" class="btn btn-sm btn-secondary" (click)="provisionItemEvent($event, selectedRow[0])" [disabled]="!(selectedRow.length===1 && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon> {{'REPOSITORY.DEPLOY' | translate}}</button>
|
||||||
|
<button *ngIf="withAdmiral" type="button" class="btn btn-sm btn-secondary" (click)="itemAddInfoEvent($event, selectedRow[0])" [disabled]="!(selectedRow.length===1 && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon> {{'REPOSITORY.ADDITIONAL_INFO' | translate}}</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" (click)="deleteRepos(selectedRow)" [disabled]="!(selectedRow.length && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon> {{'REPOSITORY.DELETE' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" (click)="deleteRepos(selectedRow)" [disabled]="!(selectedRow.length && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon> {{'REPOSITORY.DELETE' | translate}}</button>
|
||||||
</clr-dg-action-bar>
|
</clr-dg-action-bar>
|
||||||
<clr-dg-column [clrDgField]="'name'">{{'REPOSITORY.NAME' | translate}}</clr-dg-column>
|
<clr-dg-column [clrDgField]="'name'">{{'REPOSITORY.NAME' | translate}}</clr-dg-column>
|
||||||
@ -67,7 +69,7 @@ export const REPOSITORY_GRIDVIEW_TEMPLATE = `
|
|||||||
<div>{{item.tags_count}}</div>
|
<div>{{item.tags_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{'REPOSITORY.TAGS_COUNT' | translate}}</label>
|
<label>{{'REPOSITORY.PULL_COUNT' | translate}}</label>
|
||||||
<div>{{item.pull_count}}</div>
|
<div>{{item.pull_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,15 +101,16 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
// Get system info for tag views
|
||||||
|
toPromise<SystemInfo>(this.systemInfoService.getSystemInfo())
|
||||||
|
.then(systemInfo => this.systemInfo = systemInfo)
|
||||||
|
.catch(error => this.errorHandler.error(error));
|
||||||
|
|
||||||
if (this.withAdmiral) {
|
if (this.withAdmiral) {
|
||||||
this.isCardView = true;
|
this.isCardView = true;
|
||||||
} else {
|
} else {
|
||||||
this.isCardView = false;
|
this.isCardView = false;
|
||||||
}
|
}
|
||||||
// Get system info for tag views
|
|
||||||
toPromise<SystemInfo>(this.systemInfoService.getSystemInfo())
|
|
||||||
.then(systemInfo => this.systemInfo = systemInfo)
|
|
||||||
.catch(error => this.errorHandler.error(error));
|
|
||||||
|
|
||||||
this.lastFilteredRepoName = '';
|
this.lastFilteredRepoName = '';
|
||||||
}
|
}
|
||||||
@ -259,18 +260,22 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
|||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
this.repoProvisionEvent.emit(repo);
|
this.repoProvisionEvent.emit(repo);
|
||||||
}
|
}
|
||||||
deleteItemEvent(evt: any, item: RepositoryItem): void {
|
|
||||||
evt.stopPropagation();
|
|
||||||
this.deleteRepos([item]);
|
|
||||||
}
|
|
||||||
itemAddInfoEvent(evt: any, repo: RepositoryItem): void {
|
itemAddInfoEvent(evt: any, repo: RepositoryItem): void {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
this.addInfoEvent.emit(repo);
|
this.addInfoEvent.emit(repo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteItemEvent(evt: any, item: RepositoryItem): void {
|
||||||
|
evt.stopPropagation();
|
||||||
|
this.deleteRepos([item]);
|
||||||
|
}
|
||||||
|
|
||||||
selectedChange(): void {
|
selectedChange(): void {
|
||||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||||
setTimeout(() => clearInterval(hnd), 2000);
|
setTimeout(() => clearInterval(hnd), 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
this.doSearchRepoNames('');
|
this.doSearchRepoNames('');
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
"@angular/animations": "^4.3.0",
|
"@angular/animations": "^4.3.0",
|
||||||
"@angular/common": "^4.3.0",
|
"@angular/common": "^4.3.0",
|
||||||
"@angular/compiler": "^4.3.0",
|
"@angular/compiler": "^4.3.0",
|
||||||
"@angular/compiler-cli": "^4.3.0",
|
|
||||||
"@angular/core": "^4.3.0",
|
"@angular/core": "^4.3.0",
|
||||||
"@angular/forms": "^4.3.0",
|
"@angular/forms": "^4.3.0",
|
||||||
"@angular/http": "^4.3.0",
|
"@angular/http": "^4.3.0",
|
||||||
@ -31,7 +30,7 @@
|
|||||||
"clarity-icons": "0.10.24",
|
"clarity-icons": "0.10.24",
|
||||||
"clarity-ui": "0.10.24",
|
"clarity-ui": "0.10.24",
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"harbor-ui": "0.6.71",
|
"harbor-ui": "0.6.72",
|
||||||
"intl": "^1.2.5",
|
"intl": "^1.2.5",
|
||||||
"mutationobserver-shim": "^0.3.2",
|
"mutationobserver-shim": "^0.3.2",
|
||||||
"ngx-cookie": "^1.0.0",
|
"ngx-cookie": "^1.0.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user