diff --git a/ait/gui/__init__.py b/ait/gui/__init__.py index 07679f70..4c0d7438 100644 --- a/ait/gui/__init__.py +++ b/ait/gui/__init__.py @@ -239,9 +239,9 @@ def reset(self): _RUNNING_SEQ = None CMD_API = ait.core.api.CmdAPI() + class HTMLRoot: - Static = pkg_resources.resource_filename('ait.gui', 'static/') - User = ait.config.get('gui.html.directory', Static) + Static = User = pkg_resources.resource_filename('ait.gui', 'static/') SEQRoot = ait.config.get('sequence.directory', None) if SEQRoot and not os.path.isdir(SEQRoot): @@ -280,8 +280,10 @@ def __init__(self, inputs, outputs, zmq_args=None, **kwargs): try: HTMLRoot.User = kwargs['html']['directory'] + log.info('[GUI Plugin Configuration] Static file directory is set to {}'.format(HTMLRoot.User)) except: - pass + log.warn('[GUI Plugin Configuration] Unable to locate static file direcotry in config.yaml. '\ + 'The directory is set to {}'.format(HTMLRoot.User)) bottle.TEMPLATE_PATH.append(HTMLRoot.User) diff --git a/doc/source/new_project.rst b/doc/source/new_project.rst index 1b4e76fb..f8fbeb34 100644 --- a/doc/source/new_project.rst +++ b/doc/source/new_project.rst @@ -80,6 +80,8 @@ You'll need to update your **server** configuration to enable the GUI Plugin. Ad - telem_stream outputs: - command_stream + html: + directory: /path/to/ait-gui/static/dir The definitions for **log_stream**, **telem_stream**, and **command_stream** exist in the example Core **config.yaml** file.