Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionals feature #2830

Merged
merged 489 commits into from
Mar 31, 2020
Merged
Changes from 1 commit
Commits
Show all changes
489 commits
Select commit Hold shift + click to select a range
486dae5
add metadata provider
davetsay Feb 26, 2020
acd75f8
add name to conditions view
davetsay Feb 26, 2020
80656c1
Merge branch 'topic-conditionals' into dave/provide-conditions-telemetry
davetsay Feb 26, 2020
0915aae
allow conditions to be dropped into telemetry views
davetsay Feb 26, 2020
96e433b
Merge pull request #2677 from nasa/condition-clone-name
shefalijoshi Feb 26, 2020
30a493d
resolved merge conflict
Feb 26, 2020
614206b
remove criterion working
Feb 20, 2020
43056c4
implimented clone criterion
Feb 20, 2020
25e28ab
added controls for remove and duplicate criteria
Feb 20, 2020
598d2b3
remove criterion working
Feb 20, 2020
fea6d2d
Merge branch 'remove-criteria' of https://github.com/nasa/openmct int…
Feb 26, 2020
ec4d121
changed classname of controls div
Feb 26, 2020
463ec47
changed classname of controls div
Feb 26, 2020
f504a33
disabled add or edit condition set without telemetry
Feb 25, 2020
858199e
enable trigger
Feb 25, 2020
cda97d1
Merge branch 'condition-trigger' of https://github.com/nasa/openmct i…
Feb 26, 2020
4456633
output telemetry to views
davetsay Feb 26, 2020
1b9b7e2
added hid/show selects
Feb 20, 2020
b4cf81a
wip: filtering select comparison
Feb 21, 2020
f328a10
filter comparison list based on field selected
Feb 23, 2020
ee6e0f3
changed default input to array and clear downstream selection lists o…
Feb 24, 2020
8f87cc7
rendering correct number of input fields depending on operation and p…
Feb 25, 2020
d46310c
handle multiple inputs in telemetryCriterion
Feb 25, 2020
a51c0d5
addressed review comments
Feb 25, 2020
467c57b
Merge branch 'criterion-multi-input' of https://github.com/nasa/openm…
Feb 26, 2020
fc53e85
Merge branch 'conditionals-refactor' into dave/provide-conditions-tel…
davetsay Feb 26, 2020
9d5c7a4
destroy conditionManager instance on stop providing telemetry
davetsay Feb 26, 2020
b8dc5ac
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Feb 27, 2020
2609a41
Addresses comments
shefalijoshi Feb 27, 2020
0e9bf74
Merge branch 'conditionals-refactor' into dave/provide-conditions-tel…
davetsay Feb 27, 2020
3aec9ec
add setData on dragStart for FF support
Feb 27, 2020
e57c18f
removed unused isDefault prop
Feb 27, 2020
1a409af
wip: addressing review comments
Feb 28, 2020
d2a45e4
modified getOperationFormat
Feb 28, 2020
b386275
removed disabled inputs with no telemetry
Feb 28, 2020
c9419d3
Fix for when input is not an array. This will be handled differently …
shefalijoshi Feb 28, 2020
28255dc
Merge pull request #2687 from nasa/remove-criteria
shefalijoshi Feb 28, 2020
583f4da
Merge branch 'conditionals-refactor' into dave/provide-conditions-tel…
davetsay Feb 28, 2020
364191e
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Feb 28, 2020
d333fd5
disabled add or edit condition set without telemetry
Feb 25, 2020
8539d60
enable trigger
Feb 25, 2020
371a7d3
removed disabled inputs with no telemetry
Feb 28, 2020
564be6f
Merge branch 'condition-trigger' of https://github.com/nasa/openmct i…
Feb 28, 2020
e526626
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Feb 28, 2020
ac13bc5
Merge pull request #2688 from nasa/condition-trigger
shefalijoshi Feb 28, 2020
ba78098
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Feb 28, 2020
89ae6ef
provide telemetry with timestamps
davetsay Feb 28, 2020
cfafecd
Merge pull request #2685 from nasa/conditionals-refactor
JoelMcKinnon Feb 28, 2020
39bf601
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
Feb 28, 2020
83d08ae
resolve merge conflicts
Feb 28, 2020
14e3500
add timestamps for default condition
davetsay Feb 28, 2020
fd56840
Merge branch 'topic-conditionals' into dave/provide-conditions-telemetry
davetsay Feb 28, 2020
3626ff9
fix linting issues
davetsay Feb 28, 2020
fd74fb0
remove unused var
davetsay Feb 28, 2020
9bd1c51
always use timestamp from latest datum
davetsay Feb 28, 2020
0f9d7d2
fix default condition edge case
davetsay Feb 28, 2020
5498ba8
changed computeResults
Feb 28, 2020
16a0bf9
Merge pull request #2703 from nasa/criterion-multi-input
shefalijoshi Feb 28, 2020
2c40396
refactor for clarity
davetsay Feb 28, 2020
71424dc
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
Feb 28, 2020
84ae655
remove unused var
davetsay Feb 28, 2020
b74733b
Add back id and conditionId required for styling
davetsay Feb 28, 2020
51c70d0
fix naming bug
davetsay Feb 28, 2020
dabd0bf
only listen for condition updates in telemetry provider
davetsay Feb 28, 2020
47d4fc9
removed CurrentOutput component
Feb 28, 2020
fa83b48
removed extra div
Mar 2, 2020
fb1eed1
Merge pull request #2706 from nasa/current-output-refactor
shefalijoshi Mar 2, 2020
97f829d
added dragstop listener and dragStop method
Mar 2, 2020
3b046db
Merge pull request #2695 from nasa/firefox-drag-fix
shefalijoshi Mar 2, 2020
f8b3899
addressed review comments and lint errors
Mar 2, 2020
768df84
Merge pull request #2711 from nasa/condition-output-persistance2
shefalijoshi Mar 2, 2020
ecabd00
fix failing unit tests
davetsay Mar 2, 2020
ece6223
Merge pull request #2704 from nasa/dave/provide-conditions-telemetry
shefalijoshi Mar 2, 2020
8cb29ba
add handleConditionUpdated back
davetsay Mar 3, 2020
b8b838f
get all timesystems
davetsay Mar 3, 2020
4c4b587
pass timestamp datum through to ConditionManager
davetsay Mar 3, 2020
34a1496
keep track of latest timestamp
davetsay Mar 4, 2020
5b00246
fix failing unit test
davetsay Mar 4, 2020
95f855f
Merge pull request #2717 from nasa/dave/conditions-telemetry
JoelMcKinnon Mar 4, 2020
576b843
Merge branch 'master' of https://github.com/nasa/openmct into topic-c…
shefalijoshi Mar 5, 2020
3e6509c
WIP add support for LAD request
davetsay Mar 5, 2020
897d052
WIP continue to add support for LAD request
davetsay Mar 6, 2020
7f32d19
WIP request gets to telemetry criterion before erroring
davetsay Mar 6, 2020
cf9336d
WIP receive criterion results and compute condition results
davetsay Mar 6, 2020
4675fc8
Conditional styles (#2718)
shefalijoshi Mar 6, 2020
4a5e106
request LAD for conditions provides telemetry
davetsay Mar 7, 2020
27a0923
Integrate Conditionals styling into topic-conditionals (try 2) (#2730)
charlesh88 Mar 9, 2020
24bade2
provide correct data to getLatestTimestamp call
davetsay Mar 9, 2020
a7e57c6
linting fixes (#2733)
davetsay Mar 9, 2020
8900072
added computed property and method to get description
Mar 9, 2020
efca7c8
added descriptions to conditions
Mar 9, 2020
7a4b967
condition sets with no telemetry points should not provide telemetry
davetsay Mar 9, 2020
49ff0c7
tidy up condition manager use in telemetry provider
davetsay Mar 9, 2020
084df53
Merge branch 'topic-conditionals' into dave/condition-telemetry-request
davetsay Mar 9, 2020
0da80c2
move var declaration around for clarity
davetsay Mar 10, 2020
dba5586
fix broken unit tests
davetsay Mar 10, 2020
6095872
remove logging
davetsay Mar 10, 2020
63feaef
reinitialize rule string in forEach
Mar 11, 2020
02cd304
Removed conditions as domain objects
shefalijoshi Mar 12, 2020
65f80f4
Resubscribe to the conditionSet telemetry provider when the condition…
shefalijoshi Mar 12, 2020
625b39d
Fix typo
shefalijoshi Mar 12, 2020
b75b7a9
added input types and fixed bug for isDefined, isUndefined comparisons
Mar 12, 2020
649575f
Moves domain object observe logic to the condition set telemetry prov…
shefalijoshi Mar 12, 2020
74a7ef2
Fix bug with removeCondition
shefalijoshi Mar 12, 2020
81caa27
Fixes failing tests
shefalijoshi Mar 12, 2020
8f05c57
Fixes clone condition bug
shefalijoshi Mar 13, 2020
1dc9743
remove unecessary get call
davetsay Mar 13, 2020
15a7d03
rename function for clarity
davetsay Mar 13, 2020
09bfd80
Fix bug with telemetry disappearing
shefalijoshi Mar 13, 2020
76e7fec
Ensures the conditionManager is in sync with outside changes so that …
shefalijoshi Mar 13, 2020
83c648c
Addresses comments
shefalijoshi Mar 13, 2020
41c79c6
[Conditions] ConditionManager should observe its own mutations (#2748)
davetsay Mar 16, 2020
94b5617
Since we're observing for changes to the conditionSet domain object, …
shefalijoshi Mar 16, 2020
f090f7f
Removes comment.
shefalijoshi Mar 16, 2020
55e5c49
Merge pull request #2747 from nasa/conditions-do-refactor
davetsay Mar 16, 2020
8975bc8
Handles enum meta data for criteria
shefalijoshi Mar 16, 2020
6ab60ab
ConditionSet view listens to a listener from conditionCollection to d…
shefalijoshi Mar 16, 2020
90dd53e
Merge branch 'topic-conditionals' into dave/condition-telemetry-request
davetsay Mar 16, 2020
090e89d
remove testing aid
davetsay Mar 16, 2020
84f0d49
code is documentation
davetsay Mar 16, 2020
e339d74
remove uneccessary update call
davetsay Mar 16, 2020
b7fffea
conditionManager controls subscriptions
davetsay Mar 17, 2020
b0bb723
resolve merge, address review comments
Mar 17, 2020
500ab52
Merge pull request #2754 from nasa/conditions-observables
shefalijoshi Mar 17, 2020
5d21a8b
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 17, 2020
60aecfe
Merge branch 'topic-conditionals' into dave/conditions-telemetry
davetsay Mar 17, 2020
fe2e29d
Merge pull request #2753 from nasa/remove-ConditionSetView-telemetry
davetsay Mar 17, 2020
43a82ec
Conditional styles for drawing objects (#2740)
shefalijoshi Mar 17, 2020
cc2df84
vue style render of description
Mar 18, 2020
e22458f
Merge branch 'master' of https://github.com/nasa/openmct into topic-c…
shefalijoshi Mar 18, 2020
05f94ed
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 18, 2020
316e0f2
added fieldName prop to telemetry object, computed props for canEvalu…
Mar 18, 2020
243b9ca
subscribe to telemetry
davetsay Mar 18, 2020
0cd2799
added isLastCriterion comp method
Mar 18, 2020
6b4cd25
Merge branch 'topic-conditionals' into dave/conditions-telemetry
davetsay Mar 18, 2020
6731283
Merge pull request #2734 from nasa/condition-description
davetsay Mar 18, 2020
00d1b5e
avoid multiple instantiations of condtionManager if possible
davetsay Mar 19, 2020
11978cd
remove straggler call
davetsay Mar 19, 2020
983ed7f
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 19, 2020
5332d13
Fix small bug with inputCount
shefalijoshi Mar 19, 2020
ce1fdbd
Merge pull request #2757 from nasa/conditions-set-cleanup
shefalijoshi Mar 19, 2020
3f61db2
pass telemetry down to criteria. criteria listens to corresponding en…
davetsay Mar 20, 2020
1f3ec77
Merge branch 'topic-conditionals' into fix-enum-metadata
davetsay Mar 20, 2020
e08b4ff
Merge pull request #2751 from nasa/fix-enum-metadata
davetsay Mar 20, 2020
3b82fd5
Merge branch 'topic-conditionals' into dave/conditions-telemetry
davetsay Mar 20, 2020
ecf3e19
remove listener on destroy
davetsay Mar 20, 2020
b38a9ad
exclude default condition when requesting telemetry
davetsay Mar 20, 2020
cbeb25c
request telemetry from all conditions
davetsay Mar 20, 2020
aed5377
use existing var instead of recalculating
davetsay Mar 20, 2020
d51dd8b
fix broken tests
davetsay Mar 20, 2020
e4a6c21
load composition using less code
davetsay Mar 20, 2020
05d9817
change string output to enum for plot views
davetsay Mar 21, 2020
f04b5b6
suppress plot view on view condition sets
davetsay Mar 21, 2020
60fce4a
remove completed TODO comments
davetsay Mar 21, 2020
44f48a3
moved persist calls to events, used emit to save name and fieldname p…
Mar 21, 2020
1f19f48
fix unit tests
davetsay Mar 21, 2020
096c968
Merge branch 'master' of https://github.com/nasa/openmct into topic-c…
shefalijoshi Mar 23, 2020
f790c9b
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 23, 2020
87b4000
Merge pull request #2763 from nasa/dave/conditions-views
davetsay Mar 23, 2020
26ffe8e
remove comment
davetsay Mar 23, 2020
42ac3ef
Implements two new operations - is one of and is not one of that eval…
shefalijoshi Mar 23, 2020
f13714e
rename telemetry subscription calls
davetsay Mar 23, 2020
48af39a
Merge branch 'topic-conditionals' into dave/conditions-telemetry
davetsay Mar 23, 2020
77b705e
add telemetry object back for criterion
davetsay Mar 23, 2020
d42bd44
remove logging statement
davetsay Mar 23, 2020
a5a1976
remove debug
davetsay Mar 23, 2020
78487a4
restrict conditionManager instances to one per domainObject
davetsay Mar 23, 2020
168c040
fix sticky telemetry selection issue
Mar 23, 2020
87513a1
removed log
Mar 24, 2020
0a2e912
removed refs from dom elements and added index to call to isLastCrite…
Mar 24, 2020
437e8a0
always load composition
davetsay Mar 24, 2020
2c1b4b4
Merge pull request #2759 from nasa/dave/conditions-telemetry
shefalijoshi Mar 24, 2020
57a68a2
Apply condition sets to drawing objects in a layout + Static styling …
shefalijoshi Mar 24, 2020
dc54eef
Resolves #2776
shefalijoshi Mar 24, 2020
c27c347
Conditionals fixes and tweaks
charlesh88 Mar 25, 2020
cdf0dd0
Conditionals fixes and tweaks
charlesh88 Mar 25, 2020
07d101a
Conditionals fixes and tweaks
charlesh88 Mar 25, 2020
6f500d0
Resolves ##2741
shefalijoshi Mar 25, 2020
7f49a7b
Conditionals fixes and tweaks
charlesh88 Mar 25, 2020
dc7f837
Adds parse treatment for string format.
shefalijoshi Mar 25, 2020
829eecf
resolved merge conflicts
Mar 25, 2020
fcca8fa
Fixes error while getting metadata when telemetry is not yet availabl…
shefalijoshi Mar 25, 2020
0a634eb
Fixes unit tests
shefalijoshi Mar 25, 2020
a681d67
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 25, 2020
f76f537
removed extraneous emits and handlers
Mar 25, 2020
39d7dc8
Adds unit tests for isOneOf and isNotOneOf
shefalijoshi Mar 25, 2020
32da19a
New Condition Widget, WIP
charlesh88 Mar 25, 2020
b7cea7b
New Condition Widget, WIP
charlesh88 Mar 25, 2020
a1f2608
Merge pull request #2782 from nasa/conditionals-ch-fixes-032420
charlesh88 Mar 26, 2020
0857fd9
New Condition Widget, WIP
charlesh88 Mar 26, 2020
6ff5ce7
Merge remote-tracking branch 'origin' into new-widget
charlesh88 Mar 26, 2020
953b95f
Merge branch 'topic-conditionals' into new-widget
charlesh88 Mar 26, 2020
fff89a6
delete unsubscribe method on destroy
davetsay Mar 26, 2020
d2b7407
add request for LAD data
davetsay Mar 26, 2020
28a603d
New Condition Widget, WIP
charlesh88 Mar 26, 2020
0cae614
New Condition Widget, WIP
charlesh88 Mar 26, 2020
311ff00
Merge pull request #2784 from nasa/fix-conditionals
davetsay Mar 26, 2020
1b680cf
moved persist call into change event method and removed check on $ref
Mar 26, 2020
a810095
Merge branch 'condition-persist' of https://github.com/nasa/openmct i…
Mar 26, 2020
4a07ddb
added persist call to change enum input
Mar 26, 2020
015aa8c
Checks for input before processing it.
shefalijoshi Mar 26, 2020
0cf27c3
Merge pull request #2768 from nasa/conditionset-multi-value-operations
shefalijoshi Mar 26, 2020
32c1641
Fixes description for enums
shefalijoshi Mar 26, 2020
de8f808
Merge pull request #2786 from nasa/issue-2773
shefalijoshi Mar 26, 2020
0552769
change back to refs
Mar 26, 2020
271c619
Merge pull request #2789 from nasa/fix-description
JoelMcKinnon Mar 26, 2020
23ec838
Merge pull request #2764 from nasa/condition-persist
davetsay Mar 26, 2020
d1b28e0
Merge branch 'topic-conditionals' into new-widget
charlesh88 Mar 26, 2020
7c200df
resolved merge conflict
Mar 26, 2020
4172fdf
Merge pull request #2788 from nasa/criterion-enum-persist
shefalijoshi Mar 26, 2020
5128af2
New Condition Widget, WIP
charlesh88 Mar 26, 2020
53440c3
Handles remove telemetry from condition set - this resets criterion p…
shefalijoshi Mar 26, 2020
91e1a14
Merge branch 'master' of https://github.com/nasa/openmct into topic-c…
shefalijoshi Mar 26, 2020
4413c29
Merge pull request #2793 from nasa/new-widget
charlesh88 Mar 26, 2020
ec0291c
Implement any telemetry and all telemetry options
shefalijoshi Mar 26, 2020
7282792
fixed refs and ev bugs
Mar 26, 2020
f0fd0a9
Use parsed telemetry data values for condition evaluations (#2783)
shefalijoshi Mar 26, 2020
bf947a8
reverted to espresso (#2797)
JoelMcKinnon Mar 26, 2020
502d29d
Add all and any options for telemetry
shefalijoshi Mar 26, 2020
459a055
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 27, 2020
03a690a
Fixes import
shefalijoshi Mar 27, 2020
0a1959d
Fixes linting issues
shefalijoshi Mar 27, 2020
1a86204
used lodash cloneDeep for criteria, conditions
Mar 27, 2020
ef3c4cc
clear dependent fields when field selector is changed
Mar 27, 2020
5f06100
fixed updateOperations, clearDependentFields, removed unnecessary ref
Mar 27, 2020
5ec8ac9
Fixes linting issues
shefalijoshi Mar 27, 2020
f990a14
Remove duplicate metadata options
shefalijoshi Mar 27, 2020
89a298f
Removes name string fix
shefalijoshi Mar 27, 2020
90b475e
addressed review comments
Mar 29, 2020
c02cbd1
Merge pull request #2804 from nasa/criterion-type-change
davetsay Mar 29, 2020
389589d
Merge pull request #2806 from nasa/preserve-user-input
davetsay Mar 29, 2020
a5a4bb8
Removed extra if statement, copied only config
Mar 30, 2020
2907d6d
moved opy to cloneCondition
Mar 30, 2020
d00e8b6
Merge pull request #2802 from nasa/clone-condition-issues
davetsay Mar 30, 2020
84874f2
Cast number inputs to a Number so that operations evaluate correctly …
shefalijoshi Mar 30, 2020
9e12203
Merge branch 'master' into topic-conditionals
davetsay Mar 30, 2020
f9e8832
Condition Widget refinements (#2814)
charlesh88 Mar 30, 2020
a31d10e
Adds NOT and XOR triggers for conditions (#2816)
shefalijoshi Mar 30, 2020
14eaf4e
Addresses comments: Fixes dropdown logic
shefalijoshi Mar 30, 2020
4e39d9f
Test data for condition sets (#2807)
shefalijoshi Mar 30, 2020
984bede
Removed image properties button from display layouts toolbar (#2809)
JoelMcKinnon Mar 30, 2020
42eeeea
Merge branch 'topic-conditionals' of https://github.com/nasa/openmct …
shefalijoshi Mar 31, 2020
e4c9f15
Merge pull request #2800 from nasa/any-all-telemetry
shefalijoshi Mar 31, 2020
0792012
Merge branch 'master' into topic-conditionals
davetsay Mar 31, 2020
4220a8a
[Conditionals] default condition handling (#2827)
davetsay Mar 31, 2020
8512b63
Merge branch 'master' of https://github.com/nasa/openmct into topic-c…
shefalijoshi Mar 31, 2020
064cf67
Adds copyright text
shefalijoshi Mar 31, 2020
3956cd1
Merge pull request #2829 from nasa/topic-conditionals-master-merge
shefalijoshi Mar 31, 2020
ebaf702
Topic conditionals master merge (#2833)
charlesh88 Mar 31, 2020
b90eb80
Addresses review comments: Rename file, change copyright year, remove…
shefalijoshi Mar 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rendering correct number of input fields depending on operation and p…
…ersisting values
  • Loading branch information
Joel McKinnon committed Feb 26, 2020
commit 8f87cc78e8f7e31853c950cdcaef6ae19d0e86a2
44 changes: 22 additions & 22 deletions src/plugins/condition/components/Criterion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@
{{ option.text }}
</option>
</select>
<input v-if="isInputOperation"
v-model="criterion.input"
<input v-if="inputCount > 0"
v-model="criterion.input[0]"
class="t-condition-name-input"
type="text"
@blur="persist"
>
<span v-if="inputCount === 2">and</span>
<input v-if="inputCount === 2"
v-model="criterion.input[1]"
class="t-condition-name-input"
type="text"
@blur="persist"
>
</span>
</span>
</li>

</template>

<script>
Expand Down Expand Up @@ -86,7 +92,7 @@ export default {
telemetryMetadataOptions: {},
operations: OPERATIONS,
filteredOps: [],
isInputOperation: false,
inputCount: 0,
rowLabel: ''
}
},
Expand All @@ -101,11 +107,7 @@ export default {
},
methods: {
updateMetadataOptions(ev) {
if (ev) {
this.criterion.metadata = '';
this.criterion.operation = '';
this.criterion.input = [];
}
if (ev) {this.clearInputs()}
if (this.criterion.telemetry) {
this.openmct.objects.get(this.criterion.telemetry).then((telemetryObject) => {
this.telemetryMetadata = this.openmct.telemetry.getMetadata(telemetryObject);
Expand All @@ -116,13 +118,9 @@ export default {
} else {
this.criterion.metadata = '';
}
this.persist();
},
updateOperations(ev) {
if (ev) {
this.criterion.operation = '';
this.criterion.input = [];
}
if (ev) {this.clearInputs()}
let operationFormat = 'string';
this.telemetryMetadata.valueMetadatas.forEach((value, index) => {
if (value.key === this.criterion.metadata) {
Expand All @@ -139,23 +137,25 @@ export default {
}
});
this.filteredOps = [...this.operations.filter(op => op.appliesTo.indexOf(operationFormat) !== -1)];
this.persist();
},
updateOperationInputVisibility(ev) {
if (ev) {
this.criterion.input = [];
}
if (this.criterion.operation === '') {
this.isInputOperation = false;
} else {
for (let i = 0; i < this.filteredOps.length; i++) {
if (this.criterion.operation === this.filteredOps[i].name) {
this.isInputOperation = this.filteredOps[i].inputCount > 0;
if (!this.isInputOperation) {this.criterion.input = ''}
}
for (let i = 0; i < this.filteredOps.length; i++) {
if (this.criterion.operation === this.filteredOps[i].name) {
this.inputCount = this.filteredOps[i].inputCount;
if (!this.inputCount) {this.criterion.input = []}
}
}
this.persist();
},
clearInputs() {
this.criterion.operation = '';
this.criterion.input = [];
this.inputCount = 0;
},
updateMetadataSelection() {
this.updateOperationInputVisibility();
},
Expand Down