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 a command to open a browser page for the execution bucket #191

Open
SHuang-Broad opened this issue Mar 7, 2022 · 3 comments
Open

add a command to open a browser page for the execution bucket #191

SHuang-Broad opened this issue Mar 7, 2022 · 3 comments
Labels
Cromshell 2 Issues related to Cromshell 2.0

Comments

@SHuang-Broad
Copy link
Contributor

No description provided.

@jonn-smith
Copy link
Collaborator

If you want a quick version of this that's portable, I wrote a function to do exactly this:

function openGsPath() 
{
  P=""
  if [[ $# -eq 0 ]] ; then
    P=$( sed -e \
        '[/^http[s]*/ {
           s#^http[s]*://console.cloud.google.com/storage/browser/#GSREP# 
           s#^http[s]*://console.cloud.google.com/#GSREP#
           s#^http[s]*://storage.cloud.google.com/#GSREP#
        }
        /^gs:\/\// {
           s#^gs://#HTTPSREP#
        }
        /^GSREP/ {
           s#^GSREP#gs://#
        }
        /^HTTPSREP/ {
           s#HTTPSREP#https://console.cloud.google.com/storage/browser/#
         }' -e 's#gs://_details/#gs://#' -e 's#?.*##' - )
  else
    P=$( echo "${1}" | sed -e \
      '/^http[s]*/ {
          s#^http[s]*://console.cloud.google.com/storage/browser/#GSREP# 
          s#^http[s]*://console.cloud.google.com/#GSREP#
          s#^http[s]*://storage.cloud.google.com/#GSREP#
       }
       /^gs:\/\// {
          s#^gs://#HTTPSREP#
       }
       /^GSREP/ {
          s#^GSREP#gs://#
       }
       /^HTTPSREP/ {
          s#HTTPSREP#https://console.cloud.google.com/storage/browser/#
        }' -e 's#gs://_details/#gs://#' -e 's#?.*##' )
  fi  

  echo $P
  open ${P}
}

Put that in a shell file and source it when you log in. Then you can do openGsPath GSURL and it'll open a browser page to that location.

@jonn-smith
Copy link
Collaborator

Someday when I clean up my dotfiles, I'll make them public so anyone can use this…

@SHuang-Broad
Copy link
Contributor Author

I have a poor-man's solution ...
What I meant was to actually have the command open up the page directly by providing the workflow/submission ID.
Right now, we'd have to click-click-click to get to that "folder", or manually figure out the bucket and folder/prefix.

@SHuang-Broad SHuang-Broad added the Cromshell 2 Issues related to Cromshell 2.0 label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cromshell 2 Issues related to Cromshell 2.0
Projects
None yet
Development

No branches or pull requests

2 participants