Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src/*: various fixes to make ESLint happy
  • Loading branch information
peat-psuwit committed Sep 28, 2023
commit 38bf12b03bc69b06e3276284bb252ade4967310d
20 changes: 10 additions & 10 deletions src/components/discover-cloud/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export const TabsContent = {
given War Room.
</TabsContentText>
<TabsContentText>
With Overview's composite charts, you can see your infrastructure from a single pane of
With Overview&apos;s composite charts, you can see your infrastructure from a single pane of
glass, discover trends or anomalies, then drill down by grouping metrics by node and
jumping to single-node dashboards for root cause analysis.
</TabsContentText>
<TabsContentText>
Here's an example of a composite chart visualizing Disk I/O bandwidth from 5 different
Here&apos;s an example of a composite chart visualizing Disk I/O bandwidth from 5 different
nodes in one chart.
</TabsContentText>
</>
Expand All @@ -75,8 +75,8 @@ export const TabsContent = {
text: () => (
<TabsContentText>
The Nodes view in Netdata Cloud lets you see and customize key metrics from any number of
Agent-monitored nodes and seamlessly navigate to any node's dashboard for troubleshooting
performance issues or anomalies using Netdata's highly-granular metrics.
Agent-monitored nodes and seamlessly navigate to any node&apos;s dashboard for troubleshooting
performance issues or anomalies using Netdata&apos;s highly-granular metrics.
</TabsContentText>
),
icon: "nodes_hollow",
Expand All @@ -88,8 +88,8 @@ export const TabsContent = {
header: "Dashboards",
text: () => (
<TabsContentText>
With Netdata Cloud, you can build new dashboards that target your infrastructure's unique
needs. Put key metrics from any number of distributed systems in one place for a bird's eye
With Netdata Cloud, you can build new dashboards that target your infrastructure&apos;s unique
needs. Put key metrics from any number of distributed systems in one place for a bird&apos;s eye
view of your infrastructure.
</TabsContentText>
),
Expand All @@ -103,7 +103,7 @@ export const TabsContent = {
text: () => (
<TabsContentText>
The Alerts view gives you a high level of availability and performance information for every
node you're monitoring with Netdata Cloud. It also offers an easy way to drill down into any
node you&apos;re monitoring with Netdata Cloud. It also offers an easy way to drill down into any
particular alert by taking the user to the dedicated alert view from where the user can run
metrics correlation or take further troubleshooting steps.
</TabsContentText>
Expand Down Expand Up @@ -149,19 +149,19 @@ export const TabsContent = {
<>
<TabsContentText>
Data privacy is very important to us. We firmly believe that your data belongs to you.
This is why we don't store any metric data in Netdata Cloud.
This is why we don&apos;t store any metric data in Netdata Cloud.
</TabsContentText>
<TabsContentText>
Your local installations of the Netdata Agent form the basis for the Netdata Cloud. All
the data that you see in the web browser when using Netdata Cloud, is actually streamed
directly from the Netdata Agent to the Netdata Cloud dashboard. The data passes through
our systems, but it isn't stored. You can learn more about{" "}
our systems, but it isn&apos;t stored. You can learn more about{" "}
<Anchor
target="_blank"
rel="noopener noreferrer"
href="https://learn.netdata.cloud/docs/agent/netdata-security"
>
the Agent's security design
the Agent&apos;s security design
</Anchor>{" "}
design in the Agent documentation.
</TabsContentText>
Expand Down
1 change: 1 addition & 0 deletions src/components/header/ACLK/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { UserStatus, NodeLiveness } from "@/src/domains/dashboard/components/migration-modal"
import React from "react"

export type CloudConnectionProps = {
userStatus: UserStatus
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/ACLK/use-cloud-connection-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Text } from "@netdata/netdata-ui"
export const makeCloudConnectionStatusInfo = ({
nodeStatus,
userStatus,
date,
/* date, */
}: CloudConnectionProps): ConnectionModalStatusContent => ({
title: "Netdata Cloud connection status",
text: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/space/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getNodes = (hosts, hostname, hostsStatus) => {

const replicatedNodes = hosts
.slice(1)
.map(({ hostname }, index) => ({
.map(({ hostname }, /* index */) => ({
hostname,
url: getNodeUrl(baseUrl, hostname),
status: hostsStatus.find(host => host.hostname === hostname)?.reachable || false,
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/space/prompts/offline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import NoNetwork from "./noNetwork"
const OfflinePrompt = () => (
<Flex alignItems="center" background={["neutral", "regentgrey"]} column gap={1} padding={[10]}>
<TextSmall color="bright" strong textAlign="center">
Can't connect to Netdata Cloud
Can&apos;t connect to Netdata Cloud
</TextSmall>
<NoNetwork />
<TextNano color="bright" textAlign="center" margin={[2, 0, 0]}>
Expand Down
2 changes: 0 additions & 2 deletions src/domains/chart/components/chart-legend-right.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ export const ChartLegendRight = ({
return (
<Fragment key={dimensionId}>
{i !== 0 && <br />}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<span
title={dimensionName}
className={classNames(
Expand Down Expand Up @@ -166,7 +165,6 @@ export const ChartLegendRight = ({
{" "}
<LegendText id={chartUuid} index={i} />
</span>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<span
title={dimensionName}
className={classNames(
Expand Down
2 changes: 2 additions & 0 deletions src/domains/chart/components/lib-charts/google-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { Attributes } from "domains/chart/utils/transformDataAttributes"
import { ChartMetadata, EasyPieChartData } from "domains/chart/chart-types"
import { loadGoogleVisualizationApi } from "domains/chart/utils/google-visualization-loader"

/* global google */

interface Props {
attributes: Attributes
chartData: EasyPieChartData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { memo } from "react"
import styled from "styled-components"
import { Flex, Text } from "@netdata/netdata-ui"
import { AppStateT } from "store/app-state"
import { useSelector } from "store/redux-separate-context"
import { useFormatters } from "domains/chart/utils/formatters"
import { netdataDashboard } from "domains/dashboard/utils/netdata-dashboard"
Expand Down
2 changes: 2 additions & 0 deletions src/domains/chart/hooks/use-proceeded-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import React, { useRef, useCallback } from "react"
import { useToggle } from "react-use"

/* global Dygraph */

const useProceededChart = (
chartRef: any,
propsRef: any
Expand Down
2 changes: 2 additions & 0 deletions src/domains/chart/utils/get-pan-and-zoom-step.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from "react"

type GetPanAndZoomStep = (event: React.MouseEvent) => number
export const getPanAndZoomStep: GetPanAndZoomStep = (event) => {
if (event.ctrlKey) {
Expand Down
4 changes: 2 additions & 2 deletions src/domains/dashboard/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { ChartsMetadata } from "domains/global/types"

import { storeKey } from "./constants"

export interface startSnapshotModeAction {
interface IStartSnapshotModeAction {
charts: ChartsMetadata
dataPoints: number
}
export const startSnapshotModeAction = createAction<startSnapshotModeAction>(
export const startSnapshotModeAction = createAction<IStartSnapshotModeAction>(
`${storeKey}/isSnapshotModeAction`,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ const MigrationModal = ({
setUserPrefrence(CTA2.userPreference)
savePromoRemindMeSelection(isRememberChoiceChecked)
}
if (CTA2.action === "NAVIGATE") {
} else if (CTA2.action === "REFRESH") {
if (CTA2.action === "REFRESH") {
requestRefreshOfAccess()
}
closeModal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const migrationmodalInfo: MigrationModalInfo = {
[MigrationModalPromos.FALLBACK_TO_AGENT]: {
title: "Oops! This node has lost connection to Netdata Cloud!",
text: {
header: ({ date = "" }) => {
header: ( /* { date = "" } */ ) => {
return (
<>
<Text strong>
Expand Down Expand Up @@ -294,7 +294,7 @@ export const migrationmodalInfo: MigrationModalInfo = {
return (
<>
<Text strong>
Unfortunately, it seems we aren't able to get information on this node in regards to
Unfortunately, it seems we aren&apos;t able to get information on this node in regards to
Netdata Cloud.
</Text>
<Text>
Expand Down
8 changes: 8 additions & 0 deletions src/domains/global/alarms-sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ function* getLog(lastNotificationIdArg: number, serverDefault: string) {
}
}

interface NotificationOptions {
body: string
tag: string
requireInteraction: boolean,
icon: string
data: AlarmLog
}

interface NotificationConfig {
notificationTitle: string
notificationOptions: NotificationOptions
Expand Down
1 change: 1 addition & 0 deletions src/types/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ interface NETDATA {

type jQuery = any

/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
interface Window {
NETDATA: NETDATA
Ps: any // perfect scrollbar
Expand Down