Merge pull request #1662 from FarmBot/staging

Recovery Release
firmware_quickfix
Rick Carlino 2020-01-10 07:36:47 -06:00 committed by GitHub
commit 1e5ebb9c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 20 deletions

View File

@ -421,6 +421,7 @@
} }
} }
.edit-farm-event-panel,
.add-farm-event-panel { .add-farm-event-panel {
input { input {
background: $white; background: $white;
@ -459,6 +460,7 @@
.edit-farm-event-panel button.red { .edit-farm-event-panel button.red {
margin-top: 1rem; margin-top: 1rem;
margin-left: 1rem; margin-left: 1rem;
margin-right: 0.5rem;
} }
.panel-nav { .panel-nav {

View File

@ -6,6 +6,10 @@ import { history } from "../../history";
import { TaggedFarmEvent } from "farmbot"; import { TaggedFarmEvent } from "farmbot";
import { EditFEForm } from "./edit_fe_form"; import { EditFEForm } from "./edit_fe_form";
import { t } from "../../i18next_wrapper"; import { t } from "../../i18next_wrapper";
import { Panel } from "../panel_header";
import {
DesignerPanel, DesignerPanelHeader, DesignerPanelContent
} from "../designer_panel";
export class RawEditFarmEvent extends React.Component<AddEditFarmEventProps, {}> { export class RawEditFarmEvent extends React.Component<AddEditFarmEventProps, {}> {
redirect() { redirect() {
@ -14,18 +18,27 @@ export class RawEditFarmEvent extends React.Component<AddEditFarmEventProps, {}>
} }
renderForm(fe: TaggedFarmEvent) { renderForm(fe: TaggedFarmEvent) {
return <EditFEForm farmEvent={fe} const panelName = "edit-farm-event";
deviceTimezone={this.props.deviceTimezone} return <DesignerPanel panelName={panelName} panel={Panel.FarmEvents}>
repeatOptions={this.props.repeatOptions} <DesignerPanelHeader
executableOptions={this.props.executableOptions} panelName={panelName}
dispatch={this.props.dispatch} panel={Panel.FarmEvents}
findExecutable={this.props.findExecutable} title={t("Edit Event")} />
title={t("Edit Event")} <DesignerPanelContent panelName={panelName}>
deleteBtn={true} <EditFEForm farmEvent={fe}
timeSettings={this.props.timeSettings} deviceTimezone={this.props.deviceTimezone}
autoSyncEnabled={this.props.autoSyncEnabled} repeatOptions={this.props.repeatOptions}
resources={this.props.resources} executableOptions={this.props.executableOptions}
shouldDisplay={this.props.shouldDisplay} />; dispatch={this.props.dispatch}
findExecutable={this.props.findExecutable}
title={t("Edit Event")}
deleteBtn={true}
timeSettings={this.props.timeSettings}
autoSyncEnabled={this.props.autoSyncEnabled}
resources={this.props.resources}
shouldDisplay={this.props.shouldDisplay} />
</DesignerPanelContent>
</DesignerPanel>;
} }
render() { render() {

View File

@ -10,6 +10,7 @@ BASE_BRANCHES = ["master", "staging"]
CURRENT_COMMIT = ENV.fetch("CIRCLE_SHA1", "") CURRENT_COMMIT = ENV.fetch("CIRCLE_SHA1", "")
CSS_SELECTOR = ".fraction" CSS_SELECTOR = ".fraction"
FRACTION_DELIM = "/" FRACTION_DELIM = "/"
FALLBACK_VALUE = 0.9772
# Fetch JSON over HTTP. Rails probably already has a helper for this :shrug: # Fetch JSON over HTTP. Rails probably already has a helper for this :shrug:
def open_json(url) def open_json(url)
@ -162,6 +163,15 @@ namespace :coverage do
.map { |x| x.split(FRACTION_DELIM).map(&:to_f) } .map { |x| x.split(FRACTION_DELIM).map(&:to_f) }
.map { |x| Pair.new(*x) } .map { |x| Pair.new(*x) }
fallback_fraction = Pair.new(FALLBACK_VALUE, 1.0)
puts "!" * 50 if lines.nil?
puts "WARNING: USING FALLBACK VALUE (#{FALLBACK_VALUE})" if lines.nil?
puts "!" * 50 if lines.nil?
statements = statements || fallback_fraction
branches = branches || fallback_fraction
functions = functions || fallback_fraction
lines = lines || fallback_fraction
puts puts
puts "This build: #{CURRENT_COMMIT}" puts "This build: #{CURRENT_COMMIT}"
puts "Statements: #{to_percent(statements)}%" puts "Statements: #{to_percent(statements)}%"

View File

@ -8,7 +8,7 @@
}, },
"scripts": { "scripts": {
"coverage": "cat **/*lcov.info | ./node_modules/coveralls/bin/coveralls.js", "coverage": "cat **/*lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test-very-slow": "node --expose-gc ./node_modules/.bin/jest -i --colors # low CPU/RAM usage", "test-very-slow": "node --expose-gc ./node_modules/.bin/jest -i --colors --coverage # low CPU/RAM usage",
"test-slow": "./node_modules/.bin/jest -w 6 --colors", "test-slow": "./node_modules/.bin/jest -w 6 --colors",
"test": "./node_modules/.bin/jest -w 5 --no-coverage", "test": "./node_modules/.bin/jest -w 5 --no-coverage",
"typecheck": "./node_modules/typescript/bin/tsc --noEmit", "typecheck": "./node_modules/typescript/bin/tsc --noEmit",
@ -33,20 +33,20 @@
"@types/lodash": "4.14.149", "@types/lodash": "4.14.149",
"@types/markdown-it": "0.0.9", "@types/markdown-it": "0.0.9",
"@types/moxios": "0.4.9", "@types/moxios": "0.4.9",
"@types/node": "13.1.2", "@types/node": "13.1.6",
"@types/promise-timeout": "1.3.0", "@types/promise-timeout": "1.3.0",
"@types/react": "16.9.17", "@types/react": "16.9.17",
"@types/react-color": "3.0.1", "@types/react-color": "3.0.1",
"@types/react-dom": "16.9.4", "@types/react-dom": "16.9.4",
"@types/react-redux": "7.1.5", "@types/react-redux": "7.1.5",
"axios": "0.19.0", "axios": "0.19.1",
"boxed_value": "1.0.0", "boxed_value": "1.0.0",
"browser-speech": "1.1.1", "browser-speech": "1.1.1",
"coveralls": "3.0.9", "coveralls": "3.0.9",
"enzyme": "3.11.0", "enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2", "enzyme-adapter-react-16": "1.15.2",
"farmbot": "9.0.1-rc0", "farmbot": "9.0.1-rc0",
"i18next": "19.0.2", "i18next": "19.0.3",
"install": "0.13.0", "install": "0.13.0",
"lodash": "4.17.15", "lodash": "4.17.15",
"markdown-it": "10.0.0", "markdown-it": "10.0.0",
@ -54,13 +54,13 @@
"moment": "2.24.0", "moment": "2.24.0",
"moxios": "0.4.0", "moxios": "0.4.0",
"mqtt": "3.0.0", "mqtt": "3.0.0",
"npm": "6.13.4", "npm": "6.13.6",
"parcel-bundler": "1.12.4", "parcel-bundler": "1.12.4",
"promise-timeout": "1.3.0", "promise-timeout": "1.3.0",
"raf": "3.4.1", "raf": "3.4.1",
"react": "16.12.0", "react": "16.12.0",
"react-addons-test-utils": "15.6.2", "react-addons-test-utils": "15.6.2",
"react-color": "2.17.3", "react-color": "2.18.0",
"react-dom": "16.12.0", "react-dom": "16.12.0",
"react-joyride": "2.2.1", "react-joyride": "2.2.1",
"react-redux": "7.1.3", "react-redux": "7.1.3",
@ -69,10 +69,10 @@
"redux": "4.0.5", "redux": "4.0.5",
"redux-immutable-state-invariant": "2.1.0", "redux-immutable-state-invariant": "2.1.0",
"redux-thunk": "2.3.0", "redux-thunk": "2.3.0",
"sass": "1.24.1", "sass": "1.24.4",
"sass-lint": "1.13.1", "sass-lint": "1.13.1",
"takeme": "0.11.3", "takeme": "0.11.3",
"ts-jest": "24.2.0", "ts-jest": "24.3.0",
"ts-lint": "4.5.1", "ts-lint": "4.5.1",
"tslint": "5.20.1", "tslint": "5.20.1",
"typescript": "3.7.4", "typescript": "3.7.4",