Web interface configuration update

57 views
Skip to first unread message

俊黄

unread,
May 21, 2020, 12:35:28 PM5/21/20
to Lunaserv
Dear Nick,
I updated the public/config/lunaserv.yml file with a new layer, and restarted passenger. However, the webpage didn't updated as I expected.

Should I run something to update the webpage?

Thanks!
Jun

Nick Estes

unread,
May 21, 2020, 4:58:00 PM5/21/20
to 俊黄, Lunaserv
Web browsers often cache that file without checking for updates, even on
a forced reload, but there's a way to force that to happen. If you look
in the lunaserv.html file and search for where it loads lunaserv.yml,
there might already be something like "?reload=1" after it. The only
purpose for that is to force browsers to reload the yml file, just
change the 1 to anything else (2, a datestamp, whatever), and the
browser will then see it as a cache miss and pull the new yml file even
though the get parameter is otherwise meaningless.

--Nick
> --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lunaserv+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lunaserv/973343ba-bf77-4701-b481-1307fce0813a%40googlegroups.com
> [1].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/lunaserv/973343ba-bf77-4701-b481-1307fce0813a%40googlegroups.com?utm_medium=email&utm_source=footer

俊黄

unread,
May 22, 2020, 11:29:21 PM5/22/20
to Lunaserv
Thank you for the guide.

However, I didn't find "?reload=1" in /public/lunaserv.html file, but I found it in /public/javascripts/lunaserv.js 

I restarted the passenger service, but It didn't work.

The layer I added is MOLA color map, which works perfect in QGIS. The mola pyramided GeoTIFF file (1.7G) is in layer/mars/mola_color. I didn't create .ext file with it due to the embedded geo info in the tiff file. 

The part I edited in /public/config/lunaserv.yml file is in BOLD:
MARS:
    NAME: Mars
    BODY_CODE: !!str 499
    RADIUS: 3397000
    DEFAULT_BASEMAP: mars_viking
    LAYERS:
      BASE:
        NAME: Base layer
        TYPE: MENU
        MARS_VIKING:
          NAME: Viking merged color mosaic
          TYPE: RADIO
          RADIO_GROUP: BASE
          SERVER_LAYERS: mars_viking
MARS_MOLA_COLOR:
  NAME: MOLA COLOR
  TYPE: RADIO
  RADIO_GROUP: BASE
  SERVER_LAYERS: mars_mola_color
      MISC:
        NAME: Miscellaneous
        TYPE: MENU
        MARS_NOMENCLATURE:
          NAME: Mars nomenclature
          TYPE: CHECKBOX
          SERVER_LAYERS: mars_nomenclature
          ADDITIONAL_WMS:
            mars_nomenclature_background: ffffff60
        MARS_DAY_NIGHT:
          NAME: Nighttime shading (now)
          TYPE: CHECKBOX
          SERVER_LAYERS: mars_day_night

Jun

On Friday, May 22, 2020 at 4:58:00 AM UTC+8, Nick Estes wrote:
Web browsers often cache that file without checking for updates, even on
a forced reload, but there's a way to force that to happen.  If you look
in the lunaserv.html file and search for where it loads lunaserv.yml,
there might already be something like "?reload=1" after it.  The only
purpose for that is to force browsers to reload the yml file, just
change the 1 to anything else (2, a datestamp, whatever), and the
browser will then see it as a cache miss and pull the new yml file even
though the get parameter is otherwise meaningless.

         --Nick


On 2020-05-21 09:35, 俊黄 wrote:
> Dear Nick,
> I updated the public/config/lunaserv.yml file with a new layer, and
> restarted passenger. However, the webpage didn't updated as I
> expected.
>
> Should I run something to update the webpage?
>
> Thanks!
> Jun
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to luna...@googlegroups.com.

俊黄

unread,
May 26, 2020, 10:18:10 AM5/26/20
to Lunaserv
Dear Nick,
I have encountered another issue when try to access lunaserv from a different computer via a web browser (google chrome). It didn't display any image data (attached), and the lunaserv says:
I, [2020-05-26T22:11:53.647506 #18457]  INFO -- : Request for: / from 59.172.66.225 query: {}
I, [2020-05-26T22:11:53.678757 #18457]  INFO -- : Request completed in 0.030766006 seconds. Status: 302
I, [2020-05-26T22:11:53.894778 #18457]  INFO -- : Request for: /js/jquery.history.js from 59.172.66.225 query: {}
I, [2020-05-26T22:11:53.926425 #18457]  INFO -- : Request completed in 0.031268847 seconds. Status: 404
I, [2020-05-26T22:11:54.518532 #18457]  INFO -- : Request for: /javascripts/theme/default/style.css from 59.172.66.225 query: {}
I, [2020-05-26T22:11:54.552559 #18457]  INFO -- : Request completed in 0.033604645 seconds. Status: 404

However, I can successfully access lunaserv using qgis.

Thank you very much for your help!
Jun
On Friday, May 22, 2020 at 4:58:00 AM UTC+8, Nick Estes wrote:
Web browsers often cache that file without checking for updates, even on
a forced reload, but there's a way to force that to happen.  If you look
in the lunaserv.html file and search for where it loads lunaserv.yml,
there might already be something like "?reload=1" after it.  The only
purpose for that is to force browsers to reload the yml file, just
change the 1 to anything else (2, a datestamp, whatever), and the
browser will then see it as a cache miss and pull the new yml file even
though the get parameter is otherwise meaningless.

         --Nick


On 2020-05-21 09:35, 俊黄 wrote:
> Dear Nick,
> I updated the public/config/lunaserv.yml file with a new layer, and
> restarted passenger. However, the webpage didn't updated as I
> expected.
>
> Should I run something to update the webpage?
>
> Thanks!
> Jun
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to luna...@googlegroups.com.
snapshot.png

Nick Estes

unread,
Jun 11, 2020, 11:40:18 AM6/11/20
to 俊黄, Lunaserv
Jun,

Sorry I didn't reply to this earlier, I ended up in the hospital for a
few days and got behind on all my email. Are you still having issues,
or were you able to resolve it?

--Nick


On 2020-05-26 07:18, 俊黄 wrote:
> Dear Nick,
>> [2]
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lunaserv+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lunaserv/a5d06706-2bad-4003-9e9f-811e075e9fe7%40googlegroups.com
> [3].
> [2]
> https://groups.google.com/d/msgid/lunaserv/973343ba-bf77-4701-b481-1307fce0813a%40googlegroups.com?utm_medium=email&utm_source=footer
> [3]
> https://groups.google.com/d/msgid/lunaserv/a5d06706-2bad-4003-9e9f-811e075e9fe7%40googlegroups.com?utm_medium=email&utm_source=footer

俊黄

unread,
Jun 12, 2020, 6:26:13 AM6/12/20
to Lunaserv
Dear Nick,
I am sorry to hear that you were in the hospital. I wish you are getting better now!

We went through your previous posts and found out that the way to resolve it is to set the right URL in the yml file. We should have posted the solution earlier.

The infected number in AZ is still growing. Please take care.

Jun
Reply all
Reply to author
Forward
0 new messages