[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-ui pull request #66: recognize memberSpec anywhere, and refresh blu...

Github user ahgittin commented on a diff in the pull request:

    --- Diff: ui-modules/blueprint-composer/app/components/util/model/entity.model.js ---
    @@ -19,9 +19,10 @@
     import {Issue} from './issue.model';
     import {Dsl, DslParser} from './dsl.model';
    -const MEMBERSPEC_REGEX = /^(\w+\.)+[mM]ember[sS]pec$/;
    -const FIRST_MEMBERSPEC_REGEX = /^(\w+\.)+first[mM]ember[sS]pec$/;
    -const ANY_MEMBERSPEC_REGEX = /^(\w+\.)+(first)?[mM]ember[sS]pec$/;
    +const MEMBERSPEC_REGEX = /^(\w+\.)*[mM]ember[sS]pec$/;
    +const FIRST_MEMBERSPEC_REGEX = /^(\w+\.)*first[mM]ember[sS]pec$/;
    +// TODO ideally we'd just look at type EntitySpec, not key name, but for now look at keyname, anything ending memberSpec
    --- End diff --
    we do have the model, maybe not perfect, but we use it already in some places -- eg in composer examine the declared type of a config key to figure out how to render it.  there are some gaps to have this everywhere reliably but feels worth keeping the comment that that would be a better way.