Skip to content

Commit

Permalink
Updated UILanding (#874) (#875)
Browse files Browse the repository at this point in the history
- Updated Python to 3.12
- Added checks to account for new labguide versioning and pathing
  • Loading branch information
networkRob authored Sep 11, 2024
1 parent e9076f1 commit c3e18ae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nested-labvm/atd-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ services:
# - /opt/ceos:/opt/ceos:rw
uilanding:
container_name: atd-uilanding
image: us.gcr.io/beta-atds/atddocker_uilanding:2.2.0
image: us.gcr.io/beta-atds/atddocker_uilanding:2.3.0
restart: always
environment:
- PYTHONUNBUFFERED=1
Expand Down
2 changes: 1 addition & 1 deletion nested-labvm/atd-docker/uilanding/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.12


RUN pip install --upgrade pip
Expand Down
8 changes: 8 additions & 0 deletions nested-labvm/atd-docker/uilanding/src/uilanding.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
else:
TITLE = 'Test Drive Lab'

# Check and try to grab CVP Version for Info File
try:
CVP_VER = host_yaml['cvp']
CVP_VER = CVP_VER.rsplit(".", 1)[0]
except:
CVP_VER = "latest"
class BaseHandler(tornado.web.RequestHandler):
def get_current_user(self):
return(self.get_secure_cookie("user"))
Expand Down Expand Up @@ -121,6 +127,8 @@ def get(self):
if 'labguides' in host_yaml:
if host_yaml['labguides'] == 'self':
labguides = '/labguides/index.html'
elif "testdrive" in host_yaml['labguides']:
labguides = f"{host_yaml['labguides']}/{CVP_VER}/"
else:
labguides = host_yaml['labguides']
else:
Expand Down

0 comments on commit c3e18ae

Please sign in to comment.