Skip to content

Commit

Permalink
ui: reuse components from admin-ui-components package
Browse files Browse the repository at this point in the history
Currently, many components were exported to `admin-ui-components`
package and these components weren't removed from this repo.
To avoid duplicates, these components removed and re-imported back.

Release note: None
  • Loading branch information
koorosh committed Jan 18, 2021
1 parent 3124c0a commit 724cf52
Show file tree
Hide file tree
Showing 34 changed files with 28 additions and 3,433 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Link } from "react-router-dom";

import { generateLocalityRoute } from "src/util/localities";
import { LocalityTier } from "src/redux/localities";
import { intersperse } from "src/util/intersperse";
import { util } from "@cockroachlabs/admin-ui-components";
import { getLocalityLabel } from "src/util/localities";
import mapPinIcon from "!!raw-loader!assets/mapPin.svg";
import { trustIcon } from "src/util/trust";
Expand All @@ -24,6 +24,8 @@ interface BreadcrumbsProps {
tiers: LocalityTier[];
}

const { intersperse } = util;

export class Breadcrumbs extends React.Component<BreadcrumbsProps> {
render() {
const paths = breadcrumbPaths(this.props.tiers);
Expand Down
86 changes: 0 additions & 86 deletions pkg/ui/src/components/downloadFile/downloadFile.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/ui/src/components/downloadFile/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ export * from "./sideNavigation";
export * from "./pageHeader";
export * from "./text";
export * from "./input";
export * from "./table";
export * from "./tooltip";
export * from "./select";
export * from "./downloadFile";
export * from "./modal";
export * from "./rangeCalendar";
export * from "./link";
11 changes: 0 additions & 11 deletions pkg/ui/src/components/table/index.ts

This file was deleted.

97 changes: 0 additions & 97 deletions pkg/ui/src/components/table/table.styl

This file was deleted.

63 changes: 0 additions & 63 deletions pkg/ui/src/components/table/table.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion pkg/ui/src/redux/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { createSelector } from "reselect";

import * as protos from "src/js/protos";
import { AdminUIState } from "./state";
import { util } from "@cockroachlabs/admin-ui-components";
import { Pick } from "src/util/pick";
import { NoConnection } from "src/views/reports/containers/network";
import { INodeStatus, MetricConstants, BytesUsed } from "src/util/proto";
import { nullOfReturnType } from "src/util/types";

/**
Expand All @@ -26,6 +26,9 @@ import { nullOfReturnType } from "src/util/types";
export import LivenessStatus = protos.cockroach.kv.kvserver.liveness.livenesspb.NodeLivenessStatus;
import { cockroach } from "src/js/protos";
import MembershipStatus = cockroach.kv.kvserver.liveness.livenesspb.MembershipStatus;
import INodeStatus = cockroach.server.status.statuspb.INodeStatus;

const { MetricConstants, BytesUsed } = util;

/**
* livenessNomenclature resolves a mismatch between the terms used for liveness
Expand Down
30 changes: 0 additions & 30 deletions pkg/ui/src/util/intersperse.spec.ts

This file was deleted.

21 changes: 0 additions & 21 deletions pkg/ui/src/util/intersperse.ts

This file was deleted.

Loading

0 comments on commit 724cf52

Please sign in to comment.