Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
contactJS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MOTIVATE
contactJS
Commits
74530279
Commit
74530279
authored
9 years ago
by
Helena Jank
Browse files
Options
Downloads
Patches
Plain Diff
+ added translations to unsatisfied attributes in order to extend search for relevant components
parent
9f5d860a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/modules/aggregator/aggregator.js
+10
-1
10 additions, 1 deletion
js/modules/aggregator/aggregator.js
with
10 additions
and
1 deletion
js/modules/aggregator/aggregator.js
+
10
−
1
View file @
74530279
...
...
@@ -618,7 +618,16 @@ define(['easejs', 'MathUuid','widget',
* @param {Array} _componentTypes An array of components classes that should be searched for (e.g. Widget, Interpreter and Aggregator).
*/
'
private getComponentsForUnsatisfiedAttributeTypes
'
:
function
(
_unsatisfiedAttributes
,
_all
,
_componentTypes
)
{
// ask the discoverer for components that satisfy the requested components
var
attrs
=
_unsatisfiedAttributes
.
getItems
();
var
translations
=
this
.
discoverer
.
getTranslations
();
for
(
attribute
in
attrs
)
{
for
(
translation
in
translations
)
{
_unsatisfiedAttributes
.
put
(
translations
[
translation
].
getSynonym
(
attrs
[
attribute
]));
}
}
// ask the discoverer for components that satisfy the requested components
var
relevantComponents
=
this
.
discoverer
.
getComponentsByAttributes
(
_unsatisfiedAttributes
,
_all
,
_componentTypes
);
console
.
log
(
"
I found
"
+
relevantComponents
.
length
+
"
component(s) of type
"
+
_componentTypes
+
"
that might satisfy the requested attributes.
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment