diff --git a/pkg/ui/BUILD.bazel b/pkg/ui/BUILD.bazel index a471736adaf7..52ed7644956e 100644 --- a/pkg/ui/BUILD.bazel +++ b/pkg/ui/BUILD.bazel @@ -12,6 +12,7 @@ go_library( "//pkg/base", "//pkg/build", "//pkg/server/serverpb", + "//pkg/settings", "//pkg/util/httputil", "//pkg/util/log", ], diff --git a/pkg/ui/ui.go b/pkg/ui/ui.go index bfe6ade224e4..2f601f2627d8 100644 --- a/pkg/ui/ui.go +++ b/pkg/ui/ui.go @@ -28,10 +28,27 @@ import ( "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/build" "github.com/cockroachdb/cockroach/pkg/server/serverpb" + "github.com/cockroachdb/cockroach/pkg/settings" "github.com/cockroachdb/cockroach/pkg/util/httputil" "github.com/cockroachdb/cockroach/pkg/util/log" ) +const ( + utc int64 = iota + americaNewYork +) + +var _ = settings.RegisterEnumSetting( + settings.SystemOnly, + "ui.display_timezone", + "the timezone used to format timestamps in the ui", + "UTC", + map[int64]string{ + utc: "UTC", + americaNewYork: "America/New_York", + }, +) + // Assets is used for embedded JS assets required for UI. // In case the binary is built without UI, it provides single index.html file with // the same content as indexHTML as a fallback. diff --git a/pkg/ui/workspaces/cluster-ui/BUILD.bazel b/pkg/ui/workspaces/cluster-ui/BUILD.bazel index e15356159c8d..eb493e62197a 100644 --- a/pkg/ui/workspaces/cluster-ui/BUILD.bazel +++ b/pkg/ui/workspaces/cluster-ui/BUILD.bazel @@ -98,6 +98,8 @@ DEPENDENCIES = [ "@npm_cluster_ui//less", "@npm_cluster_ui//less-loader", "@npm_cluster_ui//long", + "@npm_cluster_ui//moment", + "@npm_cluster_ui//moment-timezone", "@npm_cluster_ui//moment-locales-webpack-plugin", "@npm_cluster_ui//npm-run-all", "@npm_cluster_ui//prettier", @@ -162,6 +164,7 @@ ts_project( "@npm_cluster_ui//classnames", "@npm_cluster_ui//connected-react-router", "@npm_cluster_ui//moment", + "@npm_cluster_ui//moment-timezone", "@npm_cluster_ui//protobufjs", "@npm_cluster_ui//redux", "@npm_cluster_ui//redux-saga", @@ -278,6 +281,7 @@ tsc_test( "@npm_cluster_ui//classnames", "@npm_cluster_ui//connected-react-router", "@npm_cluster_ui//moment", + "@npm_cluster_ui//moment-timezone", "@npm_cluster_ui//protobufjs", "@npm_cluster_ui//redux", "@npm_cluster_ui//redux-saga", diff --git a/pkg/ui/workspaces/cluster-ui/package.json b/pkg/ui/workspaces/cluster-ui/package.json index 6863116ce901..f4bd6e916ae2 100644 --- a/pkg/ui/workspaces/cluster-ui/package.json +++ b/pkg/ui/workspaces/cluster-ui/package.json @@ -119,7 +119,9 @@ "less": "^3.12.2", "less-loader": "^6.2.0", "long": "^4.0.0", + "moment": "^2.29.4", "moment-locales-webpack-plugin": "^1.2.0", + "moment-timezone": "^0.5.42", "npm-run-all": "^4.1.5", "prettier": "^2.6.2", "protobufjs": "6.8.6", diff --git a/pkg/ui/workspaces/cluster-ui/src/api/clusterLocksApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/clusterLocksApi.ts index b7660d295986..c5827c5b4984 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/clusterLocksApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/clusterLocksApi.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { executeInternalSql, LONG_TIMEOUT, diff --git a/pkg/ui/workspaces/cluster-ui/src/api/contentionApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/contentionApi.ts index 128ce0e4732b..65e7e06ec53d 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/contentionApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/contentionApi.ts @@ -18,7 +18,7 @@ import { formatApiResult, } from "./sqlApi"; import { ContentionDetails } from "src/insights"; -import moment from "moment"; +import moment from "moment-timezone"; export type ContentionFilters = { waitingTxnID?: string; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts index c8db0e7e6803..5376c6230dd8 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts @@ -23,7 +23,7 @@ import { } from "./sqlApi"; import { IndexUsageStatistic, recommendDropUnusedIndex } from "../insights"; import { Format, Identifier, QualifiedIdentifier } from "./safesql"; -import moment from "moment"; +import moment from "moment-timezone"; import { fromHexString, withTimeout } from "./util"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/databasesApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/databasesApi.ts index 1d8d5d070dfa..0aa9a5e5b0b8 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/databasesApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/databasesApi.ts @@ -16,7 +16,7 @@ import { sqlResultsAreEmpty, } from "./sqlApi"; import { withTimeout } from "./util"; -import moment from "moment"; +import moment from "moment-timezone"; export type DatabasesColumns = { database_name: string; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/eventsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/eventsApi.ts index abfd401f37a6..443b202f2046 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/eventsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/eventsApi.ts @@ -18,7 +18,7 @@ import { formatApiResult, } from "./sqlApi"; import { withTimeout } from "./util"; -import moment from "moment"; +import moment from "moment-timezone"; // defaultEventsNumLimit is the default number of events to be returned. export const defaultEventsNumLimit = 1000; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts index d6f6a29f0b51..420bdb6eda78 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts @@ -19,7 +19,7 @@ import { sqlResultsAreEmpty, StatementRawFormat, } from "src/api"; -import moment from "moment"; +import moment from "moment-timezone"; import { TimeScale, toRoundedDateRange } from "../timeScaleDropdown"; import { AggregateStatistics } from "../statementsTable"; import { INTERNAL_APP_NAME_PREFIX } from "../recentExecutions/recentStatementUtils"; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/schedulesApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/schedulesApi.ts index bf4907ff5c50..3833c5375b56 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/schedulesApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/schedulesApi.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import { executeInternalSql, SqlExecutionRequest, diff --git a/pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts index 0b1b8df1e639..f290fb534372 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { executeInternalSql, SqlExecutionRequest, diff --git a/pkg/ui/workspaces/cluster-ui/src/api/statementsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/statementsApi.ts index e637684f6abe..9bde8db1fc9f 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/statementsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/statementsApi.ts @@ -18,7 +18,7 @@ import { stringToTimestamp, } from "src/util"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import { AggregateStatistics } from "../statementsTable"; const STATEMENTS_PATH = "/_status/combinedstmts"; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/stmtInsightsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/stmtInsightsApi.ts index 8eec4d8765e5..377da2b84ec1 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/stmtInsightsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/stmtInsightsApi.ts @@ -25,7 +25,7 @@ import { StatementStatus, StmtInsightEvent, } from "src/insights"; -import moment from "moment"; +import moment from "moment-timezone"; import { INTERNAL_APP_NAME_PREFIX } from "src/recentExecutions/recentStatementUtils"; import { FixFingerprintHexValue } from "../util"; import { getContentionDetailsApi } from "./contentionApi"; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/tableDetailsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/tableDetailsApi.ts index 8613e7a5375b..e76721bba6b0 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/tableDetailsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/tableDetailsApi.ts @@ -21,7 +21,7 @@ import { SqlTxnResult, txnResultIsEmpty, } from "./sqlApi"; -import moment from "moment"; +import moment from "moment-timezone"; import { fromHexString, withTimeout } from "./util"; import { Format, Identifier, Join, SQL } from "./safesql"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; diff --git a/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts index 1e7b99a3c564..c371f29d5986 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts @@ -31,7 +31,7 @@ import { TxnInsightDetails, TxnInsightEvent, } from "src/insights"; -import moment from "moment"; +import moment from "moment-timezone"; import { FixFingerprintHexValue } from "../util"; import { formatStmtInsights, diff --git a/pkg/ui/workspaces/cluster-ui/src/api/util.ts b/pkg/ui/workspaces/cluster-ui/src/api/util.ts index fd2cfa58d2d3..589a3e3a1fa2 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/util.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/util.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; export const PROMISE_TIMEOUT = moment.duration(30, "s"); // seconds diff --git a/pkg/ui/workspaces/cluster-ui/src/contexts/index.ts b/pkg/ui/workspaces/cluster-ui/src/contexts/index.ts index f252008a33d3..177f9097c585 100644 --- a/pkg/ui/workspaces/cluster-ui/src/contexts/index.ts +++ b/pkg/ui/workspaces/cluster-ui/src/contexts/index.ts @@ -9,3 +9,4 @@ // licenses/APL.txt. export * from "./cockroachCloudContext"; +export * from "./timezoneContext"; diff --git a/pkg/ui/workspaces/cluster-ui/src/contexts/timezoneContext.tsx b/pkg/ui/workspaces/cluster-ui/src/contexts/timezoneContext.tsx new file mode 100644 index 000000000000..2882c60b5c81 --- /dev/null +++ b/pkg/ui/workspaces/cluster-ui/src/contexts/timezoneContext.tsx @@ -0,0 +1,26 @@ +// Copyright 2023 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +import React from "react"; +import { createContext, useContext } from "react"; + +export const TimezoneContext = createContext("UTC"); + +// WithTimezone wraps a class component to provide the +// context's timezone value as a component prop. +export function WithTimezone(Component: any) { + return (props: any) => { + // This lambda is a React function component. + // It is safe to call a hook here. + // eslint-disable-next-line + const timezone = useContext(TimezoneContext); + return ; + }; +} diff --git a/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.stories.tsx index c8e5852aaf29..8e91151cce0f 100644 --- a/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.stories.tsx @@ -26,7 +26,7 @@ import { } from "./databaseDetailsPage"; import * as H from "history"; -import moment from "moment"; +import moment from "moment-timezone"; import { defaultFilters } from "src/queryFilter"; const history = H.createHashHistory(); diff --git a/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.tsx index de00c45ade4b..f378a71334b8 100644 --- a/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/databaseDetailsPage/databaseDetailsPage.tsx @@ -37,7 +37,7 @@ import { mvccGarbage, syncHistory, unique } from "../util"; import styles from "./databaseDetailsPage.module.scss"; import sortableTableStyles from "src/sortedtable/sortedtable.module.scss"; import { baseHeadingClasses } from "src/transactionsPage/transactionsPageClasses"; -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import { Caution } from "@cockroachlabs/icons"; import { Anchor } from "../anchor"; import LoadingError from "../sqlActivity/errorComponent"; diff --git a/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.stories.tsx index c633133ec538..2b52828a5a24 100644 --- a/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.stories.tsx @@ -19,7 +19,7 @@ import { randomTablePrivilege, } from "src/storybook/fixtures"; import { DatabaseTablePage, DatabaseTablePageProps } from "./databaseTablePage"; -import moment from "moment"; +import moment from "moment-timezone"; import * as H from "history"; const history = H.createHashHistory(); diff --git a/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.tsx b/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.tsx index 596b07bebe99..bff16da6f6d6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/databaseTablePage/databaseTablePage.tsx @@ -49,7 +49,7 @@ import { import styles from "./databaseTablePage.module.scss"; import { commonStyles } from "src/common"; import { baseHeadingClasses } from "src/transactionsPage/transactionsPageClasses"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { Search as IndexIcon } from "@cockroachlabs/icons"; import booleanSettingStyles from "../settings/booleanSetting.module.scss"; import { CircleFilled } from "../icon"; diff --git a/pkg/ui/workspaces/cluster-ui/src/dateRangeMenu/dateRangeMenu.tsx b/pkg/ui/workspaces/cluster-ui/src/dateRangeMenu/dateRangeMenu.tsx index d89fe8dbad36..86fe826f08b0 100644 --- a/pkg/ui/workspaces/cluster-ui/src/dateRangeMenu/dateRangeMenu.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/dateRangeMenu/dateRangeMenu.tsx @@ -14,7 +14,7 @@ import "antd/lib/time-picker/style"; import "antd/lib/icon/style"; import "antd/lib/date-picker/style"; import "antd/lib/alert/style"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import classNames from "classnames/bind"; import { Time as TimeIcon, ErrorCircleFilled } from "@cockroachlabs/icons"; import { Button } from "src/button"; diff --git a/pkg/ui/workspaces/cluster-ui/src/delayed/delayed.tsx b/pkg/ui/workspaces/cluster-ui/src/delayed/delayed.tsx index 38b26b377432..9f2abad6afb7 100644 --- a/pkg/ui/workspaces/cluster-ui/src/delayed/delayed.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/delayed/delayed.tsx @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import React, { useState, useEffect } from "react"; type Props = { diff --git a/pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.ts b/pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.ts index b9226375c923..37fd4728aa05 100644 --- a/pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.ts +++ b/pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import _ from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import { BytesFitScale, diff --git a/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.stories.tsx index 5dee11534706..5578ce43b129 100644 --- a/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.stories.tsx @@ -14,7 +14,7 @@ import { storiesOf } from "@storybook/react"; import { withBackground, withRouterProvider } from "src/storybook/decorators"; import { randomName } from "src/storybook/fixtures"; import { IndexDetailsPage, IndexDetailsPageProps } from "./indexDetailsPage"; -import moment from "moment"; +import moment from "moment-timezone"; const withData: IndexDetailsPageProps = { databaseName: randomName(), diff --git a/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.tsx index 35e3b0b3774b..dd833e9de1c9 100644 --- a/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/indexDetailsPage/indexDetailsPage.tsx @@ -28,7 +28,7 @@ import "antd/lib/col/style"; import "antd/lib/row/style"; import "antd/lib/tooltip/style"; import { SummaryCard } from "../summaryCard"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { Heading } from "@cockroachlabs/ui-components"; import { Anchor } from "../anchor"; import { diff --git a/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.spec.ts b/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.spec.ts index 8b37657e9636..ce5640735271 100644 --- a/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.spec.ts @@ -14,7 +14,7 @@ import { recommendDropUnusedIndex, } from "./indexUsageStatsRec"; import { ClusterIndexUsageStatistic } from "../../api"; -import moment from "moment"; +import moment from "moment-timezone"; describe("recommendDropUnusedIndex", () => { const mockCurrentTime = moment(); diff --git a/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.ts b/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.ts index b573d8ea548f..f9322dbe163f 100644 --- a/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/insights/schemaInsights/indexUsageStatsRec.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; export const indexNeverUsedReason = "This index has not been used and can be removed for better write performance."; diff --git a/pkg/ui/workspaces/cluster-ui/src/insights/types.ts b/pkg/ui/workspaces/cluster-ui/src/insights/types.ts index 64fc4ac6584f..e88fc568cd10 100644 --- a/pkg/ui/workspaces/cluster-ui/src/insights/types.ts +++ b/pkg/ui/workspaces/cluster-ui/src/insights/types.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import { Filters } from "../queryFilter"; // This enum corresponds to the string enum for `problems` in `cluster_execution_insights` diff --git a/pkg/ui/workspaces/cluster-ui/src/insights/utils.spec.ts b/pkg/ui/workspaces/cluster-ui/src/insights/utils.spec.ts index 63d5a20703ba..de9b03fdcb42 100644 --- a/pkg/ui/workspaces/cluster-ui/src/insights/utils.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/insights/utils.spec.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { filterStatementInsights, filterTransactionInsights, diff --git a/pkg/ui/workspaces/cluster-ui/src/insights/workloadInsights/statementInsights/statementInsightsView.tsx b/pkg/ui/workspaces/cluster-ui/src/insights/workloadInsights/statementInsights/statementInsightsView.tsx index ccdce17da67f..051a548163f6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/insights/workloadInsights/statementInsights/statementInsightsView.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/insights/workloadInsights/statementInsights/statementInsightsView.tsx @@ -51,7 +51,7 @@ import { timeScaleRangeToObj, } from "../../../timeScaleDropdown"; import { StmtInsightsReq } from "src/api/stmtInsightsApi"; -import moment from "moment"; +import moment from "moment-timezone"; import styles from "src/statementsPage/statementsPage.module.scss"; import sortableTableStyles from "src/sortedtable/sortedtable.module.scss"; diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.fixture.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.fixture.tsx index e56039ef6ee3..62995fb1ab34 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.fixture.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.fixture.tsx @@ -12,7 +12,7 @@ import * as protos from "@cockroachlabs/crdb-protobuf-client"; import { createMemoryHistory } from "history"; import Long from "long"; import { JobsPageProps } from "./jobsPage"; -import moment from "moment"; +import moment from "moment-timezone"; import JobsResponse = cockroach.server.serverpb.JobsResponse; import Job = cockroach.server.serverpb.IJobResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.spec.tsx index 15ce5dfaae2a..5dc0b12c0c55 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.spec.tsx @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { JobsPage, JobsPageProps } from "./jobsPage"; import { formatDuration } from "../util/duration"; diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.tsx index 2dead1f7a2b8..4d23b6d482b9 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import { cockroach, google } from "@cockroachlabs/crdb-protobuf-client"; import { InlineAlert } from "@cockroachlabs/ui-components"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { Helmet } from "react-helmet"; import { RouteComponentProps } from "react-router-dom"; diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/util/duration.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/util/duration.tsx index 29200a43cac0..db8470134ac0 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/util/duration.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/util/duration.tsx @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { TimestampToMoment } from "src/util"; diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/util/highwaterTimestamp.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/util/highwaterTimestamp.tsx index bf3049718a0d..ab5ccd0fa34d 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/util/highwaterTimestamp.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/util/highwaterTimestamp.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import { google } from "@cockroachlabs/crdb-protobuf-client"; import { Tooltip } from "@cockroachlabs/ui-components"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { DATE_FORMAT_24_UTC } from "src/util/format"; diff --git a/pkg/ui/workspaces/cluster-ui/src/network/identity.ts b/pkg/ui/workspaces/cluster-ui/src/network/identity.ts index 21d8abe0c62d..ae6c998f210c 100644 --- a/pkg/ui/workspaces/cluster-ui/src/network/identity.ts +++ b/pkg/ui/workspaces/cluster-ui/src/network/identity.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; export interface Identity { nodeID: number; diff --git a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.spec.ts b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.spec.ts index 97377cf932c2..9e3d960985ef 100644 --- a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.spec.ts @@ -19,7 +19,7 @@ import { ExecutionStatus, } from "./types"; import * as protos from "@cockroachlabs/crdb-protobuf-client"; -import moment from "moment"; +import moment from "moment-timezone"; import { TimestampToMoment } from "../util"; import Long from "long"; import { diff --git a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.ts b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.ts index c88d6a0eac04..6a322d2c8d44 100644 --- a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.ts +++ b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/recentStatementUtils.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { byteArrayToUuid } from "src/sessions"; import { TimestampToMoment, unset } from "src/util"; import { RecentTransaction } from "."; diff --git a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/types.ts b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/types.ts index 931a23c8ac84..862856484048 100644 --- a/pkg/ui/workspaces/cluster-ui/src/recentExecutions/types.ts +++ b/pkg/ui/workspaces/cluster-ui/src/recentExecutions/types.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import * as protos from "@cockroachlabs/crdb-protobuf-client"; -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import { Filters } from "src/queryFilter"; export type SessionsResponse = diff --git a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.fixture.tsx b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.fixture.tsx index f9c2b738ee8d..46dcd0d1f53a 100644 --- a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.fixture.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.fixture.tsx @@ -10,7 +10,7 @@ import * as protos from "@cockroachlabs/crdb-protobuf-client"; import { createMemoryHistory } from "history"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import { SchedulesPageProps } from "./schedulesPage"; import { Schedule } from "src/api/schedulesApi"; diff --git a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.spec.tsx index cf6b818d5f2c..e37f5bd533c8 100644 --- a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.spec.tsx @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { SchedulesPage, SchedulesPageProps } from "./schedulesPage"; import { allSchedulesFixture } from "./schedulesPage.fixture"; diff --git a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.tsx b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.tsx index b213844fd3b5..1431341f5bde 100644 --- a/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/schedules/schedulesPage/schedulesPage.tsx @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. import { InlineAlert } from "@cockroachlabs/ui-components"; -import moment from "moment"; +import moment from "moment-timezone"; import React, { useEffect } from "react"; import { Helmet } from "react-helmet"; import { RouteComponentProps } from "react-router-dom"; diff --git a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionDetails.tsx index a4b82c830437..f4e2984f1497 100644 --- a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionDetails.tsx @@ -55,7 +55,7 @@ import classNames from "classnames/bind"; import { commonStyles } from "src/common"; import { CircleFilled } from "../icon"; import { createTimeScaleFromDateRange, TimeScale } from "src/timeScaleDropdown"; -import moment from "moment"; +import moment from "moment-timezone"; const cx = classNames.bind(styles); const statementsPageCx = classNames.bind(statementsPageStyles); diff --git a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsPage.tsx index 3fde145b7787..794192582267 100644 --- a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsPage.tsx @@ -58,7 +58,7 @@ import ColumnsSelector, { SelectOption, } from "../columnsSelector/columnsSelector"; import { TimestampToMoment, unset } from "src/util"; -import moment from "moment"; +import moment from "moment-timezone"; import { getLabel, StatisticTableColumnKeys, diff --git a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsTable.tsx b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsTable.tsx index 03e8378e1c7f..56af237a8358 100644 --- a/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsTable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/sessions/sessionsTable.tsx @@ -20,7 +20,7 @@ import { BytesWithPrecision, Count } from "src/util/format"; import { Link } from "react-router-dom"; import React from "react"; -import moment from "moment"; +import moment from "moment-timezone"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; type ISession = cockroach.server.serverpb.Session; diff --git a/pkg/ui/workspaces/cluster-ui/src/sortedtable/sortedtable.tsx b/pkg/ui/workspaces/cluster-ui/src/sortedtable/sortedtable.tsx index 4a0c26ec9fc9..d87ccf7e823d 100644 --- a/pkg/ui/workspaces/cluster-ui/src/sortedtable/sortedtable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/sortedtable/sortedtable.tsx @@ -12,7 +12,7 @@ import React from "react"; import _ from "lodash"; import * as Long from "long"; import { History } from "history"; -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import { createSelector } from "reselect"; import times from "lodash/times"; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsUtils.ts b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsUtils.ts index 284fee783eb8..4b21c4539952 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsUtils.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsUtils.ts @@ -11,7 +11,7 @@ import { isUndefined } from "lodash"; import { DiagnosticStatuses } from "src/statementsDiagnostics"; import { StatementDiagnosticsReport } from "../../api"; -import moment from "moment"; +import moment from "moment-timezone"; export function getDiagnosticsStatus( diagnosticsRequest: StatementDiagnosticsReport, diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.spec.tsx index 752741838f3b..abc206afd9c6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.spec.tsx @@ -18,7 +18,7 @@ import { DiagnosticsView } from "./diagnosticsView"; import { Table } from "src/table"; import { TestStoreProvider } from "src/test-utils"; import { StatementDiagnosticsReport } from "../../api"; -import moment from "moment"; +import moment from "moment-timezone"; const activateDiagnosticsRef = { current: { showModalFor: jest.fn() } }; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.tsx b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.tsx index 5b2e6f0ea3a3..0c67216295b6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/diagnostics/diagnosticsView.tsx @@ -10,7 +10,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import moment from "moment"; +import moment from "moment-timezone"; import classnames from "classnames/bind"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { Button, Icon } from "@cockroachlabs/ui-components"; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts index 418a31684542..585592888572 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import Long from "long"; import { createMemoryHistory } from "history"; import { noop } from "lodash"; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.selectors.ts b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.selectors.ts index 7ee7f3d6c2b2..402c6bb417d4 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.selectors.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.selectors.ts @@ -22,7 +22,7 @@ import { import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { TimeScale, toRoundedDateRange } from "../timeScaleDropdown"; import { selectTimeScale } from "../store/utils/selectors"; -import moment from "moment"; +import moment from "moment-timezone"; type StatementDetailsResponseMessage = cockroach.server.serverpb.StatementDetailsResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx index 303acbac3143..c29d8bdca885 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx @@ -72,7 +72,7 @@ import { generateCPUTimeseries, } from "./timeseriesUtils"; import { Delayed } from "../delayed"; -import moment from "moment"; +import moment from "moment-timezone"; import { InsertStmtDiagnosticRequest, InsightRecommendation, diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts index 1710bafc6c51..7a879769f667 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts @@ -10,7 +10,7 @@ /* eslint-disable prettier/prettier */ import { StatementsPageProps } from "./statementsPage"; -import moment from "moment"; +import moment from "moment-timezone"; import { createMemoryHistory } from "history"; import Long from "long"; import { noop } from "lodash"; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx index d0c21159c4b4..4ef475c14950 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx @@ -73,7 +73,7 @@ import { import { commonStyles } from "../common"; import { isSelectedColumn } from "src/columnsSelector/utils"; import { StatementViewType } from "./statementPageTypes"; -import moment from "moment"; +import moment from "moment-timezone"; import { InsertStmtDiagnosticRequest, StatementDiagnosticsReport, diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTableContent.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTableContent.tsx index 617889e816d4..dea19b2d43dc 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTableContent.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTableContent.tsx @@ -31,7 +31,7 @@ import styles from "./statementsTableContent.module.scss"; import { EllipsisVertical } from "@cockroachlabs/icons"; import { getBasePath } from "src/api/basePath"; import { StatementDiagnosticsReport } from "src/api/statementDiagnosticsApi"; -import moment from "moment"; +import moment from "moment-timezone"; export type NodeNames = { [nodeId: string]: string }; const cx = classNames.bind(styles); diff --git a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx index 052b2b4bd737..0bbeae40c7c6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx @@ -10,7 +10,7 @@ import React from "react"; import { Anchor } from "src/anchor"; -import moment from "moment"; +import moment from "moment-timezone"; import { Tooltip } from "@cockroachlabs/ui-components"; import { diff --git a/pkg/ui/workspaces/cluster-ui/src/store/databasesList/databasesList.saga.ts b/pkg/ui/workspaces/cluster-ui/src/store/databasesList/databasesList.saga.ts index edcd0f3eb54b..7db9f7638598 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/databasesList/databasesList.saga.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/databasesList/databasesList.saga.ts @@ -12,7 +12,7 @@ import { all, call, put, takeLatest } from "redux-saga/effects"; import { actions } from "./databasesList.reducers"; import { getDatabasesList } from "src/api"; -import moment from "moment"; +import moment from "moment-timezone"; export function* refreshDatabasesListSaga() { yield put(actions.request()); diff --git a/pkg/ui/workspaces/cluster-ui/src/store/insightDetails/transactionInsightDetails/transactionInsightDetails.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/insightDetails/transactionInsightDetails/transactionInsightDetails.reducer.ts index 47b2b0dc37cc..d72924552cef 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/insightDetails/transactionInsightDetails/transactionInsightDetails.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/insightDetails/transactionInsightDetails/transactionInsightDetails.reducer.ts @@ -10,7 +10,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME } from "src/store/utils"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { ErrorWithKey } from "src/api/statementsApi"; import { TxnInsightDetailsRequest, diff --git a/pkg/ui/workspaces/cluster-ui/src/store/insights/statementFingerprintInsights/statementFingerprintInsights.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/insights/statementFingerprintInsights/statementFingerprintInsights.reducer.ts index 9bf74468e78f..4a1f72de5db2 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/insights/statementFingerprintInsights/statementFingerprintInsights.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/insights/statementFingerprintInsights/statementFingerprintInsights.reducer.ts @@ -10,7 +10,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME } from "../../utils"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { SqlApiResponse, ErrorWithKey, StmtInsightsReq } from "src/api"; import { StmtInsightEvent } from "../../../insights"; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/insights/statementInsights/statementInsights.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/insights/statementInsights/statementInsights.reducer.ts index dfe722d50fc8..7bc22a501e0a 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/insights/statementInsights/statementInsights.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/insights/statementInsights/statementInsights.reducer.ts @@ -12,7 +12,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME } from "../../utils"; import { StmtInsightEvent } from "src/insights"; import { SqlApiResponse, StmtInsightsReq } from "src/api"; -import moment from "moment"; +import moment from "moment-timezone"; export type StmtInsightsState = { data: SqlApiResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/insights/transactionInsights/transactionInsights.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/insights/transactionInsights/transactionInsights.reducer.ts index dd2a8170602f..981bb8c36553 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/insights/transactionInsights/transactionInsights.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/insights/transactionInsights/transactionInsights.reducer.ts @@ -11,7 +11,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME } from "../../utils"; import { TxnInsightEvent } from "src/insights"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { SqlApiResponse, TxnInsightsRequest } from "src/api"; export type TxnInsightsState = { diff --git a/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.reducer.ts index 1198f103eb39..9e62032bd4e6 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.reducer.ts @@ -11,7 +11,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { JobsRequest, JobsResponse } from "src/api/jobsApi"; import { DOMAIN_NAME } from "../utils"; -import moment from "moment"; +import moment from "moment-timezone"; export type JobsState = { data: JobsResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.sagas.spec.ts index ba3abac87b62..b7b5d0cb48ba 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/jobs/jobs.sagas.spec.ts @@ -24,7 +24,7 @@ import { allJobsFixture, earliestRetainedTime, } from "../../jobs/jobsPage/jobsPage.fixture"; -import moment from "moment"; +import moment from "moment-timezone"; describe("jobs sagas", () => { const lastUpdated = moment.utc(new Date("2023-02-21T12:00:00.000Z")); diff --git a/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.reducer.ts index a415afb0f844..3aa0cb1ffe2a 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.reducer.ts @@ -10,7 +10,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME, noopReducer } from "../utils"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { InsightRecommendation } from "../../insights"; import { SqlApiResponse } from "src/api"; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.sagas.spec.ts index 57bad0d0c1da..610c4ba18f0c 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/schemaInsights/schemaInsights.sagas.spec.ts @@ -15,7 +15,7 @@ import { throwError, } from "redux-saga-test-plan/providers"; import * as matchers from "redux-saga-test-plan/matchers"; -import moment from "moment"; +import moment from "moment-timezone"; import { getSchemaInsights, SqlApiResponse } from "../../api"; import { refreshSchemaInsightsSaga, diff --git a/pkg/ui/workspaces/cluster-ui/src/store/sessions/sessions.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/sessions/sessions.reducer.ts index fe1f765fc011..615552b56329 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/sessions/sessions.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/sessions/sessions.reducer.ts @@ -11,7 +11,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { DOMAIN_NAME, noopReducer } from "../utils"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; type SessionsResponse = cockroach.server.serverpb.ListSessionsResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.reducer.ts index 61ba8d1ed005..c05a2fecd8e1 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.reducer.ts @@ -13,7 +13,7 @@ import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import { DOMAIN_NAME } from "../utils"; import { StatementsRequest } from "src/api/statementsApi"; import { TimeScale } from "../../timeScaleDropdown"; -import moment from "moment"; +import moment from "moment-timezone"; export type StatementsResponse = cockroach.server.serverpb.StatementsResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.sagas.spec.ts index e07206d6c020..7df6bff40c03 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/sqlStats/sqlStats.sagas.spec.ts @@ -27,7 +27,7 @@ import { import { actions, reducer, SQLStatsState } from "./sqlStats.reducer"; import { actions as sqlDetailsStatsActions } from "../statementDetails/statementDetails.reducer"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; const lastUpdated = moment(); diff --git a/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.reducer.ts index 77aec1076ef6..65d7ddf2fecb 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.reducer.ts @@ -17,7 +17,7 @@ import { StatementDetailsResponseWithKey, } from "src/api/statementsApi"; import { generateStmtDetailsToID } from "../../util"; -import moment from "moment"; +import moment from "moment-timezone"; export type SQLDetailsStatsState = { data: StatementDetailsResponse; diff --git a/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.sagas.spec.ts index 4a17d3d85fd3..14f71b8fa56f 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.sagas.spec.ts @@ -29,7 +29,7 @@ import { SQLDetailsStatsReducerState, } from "./statementDetails.reducer"; -import moment from "moment"; +import moment from "moment-timezone"; const lastUpdated = moment(); diff --git a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.sagas.spec.ts index 2748d871ee60..0872a6a5ae40 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.sagas.spec.ts @@ -28,7 +28,7 @@ import { CancelStmtDiagnosticRequest, CancelStmtDiagnosticResponse, } from "src/api/statementDiagnosticsApi"; -import moment from "moment"; +import moment from "moment-timezone"; describe("statementsDiagnostics sagas", () => { describe("createDiagnosticsReportSaga", () => { diff --git a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.spec.ts index d7e03a69db68..dd5f2ae7f091 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.spec.ts @@ -11,7 +11,7 @@ import { assert } from "chai"; import { selectDiagnosticsReportsPerStatement } from "./statementDiagnostics.selectors"; import { StatementDiagnosticsReport } from "../../api"; -import moment from "moment"; +import moment from "moment-timezone"; const reports: StatementDiagnosticsReport[] = [ { diff --git a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.ts b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.ts index f44a2f5ecc96..92f662967856 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/statementDiagnostics/statementDiagnostics.selectors.ts @@ -12,7 +12,7 @@ import { createSelector } from "reselect"; import { chain, orderBy } from "lodash"; import { AppState } from "../reducers"; import { StatementDiagnosticsReport } from "../../api"; -import moment from "moment"; +import moment from "moment-timezone"; export const statementDiagnostics = createSelector( (state: AppState) => state.adminUI, diff --git a/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.reducer.ts b/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.reducer.ts index 71731100874c..d3b6ed1c5507 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.reducer.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.reducer.ts @@ -12,7 +12,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { DOMAIN_NAME } from "../utils"; import { StatementsRequest } from "src/api/statementsApi"; import { TimeScale } from "../../timeScaleDropdown"; -import moment from "moment"; +import moment from "moment-timezone"; import { StatementsResponse } from "../sqlStats"; export type TxnStatsState = { diff --git a/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.sagas.spec.ts b/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.sagas.spec.ts index 7f88306fa492..09dcad9d55ad 100644 --- a/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.sagas.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/store/transactionStats/txnStats.sagas.spec.ts @@ -21,7 +21,7 @@ import { getFlushedTxnStatsApi } from "src/api/statementsApi"; import { refreshTxnStatsSaga, requestTxnStatsSaga } from "./txnStats.sagas"; import { actions, reducer, TxnStatsState } from "./txnStats.reducer"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; const lastUpdated = moment(); diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/rangeSelect.tsx b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/rangeSelect.tsx index 574c46bee145..87adb4f4ca40 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/rangeSelect.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/rangeSelect.tsx @@ -12,7 +12,7 @@ import React, { useState, useRef } from "react"; import { Button, Dropdown } from "antd"; import "antd/lib/button/style"; import "antd/lib/dropdown/style"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { DateRangeMenu } from "src/dateRangeMenu"; import { CaretDown } from "src/icon/caretDown"; import classNames from "classnames/bind"; diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.spec.tsx index 5266d4cb2ec4..cbcbfd93b983 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.spec.tsx @@ -19,7 +19,7 @@ import { TimeScaleDropdown, } from "./timeScaleDropdown"; import * as timescale from "./timeScaleTypes"; -import moment from "moment"; +import moment from "moment-timezone"; import { MemoryRouter } from "react-router"; import TimeFrameControls from "./timeFrameControls"; import RangeSelect from "./rangeSelect"; diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.stories.tsx index 2deb7f19844d..52935833bc4d 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.stories.tsx @@ -12,7 +12,7 @@ import React, { useState } from "react"; import { storiesOf } from "@storybook/react"; import { TimeScaleDropdown } from "./timeScaleDropdown"; import { defaultTimeScaleOptions, defaultTimeScaleSelected } from "./utils"; -import moment from "moment"; +import moment from "moment-timezone"; export function TimeScaleDropdownWrapper({ initialTimeScale = defaultTimeScaleSelected, diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.tsx b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.tsx index 46be340fd099..676b26662c58 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import React, { useMemo } from "react"; -import moment from "moment"; +import moment from "moment-timezone"; import classNames from "classnames/bind"; import { ArrowDirection, diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleTypes.ts b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleTypes.ts index 1160a65d55cf..d46c3cf05388 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleTypes.ts +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleTypes.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { defaultTimeScaleOptions } from "./utils"; /** diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.spec.tsx index f8520f8e7099..9ef8e5b9b7cb 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.spec.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import { TimeScale } from "./timeScaleTypes"; -import moment from "moment"; +import moment from "moment-timezone"; import { defaultTimeScaleOptions, findClosestTimeScale, diff --git a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.ts b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.ts index 83951f038ba1..d193bd335940 100644 --- a/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.ts +++ b/pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/utils.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { TimeScale, TimeScaleOption, TimeScaleOptions } from "./timeScaleTypes"; import { dateFormat, timeFormat } from "./timeScaleDropdown"; diff --git a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanComponent.tsx b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanComponent.tsx index b4c4fa71c833..deeda0bf4306 100644 --- a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanComponent.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanComponent.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import React, { useCallback, useMemo, useState } from "react"; -import moment from "moment"; +import moment from "moment-timezone"; import { Helmet } from "react-helmet"; import { commonStyles } from "src/common"; import classNames from "classnames/bind"; diff --git a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanMetadataTable.tsx b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanMetadataTable.tsx index 118b23b2040b..5e809443379c 100644 --- a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanMetadataTable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanMetadataTable.tsx @@ -7,7 +7,7 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import React, { useState } from "react"; import { Nodes } from "@cockroachlabs/icons"; import { NamedOperationMetadata } from "src/api/tracezApi"; diff --git a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanTable.tsx b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanTable.tsx index 0c809da2572d..bb3764a56d19 100644 --- a/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanTable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/tracez/snapshot/spanTable.tsx @@ -7,7 +7,7 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import React, { useState } from "react"; import { Nodes, Caution, Plus, Minus } from "@cockroachlabs/icons"; import { Span, Snapshot } from "src/api/tracezApi"; diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.fixture.ts index 2d089bc04080..46aee6711958 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.fixture.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import { RequestError } from "../util"; -import moment from "moment"; +import moment from "moment-timezone"; import { createMemoryHistory } from "history"; import Long from "long"; import * as protos from "@cockroachlabs/crdb-protobuf-client"; diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.stories.tsx index 4d65ceb5384d..89372da9bfc1 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.stories.tsx @@ -23,7 +23,7 @@ import { } from "./transactionDetails.fixture"; import { TransactionDetails } from "."; -import moment from "moment"; +import moment from "moment-timezone"; storiesOf("Transactions Details", module) .addDecorator(storyFn => {storyFn()}) diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.tsx index 63eb25d3b9be..9b0be2396d8c 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/transactionDetails/transactionDetails.tsx @@ -80,7 +80,7 @@ import { timeScaleToString, toRoundedDateRange, } from "../timeScaleDropdown"; -import moment from "moment"; +import moment from "moment-timezone"; import timeScaleStyles from "../timeScaleDropdown/timeScale.module.scss"; import insightTableStyles from "../insightsTable/insightsTable.module.scss"; diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactions.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactions.fixture.ts index 96f096e82e43..492e81ab6a41 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactions.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactions.fixture.ts @@ -11,7 +11,7 @@ import { createMemoryHistory } from "history"; import { cockroach } from "@cockroachlabs/crdb-protobuf-client"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "@cockroachlabs/crdb-protobuf-client"; import { SortSetting } from "../sortedtable"; import { Filters } from "../queryFilter"; diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactionsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactionsPage.tsx index f947cca11b87..43f51c80d399 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactionsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/transactionsPage.tsx @@ -74,7 +74,7 @@ import { import { InlineAlert } from "@cockroachlabs/ui-components"; import { TransactionViewType } from "./transactionsPageTypes"; import { isSelectedColumn } from "../columnsSelector/utils"; -import moment from "moment"; +import moment from "moment-timezone"; import { STATS_LONG_LOADING_DURATION, txnRequestSortOptions, diff --git a/pkg/ui/workspaces/cluster-ui/src/util/constants.ts b/pkg/ui/workspaces/cluster-ui/src/util/constants.ts index 43d9e21b0706..fa1febdc645e 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/constants.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/constants.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import { duration } from "moment"; +import { duration } from "moment-timezone"; export const aggregatedTsAttr = "aggregated_ts"; export const appAttr = "app"; diff --git a/pkg/ui/workspaces/cluster-ui/src/util/convert.spec.ts b/pkg/ui/workspaces/cluster-ui/src/util/convert.spec.ts index 1e6f684cf893..be540d197d46 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/convert.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/convert.spec.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "@cockroachlabs/crdb-protobuf-client"; import { NanoToMilli, diff --git a/pkg/ui/workspaces/cluster-ui/src/util/convert.ts b/pkg/ui/workspaces/cluster-ui/src/util/convert.ts index 782a17368969..d43f93dcbbf0 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/convert.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/convert.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "@cockroachlabs/crdb-protobuf-client"; import { fromNumber } from "long"; diff --git a/pkg/ui/workspaces/cluster-ui/src/util/format.ts b/pkg/ui/workspaces/cluster-ui/src/util/format.ts index a9c67ca6161f..858697f0574b 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/format.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/format.ts @@ -8,6 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. +import moment from "moment-timezone"; import { longToInt } from "./fixLong"; export const kibi = 1024; @@ -191,9 +192,18 @@ export const DATE_WITH_SECONDS_AND_MILLISECONDS_FORMAT = */ export const DATE_FORMAT_24_UTC = "MMM DD, YYYY [at] H:mm UTC"; export const DATE_WITH_SECONDS_FORMAT_24_UTC = "MMM DD, YYYY [at] H:mm:ss UTC"; +export const DATE_WITH_SECONDS_FORMAT_24_TZ = "MMM DD, YYYY [at] H:mm:ss z"; export const DATE_WITH_SECONDS_AND_MILLISECONDS_FORMAT_24_UTC = "MMM DD, YYYY [at] H:mm:ss:ms UTC"; +export function FormatWithTimezone( + m: moment.Moment, + formatString = DATE_WITH_SECONDS_FORMAT_24_TZ, + timezone = "UTC", +): string { + return moment.tz(m, timezone).format(formatString); +} + export function RenderCount(yesCount: Long, totalCount: Long): string { if (longToInt(yesCount) == 0) { return "No"; diff --git a/pkg/ui/workspaces/cluster-ui/src/util/formatDate.ts b/pkg/ui/workspaces/cluster-ui/src/util/formatDate.ts index e88070e8b9ac..60ba34c7cfe3 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/formatDate.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/formatDate.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; export const dateFormat = "Y-MM-DD HH:mm:ss"; diff --git a/pkg/ui/workspaces/cluster-ui/src/util/hooks.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/util/hooks.spec.tsx index 0b34f1099a5a..d43fea551be4 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/hooks.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/util/hooks.spec.tsx @@ -17,7 +17,7 @@ import { fireEvent, waitFor, } from "@testing-library/react"; -import moment from "moment"; +import moment from "moment-timezone"; describe("useScheduleFunction", () => { let mockFn: jest.Mock; diff --git a/pkg/ui/workspaces/cluster-ui/src/util/sqlActivityConstants.ts b/pkg/ui/workspaces/cluster-ui/src/util/sqlActivityConstants.ts index 65b7fbe66069..494b924c98db 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/sqlActivityConstants.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/sqlActivityConstants.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import { duration } from "moment"; +import { duration } from "moment-timezone"; import { SqlStatsSortOptions, SqlStatsSortType } from "src/api/statementsApi"; export const limitOptions = [ diff --git a/pkg/ui/workspaces/cluster-ui/yarn.lock b/pkg/ui/workspaces/cluster-ui/yarn.lock index 162341d1e55b..2428fda10488 100644 --- a/pkg/ui/workspaces/cluster-ui/yarn.lock +++ b/pkg/ui/workspaces/cluster-ui/yarn.lock @@ -3583,6 +3583,23 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.2": + version "2.1.8-no-fsevents.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz#e324c0a247a5567192dd7180647709d7e2faf94b" + integrity sha512-Fb8WxUFOBQVl+CX4MWet5o7eCc6Pj04rXIwVKZ6h1NnqTo45eOQW6aWyhG25NIODvWFwTDMwBsYxrQ3imxpetg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^5.1.2" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://storage.googleapis.com/cockroach-npm-deps/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -5850,6 +5867,14 @@ antd@^3.25.2: shallowequal "^1.1.0" warning "~4.0.3" +anymatch@^2.0.0: + version "2.0.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + anymatch@^3.0.0: version "3.1.2" resolved "https://storage.googleapis.com/cockroach-npm-deps/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -6149,6 +6174,11 @@ astroturf@^0.10.2: postcss-nested "^4.1.1" resolve "^1.11.1" +async-each@^1.0.1: + version "1.0.6" + resolved "https://storage.googleapis.com/cockroach-npm-deps/async-each/-/async-each-1.0.6.tgz#52f1d9403818c179b7561e11a5d1b77eb2160e77" + integrity sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg== + async-validator@~1.11.3: version "1.11.5" resolved "https://storage.googleapis.com/cockroach-npm-deps/async-validator/-/async-validator-1.11.5.tgz#9d43cf49ef6bb76be5442388d19fb9a6e47597ea" @@ -6512,11 +6542,23 @@ big.js@^5.2.2: resolved "https://storage.googleapis.com/cockroach-npm-deps/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://storage.googleapis.com/cockroach-npm-deps/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bindings@^1.5.0: + version "1.5.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bluebird@^3.3.5: version "3.7.2" resolved "https://storage.googleapis.com/cockroach-npm-deps/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -6611,6 +6653,22 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +braces@^2.3.2: + version "2.3.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + braces@^3.0.1: version "3.0.2" resolved "https://storage.googleapis.com/cockroach-npm-deps/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -7169,6 +7227,49 @@ cheerio@^1.0.0-rc.3: normalize-path "~3.0.0" readdirp "~3.6.0" +chokidar@^2.1.8: + version "2.1.8" + resolved "https://storage.googleapis.com/cockroach-npm-deps/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + +chokidar@^3.4.0: + version "3.5.3" + resolved "https://storage.googleapis.com/cockroach-npm-deps/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + +chokidar@^3.4.1: + version "3.5.3" + resolved "https://storage.googleapis.com/cockroach-npm-deps/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + chokidar@^3.4.2: version "3.5.2" resolved "https://storage.googleapis.com/cockroach-npm-deps/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" @@ -7328,6 +7429,15 @@ cli-width@^3.0.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +clipboard@^2.0.0: + version "2.0.11" + resolved "https://storage.googleapis.com/cockroach-npm-deps/clipboard/-/clipboard-2.0.11.tgz#62180360b97dd668b6b3a84ec226975762a70be5" + integrity sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw== + dependencies: + good-listener "^1.2.2" + select "^1.1.2" + tiny-emitter "^2.0.0" + cliui@^5.0.0: version "5.0.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -7427,6 +7537,11 @@ colorette@^1.2.2: resolved "https://storage.googleapis.com/cockroach-npm-deps/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== +colors@^1.1.2: + version "1.4.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + combined-stream@^1.0.8: version "1.0.8" resolved "https://storage.googleapis.com/cockroach-npm-deps/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -8376,6 +8491,11 @@ delayed-stream@~1.0.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +delegate@^3.1.2: + version "3.2.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" + integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== + delegates@^1.0.0: version "1.0.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -8933,6 +9053,13 @@ enzyme@^3.11.0: rst-selector-parser "^2.2.3" string.prototype.trim "^1.2.1" +errno@^0.1.1: + version "0.1.8" + resolved "https://storage.googleapis.com/cockroach-npm-deps/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + errno@^0.1.3: version "0.1.8" resolved "https://storage.googleapis.com/cockroach-npm-deps/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" @@ -9138,6 +9265,76 @@ es6-shim@^0.35.5: resolved "https://storage.googleapis.com/cockroach-npm-deps/es6-shim/-/es6-shim-0.35.6.tgz#d10578301a83af2de58b9eadb7c2c9945f7388a0" integrity sha512-EmTr31wppcaIAgblChZiuN/l9Y7DPyw8Xtbg7fIVngn6zMW+IEBJDJngeKC3x6wr0V/vcA2wqeFnaw1bFJbDdA== +esbuild-android-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-android-64/-/esbuild-android-64-0.14.43.tgz#59bf3edad6863c27aa92bbb5c1d83a9a5c981495" + integrity sha512-kqFXAS72K6cNrB6RiM7YJ5lNvmWRDSlpi7ZuRZ1hu1S3w0zlwcoCxWAyM23LQUyZSs1PbjHgdbbfYAN8IGh6xg== + +esbuild-android-arm64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-android-arm64/-/esbuild-android-arm64-0.14.43.tgz#0258704edf92ce2463af6d2900b844b5423bed63" + integrity sha512-bKS2BBFh+7XZY9rpjiHGRNA7LvWYbZWP87pLehggTG7tTaCDvj8qQGOU/OZSjCSKDYbgY7Q+oDw8RlYQ2Jt2BA== + +esbuild-darwin-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-darwin-64/-/esbuild-darwin-64-0.14.43.tgz#72a47295678d4aa0656979baa8cf6d5c8c92656f" + integrity sha512-/3PSilx011ttoieRGkSZ0XV8zjBf2C9enV4ScMMbCT4dpx0mFhMOpFnCHkOK0pWGB8LklykFyHrWk2z6DENVUg== + +esbuild-darwin-arm64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.43.tgz#5f5823170b8d85b888957f0794e186caac447aca" + integrity sha512-1HyFUKs8DMCBOvw1Qxpr5Vv/ThNcVIFb5xgXWK3pyT40WPvgYIiRTwJCvNs4l8i5qWF8/CK5bQxJVDjQvtv0Yw== + +esbuild-freebsd-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.43.tgz#e4a48b08181053837e6cd9bda19ae0af94d493b0" + integrity sha512-FNWc05TPHYgaXjbPZO5/rJKSBslfG6BeMSs8GhwnqAKP56eEhvmzwnIz1QcC9cRVyO+IKqWNfmHFkCa1WJTULA== + +esbuild-freebsd-arm64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.43.tgz#386e780d36c1dedf3a1cdab79e0bbacd873274e6" + integrity sha512-amrYopclz3VohqisOPR6hA3GOWA3LZC1WDLnp21RhNmoERmJ/vLnOpnrG2P/Zao+/erKTCUqmrCIPVtj58DRoA== + +esbuild-linux-32@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-32/-/esbuild-linux-32-0.14.43.tgz#040ed6b9ebf06d73acdf2acce7f1cd0c12fbc6a5" + integrity sha512-KoxoEra+9O3AKVvgDFvDkiuddCds6q71owSQEYwjtqRV7RwbPzKxJa6+uyzUulHcyGVq0g15K0oKG5CFBcvYDw== + +esbuild-linux-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-64/-/esbuild-linux-64-0.14.43.tgz#8abbb7594ab6a008f2aae72d95d8a4fdc59d9000" + integrity sha512-EwINwGMyiJMgBby5/SbMqKcUhS5AYAZ2CpEBzSowsJPNBJEdhkCTtEjk757TN/wxgbu3QklqDM6KghY660QCUw== + +esbuild-linux-arm64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.43.tgz#4e8e9ce77cbf7efec65e79e512b3d2fbd2da398f" + integrity sha512-UlSpjMWllAc70zYbHxWuDS3FJytyuR/gHJYBr8BICcTNb/TSOYVBg6U7b3jZ3mILTrgzwJUHwhEwK18FZDouUQ== + +esbuild-linux-arm@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-arm/-/esbuild-linux-arm-0.14.43.tgz#9e41ee5e099c0ffdfd150da154330c2c0226cc96" + integrity sha512-e6YzQUoDxxtyamuF12eVzzRC7bbEFSZohJ6igQB9tBqnNmIQY3fI6Cns3z2wxtbZ3f2o6idkD2fQnlvs2902Dg== + +esbuild-linux-mips64le@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.43.tgz#4b41f465a787f91cc4fe7dffa0dcabf655935a1a" + integrity sha512-f+v8cInPEL1/SDP//CfSYzcDNgE4CY3xgDV81DWm3KAPWzhvxARrKxB1Pstf5mB56yAslJDxu7ryBUPX207EZA== + +esbuild-linux-ppc64le@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.43.tgz#ca15934f5b46728dd9ac05270e783e7feaca9eaf" + integrity sha512-5wZYMDGAL/K2pqkdIsW+I4IR41kyfHr/QshJcNpUfK3RjB3VQcPWOaZmc+74rm4ZjVirYrtz+jWw0SgxtxRanA== + +esbuild-linux-riscv64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.43.tgz#70fce2b5a0605a67e58b5a357b0e00be1029836d" + integrity sha512-lYcAOUxp85hC7lSjycJUVSmj4/9oEfSyXjb/ua9bNl8afonaduuqtw7hvKMoKuYnVwOCDw4RSfKpcnIRDWq+Bw== + +esbuild-linux-s390x@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.43.tgz#318d03b4f4ccc7fa44ac7562121cf4a4529e477a" + integrity sha512-27e43ZhHvhFE4nM7HqtUbMRu37I/4eNSUbb8FGZWszV+uLzMIsHDwLoBiJmw7G9N+hrehNPeQ4F5Ujad0DrUKQ== + esbuild-loader@^2.19.0: version "2.19.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-loader/-/esbuild-loader-2.19.0.tgz#54f62d1da8262acfc3c5883c24da35af8324f116" @@ -9150,6 +9347,36 @@ esbuild-loader@^2.19.0: tapable "^2.2.0" webpack-sources "^2.2.0" +esbuild-netbsd-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.43.tgz#86130ce204ef0162a96e863b55851efecc92f423" + integrity sha512-2mH4QF6hHBn5zzAfxEI/2eBC0mspVsZ6UVo821LpAJKMvLJPBk3XJO5xwg7paDqSqpl7p6IRrAenW999AEfJhQ== + +esbuild-openbsd-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.43.tgz#0229dc2db2ded97b03bb93bba7646b30ffdf5d0d" + integrity sha512-ZhQpiZjvqCqO8jKdGp9+8k9E/EHSA+zIWOg+grwZasI9RoblqJ1QiZqqi7jfd6ZrrG1UFBNGe4m0NFxCFbMVbg== + +esbuild-sunos-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-sunos-64/-/esbuild-sunos-64-0.14.43.tgz#17e316216eb9f1de25d52a9000356ae5b869e736" + integrity sha512-DgxSi9DaHReL9gYuul2rrQCAapgnCJkh3LSHPKsY26zytYppG0HgkgVF80zjIlvEsUbGBP/GHQzBtrezj/Zq1Q== + +esbuild-windows-32@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-windows-32/-/esbuild-windows-32-0.14.43.tgz#a173757bc6dfd0f2656ff40b64f7f9290745778e" + integrity sha512-Ih3+2O5oExiqm0mY6YYE5dR0o8+AspccQ3vIAtRodwFvhuyGLjb0Hbmzun/F3Lw19nuhPMu3sW2fqIJ5xBxByw== + +esbuild-windows-64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-windows-64/-/esbuild-windows-64-0.14.43.tgz#c447b23126aad158c4fe6a394342cafd97926ed1" + integrity sha512-8NsuNfI8xwFuJbrCuI+aBqNTYkrWErejFO5aYM+yHqyHuL8mmepLS9EPzAzk8rvfaJrhN0+RvKWAcymViHOKEw== + +esbuild-windows-arm64@0.14.43: + version "0.14.43" + resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.43.tgz#3caed1b430d394d7a7836407b9d36c4750246e76" + integrity sha512-7ZlD7bo++kVRblJEoG+cepljkfP8bfuTPz5fIXzptwnPaFwGS6ahvfoYzY7WCf5v/1nX2X02HDraVItTgbHnKw== + esbuild@0.14.43: version "0.14.43" resolved "https://storage.googleapis.com/cockroach-npm-deps/esbuild/-/esbuild-0.14.43.tgz#c227d585c512d3e0f23b88f50b8e16501147f647" @@ -9774,6 +10001,11 @@ file-system-cache@^1.0.5: fs-extra "^0.30.0" ramda "^0.21.0" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + filesize@6.1.0: version "6.1.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" @@ -10095,6 +10327,24 @@ fs.realpath@^1.0.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@^1.2.7: + version "1.2.13" + resolved "https://storage.googleapis.com/cockroach-npm-deps/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@^2.3.2: + version "2.3.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + fsm-iterator@^1.1.0: version "1.1.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/fsm-iterator/-/fsm-iterator-1.1.0.tgz#337de45de19eb205788cf02e3a955ec206760dec" @@ -10494,11 +10744,23 @@ globby@^9.2.0: pify "^4.0.1" slash "^2.0.0" +good-listener@^1.2.2: + version "1.2.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" + integrity sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw== + dependencies: + delegate "^3.1.2" + google-protobuf@^3.6.1: version "3.18.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/google-protobuf/-/google-protobuf-3.18.0.tgz#687449d8e858305d658dc1145852c306d8222f5a" integrity sha512-WlaQWRkUOo/lm9uTgNH6nk9IQt814RggWPzKBfnAVewOFzSzRUSmS1yUWRT6ixW1vS7er5p6tmLSmwzpPpmc8A== +graceful-fs@^4.1.11: + version "4.2.11" + resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.1.15: version "4.2.6" resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" @@ -10509,6 +10771,16 @@ graceful-fs@^4.1.2: resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== +graceful-fs@^4.1.6: + version "4.2.11" + resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graceful-fs@^4.1.9: + version "4.2.11" + resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.2.0: version "4.2.6" resolved "https://storage.googleapis.com/cockroach-npm-deps/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" @@ -11020,6 +11292,11 @@ ignore@^5.2.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +image-size@~0.5.0: + version "0.5.5" + resolved "https://storage.googleapis.com/cockroach-npm-deps/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== + immer@8.0.1: version "8.0.1" resolved "https://storage.googleapis.com/cockroach-npm-deps/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" @@ -11035,6 +11312,11 @@ immutable@^3.7.4: resolved "https://storage.googleapis.com/cockroach-npm-deps/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= +"immutable@^3.8.1 || ^4.0.0-rc.1": + version "4.3.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" + integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== + immutable@~3.7.4: version "3.7.6" resolved "https://storage.googleapis.com/cockroach-npm-deps/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" @@ -11323,6 +11605,13 @@ is-bigint@^1.0.1: resolved "https://storage.googleapis.com/cockroach-npm-deps/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://storage.googleapis.com/cockroach-npm-deps/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q== + dependencies: + binary-extensions "^1.0.0" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -13242,6 +13531,25 @@ micromatch@^3.1.10: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^3.1.4: + version "3.1.10" + resolved "https://storage.googleapis.com/cockroach-npm-deps/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + micromatch@^4.0.2: version "4.0.4" resolved "https://storage.googleapis.com/cockroach-npm-deps/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" @@ -13302,6 +13610,11 @@ mime@1.6.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mime@^1.4.1: + version "1.6.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mime@^2.4.4: version "2.5.2" resolved "https://storage.googleapis.com/cockroach-npm-deps/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" @@ -13486,6 +13799,13 @@ moment-locales-webpack-plugin@^1.2.0: dependencies: lodash.difference "^4.5.0" +moment-timezone@^0.5.42: + version "0.5.42" + resolved "https://storage.googleapis.com/cockroach-npm-deps/moment-timezone/-/moment-timezone-0.5.42.tgz#c59f2aa00442d0dcd1d258d2182873d637b4e17b" + integrity sha512-tjI9goqwzkflKSTxJo+jC/W8riTFwEjjunssmFvAWlvNVApjbkJM7UHggyKO0q1Fd/kZVKY77H7C9A0XKhhAFw== + dependencies: + moment "^2.29.4" + moment@2.x: version "2.29.1" resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" @@ -13496,6 +13816,11 @@ moment@^2.24.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== +moment@^2.29.4: + version "2.29.4" + resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + moo-color@^1.0.2: version "1.0.3" resolved "https://storage.googleapis.com/cockroach-npm-deps/moo-color/-/moo-color-1.0.3.tgz#d56435f8359c8284d83ac58016df7427febece74" @@ -13550,6 +13875,11 @@ mute-stream@0.0.8: resolved "https://storage.googleapis.com/cockroach-npm-deps/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nan@^2.12.1: + version "2.17.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" + integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== + nanomatch@^1.2.9: version "1.2.13" resolved "https://storage.googleapis.com/cockroach-npm-deps/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -13567,6 +13897,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +native-request@^1.0.5: + version "1.1.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/native-request/-/native-request-1.1.0.tgz#acdb30fe2eefa3e1bc8c54b3a6852e9c5c0d3cb0" + integrity sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw== + native-url@^0.2.6: version "0.2.6" resolved "https://storage.googleapis.com/cockroach-npm-deps/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae" @@ -13752,6 +14087,13 @@ normalize-package-data@^2.5.0: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://storage.googleapis.com/cockroach-npm-deps/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== + dependencies: + remove-trailing-separator "^1.0.1" + normalize-path@^3.0.0: version "3.0.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -16623,6 +16965,15 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readdirp@^2.2.1: + version "2.2.1" + resolved "https://storage.googleapis.com/cockroach-npm-deps/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + readdirp@~3.6.0: version "3.6.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -16888,6 +17239,11 @@ remark-squeeze-paragraphs@4.0.0: dependencies: mdast-squeeze-paragraphs "^4.0.0" +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== + renderkid@^2.0.4: version "2.0.7" resolved "https://storage.googleapis.com/cockroach-npm-deps/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" @@ -17360,6 +17716,16 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" +seamless-immutable@^7.1.3: + version "7.1.4" + resolved "https://storage.googleapis.com/cockroach-npm-deps/seamless-immutable/-/seamless-immutable-7.1.4.tgz#6e9536def083ddc4dea0207d722e0e80d0f372f8" + integrity sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A== + +select@^1.1.2: + version "1.1.2" + resolved "https://storage.googleapis.com/cockroach-npm-deps/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" + integrity sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA== + "semver@2 || 3 || 4 || 5": version "5.7.1" resolved "https://storage.googleapis.com/cockroach-npm-deps/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -18533,6 +18899,11 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tiny-emitter@^2.0.0: + version "2.1.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" + integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== + tiny-invariant@^1.0.2: version "1.2.0" resolved "https://storage.googleapis.com/cockroach-npm-deps/tiny-invariant/-/tiny-invariant-1.2.0.tgz#a1141f86b672a9148c72e978a19a73b9b94a15a9" @@ -19039,6 +19410,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +upath@^1.1.1: + version "1.2.0" + resolved "https://storage.googleapis.com/cockroach-npm-deps/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + uplot@^1.6.19: version "1.6.19" resolved "https://storage.googleapis.com/cockroach-npm-deps/uplot/-/uplot-1.6.19.tgz#98f461992a3f7f3bda7a62f4a028b8afa8da7942" @@ -19311,6 +19687,13 @@ warning@~4.0.3: dependencies: loose-envify "^1.0.0" +watchpack-chokidar2@^2.0.1: + version "2.0.1" + resolved "https://storage.googleapis.com/cockroach-npm-deps/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" + integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== + dependencies: + chokidar "^2.1.8" + watchpack@^1.7.4: version "1.7.5" resolved "https://storage.googleapis.com/cockroach-npm-deps/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" diff --git a/pkg/ui/workspaces/db-console/BUILD.bazel b/pkg/ui/workspaces/db-console/BUILD.bazel index f4898591dbdc..b181542a047d 100644 --- a/pkg/ui/workspaces/db-console/BUILD.bazel +++ b/pkg/ui/workspaces/db-console/BUILD.bazel @@ -141,6 +141,7 @@ DEPENDENCIES = [ "@npm_db_console//list.js", "@npm_db_console//mini-create-react-context", "@npm_db_console//moment", + "@npm_db_console//moment-timezone", "@npm_db_console//nvd3", "@npm_db_console//popper.js", "@npm_db_console//raw-loader", @@ -307,6 +308,7 @@ tsc_test( "@npm_db_console//connected-react-router", "@npm_db_console//highlight.js", "@npm_db_console//moment", + "@npm_db_console//moment-timezone", "@npm_db_console//protobufjs", "@npm_db_console//redux", "@npm_db_console//redux-saga", diff --git a/pkg/ui/workspaces/db-console/ccl/src/views/clusterviz/containers/map/nodeView.tsx b/pkg/ui/workspaces/db-console/ccl/src/views/clusterviz/containers/map/nodeView.tsx index 832f244d100e..b7cad0659c22 100644 --- a/pkg/ui/workspaces/db-console/ccl/src/views/clusterviz/containers/map/nodeView.tsx +++ b/pkg/ui/workspaces/db-console/ccl/src/views/clusterviz/containers/map/nodeView.tsx @@ -7,7 +7,7 @@ // https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt import React from "react"; -import moment from "moment"; +import moment from "moment-timezone"; import { Link } from "react-router-dom"; import { INodeStatus } from "src/util/proto"; diff --git a/pkg/ui/workspaces/db-console/ccl/src/views/reports/containers/stores/encryption.tsx b/pkg/ui/workspaces/db-console/ccl/src/views/reports/containers/stores/encryption.tsx index a8fd1a87f951..16f75eaf9abf 100644 --- a/pkg/ui/workspaces/db-console/ccl/src/views/reports/containers/stores/encryption.tsx +++ b/pkg/ui/workspaces/db-console/ccl/src/views/reports/containers/stores/encryption.tsx @@ -9,7 +9,7 @@ import React from "react"; import _ from "lodash"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "src/js/protos"; import * as protosccl from "@cockroachlabs/crdb-protobuf-client-ccl"; diff --git a/pkg/ui/workspaces/db-console/package.json b/pkg/ui/workspaces/db-console/package.json index f2111db5cb4e..11b6231c1dd3 100644 --- a/pkg/ui/workspaces/db-console/package.json +++ b/pkg/ui/workspaces/db-console/package.json @@ -35,6 +35,7 @@ "long": "^4.0.0", "mini-create-react-context": "^0.3.2", "moment": "^2.19.3", + "moment-timezone": "^0.5.42", "nvd3": "^1.8.5", "popper.js": "^1.14.4", "raw-loader": "^0.5.1", diff --git a/pkg/ui/workspaces/db-console/src/app.tsx b/pkg/ui/workspaces/db-console/src/app.tsx index b126b6b64955..69f9703ce6fc 100644 --- a/pkg/ui/workspaces/db-console/src/app.tsx +++ b/pkg/ui/workspaces/db-console/src/app.tsx @@ -86,6 +86,7 @@ import StatementInsightDetailsPage from "./views/insights/statementInsightDetail import { CockroachCloudContext } from "@cockroachlabs/cluster-ui"; import { SnapshotRouter } from "src/views/tracez_v2/snapshotRoutes"; import KeyVisualizerPage from "src/views/keyVisualizer"; +import { TimezoneProvider } from "src/contexts/timezoneProvider"; // NOTE: If you are adding a new path to the router, and that path contains any // components that are personally identifying information, you MUST update the @@ -109,349 +110,363 @@ export const App: React.FC = (props: AppProps) => { - - {/* login */} - {createLoginRoute()} - {createLogoutRoute(store)} - - - - - {/* overview page */} - {visualizationRoutes()} + + + {/* login */} + {createLoginRoute()} + {createLogoutRoute(store)} + + + + + {/* overview page */} + {visualizationRoutes()} - {/* time series metrics */} - - - - - + {/* time series metrics */} + + + + + - {/* node details */} - - - + {/* node details */} + + + - {/* events & jobs */} - - - + {/* events & jobs */} + + + - - + + - {/* databases */} - - - - + {/* databases */} + + + + - - - - - - + + + + + + - {/* data distribution */} - + {/* data distribution */} + - {/* SQL activity */} - + {/* SQL activity */} + - {/* Active executions */} - + {/* Active executions */} + - + - {/* statement statistics */} - - - - - - - - - + {/* statement statistics */} + + + + + + + + + - {/* sessions */} - - + {/* sessions */} + + - {/* transactions */} - - - + {/* transactions */} + + + - {/* Insights */} - - - + {/* Insights */} + + + - {/* debug pages */} - - - - - - - - - - - - - - - - - - + {/* debug pages */} + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - {/* hot ranges */} - - {/* old route redirects */} - - - - - - - + + + + + + + + + + + + + {/* hot ranges */} + + {/* old route redirects */} + + + + + + + - + - {/* 404 */} - - - - - + {/* 404 */} + + + + + + diff --git a/pkg/ui/workspaces/db-console/src/components/rangeCalendar/dateRangeLabel.tsx b/pkg/ui/workspaces/db-console/src/components/rangeCalendar/dateRangeLabel.tsx index 6d9ad90a3dbf..bf6cbdb8e5e5 100644 --- a/pkg/ui/workspaces/db-console/src/components/rangeCalendar/dateRangeLabel.tsx +++ b/pkg/ui/workspaces/db-console/src/components/rangeCalendar/dateRangeLabel.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import React from "react"; -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import { Text, TextTypes } from "src/components"; export interface DateRangeLabelProps { diff --git a/pkg/ui/workspaces/db-console/src/contexts/timezoneProvider.tsx b/pkg/ui/workspaces/db-console/src/contexts/timezoneProvider.tsx new file mode 100644 index 000000000000..8eee33abbb50 --- /dev/null +++ b/pkg/ui/workspaces/db-console/src/contexts/timezoneProvider.tsx @@ -0,0 +1,35 @@ +// Copyright 2023 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +import React, { useEffect } from "react"; +import { useDispatch, useSelector } from "react-redux"; +import { + selectClusterSettings, + selectTimezoneSetting, +} from "src/redux/clusterSettings"; +import { refreshSettings } from "src/redux/apiReducers"; +import { TimezoneContext } from "@cockroachlabs/cluster-ui"; + +export const TimezoneProvider = (props: any) => { + // Refresh cluster settings if needed + const dispatch = useDispatch(); + const settings = useSelector(selectClusterSettings); + useEffect(() => { + dispatch(refreshSettings()); + }, [settings, dispatch]); + + // Grab the timezone value from the store, and pass it to our context. + const timezone = useSelector(selectTimezoneSetting); + return ( + + {props.children} + + ); +}; diff --git a/pkg/ui/workspaces/db-console/src/redux/alerts.spec.ts b/pkg/ui/workspaces/db-console/src/redux/alerts.spec.ts index 2a4ac0b7f386..ed8ec55b89b3 100644 --- a/pkg/ui/workspaces/db-console/src/redux/alerts.spec.ts +++ b/pkg/ui/workspaces/db-console/src/redux/alerts.spec.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import { Store } from "redux"; -import moment from "moment"; +import moment from "moment-timezone"; import { createHashHistory } from "history"; import * as protos from "src/js/protos"; diff --git a/pkg/ui/workspaces/db-console/src/redux/alerts.ts b/pkg/ui/workspaces/db-console/src/redux/alerts.ts index 3f95346c2783..9a8102d64f1f 100644 --- a/pkg/ui/workspaces/db-console/src/redux/alerts.ts +++ b/pkg/ui/workspaces/db-console/src/redux/alerts.ts @@ -14,7 +14,7 @@ */ import _ from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import { createSelector } from "reselect"; import { Store, Dispatch, Action, AnyAction } from "redux"; import { ThunkAction } from "redux-thunk"; diff --git a/pkg/ui/workspaces/db-console/src/redux/apiReducers.ts b/pkg/ui/workspaces/db-console/src/redux/apiReducers.ts index 1e1a39c6bd5f..176e4c0f744f 100644 --- a/pkg/ui/workspaces/db-console/src/redux/apiReducers.ts +++ b/pkg/ui/workspaces/db-console/src/redux/apiReducers.ts @@ -11,7 +11,7 @@ import _ from "lodash"; import { Action, combineReducers } from "redux"; import { ThunkAction, ThunkDispatch } from "redux-thunk"; -import moment from "moment"; +import moment from "moment-timezone"; import { api as clusterUiApi, util, diff --git a/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.spec.ts b/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.spec.ts index b23ddaa84361..7d5b33af3bfb 100644 --- a/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.spec.ts +++ b/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.spec.ts @@ -10,7 +10,7 @@ import _ from "lodash"; import { Action } from "redux"; -import moment from "moment"; +import moment from "moment-timezone"; import { CachedDataReducer, CachedDataReducerState, diff --git a/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.ts b/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.ts index 98d5557f6a22..c3ec3d75acbc 100644 --- a/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.ts +++ b/pkg/ui/workspaces/db-console/src/redux/cachedDataReducer.ts @@ -17,7 +17,7 @@ import _ from "lodash"; import { Action } from "redux"; import assert from "assert"; -import moment from "moment"; +import moment from "moment-timezone"; import { push } from "connected-react-router"; import { ThunkAction, ThunkDispatch } from "redux-thunk"; diff --git a/pkg/ui/workspaces/db-console/src/redux/clusterSettings/clusterSettings.selectors.ts b/pkg/ui/workspaces/db-console/src/redux/clusterSettings/clusterSettings.selectors.ts index efb446a5bed4..d84a33d5b815 100644 --- a/pkg/ui/workspaces/db-console/src/redux/clusterSettings/clusterSettings.selectors.ts +++ b/pkg/ui/workspaces/db-console/src/redux/clusterSettings/clusterSettings.selectors.ts @@ -11,7 +11,7 @@ import { createSelector } from "reselect"; import { AdminUIState } from "src/redux/state"; import { cockroach } from "src/js/protos"; -import moment from "moment"; +import moment from "moment-timezone"; import { util } from "@cockroachlabs/cluster-ui"; export const selectClusterSettings = createSelector( @@ -20,6 +20,17 @@ export const selectClusterSettings = createSelector( settings?.key_values, ); +export const selectTimezoneSetting = createSelector( + selectClusterSettings, + settings => { + if (!settings) { + return "UTC"; + } + const setting = settings["ui.display_timezone"]; + return setting ? setting.value : "UTC"; + }, +); + export const selectResolution10sStorageTTL = createSelector( selectClusterSettings, (settings): moment.Duration | undefined => { diff --git a/pkg/ui/workspaces/db-console/src/redux/hover.ts b/pkg/ui/workspaces/db-console/src/redux/hover.ts index 9ed725fc371b..8850b94bf811 100644 --- a/pkg/ui/workspaces/db-console/src/redux/hover.ts +++ b/pkg/ui/workspaces/db-console/src/redux/hover.ts @@ -12,7 +12,7 @@ * Monitors the currently hovered chart and point in time. */ -import moment from "moment"; +import moment from "moment-timezone"; import { Action } from "redux"; import { PayloadAction } from "src/interfaces/action"; diff --git a/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.spec.ts b/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.spec.ts index 9956baf49c09..52fe6e0edb55 100644 --- a/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.spec.ts +++ b/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.spec.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { managedQueryReducer, diff --git a/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.ts b/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.ts index 700b910c0327..c85aaaae0618 100644 --- a/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.ts +++ b/pkg/ui/workspaces/db-console/src/redux/queryManager/reducer.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { Action } from "redux"; import nextState from "src/util/nextState"; diff --git a/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.spec.ts b/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.spec.ts index 83c9f067b881..fdbb0ff68cc1 100644 --- a/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.spec.ts +++ b/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.spec.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { channel } from "redux-saga"; import { delay, call } from "redux-saga/effects"; diff --git a/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.ts b/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.ts index 20e3c557e9d0..b302f9c7df7b 100644 --- a/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.ts +++ b/pkg/ui/workspaces/db-console/src/redux/queryManager/saga.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import { Action } from "redux"; import { channel, Task, Channel } from "redux-saga"; import { diff --git a/pkg/ui/workspaces/db-console/src/redux/statements/statementsSelectors.ts b/pkg/ui/workspaces/db-console/src/redux/statements/statementsSelectors.ts index 88a5802cf0ba..7f4d5c97d5ee 100644 --- a/pkg/ui/workspaces/db-console/src/redux/statements/statementsSelectors.ts +++ b/pkg/ui/workspaces/db-console/src/redux/statements/statementsSelectors.ts @@ -12,7 +12,7 @@ import { chain, orderBy } from "lodash"; import { createSelector } from "reselect"; import { AdminUIState } from "src/redux/state"; import { api as clusterUiApi } from "@cockroachlabs/cluster-ui"; -import moment from "moment"; +import moment from "moment-timezone"; export const selectStatementByFingerprint = createSelector( (state: AdminUIState) => state.cachedData.statements.data?.statements, diff --git a/pkg/ui/workspaces/db-console/src/redux/timeScale.spec.ts b/pkg/ui/workspaces/db-console/src/redux/timeScale.spec.ts index 289a3bb5a22d..e3eaa4409bf0 100644 --- a/pkg/ui/workspaces/db-console/src/redux/timeScale.spec.ts +++ b/pkg/ui/workspaces/db-console/src/redux/timeScale.spec.ts @@ -10,7 +10,7 @@ import { defaultTimeScaleOptions, TimeScale } from "@cockroachlabs/cluster-ui"; import * as timeScale from "./timeScale"; -import moment from "moment"; +import moment from "moment-timezone"; describe("time scale reducer", function () { describe("actions", function () { diff --git a/pkg/ui/workspaces/db-console/src/redux/timeScale.ts b/pkg/ui/workspaces/db-console/src/redux/timeScale.ts index 576f3e9fb527..f67815189a85 100644 --- a/pkg/ui/workspaces/db-console/src/redux/timeScale.ts +++ b/pkg/ui/workspaces/db-console/src/redux/timeScale.ts @@ -18,7 +18,7 @@ import { put, takeEvery, all } from "redux-saga/effects"; import { PayloadAction } from "src/interfaces/action"; import _ from "lodash"; import { defaultTimeScaleOptions, TimeScale } from "@cockroachlabs/cluster-ui"; -import moment from "moment"; +import moment from "moment-timezone"; import { createSelector } from "reselect"; import { AdminUIState } from "src/redux/state"; import { diff --git a/pkg/ui/workspaces/db-console/src/util/api.spec.ts b/pkg/ui/workspaces/db-console/src/util/api.spec.ts index 1ee05efb8dab..e53fb4a55498 100644 --- a/pkg/ui/workspaces/db-console/src/util/api.spec.ts +++ b/pkg/ui/workspaces/db-console/src/util/api.spec.ts @@ -9,7 +9,7 @@ // licenses/APL.txt. import _ from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import Long from "long"; import fetchMock from "./fetch-mock"; diff --git a/pkg/ui/workspaces/db-console/src/util/api.ts b/pkg/ui/workspaces/db-console/src/util/api.ts index b51f7c43fdbc..a64fbf0db5db 100644 --- a/pkg/ui/workspaces/db-console/src/util/api.ts +++ b/pkg/ui/workspaces/db-console/src/util/api.ts @@ -13,7 +13,7 @@ */ import _ from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "src/js/protos"; import { FixLong } from "src/util/fixLong"; diff --git a/pkg/ui/workspaces/db-console/src/util/cockroachlabsAPI.ts b/pkg/ui/workspaces/db-console/src/util/cockroachlabsAPI.ts index 2967359b75e4..c161a81ad1d5 100644 --- a/pkg/ui/workspaces/db-console/src/util/cockroachlabsAPI.ts +++ b/pkg/ui/workspaces/db-console/src/util/cockroachlabsAPI.ts @@ -12,7 +12,7 @@ * This module contains all the REST endpoints for communicating with the admin UI. */ -import moment from "moment"; +import moment from "moment-timezone"; import { VersionList, VersionCheckRequest } from "src/interfaces/cockroachlabs"; import { withTimeout } from "./api"; diff --git a/pkg/ui/workspaces/db-console/src/util/fakeApi.ts b/pkg/ui/workspaces/db-console/src/util/fakeApi.ts index 8954391d9b26..cf640e01e451 100644 --- a/pkg/ui/workspaces/db-console/src/util/fakeApi.ts +++ b/pkg/ui/workspaces/db-console/src/util/fakeApi.ts @@ -14,7 +14,7 @@ import { api as clusterUiApi } from "@cockroachlabs/cluster-ui"; import { cockroach } from "src/js/protos"; import { API_PREFIX, STATUS_PREFIX } from "src/util/api"; import fetchMock from "src/util/fetch-mock"; -import moment from "moment"; +import moment from "moment-timezone"; const { SettingsResponse, diff --git a/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/index.tsx b/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/index.tsx index 78433f318ee8..a0f456f19e28 100644 --- a/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/index.tsx @@ -10,7 +10,7 @@ import React from "react"; import { connect } from "react-redux"; -import moment from "moment"; +import moment from "moment-timezone"; import { AdminUIState } from "src/redux/state"; import * as timewindow from "src/redux/timeScale"; diff --git a/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/metricsTimeManager.spec.tsx b/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/metricsTimeManager.spec.tsx index 9060531b8731..cee80556c302 100644 --- a/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/metricsTimeManager.spec.tsx +++ b/pkg/ui/workspaces/db-console/src/views/app/containers/metricsTimeManager/metricsTimeManager.spec.tsx @@ -10,7 +10,7 @@ import React from "react"; import { shallow } from "enzyme"; -import moment from "moment"; +import moment from "moment-timezone"; import _ from "lodash"; import { MetricsTimeManagerUnconnected as MetricsTimeManager } from "./"; diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/components/linegraph/index.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/components/linegraph/index.tsx index d0db7ef15182..f322073f7c86 100644 --- a/pkg/ui/workspaces/db-console/src/views/cluster/components/linegraph/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/cluster/components/linegraph/index.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import React from "react"; -import moment from "moment"; +import moment from "moment-timezone"; import { createSelector } from "reselect"; import { hoverOff, hoverOn, HoverState } from "src/redux/hover"; diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/events/index.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/events/index.tsx index 1c5bab561d93..453223667a95 100644 --- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/events/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/events/index.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import _ from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { Helmet } from "react-helmet"; import { Link, RouteComponentProps, withRouter } from "react-router-dom"; diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/index.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/index.tsx index 40a7f140eb1f..eac94f6d0625 100644 --- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/index.tsx @@ -81,7 +81,7 @@ import { TimeScale, } from "@cockroachlabs/cluster-ui"; import { reduceStorageOfTimeSeriesDataOperationalFlags } from "src/util/docs"; -import moment from "moment"; +import moment from "moment-timezone"; import { selectResolution10sStorageTTL, selectResolution30mStorageTTL, diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodesOverview/index.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodesOverview/index.tsx index df5465defd37..14171645f03e 100644 --- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodesOverview/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodesOverview/index.tsx @@ -11,7 +11,7 @@ import React from "react"; import { Link } from "react-router-dom"; import { connect } from "react-redux"; -import moment, { Moment } from "moment"; +import moment, { Moment } from "moment-timezone"; import { createSelector } from "reselect"; import _ from "lodash"; diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/timeScaleDropdownWithSearchParams/index.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/timeScaleDropdownWithSearchParams/index.tsx index 2106692fd979..2f08dca892fb 100644 --- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/timeScaleDropdownWithSearchParams/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/timeScaleDropdownWithSearchParams/index.tsx @@ -22,7 +22,7 @@ import { findClosestTimeScale, } from "@cockroachlabs/cluster-ui"; import { createSelector } from "reselect"; -import moment from "moment"; +import moment from "moment-timezone"; // The time scale dropdown from cluster-ui that updates route params as // options are selected. diff --git a/pkg/ui/workspaces/db-console/src/views/databases/databaseDetailsPage/redux.spec.ts b/pkg/ui/workspaces/db-console/src/views/databases/databaseDetailsPage/redux.spec.ts index c14da8130dbe..9e2a98f22636 100644 --- a/pkg/ui/workspaces/db-console/src/views/databases/databaseDetailsPage/redux.spec.ts +++ b/pkg/ui/workspaces/db-console/src/views/databases/databaseDetailsPage/redux.spec.ts @@ -25,7 +25,7 @@ import { AdminUIState, createAdminUIStore } from "src/redux/state"; import { databaseNameAttr } from "src/util/constants"; import * as fakeApi from "src/util/fakeApi"; import { mapStateToProps, mapDispatchToProps } from "./redux"; -import moment from "moment"; +import moment from "moment-timezone"; function fakeRouteComponentProps( key: string, diff --git a/pkg/ui/workspaces/db-console/src/views/databases/databaseTablePage/redux.spec.ts b/pkg/ui/workspaces/db-console/src/views/databases/databaseTablePage/redux.spec.ts index f42e1970bd0f..731652833fdf 100644 --- a/pkg/ui/workspaces/db-console/src/views/databases/databaseTablePage/redux.spec.ts +++ b/pkg/ui/workspaces/db-console/src/views/databases/databaseTablePage/redux.spec.ts @@ -26,7 +26,7 @@ import { databaseNameAttr, tableNameAttr } from "src/util/constants"; import * as fakeApi from "src/util/fakeApi"; import { mapStateToProps, mapDispatchToProps } from "./redux"; import { makeTimestamp } from "src/views/databases/utils"; -import moment from "moment"; +import moment from "moment-timezone"; function fakeRouteComponentProps( k1: string, diff --git a/pkg/ui/workspaces/db-console/src/views/databases/indexDetailsPage/redux.spec.ts b/pkg/ui/workspaces/db-console/src/views/databases/indexDetailsPage/redux.spec.ts index fb9a7b0dd4ee..083a3a037ab4 100644 --- a/pkg/ui/workspaces/db-console/src/views/databases/indexDetailsPage/redux.spec.ts +++ b/pkg/ui/workspaces/db-console/src/views/databases/indexDetailsPage/redux.spec.ts @@ -27,7 +27,7 @@ import { } from "src/util/constants"; import * as fakeApi from "src/util/fakeApi"; import { mapStateToProps, mapDispatchToProps } from "./redux"; -import moment from "moment"; +import moment from "moment-timezone"; import { makeTimestamp } from "src/views/databases/utils"; function fakeRouteComponentProps( diff --git a/pkg/ui/workspaces/db-console/src/views/keyVisualizer/timeWindow.tsx b/pkg/ui/workspaces/db-console/src/views/keyVisualizer/timeWindow.tsx index 2bccede57db8..5fdc7d072151 100644 --- a/pkg/ui/workspaces/db-console/src/views/keyVisualizer/timeWindow.tsx +++ b/pkg/ui/workspaces/db-console/src/views/keyVisualizer/timeWindow.tsx @@ -11,7 +11,7 @@ import React from "react"; import { TimeScaleOptions } from "@cockroachlabs/cluster-ui"; import TimeScaleDropdown from "src/views/cluster/containers/timeScaleDropdownWithSearchParams"; -import moment from "moment"; +import moment from "moment-timezone"; export const KeyVisualizerTimeWindow = () => { const keyVisualizerTimeScaleOptions: TimeScaleOptions = { diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/enqueueRange/index.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/enqueueRange/index.tsx index 47bd9dda766e..e6422ab81c52 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/enqueueRange/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/enqueueRange/index.tsx @@ -11,7 +11,7 @@ import React, { Fragment } from "react"; import Helmet from "react-helmet"; import { RouteComponentProps, withRouter } from "react-router-dom"; -import moment from "moment"; +import moment from "moment-timezone"; import { enqueueRange } from "src/util/api"; import { cockroach } from "src/js/protos"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/hotranges/index.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/hotranges/index.tsx index 4533a36b31c8..59ee443f03b0 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/hotranges/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/hotranges/index.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useEffect, useState } from "react"; import { RouteComponentProps, withRouter } from "react-router-dom"; -import moment from "moment"; +import moment from "moment-timezone"; import { Button } from "@cockroachlabs/ui-components"; import { cockroach } from "src/js/protos"; import { getHotRanges } from "src/util/api"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/network/index.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/network/index.tsx index 6307c072922b..e079034dc189 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/network/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/network/index.tsx @@ -10,7 +10,7 @@ import { deviation as d3Deviation, mean as d3Mean } from "d3"; import _, { capitalize } from "lodash"; -import moment from "moment"; +import moment from "moment-timezone"; import React, { Fragment } from "react"; import { Helmet } from "react-helmet"; import { connect } from "react-redux"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/network/latency/latency.fixtures.ts b/pkg/ui/workspaces/db-console/src/views/reports/containers/network/latency/latency.fixtures.ts index 1978ae30a58e..5c2365d8558a 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/network/latency/latency.fixtures.ts +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/network/latency/latency.fixtures.ts @@ -8,7 +8,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -import moment from "moment"; +import moment from "moment-timezone"; import Long from "long"; import { ILatencyProps } from "."; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/nodeHistory/decommissionedNodeHistory.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/nodeHistory/decommissionedNodeHistory.tsx index 27dd63be8ddb..5d27c71cbb0c 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/nodeHistory/decommissionedNodeHistory.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/nodeHistory/decommissionedNodeHistory.tsx @@ -12,7 +12,7 @@ import * as React from "react"; import { Helmet } from "react-helmet"; import { connect } from "react-redux"; import { RouteComponentProps, withRouter } from "react-router-dom"; -import { Moment } from "moment"; +import { Moment } from "moment-timezone"; import _ from "lodash"; import { AdminUIState } from "src/redux/state"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/nodes/index.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/nodes/index.tsx index c8d283494980..77e092ed400e 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/nodes/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/nodes/index.tsx @@ -11,7 +11,7 @@ import classNames from "classnames"; import _ from "lodash"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { Helmet } from "react-helmet"; import { connect } from "react-redux"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/range/print.ts b/pkg/ui/workspaces/db-console/src/views/reports/containers/range/print.ts index 7e4e7edb4016..3f5b8fbe1980 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/range/print.ts +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/range/print.ts @@ -10,7 +10,7 @@ import _ from "lodash"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import * as protos from "src/js/protos"; import { util } from "@cockroachlabs/cluster-ui"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/range/rangeTable.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/range/rangeTable.tsx index 3882f6808339..c327df20afc1 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/range/rangeTable.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/range/rangeTable.tsx @@ -11,7 +11,7 @@ import classNames from "classnames"; import _ from "lodash"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import * as protos from "src/js/protos"; import { cockroach } from "src/js/protos"; diff --git a/pkg/ui/workspaces/db-console/src/views/reports/containers/statementDiagnosticsHistory/index.tsx b/pkg/ui/workspaces/db-console/src/views/reports/containers/statementDiagnosticsHistory/index.tsx index 6c31352686e1..93f6c496f707 100644 --- a/pkg/ui/workspaces/db-console/src/views/reports/containers/statementDiagnosticsHistory/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/reports/containers/statementDiagnosticsHistory/index.tsx @@ -11,7 +11,7 @@ import React from "react"; import { Helmet } from "react-helmet"; import { connect } from "react-redux"; -import moment from "moment"; +import moment from "moment-timezone"; import { Link } from "react-router-dom"; import { isUndefined } from "lodash"; diff --git a/pkg/ui/workspaces/db-console/src/views/shared/containers/metricDataProvider/index.tsx b/pkg/ui/workspaces/db-console/src/views/shared/containers/metricDataProvider/index.tsx index f34bcf33fb39..c5f2b3b26d84 100644 --- a/pkg/ui/workspaces/db-console/src/views/shared/containers/metricDataProvider/index.tsx +++ b/pkg/ui/workspaces/db-console/src/views/shared/containers/metricDataProvider/index.tsx @@ -10,7 +10,7 @@ import _ from "lodash"; import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import React from "react"; import { connect } from "react-redux"; import { createSelector } from "reselect"; diff --git a/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx b/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx index 5268377f8e0d..7e0f337f331a 100644 --- a/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx +++ b/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx @@ -52,7 +52,7 @@ import { getMatchParamByName, queryByName } from "src/util/query"; import { appNamesAttr, statementAttr } from "src/util/constants"; import { selectTimeScale } from "src/redux/timeScale"; import { api as clusterUiApi } from "@cockroachlabs/cluster-ui"; -import moment from "moment"; +import moment from "moment-timezone"; const { generateStmtDetailsToID } = util; diff --git a/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx b/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx index 83052686f871..842777790e0e 100644 --- a/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx +++ b/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx @@ -9,7 +9,7 @@ // licenses/APL.txt. import Long from "long"; -import moment from "moment"; +import moment from "moment-timezone"; import { RouteComponentProps } from "react-router-dom"; import * as H from "history"; import { merge } from "lodash"; diff --git a/pkg/ui/workspaces/db-console/yarn.lock b/pkg/ui/workspaces/db-console/yarn.lock index d0af549227d9..fb8bcd64c688 100644 --- a/pkg/ui/workspaces/db-console/yarn.lock +++ b/pkg/ui/workspaces/db-console/yarn.lock @@ -14899,6 +14899,13 @@ mocha@^6.2.1: yargs-parser "13.1.2" yargs-unparser "1.6.0" +moment-timezone@^0.5.42: + version "0.5.42" + resolved "https://storage.googleapis.com/cockroach-npm-deps/moment-timezone/-/moment-timezone-0.5.42.tgz#c59f2aa00442d0dcd1d258d2182873d637b4e17b" + integrity sha512-tjI9goqwzkflKSTxJo+jC/W8riTFwEjjunssmFvAWlvNVApjbkJM7UHggyKO0q1Fd/kZVKY77H7C9A0XKhhAFw== + dependencies: + moment "^2.29.4" + moment@2.x: version "2.29.1" resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" @@ -14914,6 +14921,11 @@ moment@^2.24.0: resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== +moment@^2.29.4: + version "2.29.4" + resolved "https://storage.googleapis.com/cockroach-npm-deps/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + moo-color@^1.0.2: version "1.0.3" resolved "https://storage.googleapis.com/cockroach-npm-deps/moo-color/-/moo-color-1.0.3.tgz#d56435f8359c8284d83ac58016df7427febece74"