[ARVADOS] updated: 1.1.2-20-g7d0d61f
Git user
git at public.curoverse.com
Tue Jan 2 15:20:11 EST 2018
Summary of changes:
.../app/assets/javascripts/components/edit_tags.js | 13 ++++++++-----
apps/workbench/public/vocabulary.json | 4 ++--
2 files changed, 10 insertions(+), 7 deletions(-)
via 7d0d61f43be20aec7ff643001fcf940e485d465b (commit)
from 2ada2ce8390db1e22c5f4fc236518640339e9ce5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7d0d61f43be20aec7ff643001fcf940e485d465b
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue Jan 2 17:19:06 2018 -0300
12479: Renamed 'overridable' property to 'strict'. Both toplevel
and type specific 'strict' properties are assumed false by default.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/apps/workbench/app/assets/javascripts/components/edit_tags.js b/apps/workbench/app/assets/javascripts/components/edit_tags.js
index 1983c3b..21006f2 100644
--- a/apps/workbench/app/assets/javascripts/components/edit_tags.js
+++ b/apps/workbench/app/assets/javascripts/components/edit_tags.js
@@ -69,7 +69,8 @@ window.TagEditorRow = {
m("div", {key: 'name-'+vnode.attrs.name()},[m(SelectOrAutocomplete, {
options: nameOpts,
value: vnode.attrs.name,
- create: !vnode.attrs.vocabulary().strict,
+ // Allow any tag name unless "strict" is set to true.
+ create: !(vnode.attrs.vocabulary().strict === true),
placeholder: 'new tag',
})])
: vnode.attrs.name),
@@ -80,10 +81,12 @@ window.TagEditorRow = {
options: valueOpts,
value: vnode.attrs.value,
placeholder: 'new value',
- create: (vnode.attrs.name() in vnode.attrs.vocabulary().types)
- ? (vnode.attrs.vocabulary().types[vnode.attrs.name()].type == 'text') ||
- vnode.attrs.vocabulary().types[vnode.attrs.name()].overridable || false
- : true, // If tag not in vocabulary, we should accept any value
+ // Allow any value on tags not listed on the vocabulary.
+ // Allow any value on text tags, or the ones that aren't
+ // explicitly declared to be strict.
+ create: !(vnode.attrs.name() in vnode.attrs.vocabulary().types)
+ || (vnode.attrs.vocabulary().types[vnode.attrs.name()].type === 'text')
+ || !(vnode.attrs.vocabulary().types[vnode.attrs.name()].strict === true)
})
])
: vnode.attrs.value)
diff --git a/apps/workbench/public/vocabulary.json b/apps/workbench/public/vocabulary.json
index c17cc18..eb3c098 100644
--- a/apps/workbench/public/vocabulary.json
+++ b/apps/workbench/public/vocabulary.json
@@ -1,10 +1,10 @@
{
- "strict": "false",
+ "strict": false,
"types": {
"fruit": {
"type": "select",
"options": ["pineapple", "tomato", "orange", "banana"],
- "overridable": "true"
+ "strict": true
},
"animal": {
"type": "select",
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list