提交 44afd16f 编写于 作者: M Marcin Maciaszczyk 提交者: Kubernetes Prow Robot

Fix breadcrumb for logs and exec views (#3534)

* Fix logs breadcrumb

* Fix exec breadcrumb
上级 ea4e02aa
......@@ -104,7 +104,7 @@ export class BreadcrumbsComponent implements OnInit {
const breadcrumb = new Breadcrumb();
breadcrumb.label = this.breadcrumbs_.getDisplayName(state);
breadcrumb.stateLink = this.state_.href(state.name, null);
breadcrumb.stateLink = this.state_.href(state.name, this.state_.params);
return breadcrumb;
}
......
......@@ -51,7 +51,7 @@ export class SearchStateParams extends StateParams {
export class LogsStateParams extends StateParams {
constructor(
public resourceNamespace: string, public podName: string, public resourceType: string) {
public resourceNamespace: string, public resourceName: string, public resourceType: string) {
super();
}
}
......@@ -77,5 +77,5 @@ export function addNamespacedResourceStateParamsToUrl(url: string): string {
}
export function addLogsStateParamsToUrl(url: string): string {
return `${url}/:resourceNamespace/:podName/:resourceType`;
return `${url}/:resourceNamespace/:resourceName/:resourceType`;
}
......@@ -67,7 +67,7 @@ export class LogsComponent implements OnDestroy {
const namespace = this.state_.params.resourceNamespace;
const resourceType = this.state_.params.resourceType;
let podName = this.state_.params.podName;
let podName = this.state_.params.resourceName;
this.sourceSubscription =
logService.getResource(`source/${namespace}/${podName}/${resourceType}`)
......
......@@ -31,6 +31,7 @@ export const logsState: Ng2StateDeclaration = {
data: {
kdBreadcrumbs: {
label: 'Logs',
parent: 'pod.detail',
}
},
views: {
......
......@@ -45,6 +45,7 @@ export const shellState: Ng2StateDeclaration = {
data: {
kdBreadcrumbs: {
label: 'Shell',
parent: 'pod.detail',
}
},
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册