Merge branch 'staging' into read_only_mode

pull/1348/head
Rick Carlino 2019-07-30 11:47:44 -05:00
commit 0799254263
7 changed files with 43 additions and 15 deletions

View File

@ -134,7 +134,7 @@ GEM
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
hashdiff (0.4.0)
hashdiff (1.0.0)
hashie (3.6.0)
httpclient (2.8.3)
i18n (1.6.0)
@ -217,7 +217,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
rake (12.3.3)
redis (4.1.2)
representable (3.0.4)
declarative (< 0.1.0)
@ -276,7 +276,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.19.4)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)

View File

@ -6,4 +6,4 @@ Please see our [official support policy](http://support-policy.farm.bot).
## Reporting a Vulnerability
Please see our [guidlines for responsibly disclosing security vulnerabilities](http://vulnerabilities.farm.bot/).
Please see our [guidelines for responsibly disclosing security vulnerabilities](http://vulnerabilities.farm.bot/).

View File

@ -74,7 +74,10 @@ module CeleryScriptSettingsBag
RESOURCE_UPDATE_ARGS = [:resource_type, :resource_id, :label, :value]
SCOPE_DECLARATIONS = [:variable_declaration, :parameter_declaration]
MISC_ENUM_ERR = '"%s" is not valid. Allowed values: %s'
MAX_WAIT_MS = 1000 * 60 * 3 # Three Minutes
MAX_WAIT_MS_EXCEEDED =
"A single wait node cannot exceed #{MAX_WAIT_MS / 1000 / 60} minutes. " +
"Consider lowering the wait time or using multiple WAIT blocks."
Corpus = CeleryScript::Corpus.new
CORPUS_VALUES = {
@ -453,6 +456,11 @@ module CeleryScriptSettingsBag
wait: {
args: [:milliseconds],
tags: [:function],
blk: ->(node) do
ms_arg = node.args[:milliseconds]
ms = (ms_arg && ms_arg.value) || 0
node.invalidate!(MAX_WAIT_MS_EXCEEDED) if ms > MAX_WAIT_MS
end,
},
zero: {
args: [:axis],

View File

@ -1029,6 +1029,14 @@ ul {
line-height: 1.75rem;
margin-bottom: 1rem;
}
p {
display: block;
color: $dark_gray;
text-overflow: inherit;
overflow: inherit;
width: inherit;
white-space: inherit;
}
}
.tools-widget,

View File

@ -18,19 +18,19 @@ npm run translation-check
See the [README](https://github.com/FarmBot/Farmbot-Web-App#translating-the-web-app-into-your-language) for contribution instructions.
Total number of phrases identified by the language helper for translation: __1017__
Total number of phrases identified by the language helper for translation: __1023__
|Language|Percent translated|Translated|Untranslated|Other Translations|
|:---:|---:|---:|---:|---:|
|da|11%|111|906|22|
|de|42%|425|592|122|
|es|77%|781|236|152|
|fr|71%|719|298|180|
|it|9%|88|929|174|
|nl|8%|80|937|142|
|pt|7%|72|945|161|
|ru|59%|605|412|206|
|zh|9%|87|930|142|
|da|11%|111|912|22|
|de|42%|425|598|122|
|es|100%|1023|0|152|
|fr|70%|719|304|180|
|it|9%|88|935|174|
|nl|8%|80|943|142|
|pt|7%|72|951|161|
|ru|59%|606|417|205|
|zh|9%|87|936|142|
**Percent translated** refers to the percent of phrases identified by the
language helper that have been translated. Additional phrases not identified

View File

@ -0,0 +1,2 @@
Please see our guidelines for responsibly disclosing security vulnerabilities:
http://vulnerabilities.farm.bot/

View File

@ -220,4 +220,14 @@ describe CeleryScript::Corpus do
expect(value.fetch("tags").first).to eq("great")
expect(value.fetch("docs")).to eq("spectacular")
end
it "sets a MAX_WAIT_MS limit for `wait` nodes" do
bad = CeleryScript::AstNode.new({
kind: "wait",
args: { milliseconds: CeleryScriptSettingsBag::MAX_WAIT_MS + 10 },
})
check = CeleryScript::Checker.new(bad, corpus, device)
expect(check.valid?).to be_falsey
expect(check.error.message).to include("cannot exceed 3 minutes")
end
end