Fixes: https://tracker.ceph.com/issues/50890
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit
e79c9d3f51970fbe275087e92e468205f70e6f12)
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts
- Adopt the master branch changes.
-<form #docsForm action="/docs" target="_blank" method="post">
- <input type="hidden" name="token"/>
-</form>
-
<div dropdown>
<a dropdownToggle
class="dropdown-toggle"
<li>
<a i18n
class="dropdown-item"
- (click)="goToApiDocs()">API</a>
+ href="/docs"
+ target="_blank">API</a>
</li>
<li>
<a i18n
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
styleUrls: ['./dashboard-help.component.scss']
})
export class DashboardHelpComponent implements OnInit {
- @ViewChild('docsForm')
- docsFormElement;
docsUrl: string;
modalRef: BsModalRef;
openAboutModal() {
this.modalRef = this.modalService.show(AboutComponent);
}
-
- goToApiDocs() {
- this.docsFormElement.nativeElement.submit();
- }
}