]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/components/back-button/back-button.component.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / components / back-button / back-button.component.ts
index a578f03940273e2f679b0f199b2b82cabe58818a..64563ea2c3bbe76a6b2a8012b56605583a8bcc42 100644 (file)
@@ -1,5 +1,5 @@
 import { Location } from '@angular/common';
-import { Component, EventEmitter, Input, Output } from '@angular/core';
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
 
 import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
 
@@ -8,12 +8,16 @@ import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
   templateUrl: './back-button.component.html',
   styleUrls: ['./back-button.component.scss']
 })
-export class BackButtonComponent {
+export class BackButtonComponent implements OnInit {
   @Output() backAction = new EventEmitter();
-  @Input() name: string = this.actionLabels.CANCEL;
+  @Input() name?: string;
 
   constructor(private location: Location, private actionLabels: ActionLabelsI18n) {}
 
+  ngOnInit(): void {
+    this.name = this.name || this.actionLabels.CANCEL;
+  }
+
   back() {
     if (this.backAction.observers.length === 0) {
       this.location.back();