mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-30 14:27:35 +02:00
Fix per comments.
This commit is contained in:
parent
30a7a216c6
commit
de88cccf77
@ -1,5 +1,5 @@
|
||||
export const ENDPOINT_TEMPLATE: string = `
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)" (cancelAction)="cancelDeletion($event)"></confirmation-dialog>
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)"></confirmation-dialog>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="row flex-items-xs-between">
|
||||
|
@ -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 { Component, OnInit, ViewChild, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
||||
import { Endpoint, ReplicationRule } from '../service/interface';
|
||||
import { EndpointService } from '../service/endpoint.service';
|
||||
|
||||
@ -99,8 +99,6 @@ export class EndpointComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
cancelDeletion(message: ConfirmationAcknowledgement) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.targetName = '';
|
||||
this.retrieve('');
|
||||
|
@ -1,5 +1,5 @@
|
||||
export const REPOSITORY_TEMPLATE = `
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)" (cancelAction)="cancelDeletion($event)"></confirmation-dialog>
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)"></confirmation-dialog>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="row flex-items-xs-right option-right">
|
||||
|
@ -102,6 +102,7 @@ describe('RepositoryComponent (inline template)', ()=> {
|
||||
let el: HTMLElement = de.nativeElement;
|
||||
expect(el).toBeTruthy();
|
||||
expect(el.textContent).toEqual('library/nginx');
|
||||
expect(el.textContent).not.toEqual('library/busybox');
|
||||
});
|
||||
}));
|
||||
|
||||
|
@ -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 { Component, OnInit, OnDestroy, ViewChild, Input } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, Input } from '@angular/core';
|
||||
|
||||
import { RepositoryService } from '../service/repository.service';
|
||||
import { Repository, SessionInfo } from '../service/interface';
|
||||
@ -51,8 +51,6 @@ export class RepositoryComponent implements OnInit {
|
||||
|
||||
hasProjectAdminRole: boolean;
|
||||
|
||||
subscription: Subscription;
|
||||
|
||||
@ViewChild('confirmationDialog')
|
||||
confirmationDialog: ConfirmationDialogComponent;
|
||||
|
||||
@ -77,9 +75,7 @@ export class RepositoryComponent implements OnInit {
|
||||
}).catch(error => this.errorHandler.error(error));
|
||||
}
|
||||
}
|
||||
|
||||
cancelDeletion(message: ConfirmationAcknowledgement) {}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
if(!this.projectId) {
|
||||
this.errorHandler.error('Project ID cannot be unset.');
|
||||
@ -96,12 +92,6 @@ export class RepositoryComponent implements OnInit {
|
||||
this.retrieve();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (this.subscription) {
|
||||
this.subscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
retrieve(state?: State) {
|
||||
toPromise<Repository[]>(this.repositoryService
|
||||
.getRepositories(this.projectId, this.lastFilteredRepoName))
|
||||
|
@ -65,22 +65,6 @@ export interface Tag extends Base {
|
||||
signed?: number; //May NOT exist
|
||||
}
|
||||
|
||||
/**
|
||||
* Inteface for the tag view
|
||||
*/
|
||||
export interface TagView {
|
||||
tag: string;
|
||||
pullCommand: string;
|
||||
signed: number;
|
||||
author: string;
|
||||
created: Date;
|
||||
dockerVersion: string;
|
||||
architecture: string;
|
||||
os: string;
|
||||
id: string;
|
||||
parent: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for registry endpoints.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
export const TAG_TEMPLATE = `
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)" (cancelAction)="cancelDeletion($event)"></confirmation-dialog>
|
||||
<confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)"></confirmation-dialog>
|
||||
<clr-modal [(clrModalOpen)]="showTagManifestOpened" [clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="closable">
|
||||
<h3 class="modal-title">{{ manifestInfoTitle | translate }}</h3>
|
||||
<div class="modal-body">
|
||||
|
@ -21,7 +21,7 @@ import { ConfirmationDialogComponent } from '../confirmation-dialog/confirmation
|
||||
import { ConfirmationMessage } from '../confirmation-dialog/confirmation-message';
|
||||
import { ConfirmationAcknowledgement } from '../confirmation-dialog/confirmation-state-message';
|
||||
|
||||
import { Tag, TagView, SessionInfo } from '../service/interface';
|
||||
import { Tag, SessionInfo } from '../service/interface';
|
||||
|
||||
import { TAG_TEMPLATE } from './tag.component.html';
|
||||
import { TAG_STYLE } from './tag.component.css';
|
||||
@ -30,6 +30,22 @@ import { toPromise } from '../utils';
|
||||
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Inteface for the tag view
|
||||
*/
|
||||
export interface TagView {
|
||||
tag: string;
|
||||
pullCommand: string;
|
||||
signed: number;
|
||||
author: string;
|
||||
created: Date;
|
||||
dockerVersion: string;
|
||||
architecture: string;
|
||||
os: string;
|
||||
id: string;
|
||||
parent: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'hbr-tag',
|
||||
template: TAG_TEMPLATE,
|
||||
@ -102,8 +118,6 @@ export class TagComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
cancelDeletion(message: ConfirmationAcknowledgement) {}
|
||||
|
||||
ngOnInit() {
|
||||
if(!this.projectId) {
|
||||
this.errorHandler.error('Project ID cannot be unset.');
|
||||
|
Loading…
Reference in New Issue
Block a user