diff --git a/webpack/api/__tests__/api_test.ts b/webpack/api/__tests__/api_test.ts index 3ad4e71c8..b0b44cf3b 100644 --- a/webpack/api/__tests__/api_test.ts +++ b/webpack/api/__tests__/api_test.ts @@ -12,7 +12,7 @@ describe("API", () => { [API.current.sensorReadingPath, BASE + "/api/sensor_readings"], [API.current.deviceConfigPath, BASE + "/api/device_configs"], [API.current.plantTemplatePath, BASE + "/api/plant_templates"], - [API.current.diagnosticDumpsPath, BASE + "/api/diagnostic_dumps"], + [API.current.diagnosticDumpsPath, BASE + "/api/diagnostic_dumps/"], [API.current.farmwareInstallationPath, BASE + "/api/farmware_installations"], ].map(x => expect(x[0]).toEqual(x[1])); }); diff --git a/webpack/api/api.ts b/webpack/api/api.ts index 2124949b1..57ae314e4 100644 --- a/webpack/api/api.ts +++ b/webpack/api/api.ts @@ -146,7 +146,7 @@ export class API { /** /api/plant_templates/:id */ get plantTemplatePath() { return `${this.baseUrl}/api/plant_templates`; } /** /api/diagnostic_dumps/:id */ - get diagnosticDumpsPath() { return `${this.baseUrl}/api/diagnostic_dumps`; } + get diagnosticDumpsPath() { return `${this.baseUrl}/api/diagnostic_dumps/`; } /** /api/farmware_installations/:id */ get farmwareInstallationPath() { return `${this.baseUrl}/api/farmware_installations`; diff --git a/webpack/api/crud.ts b/webpack/api/crud.ts index d58b27de0..1599326b3 100644 --- a/webpack/api/crud.ts +++ b/webpack/api/crud.ts @@ -224,6 +224,7 @@ export function urlFor(tag: ResourceName) { FbosConfig: API.current.fbosConfigPath, WebAppConfig: API.current.webAppConfigPath, FirmwareConfig: API.current.firmwareConfigPath, + DiagnosticDump: API.current.diagnosticDumpsPath, }; const url = OPTIONS[tag]; if (url) { diff --git a/webpack/constants.ts b/webpack/constants.ts index 271c8f22b..71a26cf11 100644 --- a/webpack/constants.ts +++ b/webpack/constants.ts @@ -446,6 +446,12 @@ export namespace Content { trim(`Warning! Opting in to FarmBot OS beta releases may reduce FarmBot system stability. Are you sure?`); + export const DIAGNOSTIC_CHECK = + trim(`Save snapshot of FarmBot OS system information, including + user and device identity, to the database. A code will be returned + that you can provide in support requests to allow FarmBot to look up + data relevant to the issue to help us identify the problem.`); + // Hardware Settings export const RESTORE_DEFAULT_HARDWARE_SETTINGS = trim(`Restoring hardware parameter defaults will destroy the diff --git a/webpack/css/global.scss b/webpack/css/global.scss index 2258bfe7c..58a37c6f0 100644 --- a/webpack/css/global.scss +++ b/webpack/css/global.scss @@ -174,12 +174,6 @@ a { } .input-group { - a { - color: #434343; - &:visited { - color: #434343; - } - } input[type=checkbox] { box-shadow: none; } @@ -384,9 +378,20 @@ a { text-decoration: none !important; outline: none !important; cursor: pointer !important; - color: $off_white; + color: $dark_gray; + &:link { + font-weight: 500; + color: $dark_gray; + } &:visited { - color: $off_white; + color: $dark_gray; + } + &:hover { + font-weight: bold; + color: $dark_gray; + } + &:active { + color: $dark_gray; } } @@ -846,21 +851,3 @@ ul { } } } - -a.panel-link { - // TODO: Might need to move this to a better place. CC: @gabrielBurnworth - // - // PROBLEM: links in the device panel are invisible. - // SOLUTION: Add {color: $dark_gray} - // PROBLEM 2: This rule probably does not belong at the bottom of - // global.scss - color: $dark_gray; - - &:visited { - color: $dark_gray; - }; - - &:active { - color: $dark_gray; - }; -} diff --git a/webpack/devices/components/__tests__/diagnostic_dump_row_test.tsx b/webpack/devices/components/__tests__/diagnostic_dump_row_test.tsx index 523e817d5..a68137234 100644 --- a/webpack/devices/components/__tests__/diagnostic_dump_row_test.tsx +++ b/webpack/devices/components/__tests__/diagnostic_dump_row_test.tsx @@ -19,7 +19,7 @@ describe("", () => { diag.body.ticket_identifier = "0000"; const el = mount(); expect(el.text()).toContain("0000"); - el.find("a").first().simulate("click"); + el.find("button.green").first().simulate("click"); expect(jsonDownload).toHaveBeenCalledWith(diag.body, "farmbot_diagnostics_0000.json"); el.find("button.red").first().simulate("click"); expect(destroy).toHaveBeenCalledWith(diag.uuid); diff --git a/webpack/devices/components/diagnostic_dump_row.tsx b/webpack/devices/components/diagnostic_dump_row.tsx index 3c6432f83..6f03d5363 100644 --- a/webpack/devices/components/diagnostic_dump_row.tsx +++ b/webpack/devices/components/diagnostic_dump_row.tsx @@ -4,6 +4,7 @@ import { TaggedDiagnosticDump } from "../../resources/tagged_resources"; import { jsonDownload } from "../../account/request_account_export"; import { destroy } from "../../api/crud"; import { ago } from "../connectivity/status_checks"; +import { t } from "i18next"; export interface Props { diag: TaggedDiagnosticDump; @@ -27,19 +28,23 @@ export class DiagnosticDumpRow extends React.Component { render() { return - - - - + + - - - Download diagnostic report {this.ticket} (Saved {this.age}) - + + {t("Diagnostic report {{ticket}} (Saved {{age}})", + { ticket: this.ticket, age: this.age })} + + + ; } diff --git a/webpack/devices/components/send_diagnostic_report.tsx b/webpack/devices/components/send_diagnostic_report.tsx index 758fce567..0b31ed538 100644 --- a/webpack/devices/components/send_diagnostic_report.tsx +++ b/webpack/devices/components/send_diagnostic_report.tsx @@ -8,6 +8,7 @@ import { ShouldDisplay, Feature } from "../interfaces"; import { TaggedDiagnosticDump } from "../../resources/tagged_resources"; import { DiagnosticDumpRow } from "./diagnostic_dump_row"; import { requestDiagnostic } from "../actions"; +import { Content } from "../../constants"; export interface DiagReportProps { dispatch: Function; @@ -16,7 +17,7 @@ export interface DiagReportProps { diagnostics: TaggedDiagnosticDump[]; } -export class SendDiagnosticReport extends React.Component{ +export class SendDiagnosticReport extends React.Component { show = () => { return
@@ -34,7 +35,7 @@ export class SendDiagnosticReport extends React.Component{ -

...

+

{t(Content.DIAGNOSTIC_CHECK)}

+
{this.props.diagnostics.map(d => { return