Rename webide -> ide

This commit is contained in:
Kristóf Tóth 2018-04-20 17:33:28 +02:00
parent 31c1391726
commit 89cd7638d5
3 changed files with 9 additions and 9 deletions

View File

@ -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}

View File

@ -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')

View File

@ -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