Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3173

Update quickload javascript library to fix problem with page not showing

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Fall 2 2022 Sep 5, Fall 3 2022 Sep 26, Fall 4 2022 Oct 10, Fall 5 2022 Oct 24, Fall 6 2022 Nov 7, Fall 7 2022 Nov 21

      Description

      Our Quickload sites all use "strapdown" to present a more appealing appearance to users when they visit the Quickload sites in a Web browser.

      We have three "main" quickload sites that are provisioned onto hosts using subversion. The deployments we have currently for these are:

      Note that these sites are version-controlled using subversion (svn) on an EC2 with hostname:

      To browse the repository, visit:

      To deploy a copy of IGB quickload main (with it's styling info), use subversion as per the HEADER.md file in the "genomes/quickload" repository location:

      <h2>How to replicate this Web site</h2>
      20 <p>Set up a host with the Apache2 Web server. (It may work with other servers, too. We have never tested that.)</p>
      21 <p>
      22 The Quickload data require around 60 Gb or less.
      23 </p>
      24 <p>Install svn and check out the repository with a read-only user:</p>
      25 <p>`svn co --username=guest co https://svn.bioviz.org/repos/genomes/quickload`</p>
      26 <p>Place the checkedout-repository in your htdocs directory (DocumentRoot)</p>
      27 <p>Configure your Web server to allow fancy directory listings and configurations from .htaccess files residing alongside content.</p>

      Note: You don't actually have to get the entire site. You can if you want "check out" (clone) individual directories, e.g., the "style" directory.

      Here is what we "check out" when we deploy a quickload main mirror to a host:

      * [aloraine@lorainelab-quickload quickload]$ svn info
      Path: .
      Working Copy Root Path: /projects/igbquickload/lorainelab/www/main/htdocs/quickload
      URL: https://svn.bioviz.org/repos/genomes/quickload
      Repository Root: https://svn.bioviz.org/repos/genomes
      Repository UUID: 6adf4aaa-c9d1-47cf-a9da-488921ac0e0a
      Revision: 166
      Node Kind: directory
      Schedule: normal
      Last Changed Author: aloraine
      Last Changed Rev: 166
      Last Changed Date: 2022-07-06 07:47:14 -0400 (Wed, 06 Jul 2022)
      

      To "check in" your changes, you would need an account on the svn host. For this, ask AL.

      To see all the repositories used in IGB, just look at the igb preferences json file in the "igb_preferences" module. These are all present on three differents hosts - igbquickload.org host, renci host, and amazon host. Updating everything will be unfortunately a chore.

        Attachments

        1. Issue.png
          Issue.png
          43 kB
        2. jserror.png
          jserror.png
          113 kB
        3. strapdown.min.v3173.js
          29 kB

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            For debugging and troubleshooting I am using a mirror of the BioViz Web site which uses strapdown to display nicer views of directory contents, in bioviz.org/quickload, which is currently broken.

            Show
            ann.loraine Ann Loraine added a comment - For debugging and troubleshooting I am using a mirror of the BioViz Web site which uses strapdown to display nicer views of directory contents, in bioviz.org/quickload, which is currently broken.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Bioviz mirror deployed to https://bioviztest3.bioviz.org/
            Using my fork: https://bitbucket.org/aloraine/bioviz/

            BioViz web site contains a file ".htaccess" with the following code:

            # Autoindex-Strapdown Directives
            AddType text/plain .md
            HeaderName HEADER.md
            ReadmeName README.md
            
            # Customize by setting theme and title
            IndexHeadInsert "<script>conf = {theme: 'bootstrap', title: 'File list'};</script> \
            <script src='/js/autoindex_strapdown.js'></script> \
            <link rel='stylesheet' href='https://ais.habilis.net/autoindex_strapdown.css'>"
            

            Problem appears to be in /js/autoindex_strapdown.js. Checking into it.

            The script contains one function "addEventListener" which tries to get this file:

            which is no longer available due to the domain being expired.

            Looking for a copy of this somewhere.

            Show
            ann.loraine Ann Loraine added a comment - - edited Bioviz mirror deployed to https://bioviztest3.bioviz.org/ Using my fork: https://bitbucket.org/aloraine/bioviz/ BioViz web site contains a file ".htaccess" with the following code: # Autoindex-Strapdown Directives AddType text/plain .md HeaderName HEADER.md ReadmeName README.md # Customize by setting theme and title IndexHeadInsert "<script>conf = {theme: 'bootstrap', title: 'File list'};</script> \ <script src='/js/autoindex_strapdown.js'></script> \ <link rel='stylesheet' href='https: //ais.habilis.net/autoindex_strapdown.css'>" Problem appears to be in /js/autoindex_strapdown.js. Checking into it. The script contains one function "addEventListener" which tries to get this file: https://strapdownjs.com/v/0.2/strapdown.js which is no longer available due to the domain being expired. Looking for a copy of this somewhere.
            Hide
            ann.loraine Ann Loraine added a comment -
            Show
            ann.loraine Ann Loraine added a comment - Found this: https://github.com/Naereen/StrapDown.js/
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Replaced defunct strapdown link with: * https://cdn.jsdelivr.net/gh/Naereen/StrapDown.js@master/strapdown.min.js

            Checked location in the site that uses the strapdown code to display file index in web folders. Looks fine now. Making a branch and pushing.

            Show
            ann.loraine Ann Loraine added a comment - - edited Replaced defunct strapdown link with: * https://cdn.jsdelivr.net/gh/Naereen/StrapDown.js@master/strapdown.min.js Checked location in the site that uses the strapdown code to display file index in web folders. Looks fine now. Making a branch and pushing.
            Hide
            ann.loraine Ann Loraine added a comment -

            Branch:

            https://bitbucket.org/aloraine/bioviz/branch/IGBF-3173

            Requesting 1st level review from Karthik Raveendran.

            To review, check and view the contents of this locations:

            https://bioviztest3.bioviz.org/igb
            https://bioviztest3.bioviz.org/quickload

            Does everything look OK?

            Show
            ann.loraine Ann Loraine added a comment - Branch: https://bitbucket.org/aloraine/bioviz/branch/IGBF-3173 Requesting 1st level review from Karthik Raveendran . To review, check and view the contents of this locations: https://bioviztest3.bioviz.org/igb https://bioviztest3.bioviz.org/quickload Does everything look OK?
            Hide
            ann.loraine Ann Loraine added a comment -

            Nowlan Freese please look at it also or instead, depending on your availability.

            Show
            ann.loraine Ann Loraine added a comment - Nowlan Freese please look at it also or instead, depending on your availability.
            Hide
            ann.loraine Ann Loraine added a comment -

            svn host appears full - getting this error on my laptop when I try to get the most up-to-date data from svn host:

            local aloraine$ svn up
            Updating '.':
            svn: E200029: Couldn't perform atomic initialization
            
            Show
            ann.loraine Ann Loraine added a comment - svn host appears full - getting this error on my laptop when I try to get the most up-to-date data from svn host: local aloraine$ svn up Updating '.': svn: E200029: Couldn't perform atomic initialization
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Looking at space usage on the host:

            [elastic svn dev]$ df -h
            Filesystem      Size  Used Avail Use% Mounted on
            devtmpfs        476M     0  476M   0% /dev
            tmpfs           493M     0  493M   0% /dev/shm
            tmpfs           493M   56M  438M  12% /run
            tmpfs           493M     0  493M   0% /sys/fs/cgroup
            /dev/xvda1      8.0G  8.0G   20K 100% /
            /dev/xvdf        99G   23G   71G  25% /svn
            tmpfs            99M     0   99M   0% /run/user/1000
            

            Why is /dev/xvda1 full?

            Show
            ann.loraine Ann Loraine added a comment - - edited Looking at space usage on the host: [elastic svn dev]$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 476M 0 476M 0% /dev tmpfs 493M 0 493M 0% /dev/shm tmpfs 493M 56M 438M 12% /run tmpfs 493M 0 493M 0% /sys/fs/cgroup /dev/xvda1 8.0G 8.0G 20K 100% / /dev/xvdf 99G 23G 71G 25% /svn tmpfs 99M 0 99M 0% /run/user/1000 Why is /dev/xvda1 full?
            Hide
            ann.loraine Ann Loraine added a comment -

            Rebooting the host in hopes that some very large system log files will get deleted.

            Show
            ann.loraine Ann Loraine added a comment - Rebooting the host in hopes that some very large system log files will get deleted.
            Hide
            ann.loraine Ann Loraine added a comment -

            Looks like rebooting failed in that the svn EBS did not get remounted:

            [elastic svn svn]$ df -h
            Filesystem      Size  Used Avail Use% Mounted on
            devtmpfs        476M     0  476M   0% /dev
            tmpfs           493M     0  493M   0% /dev/shm
            tmpfs           493M  300K  493M   1% /run
            tmpfs           493M     0  493M   0% /sys/fs/cgroup
            /dev/xvda1      8.0G  3.0G  5.1G  38% /
            tmpfs            99M     0   99M   0% /run/user/1000
            
            Show
            ann.loraine Ann Loraine added a comment - Looks like rebooting failed in that the svn EBS did not get remounted: [elastic svn svn]$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 476M 0 476M 0% /dev tmpfs 493M 0 493M 0% /dev/shm tmpfs 493M 300K 493M 1% /run tmpfs 493M 0 493M 0% /sys/fs/cgroup /dev/xvda1 8.0G 3.0G 5.1G 38% / tmpfs 99M 0 99M 0% /run/user/1000
            Hide
            ann.loraine Ann Loraine added a comment -

            host has two ebs volumes - one that is 8 Gb and another that is 100 Gb. The 100 Gb has the svn repository and should be mounted to /svn. Checking that if rebooting yet again, now that the big files were deleted and making space on the 8Gb drive, lets the volume be mounted.

            Show
            ann.loraine Ann Loraine added a comment - host has two ebs volumes - one that is 8 Gb and another that is 100 Gb. The 100 Gb has the svn repository and should be mounted to /svn. Checking that if rebooting yet again, now that the big files were deleted and making space on the 8Gb drive, lets the volume be mounted.
            Hide
            ann.loraine Ann Loraine added a comment -

            The EBS volume with svn repository is attached to the EC2 according to the AWS console. Just needs to be mounted properly I guess. Going to try it now. Maybe make a copy first.

            Show
            ann.loraine Ann Loraine added a comment - The EBS volume with svn repository is attached to the EC2 according to the AWS console. Just needs to be mounted properly I guess. Going to try it now. Maybe make a copy first.
            Hide
            ann.loraine Ann Loraine added a comment -

            Made an image / backup of the volume with today's date in the name.

            Show
            ann.loraine Ann Loraine added a comment - Made an image / backup of the volume with today's date in the name.
            Hide
            ann.loraine Ann Loraine added a comment -

            executed:

            • lsblk - to list the blocks
            • mount -t ext4 /dev/xvdf /svn - to mount the xvdf block to /svn

            /svn mounted the data:

            [root@ip-172-31-63-94 ec2-user]# ls /svn
            genomes  lost+found  svn-auth
            
            Show
            ann.loraine Ann Loraine added a comment - executed: lsblk - to list the blocks mount -t ext4 /dev/xvdf /svn - to mount the xvdf block to /svn /svn mounted the data: [root@ip-172-31-63-94 ec2-user]# ls /svn genomes lost+found svn-auth
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Updated main Quickload sites:

            • renci quickload (hosted on renci)
            • ec2 quickload
            • igbquickload.org (hosted on main campus)

            note: this a temp fix (possibly) depending on review

            Show
            ann.loraine Ann Loraine added a comment - - edited Updated main Quickload sites: renci quickload (hosted on renci) ec2 quickload igbquickload.org (hosted on main campus) note: this a temp fix (possibly) depending on review
            Hide
            karthik Karthik Raveendran added a comment -

            Everything looks fine in the following quickload sites:

            https://bioviztest3.bioviz.org/igb
            https://bioviztest3.bioviz.org/quickload

            I am able to navigate through the directories, view .xml, .txt and .ico files in browser and download the others.

            Show
            karthik Karthik Raveendran added a comment - Everything looks fine in the following quickload sites: https://bioviztest3.bioviz.org/igb https://bioviztest3.bioviz.org/quickload I am able to navigate through the directories, view .xml, .txt and .ico files in browser and download the others.
            Hide
            nfreese Nowlan Freese added a comment - - edited

            Tested on Safari 15.6.1 on Mac

            I am able to see list of files/folders on https://bioviztest3.bioviz.org/igb and https://bioviztest3.bioviz.org/quickload

            My only concern/thought is that there appears to be what looks like an advertisement with links at the top of the page. Is anyone else seeing that?

            SquirtFR? MathJax? Beacon? (StrapDown.js v0.8, theme bootstrap, thanks to BitBucket)

            Show
            nfreese Nowlan Freese added a comment - - edited Tested on Safari 15.6.1 on Mac I am able to see list of files/folders on https://bioviztest3.bioviz.org/igb and https://bioviztest3.bioviz.org/quickload My only concern/thought is that there appears to be what looks like an advertisement with links at the top of the page. Is anyone else seeing that? SquirtFR? MathJax? Beacon? (StrapDown.js v0.8, theme bootstrap, thanks to BitBucket)
            Hide
            ann.loraine Ann Loraine added a comment -

            For the next steps, let's figure out how to remove these advertisements.
            Moving back to "to-do".

            Show
            ann.loraine Ann Loraine added a comment - For the next steps, let's figure out how to remove these advertisements. Moving back to "to-do".
            Hide
            karthik Karthik Raveendran added a comment - - edited

            To Dr. Nowlan Freese and Dr. [~aloraine],
            After cloning the github repo for strapdown.js , I was able to modify the strapdown.min.js to hide the ads in the navbar at the top of the page. However, the tag has the id "header-copyrights" probably implying there is a copyright conflict if its removed but the Github repo had an MIT open license. I am not sure how to move forward with this. I was able to test my code in an example provided in the repo and it works but testing on the Quickload sites is pending.

            Show
            karthik Karthik Raveendran added a comment - - edited To Dr. Nowlan Freese and Dr. [~aloraine] , After cloning the github repo for strapdown.js , I was able to modify the strapdown.min.js to hide the ads in the navbar at the top of the page. However, the tag has the id "header-copyrights" probably implying there is a copyright conflict if its removed but the Github repo had an MIT open license . I am not sure how to move forward with this. I was able to test my code in an example provided in the repo and it works but testing on the Quickload sites is pending.
            Hide
            nfreese Nowlan Freese added a comment -

            After discussing with Karthik I think we can make modifications to the strapdown.js as it does have the MIT open license. The current plan is to then add our version of the file to the website so that we don't have to worry about another cdn disappearing. Please make the changes to https://bitbucket.org/lorainelab/bioviz/src/master/htdocs/js/autoindex_strapdown.js and commit the changes to your fork for review.

            Show
            nfreese Nowlan Freese added a comment - After discussing with Karthik I think we can make modifications to the strapdown.js as it does have the MIT open license. The current plan is to then add our version of the file to the website so that we don't have to worry about another cdn disappearing. Please make the changes to https://bitbucket.org/lorainelab/bioviz/src/master/htdocs/js/autoindex_strapdown.js and commit the changes to your fork for review.
            Hide
            nfreese Nowlan Freese added a comment -

            Alternative is to host the strapdown min js on bitbucket and then updating the URL in autoindex_strapdown.js to point to the file in Bitbucket. This may be much easier to implement as it would only require updating the URL. This would be convenient as autoindex_strapdown.js is in several different repositories.

            Show
            nfreese Nowlan Freese added a comment - Alternative is to host the strapdown min js on bitbucket and then updating the URL in autoindex_strapdown.js to point to the file in Bitbucket. This may be much easier to implement as it would only require updating the URL. This would be convenient as autoindex_strapdown.js is in several different repositories.
            Hide
            karthik Karthik Raveendran added a comment -

            I have added the strapdown.min.js in the BioViz repo and modified autoindex_strapdown.js to point to that file. Moving to first level review. See the commit where files were added and commit where autodown_strapdown.js was modified

            Show
            karthik Karthik Raveendran added a comment - I have added the strapdown.min.js in the BioViz repo and modified autoindex_strapdown.js to point to that file. Moving to first level review. See the commit where files were added and commit where autodown_strapdown.js was modified
            Hide
            karthik Karthik Raveendran added a comment -

            I created a fork of Naereen/Strapdown.js and added it to a Bitbucket repo with the changes to remove the ads.

            Show
            karthik Karthik Raveendran added a comment - I created a fork of Naereen/Strapdown.js and added it to a Bitbucket repo with the changes to remove the ads.
            Hide
            nfreese Nowlan Freese added a comment -

            I think the repo fork looks good, and I can see your changes.

            Can you make a commit to a BioViz.org branch where you point the autodown_strapdown.js at the new file: https://bitbucket.org/KarthikRavee91/strapdown.js/raw/227aea7db6e04883a9421da3c235055e65e6a279/strapdown.min.js

            Show
            nfreese Nowlan Freese added a comment - I think the repo fork looks good, and I can see your changes. Can you make a commit to a BioViz.org branch where you point the autodown_strapdown.js at the new file: https://bitbucket.org/KarthikRavee91/strapdown.js/raw/227aea7db6e04883a9421da3c235055e65e6a279/strapdown.min.js
            Hide
            karthik Karthik Raveendran added a comment -

            Changes have been made. See commit

            Show
            karthik Karthik Raveendran added a comment - Changes have been made. See commit
            Hide
            nfreese Nowlan Freese added a comment -

            This looks good to me.

            [~aloraine] - the strapdown file has been tested separately, but we haven't tested it on one of the bioviz test sites. However, I see no reason why it shouldn't work as we are just changing the url.

            My recommendation would be to go ahead and create a pull request.

            Show
            nfreese Nowlan Freese added a comment - This looks good to me. [~aloraine] - the strapdown file has been tested separately, but we haven't tested it on one of the bioviz test sites. However, I see no reason why it shouldn't work as we are just changing the url. My recommendation would be to go ahead and create a pull request.
            Hide
            ann.loraine Ann Loraine added a comment -

            Minor change request for Karthik Raveendran:

            1) Please fork this new repository: https://bitbucket.org/lorainelab/strapdown.js/src/master/.

            Note that for us (Loraine Lab), the main branch of development will be "main" not "master". When you clone this repository to your personal computer, main will very likely be the default branch. You should check by running "git status" when you clone the repository locally.

            2) Make a branch and add your edits to:

            • strapdown.verbose.js

            Note that you should not make changes to the other two "strapdown" files that are present in the repository - strapdown.js and strapdown.min.js.

            3) Submit a PR with your edit(s) to strapdown.verbose.js to branch "main" in the team repository https://bitbucket.org/lorainelab/strapdown.js.

            4) Use your favorite tool to minify the newly edited strapdown.verbose.js file. Please attach it to this ticket. Don't add it to the repository.

            Just to let you know, I am planning to deploy the minified file to the "downloads" folder of the repository. Our Web pages will use the Downloads section URL.

            Show
            ann.loraine Ann Loraine added a comment - Minor change request for Karthik Raveendran : 1) Please fork this new repository: https://bitbucket.org/lorainelab/strapdown.js/src/master/ . Note that for us (Loraine Lab), the main branch of development will be "main" not "master". When you clone this repository to your personal computer, main will very likely be the default branch. You should check by running "git status" when you clone the repository locally. 2) Make a branch and add your edits to: strapdown.verbose.js Note that you should not make changes to the other two "strapdown" files that are present in the repository - strapdown.js and strapdown.min.js. 3) Submit a PR with your edit(s) to strapdown.verbose.js to branch "main" in the team repository https://bitbucket.org/lorainelab/strapdown.js . 4) Use your favorite tool to minify the newly edited strapdown.verbose.js file. Please attach it to this ticket. Don't add it to the repository. Just to let you know, I am planning to deploy the minified file to the "downloads" folder of the repository. Our Web pages will use the Downloads section URL.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            The changes have been made in strapdown.verbose.js and its minified and added to the downloads section in Bitbucket with this issue number as version number. I have also made changes in a example file, example11.html, to test the the changes.

            Show
            karthik Karthik Raveendran added a comment - - edited The changes have been made in strapdown.verbose.js and its minified and added to the downloads section in Bitbucket with this issue number as version number. I have also made changes in a example file, example11.html, to test the the changes.
            Hide
            ann.loraine Ann Loraine added a comment -

            Deploying to a testing site to check how it works.

            Show
            ann.loraine Ann Loraine added a comment - Deploying to a testing site to check how it works.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            There is a problem: the minimized javascript appears to be attempting to retrieve dependencies not available on our fork.

            Details:

            • I updated my bioviz branch IGBF-3173 to point to strapdown.min.v3173.js hosted in the lorainelab strapdown.js team repository Downloads section.
            • I copied file strapdown.min.v3173.js from Karthik's repository's Downloads to the lorainelab strapdown.js team repository's downloads section
            • To test the new "minimized" javascript file from Karthik, I deployed my branch IGBF-3173 from my repository https://bitbucket.org/aloraine/bioviz onto https://bioviztest3.bioviz.org.
            • I checked whether the new javascript strapdown code works properly by visiting this location: https://bioviztest3.bioviz.org/igb/
            • There were 3 404 errors, please see attached image.
            Show
            ann.loraine Ann Loraine added a comment - - edited There is a problem: the minimized javascript appears to be attempting to retrieve dependencies not available on our fork. Details: I updated my bioviz branch IGBF-3173 to point to strapdown.min.v3173.js hosted in the lorainelab strapdown.js team repository Downloads section. I copied file strapdown.min.v3173.js from Karthik's repository's Downloads to the lorainelab strapdown.js team repository's downloads section To test the new "minimized" javascript file from Karthik, I deployed my branch IGBF-3173 from my repository https://bitbucket.org/aloraine/bioviz onto https://bioviztest3.bioviz.org . I checked whether the new javascript strapdown code works properly by visiting this location: https://bioviztest3.bioviz.org/igb/ There were 3 404 errors, please see attached image.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Tried this new URL on https://bioviztest3.bioviz.org/igb :

            strapdown.setAttribute('src', conf.strapdown ? conf.strapdown : 'https://bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js');
            

            However, the Web browser is not showing the formatted directory index. I'm not sure why not.

            Karthik Raveendran - would you take a look?

            Show
            ann.loraine Ann Loraine added a comment - - edited Tried this new URL on https://bioviztest3.bioviz.org/igb : strapdown.setAttribute('src', conf.strapdown ? conf.strapdown : 'https: //bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js'); However, the Web browser is not showing the formatted directory index. I'm not sure why not. Karthik Raveendran - would you take a look?
            Hide
            ann.loraine Ann Loraine added a comment -

            Note: I merged my branch IGBF-3173 into master branch showing the three URLs I have tried using to import the strapdown.js code. The current solution does not properly function, but at least we can see the directory contents.

            Show
            ann.loraine Ann Loraine added a comment - Note: I merged my branch IGBF-3173 into master branch showing the three URLs I have tried using to import the strapdown.js code. The current solution does not properly function, but at least we can see the directory contents.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            At first, I thought the code below is adding strapdown.min.js over strapdown.verbose.js to the page, however, but page seems to have strapdown.verbose.js embedded.

             strapdown.setAttribute('src', conf.strapdown ? conf.strapdown : 'https://bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js');
             

            It would be better to change the above code back to strapdown.min.js

            In the strapdown javascript files, there is a broken link being added as src attribute. I changed that to point to our strapdown version. I also minified the strapdown.verbose.js and replaced the strapdown.min.js. See commit . Dr. [~aloraine], https://quickload.bioviz.org/quickload (hosted on AWS) is not working because I think its not updated and its pointing to the old broken strapdown.

            Show
            karthik Karthik Raveendran added a comment - - edited At first, I thought the code below is adding strapdown.min.js over strapdown.verbose.js to the page, however, but page seems to have strapdown.verbose.js embedded. strapdown.setAttribute('src', conf.strapdown ? conf.strapdown : 'https: //bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js'); It would be better to change the above code back to strapdown.min.js In the strapdown javascript files, there is a broken link being added as src attribute. I changed that to point to our strapdown version. I also minified the strapdown.verbose.js and replaced the strapdown.min.js. See commit . Dr. [~aloraine] , https://quickload.bioviz.org/quickload (hosted on AWS) is not working because I think its not updated and its pointing to the old broken strapdown.
            Hide
            ann.loraine Ann Loraine added a comment -

            The new latest version of strapdown.verbose.js is currently deployed on bioviz.org.
            To see in action, visit https://bioviz.org/igb.
            Note that the directory index is still not being properly rendered.

            Show
            ann.loraine Ann Loraine added a comment - The new latest version of strapdown.verbose.js is currently deployed on bioviz.org. To see in action, visit https://bioviz.org/igb . Note that the directory index is still not being properly rendered.
            Hide
            ann.loraine Ann Loraine added a comment -

            Probably you need to submit PR to bioviz repository and also strapdown.js repository to fix the above problems.

            Show
            ann.loraine Ann Loraine added a comment - Probably you need to submit PR to bioviz repository and also strapdown.js repository to fix the above problems.
            Hide
            nfreese Nowlan Freese added a comment -

            I was curious so I tried a few things out.

            Testing protocol:

            1. Go to bioviz.org/quickload/ using Chrome
            2. Right click and select Inspect
            3. Click the Sources tab
            4. Double click to open autoindex_strapdown.js (should be located within bioviz.org > js)
            5. Place a breakpoint on line 11, which should be before the line that starts with strapdown.setAttribute
            6. Refresh the page (command R on mac), the page should stop loading when it reaches the breakpoint
            7. Modify the URL pointing at the strapdown file (for example the https://bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js)
            8. Save the file (command S on mac)
            9. Press the play button (resume script execution) until the page appears

            I tested the following versions of the strapdown files:
            https://cdn.jsdelivr.net/gh/Naereen/StrapDown.js@master/strapdown.min.js - works, includes ads
            https://bitbucket.org/lorainelab/strapdown.js/raw/bf525fb9d07c8b043003f8eacd8dc3aa9d338d4b/strapdown.min.js - master branch, no additional commits, renders page, but no formatting

            I also tried the following versions of the strapdown files, but the requests were blocked due to a CORB issue
            https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.min.js - does not work
            https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.verbose.js - does not work
            https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.js - does not work

            It is unclear why only the cdn version of the strapdown.min.js file works correctly.

            Show
            nfreese Nowlan Freese added a comment - I was curious so I tried a few things out. Testing protocol: Go to bioviz.org/quickload/ using Chrome Right click and select Inspect Click the Sources tab Double click to open autoindex_strapdown.js (should be located within bioviz.org > js) Place a breakpoint on line 11 , which should be before the line that starts with strapdown.setAttribute Refresh the page (command R on mac), the page should stop loading when it reaches the breakpoint Modify the URL pointing at the strapdown file (for example the https://bitbucket.org/lorainelab/strapdown.js/raw/main/strapdown.verbose.js ) Save the file (command S on mac) Press the play button (resume script execution) until the page appears I tested the following versions of the strapdown files: https://cdn.jsdelivr.net/gh/Naereen/StrapDown.js@master/strapdown.min.js - works, includes ads https://bitbucket.org/lorainelab/strapdown.js/raw/bf525fb9d07c8b043003f8eacd8dc3aa9d338d4b/strapdown.min.js - master branch, no additional commits, renders page, but no formatting I also tried the following versions of the strapdown files, but the requests were blocked due to a CORB issue https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.min.js - does not work https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.verbose.js - does not work https://raw.githubusercontent.com/Naereen/StrapDown.js/master/strapdown.js - does not work It is unclear why only the cdn version of the strapdown.min.js file works correctly.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            biovtest3.bioviz.org host is active and can be edited by KR and NF and updated to the latest master branch.

            Show
            ann.loraine Ann Loraine added a comment - - edited biovtest3.bioviz.org host is active and can be edited by KR and NF and updated to the latest master branch.
            Hide
            karthik Karthik Raveendran added a comment -

            The challenge here seems to be with trying to use raw JavaScript files from Bitbucket/GitHub by embedding them to HTML. Services such as GitHub and Bitbucket does not allow the use of the raw repo files like a CDN and this is, to my understanding, because the content-type is changed to text/plain from application/javascript. Thus, the browsers can display the raw file as text without reading it as JavaScript.

            In case of Naereen/Strapdown.js, they use jsDelivr.net, a free CDN service for Opensource, to deliver their content, bypassing the above issue. I tested this theory by making the proposed changes(removing adverts from mast head) in my forked GitHub repository and using the testing protocol in Dr. Nowlan Freese's comment above, except that the URL that I used is from my GitHub repo with jsDelivr:

            https://cdn.jsdelivr.net/gh/karthikravee91/StrapDown.js@master/strapdown.verbose.js

            and it works.

            I am trying to find a way to do this using Loraine lab Bibucket repo because jsDelivr does not have services for Bitbucket. However Bitbucket has its own CDN service for Bitbucket Data Center.

            Show
            karthik Karthik Raveendran added a comment - The challenge here seems to be with trying to use raw JavaScript files from Bitbucket/GitHub by embedding them to HTML. Services such as GitHub and Bitbucket does not allow the use of the raw repo files like a CDN and this is, to my understanding, because the content-type is changed to text/plain from application/javascript. Thus, the browsers can display the raw file as text without reading it as JavaScript. In case of Naereen/Strapdown.js, they use jsDelivr.net, a free CDN service for Opensource, to deliver their content, bypassing the above issue. I tested this theory by making the proposed changes(removing adverts from mast head) in my forked GitHub repository and using the testing protocol in Dr. Nowlan Freese 's comment above, except that the URL that I used is from my GitHub repo with jsDelivr: https: //cdn.jsdelivr.net/gh/karthikravee91/StrapDown.js@master/strapdown.verbose.js and it works. I am trying to find a way to do this using Loraine lab Bibucket repo because jsDelivr does not have services for Bitbucket. However Bitbucket has its own CDN service for Bitbucket Data Center.
            Hide
            ann.loraine Ann Loraine added a comment -
            Show
            ann.loraine Ann Loraine added a comment - Maybe we can do what is described in the second answer: https://serverfault.com/questions/130694/how-can-i-redirect-urls-using-the-proxy-module-in-apache
            Hide
            ann.loraine Ann Loraine added a comment -

            During scrum we decided to use the CDN service with a github repository: https://github.com/lorainelab/strapdown.js.

            Loraine will keep it in sync with the bitbucket repository - the "upstream" repository.

            Show
            ann.loraine Ann Loraine added a comment - During scrum we decided to use the CDN service with a github repository: https://github.com/lorainelab/strapdown.js . Loraine will keep it in sync with the bitbucket repository - the "upstream" repository.
            Hide
            karthik Karthik Raveendran added a comment -
            Show
            karthik Karthik Raveendran added a comment - Pull request submitted. https://bitbucket.org/KarthikRavee91/bioviz/pull-requests/1
            Hide
            karthik Karthik Raveendran added a comment -

            There could be a slight problem in the website hosted with the CDN service link. The title in the navbar may appear twice. I was not able to zero-in the issue but I thought the site can be hosted first and then I can fix the bug.

            Show
            karthik Karthik Raveendran added a comment - There could be a slight problem in the website hosted with the CDN service link. The title in the navbar may appear twice. I was not able to zero-in the issue but I thought the site can be hosted first and then I can fix the bug.
            Hide
            ann.loraine Ann Loraine added a comment -

            A good site for testing via edits in your browser : http://lorainelab-quickload.scidas.org/quickload

            Show
            ann.loraine Ann Loraine added a comment - A good site for testing via edits in your browser : http://lorainelab-quickload.scidas.org/quickload

              People

              • Assignee:
                karthik Karthik Raveendran
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: