Merge branch 'staging' into fix_frontpage_ui

pull/1657/head
Rick Carlino 2020-01-10 07:44:42 -06:00 committed by GitHub
commit e19efe31e9
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 {
input {
background: $white;
@ -459,6 +460,7 @@
.edit-farm-event-panel button.red {
margin-top: 1rem;
margin-left: 1rem;
margin-right: 0.5rem;
}
.panel-nav {

View File

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

View File

@ -10,6 +10,7 @@ BASE_BRANCHES = ["master", "staging"]
CURRENT_COMMIT = ENV.fetch("CIRCLE_SHA1", "")
CSS_SELECTOR = ".fraction"
FRACTION_DELIM = "/"
FALLBACK_VALUE = 0.9772
# Fetch JSON over HTTP. Rails probably already has a helper for this :shrug:
def open_json(url)
@ -162,6 +163,15 @@ namespace :coverage do
.map { |x| x.split(FRACTION_DELIM).map(&:to_f) }
.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 "This build: #{CURRENT_COMMIT}"
puts "Statements: #{to_percent(statements)}%"

View File

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