vmware-archive/admiral

Integrate hbr-gridview with Admiral

ninjadq opened this issue · 2 comments

Harbor-ui contains hbr-gridview directive in the latest version. which include gridview for repositories and it's style is consistent with Admiral.

the usage of hbr-gridview is almost the same of hbr-listview. But It provides two additional output event repoProvisionEvent and addInfoEvent. repoProvisionEvent will emit when the user clicks the Deploy button on a repo. addInfoEvent means user clicked Add Additional Info button. both of them contains the repo info in which triggers this event. you can catch and handle them like following.

<hbr-repository-gridview 
    [projectId]="projectId" 
    [projectName]="projectName" 
    [hasSignedIn]="hasSignedIn"
    [hasProjectAdminRole]="hasProjectAdminRole"
    (repoClickEvent)="watchRepoClickEvent($event)"
    (repoProvisionEvent)="watchRepoProvisionEvent($event)"
    (addInfoEvent)="watchAddInfoEvent($event)"
></hbr-repository-gridview>
watchRepoClickEvent(repo: RepositoryItem): void {
    //Process repo click event
    ...
}

watchRepoProvisionEvent(repo: RepositoryItem): void {
    //Process Provision event
    ...
}

watchAddInfoEvent(repo: RepositoryItem): void {
    //Process add additional info event
    ...
}

Initial change for direct deployment submitted.
What remains to be done is the Additional Info action.

Done.