Skip to content

Commit f413386

Browse files
committed
Clean up base url
1 parent b4ce5e8 commit f413386

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pipelines.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,6 @@ def get_fullurl(pipeline, username, use_mounts=True, encode_again=True, image='b
113113
fullurl = urllib.parse.quote_plus(fullurl)
114114
return fullurl
115115

116+
def get_baseurl():
117+
host = os.environ.get('WO_HOST')
118+
return f'https://jupyter.{host}/'

plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import os
1616
host = os.environ.get('WO_HOST')
17-
from .pipelines import get_json, get_fullurl
17+
from .pipelines import get_json, get_fullurl, get_baseurl
1818
import requests
1919
import urllib.parse
2020

@@ -52,7 +52,7 @@ def main_menu_user(self, user):
5252
#Icons: https://fontawesome.com/v5/search?m=free
5353
def_pipeline = None
5454
#def_pipeline = pipelines[0] #Use a default pipeline instead
55-
all_url = get_fullurl(def_pipeline, user.email, image=None)
55+
all_url = get_baseurl()
5656
# base_url = get_fullurl(def_pipeline, user.email, image="base")
5757
# gpu_url = get_fullurl(def_pipeline, user.email, image="gpu")
5858
# ml_url = get_fullurl(def_pipeline, user.email, image="ml")

0 commit comments

Comments
 (0)