Skip to content

Commit

Permalink
Show viz routes/tap/top in dashboard instead of routes/tap/top (linke…
Browse files Browse the repository at this point in the history
…rd#7230)

because they are deprecated

Signed-off-by: Takumi Sue <u630868b@alumni.osaka-u.ac.jp>
  • Loading branch information
mikutas authored Nov 8, 2021
1 parent d9e5eec commit 9a756c3
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web/app/js/components/QueryToCliCmd.jsx
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ class QueryToCliCmd extends React.Component {
<br />

<code>
linkerd {cmdName} {resource}
linkerd viz {cmdName} {resource}
{ displayOrder(cmdName, query).map(item => {
return !toCliParam[item] ? null : this.renderCliItem(toCliParam[item], query[item]);
})}
12 changes: 6 additions & 6 deletions web/app/js/components/QueryToCliCmd.test.jsx
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Routes query");
expect(component.html()).to.include("linkerd routes deploy/controller --namespace linkerd");
expect(component.html()).to.include("linkerd viz routes deploy/controller --namespace linkerd");
});

it('shows the linkerd namespace if the controller is not in the default namespace', () => {
@@ -39,7 +39,7 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Routes query");
expect(component.html()).to.include("linkerd routes deploy/controller --namespace linkerd --linkerd-namespace my-linkerd-ns");
expect(component.html()).to.include("linkerd viz routes deploy/controller --namespace linkerd --linkerd-namespace my-linkerd-ns");
});

it('does not render flags for items that are not populated in the query', () => {
@@ -60,7 +60,7 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Tap query");
expect(component.html()).to.include("linkerd tap deploy/controller --namespace linkerd --authority foo.bar:8080");
expect(component.html()).to.include("linkerd viz tap deploy/controller --namespace linkerd --authority foo.bar:8080");
});

it('displays the flags in the specified order per cli command', () => {
@@ -82,7 +82,7 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Tap query");
expect(component.html()).to.include("linkerd tap deploy/controller --namespace linkerd --to deploy/prometheus --scheme HTTPS --authority foo.bar:8080");
expect(component.html()).to.include("linkerd viz tap deploy/controller --namespace linkerd --to deploy/prometheus --scheme HTTPS --authority foo.bar:8080");
});

it("doesn't render a namespace flag when the resource is a namespace", () => {
@@ -100,7 +100,7 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Top query");
expect(component.html()).to.include("linkerd top namespace/linkerd");
expect(component.html()).to.include("linkerd viz top namespace/linkerd");
});

it("doesn't render commands for which a flag is not defined", () => {
@@ -120,6 +120,6 @@ describe('QueryToCliCmd', () => {
);

expect(component.html()).to.include("Current Tap query");
expect(component.html()).to.include("linkerd tap deploy/controller --namespace linkerd --scheme HTTPS");
expect(component.html()).to.include("linkerd viz tap deploy/controller --namespace linkerd --scheme HTTPS");
});
});

0 comments on commit 9a756c3

Please sign in to comment.