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
7f66360b
Commit
7f66360b
authored
9 years ago
by
Tobias Moebert
Browse files
Options
Downloads
Patches
Plain Diff
# [Discoverer] minor corrections
parent
ae8d6bf4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/modules/discoverer/discoverer.js
+3
-5
3 additions, 5 deletions
js/modules/discoverer/discoverer.js
with
3 additions
and
5 deletions
js/modules/discoverer/discoverer.js
+
3
−
5
View file @
7f66360b
...
...
@@ -361,9 +361,8 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
if
(
!
theAggregator
.
_hasComponent
(
theComponent
.
getId
()))
{
// if component is a widget and it wasn't added before, subscribe to its callbacks
if
(
theComponent
instanceof
Widget
)
{
console
.
log
(
"
Discoverer: It's a Widget.
"
);
theAggregator
.
addWidgetSubscription
(
theComponent
);
console
.
log
(
"
Discoverer:
T
he Aggregator did subscribe to
"
+
theComponent
.
name
+
"
.
"
);
console
.
log
(
"
Discoverer:
I found
"
+
theComponent
.
name
+
"
and t
he Aggregator did subscribe to
it
.
"
);
this
.
_removeAttributesSatisfiedByWidget
(
aggregatorId
,
theComponent
,
unsatisfiedAttributes
);
}
else
if
(
theComponent
instanceof
Interpreter
)
{
// if the component is an interpreter and all its in attributes can be satisfied, add the interpreter
console
.
log
(
"
Discoverer: It's an Interpreter.
"
);
...
...
@@ -393,7 +392,6 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
*/
Discoverer
.
prototype
.
_getUnregisteredComponentsForUnsatisfiedAttributes
=
function
(
aggregatorId
,
unsatisfiedAttributes
)
{
var
theAggregator
=
this
.
getAggregator
(
aggregatorId
);
console
.
log
(
"
Discoverer: Let's look at the unregistered components.
"
);
//check all Widget's outAttributes
...
...
@@ -407,8 +405,8 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
//create temporary OutAttributeList
var
tempWidgetOutList
=
AttributeList
.
fromAttributeDescription
(
this
,
theWidget
.
inOut
.
out
);
for
(
var
temp
OutAttribute
=
0
;
tempOutAttribute
<
tempWidgetOutList
.
size
();
tempOutAttribute
++
)
{
if
(
theUnsatisfiedAttribute
.
equalsTypeOf
(
tempWidgetOutList
.
getItems
()
[
temp
OutAttribute
]))
{
for
(
var
temp
WidgetOutListIndex
in
tempWidgetOutList
.
getItems
()
)
{
if
(
theUnsatisfiedAttribute
.
equalsTypeOf
(
tempWidgetOutList
.
getItems
[
temp
WidgetOutListIndex
]))
{
console
.
log
(
"
Discoverer: I have found an unregistered
"
+
theWidget
.
name
+
"
.
"
);
var
newWidget
=
new
theWidget
(
this
,
tempWidgetOutList
);
theAggregator
.
addWidgetSubscription
(
newWidget
);
...
...
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