@@ -11,8 +11,9 @@ export const TAG_TEMPLATE = `
-
-
+
+
+
{{'REPOSITORY.TAG' | translate}}
{{'REPOSITORY.PULL_COMMAND' | translate}}
{{'REPOSITORY.SIGNED' | translate}}
@@ -42,9 +43,9 @@ export const TAG_TEMPLATE = `
{{t.architecture}}
{{t.os}}
-
+
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'REPOSITORY.OF' | translate}}
- {{pagination.totalItems}} {{'REPOSITORY.ITEMS' | translate}}
-
+ {{pagination.totalItems}} {{'REPOSITORY.ITEMS' | translate}}
+
`;
\ No newline at end of file
diff --git a/src/ui_ng/lib/src/tag/tag.component.ts b/src/ui_ng/lib/src/tag/tag.component.ts
index 95b292da9..1cf71c52e 100644
--- a/src/ui_ng/lib/src/tag/tag.component.ts
+++ b/src/ui_ng/lib/src/tag/tag.component.ts
@@ -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, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, ViewChild, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { TagService } from '../service/tag.service';
import { ErrorHandler } from '../error-handler/error-handler';
@@ -43,6 +43,9 @@ export class TagComponent implements OnInit {
@Input() projectId: number;
@Input() repoName: string;
@Input() sessionInfo: SessionInfo;
+ @Input() isEmbedded: boolean;
+
+ @Output() refreshRepo = new EventEmitter();
hasProjectAdminRole: boolean;
@@ -73,23 +76,23 @@ export class TagComponent implements OnInit {
confirmDeletion(message: ConfirmationAcknowledgement) {
if (message &&
- message.source === ConfirmationTargets.TAG
- && message.state === ConfirmationState.CONFIRMED) {
- let tag: Tag = message.data;
- if (tag) {
- if (tag.signature) {
- return;
- } else {
- toPromise(this.tagService
- .deleteTag(this.repoName, tag.name))
- .then(
- response => {
- this.retrieve();
- this.translateService.get('REPOSITORY.DELETED_TAG_SUCCESS')
- .subscribe(res=>this.errorHandler.info(res));
- }).catch(error => this.errorHandler.error(error));
- }
+ message.source === ConfirmationTargets.TAG
+ && message.state === ConfirmationState.CONFIRMED) {
+ let tag: Tag = message.data;
+ if (tag) {
+ if (tag.signature) {
+ return;
+ } else {
+ toPromise(this.tagService
+ .deleteTag(this.repoName, tag.name))
+ .then(
+ response => {
+ this.retrieve();
+ this.translateService.get('REPOSITORY.DELETED_TAG_SUCCESS')
+ .subscribe(res=>this.errorHandler.info(res));
+ }).catch(error => this.errorHandler.error(error));
}
+ }
}
}
@@ -122,6 +125,9 @@ export class TagComponent implements OnInit {
.then(items => {
this.tags = items;
this.loading = false;
+ if(this.tags && this.tags.length === 0) {
+ this.refreshRepo.emit(true);
+ }
})
.catch(error => {
this.errorHandler.error(error);