Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-21846

Firefly TAP UI on LSST Portal is not defaulting to the correct TAP service

    XMLWordPrintable

Details

    • 2
    • Science User Interface

    Description

      When the Portal ("suit" application) is started up on the lsst-lsp-int instance of the LSST Science Platform, the initial TAP screen comes up pointed at the lsst-lsp-stable.ncsa.illinois.edu TAP service. Both the -stable and -int services are configured into the TAP service menu, which used to work semi-accidentally, but now that authorization is fully enabled, only the matching TAP service will be accessible (-stable Portal must talk to -stable TAP, -int Portal must talk to -int TAP).

      This "instance matching" has been in the design all along.

      The TAP service list is currently statically configured in https://github.com/lsst/suit/blob/master/src/suit/js/SUIT.js

      Can we change this code to get the LSST TAP service URL by extracting the base URL from the URL of the currently displayed page? (Technically, by extracting everything before "/portal".)

      We need this change not only to get `-int` working properly by default, but also to get this working on cloud-based LSP deployments. Whatever the Portal URL is, let's say "https://lsst.codes/lsp/portal", the TAP service URL needs to be "https://lsst.codes/lsp/api/tap".

      Attachments

        Issue Links

          Activity

            I don't pretend that this is competent Javascript coding, but this is more or less what I have in mind:

            // Obtain the location of the LSST TAP service for *this* instance of the LSP.
            // If the Portal is at https://xyzzy.lsst.org/lsp/portal/app, then the TAP service
            // will be at https://xyzzy.lsst.org/lsp/api/tap .
            // At NCSA this is normally https://lsst-lsp-{stable,int}.ncsa.illinois.edu/api/tap ,
            // but this knowledge should not be embedded in the Firefly code.
             
            var appurl = window.location.href;
            var n = appurl.indexOf('[^/]/portal/');     // do not match if the hostname happens to begin with '/portal' someday
            var lspbase = appurl.substring(0, n+1); // advance a character to account for the not-a-/ in the regexp
            var lsptapurl = lspbase.concat('/api/tap');
            var lsptaplabel = 'LSST LSP ';
            lsptaplabel.concat( lsptapurl );
             
            // ... now prepend to the TAP service list
             
            options['tap']['services'].unshift( { label: lsptaplabel, value: lsptapurl } );
            

            gpdf Gregory Dubois-Felsmann added a comment - I don't pretend that this is competent Javascript coding, but this is more or less what I have in mind: // Obtain the location of the LSST TAP service for *this* instance of the LSP. // If the Portal is at https://xyzzy.lsst.org/lsp/portal/app, then the TAP service // will be at https://xyzzy.lsst.org/lsp/api/tap . // At NCSA this is normally https://lsst-lsp-{stable,int}.ncsa.illinois.edu/api/tap , // but this knowledge should not be embedded in the Firefly code.   var appurl = window.location.href; var n = appurl.indexOf( '[^/]/portal/' ); // do not match if the hostname happens to begin with '/portal' someday var lspbase = appurl.substring(0, n+1); // advance a character to account for the not-a-/ in the regexp var lsptapurl = lspbase.concat( '/api/tap' ); var lsptaplabel = 'LSST LSP ' ; lsptaplabel.concat( lsptapurl );   // ... now prepend to the TAP service list   options[ 'tap' ][ 'services' ].unshift( { label: lsptaplabel, value: lsptapurl } );

            This is tracked as ticket FIREFLY-411 within IPAC.

            gpdf Gregory Dubois-Felsmann added a comment - This is tracked as ticket FIREFLY-411 within IPAC.

            Reviewed as requested, on the PR https://github.com/lsst/suit/pull/19

            gpdf Gregory Dubois-Felsmann added a comment - Reviewed as requested, on the PR https://github.com/lsst/suit/pull/19

            Merged and deployed, observed to be functioning as expected.

            gpdf Gregory Dubois-Felsmann added a comment - Merged and deployed, observed to be functioning as expected.

            While the TAP query functionality still has problems, the one mentioned in this ticket seems to be resolved and this ticket can be closed.

            gpdf Gregory Dubois-Felsmann added a comment - While the TAP query functionality still has problems, the one mentioned in this ticket seems to be resolved and this ticket can be closed.

            People

              roby Trey Roby
              gpdf Gregory Dubois-Felsmann
              Gregory Dubois-Felsmann, Loi Ly
              Gregory Dubois-Felsmann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.