diff --git a/solvable/Dockerfile b/solvable/Dockerfile index 9473697..d021b1a 100644 --- a/solvable/Dockerfile +++ b/solvable/Dockerfile @@ -2,16 +2,16 @@ FROM eu.gcr.io/avatao-challengestore/tutorial-framework ENV TFW_SERVER_DIR="/srv/.tfw" \ TFW_LOGIN_APP_DIR="/tmp/source_code_server" \ - TFW_WEBIDE_WD="/home/${AVATAO_USER}/workdir" \ + TFW_IDE_WD="/home/${AVATAO_USER}/workdir" \ TFW_TERMINADO_WD="/home/${AVATAO_USER}/workdir" COPY solvable/src ${TFW_SERVER_DIR}/ COPY solvable/src/source_code_server/server.py ${TFW_LOGIN_APP_DIR}/ COPY solvable/src/source_code_server/users.db ${TFW_LOGIN_APP_DIR}/ -COPY solvable/src/source_code_server/login_component.py ${TFW_WEBIDE_WD}/ +COPY solvable/src/source_code_server/login_component.py ${TFW_IDE_WD}/ -RUN chown -R ${AVATAO_USER} ${TFW_WEBIDE_WD} &&\ - chmod -R 755 ${TFW_WEBIDE_WD} &&\ +RUN chown -R ${AVATAO_USER} ${TFW_IDE_WD} &&\ + chmod -R 755 ${TFW_IDE_WD} &&\ chown -R root ${TFW_SERVER_DIR} &&\ chmod -R 700 ${TFW_SERVER_DIR} diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index ae2359d..aac0537 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -1,6 +1,6 @@ from tornado.ioloop import IOLoop -from tfw.components import WebideEventHandler, TerminadoEventHandler, ProcessManagingEventHandler, BashMonitor +from tfw.components import IdeEventHandler, TerminadoEventHandler, ProcessManagingEventHandler, BashMonitor from tfw.components import TerminalCommands from tfw.networking import MessageSender, TFWServerConnector from tfw.config import TFWENV @@ -18,7 +18,7 @@ def cenator(history): class TestCommands(TerminalCommands): # pylint: disable=unused-argument, attribute-defined-outside-init, no-self-use def command_selectdir(self, *args): - TFWServerConnector().send_to_eventhandler({'key': 'webide', + TFWServerConnector().send_to_eventhandler({'key': 'ide', 'data': {'command': 'selectdir', 'directory': args[0]}}) @@ -55,8 +55,8 @@ class TestCommands(TerminalCommands): if __name__ == '__main__': # pylint: disable=invalid-name - ide = WebideEventHandler(key='webide', allowed_directories=[TFWENV.WEBIDE_WD], - directory=TFWENV.WEBIDE_WD, exclude=['*.pyc']) + ide = IdeEventHandler(key='ide', allowed_directories=[TFWENV.IDE_WD], + directory=TFWENV.IDE_WD, exclude=['*.pyc']) terminado = TerminadoEventHandler(key='shell', monitor=BashMonitor(TFWENV.HISTFILE)) terminado.historymonitor.subscribe_callback(cenator) commands = TestCommands(bashrc=f'/home/{TAOENV.USER}/.bashrc') diff --git a/solvable/src/source_code_server/server.py b/solvable/src/source_code_server/server.py index 6cc774b..ddeb81c 100644 --- a/solvable/src/source_code_server/server.py +++ b/solvable/src/source_code_server/server.py @@ -4,7 +4,7 @@ from tornado.web import RequestHandler, Application from tfw.config import TFWENV -sys.path.append(TFWENV.WEBIDE_WD) +sys.path.append(TFWENV.IDE_WD) from login_component import authorize_login