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

Add some informations about the Dynamic.js view #4054

Merged
merged 1 commit into from
Aug 28, 2018
Merged

Add some informations about the Dynamic.js view #4054

merged 1 commit into from
Aug 28, 2018

Conversation

sbrunner
Copy link
Member

No description provided.

@sbrunner sbrunner added this to the 2.3 milestone Aug 27, 2018
@sbrunner sbrunner requested a review from jwkaltz August 27, 2018 09:59
Dynamic.js view
---------------

To configure the ngeo constance with dynamic or configurable bales we have the dynamic view.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constance => constants

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bales ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand you second message...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just understand, fixed, thanks :-)

(mobile/desktop).
* ``do_redirect``: directly to the redirect.
* ``constants``: Dirrectly define an ``angular`` constant in the vars file.
* ``routes``: key: constant name, value name of the route witch one we want to have the URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand.
How I suppose it works:
routes: ngeo constant name: pyramid route name, same as a constant, but interpreted on server side through pyramid request.route_url.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"configuration bales" seems stange to me, but I'm not high level english speaker.

* ``do_redirect``: directly to the redirect.
* ``constants``: Dirrectly define an ``angular`` constant in the vars file.
* ``routes``: key: constant name, value name of the route witch one we want to have the URL.
* ``static``: key: constant name, value name of the static view that we want to have the URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same a routes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it OK or can we do something better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really better understanding with the colon after value. OK for me.

* ``redirect_interface``: interface on witch one we can be redirected if we use the wrong type of device
(mobile/desktop).
* ``do_redirect``: directly to the redirect.
* ``constants``: Dirrectly define an ``angular`` constant in the vars file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dirrectly => Directly

@sbrunner sbrunner force-pushed the doc-dynamic branch 2 times, most recently from e7e1b21 to 282fc35 Compare August 27, 2018 12:12

* ``redirect_interface``: interface on witch one we can be redirected if we use the wrong type of device
(mobile/desktop).
* ``do_redirect``: directly to the redirect.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to => do ?

This view is configurable in the vars files in the section ``interfaces_config``.
The sub section is the interface name, and after we have:

* ``redirect_interface``: interface on witch one we can be redirected if we use the wrong type of device
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
interface to be redirected to if an unexpected device type is used (mobile/desktop)

(mobile/desktop).
* ``do_redirect``: directly do the redirect.
* ``constants``: Directly define an ``angular`` constant in the vars file.
* ``routes``: key: constant name, value: name of the route witch one we want to have the URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value description is not clear to me - I am not sure what we are trying to say here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of the route for which the URL is wanted. ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that sounds good

* ``static``: key: constant name, value: name of the static view that we want to have the URL.
* ``fulltextsearch_params``: Additional parameters to the full text search view, see
:ref:`developer_webservices_fts` for more information.
* ``wfs_permalink``: Additional values for the ``ngeoWfsPermalinkOptions`` constant, see:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ngeoWfsPermalinkOptions is not a constant, but something else, I guess?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an angular constant name...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't it strange to provide additional values for a constant? (constant = a constant value to me, not something where you can provide additional values)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In code I do that (in mako template):

<%
wfs_permalink = dict(url=request.route_url('mapserverproxy'))
wfs_permalink.update(interface_config.get('wfs_permalink', {}))
%>
module.constant('ngeoWfsPermalinkOptions', ${json.dumps(wfs_permalink) | n});

...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I understand, thanks.

@sbrunner sbrunner merged commit 66dc944 into 2.3 Aug 28, 2018
@sbrunner sbrunner deleted the doc-dynamic branch August 28, 2018 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants