Skip to content

Commit

Permalink
hopefully fixes server error missing resource error
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaggio14 committed Sep 24, 2020
1 parent 3f2b7b7 commit c2df97e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
recursive-include imagepypelines_tools/dockerfiles *
recursive-include imagepypelines_tools/templates *
3 changes: 3 additions & 0 deletions imagepypelines_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
]
BUILD_DIR = pkg_resources.resource_filename(__name__, 'dockerfiles')

TEMPLATES_DIR = pkg_resources.resource_filename(__name__, 'templates')
LAYOUTS_DIR = pkg_resources.resource_filename(__name__, 'templates/layouts')

del pkg_resources
from .version_info import *
from .imagepypelines_tools import main
11 changes: 8 additions & 3 deletions imagepypelines_tools/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@

from Chatroom import Chatroom

from . import TEMPLATES_DIR, LAYOUTS_DIR
dashboard_html_path = os.path.join(TEMPLATES_DIR,'dashboard.html')
login_html_path = os.path.join(TEMPLATES_DIR,'login.html')
index_html_path = os.path.join(LAYOUTS_DIR,'index.html')

# CHATROOM_ACTIVE = False

app = Flask(__name__)
Expand All @@ -72,16 +77,16 @@
################################################################################
@app.route("/")
def welcome():
return render_template("dashboard.html")
return render_template(dashboard_html_path)

@app.route("/login")
def login():
return render_template("login.html")
return render_template(login_html_path)

@app.route("/login/auth")
def auth(request):
# follow tutorial for authentication of use Flask-Login plugin
return render_template("layouts/index.html") # this may need to change (should show base dashboard or first pipeline listed)
return render_template(index_html_path) # this may need to change (should show base dashboard or first pipeline listed)

@app.route("/api/sessions")
def get_sessions():
Expand Down
44 changes: 22 additions & 22 deletions imagepypelines_tools/imagepypelines_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,28 +287,28 @@ def push(parser, args):
subprocess.call(["docker", "push", full_tag])

################################################################################
def docker_dashboard(parser, args):
"""launches the dashboard in a docker container"""
check_docker('docker','--version')

parser.add_argument('chatroom-port',
help='rebuilds the docker images without a cache',
type=int,
required=True)

parser.add_argument('dashboard-port',
help='rebuilds the docker images without a cache',
type=int,
required=True)




cmd = ['docker',
'run',
'-p', "",
BUILD_DIR,
]
# def docker_dashboard(parser, args):
# """launches the dashboard in a docker container"""
# check_docker('docker','--version')
#
# parser.add_argument('chatroom-port',
# help='rebuilds the docker images without a cache',
# type=int,
# required=True)
#
# parser.add_argument('dashboard-port',
# help='rebuilds the docker images without a cache',
# type=int,
# required=True)
#
#
#
#
# cmd = ['docker',
# 'run',
# '-p', "",
# BUILD_DIR,
# ]

################################################################################
def dashboard(parser, args):
Expand Down

0 comments on commit c2df97e

Please sign in to comment.