You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by Mark Nolan <ma...@gmail.com> on 2018/05/15 18:35:06 UTC

Question about isLoaded in homeController.js

guacamole/src/main/webapp/app/home/controllers/homeController.js


I see that there is an item added to the $scope:

$scope.rootConnectionGroups = null;

This variable is used throughout the code.


The isLoaded method checks a different variable:

    $scope.isLoaded = function isLoaded() {

        return $scope.rootConnectionGroup !== null;

    };


Now, the controller doesn't have an isolated scope, so this may be entirely
as intended (the variable may be defined elsewhere), but I wonder if it is
a typo.

Regards,
Mark.
.

Re: Question about isLoaded in homeController.js

Posted by Nick Couchman <vn...@apache.org>.
On Tue, May 15, 2018 at 2:42 PM, Mark Nolan <ma...@gmail.com> wrote:

> That sets rootConnectionGroups. The only reference to the singular form is
> in isLoaded (
> https://github.com/apache/guacamole-client/blob/
> 9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/
> webapp/app/home/controllers/homeController.js#L73
> )
>
> M.
> .


Ha.  Right you are.  Okay, maybe it is a typo...

Re: Question about isLoaded in homeController.js

Posted by Nick Couchman <vn...@apache.org>.
Opened a JIRA issue (https://issues.apache.org/jira/browse/GUACAMOLE-571)
and a pull request (https://github.com/apache/guacamole-client/pull/298)
for this.  Thanks for the heads-up, Mark!

-Nick

On Tue, May 15, 2018 at 2:42 PM, Mark Nolan <ma...@gmail.com> wrote:

> That sets rootConnectionGroups. The only reference to the singular form is
> in isLoaded (
> https://github.com/apache/guacamole-client/blob/
> 9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/
> webapp/app/home/controllers/homeController.js#L73
> )
>
> M.
> .
>
>
> On 15 May 2018 at 19:38, Nick Couchman <vn...@apache.org> wrote:
>
> > On Tue, May 15, 2018 at 2:35 PM, Mark Nolan <ma...@gmail.com> wrote:
> >
> > > guacamole/src/main/webapp/app/home/controllers/homeController.js
> > >
> > >
> > > I see that there is an item added to the $scope:
> > >
> > > $scope.rootConnectionGroups = null;
> > >
> > > This variable is used throughout the code.
> > >
> > >
> > > The isLoaded method checks a different variable:
> > >
> > >     $scope.isLoaded = function isLoaded() {
> > >
> > >         return $scope.rootConnectionGroup !== null;
> > >
> > >     };
> > >
> > >
> > > Now, the controller doesn't have an isolated scope, so this may be
> > entirely
> > > as intended (the variable may be defined elsewhere), but I wonder if it
> > is
> > > a typo.
> > >
> > >
> > It is not a typo - if you look toward the end of that file, you'll see
> > where it is populated:
> >
> > https://github.com/apache/guacamole-client/blob/
> > 9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/
> > webapp/app/home/controllers/homeController.js#L129
> >
> > -Nick
> >
>

Re: Question about isLoaded in homeController.js

Posted by Mark Nolan <ma...@gmail.com>.
That sets rootConnectionGroups. The only reference to the singular form is
in isLoaded (
https://github.com/apache/guacamole-client/blob/9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/webapp/app/home/controllers/homeController.js#L73
)

M.
.


On 15 May 2018 at 19:38, Nick Couchman <vn...@apache.org> wrote:

> On Tue, May 15, 2018 at 2:35 PM, Mark Nolan <ma...@gmail.com> wrote:
>
> > guacamole/src/main/webapp/app/home/controllers/homeController.js
> >
> >
> > I see that there is an item added to the $scope:
> >
> > $scope.rootConnectionGroups = null;
> >
> > This variable is used throughout the code.
> >
> >
> > The isLoaded method checks a different variable:
> >
> >     $scope.isLoaded = function isLoaded() {
> >
> >         return $scope.rootConnectionGroup !== null;
> >
> >     };
> >
> >
> > Now, the controller doesn't have an isolated scope, so this may be
> entirely
> > as intended (the variable may be defined elsewhere), but I wonder if it
> is
> > a typo.
> >
> >
> It is not a typo - if you look toward the end of that file, you'll see
> where it is populated:
>
> https://github.com/apache/guacamole-client/blob/
> 9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/
> webapp/app/home/controllers/homeController.js#L129
>
> -Nick
>

Re: Question about isLoaded in homeController.js

Posted by Nick Couchman <vn...@apache.org>.
On Tue, May 15, 2018 at 2:35 PM, Mark Nolan <ma...@gmail.com> wrote:

> guacamole/src/main/webapp/app/home/controllers/homeController.js
>
>
> I see that there is an item added to the $scope:
>
> $scope.rootConnectionGroups = null;
>
> This variable is used throughout the code.
>
>
> The isLoaded method checks a different variable:
>
>     $scope.isLoaded = function isLoaded() {
>
>         return $scope.rootConnectionGroup !== null;
>
>     };
>
>
> Now, the controller doesn't have an isolated scope, so this may be entirely
> as intended (the variable may be defined elsewhere), but I wonder if it is
> a typo.
>
>
It is not a typo - if you look toward the end of that file, you'll see
where it is populated:

https://github.com/apache/guacamole-client/blob/9d09f0bb0a6bed3b355572644faf374d5ca14f8b/guacamole/src/main/webapp/app/home/controllers/homeController.js#L129

-Nick