Commit d573319b authored by Davide Lagoa's avatar Davide Lagoa
Browse files

added robots.txt

parent 2eb09102
Pipeline #1749 passed with stage
in 5 minutes and 22 seconds
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
......
......@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/code" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
......
......@@ -2,13 +2,71 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="87f3b13d-58c3-4a2e-acf3-4ed7fa387d7f" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/code/static/robots.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/transyt-manager-docker.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/transyt-manager-docker.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/code/manager.py" beforeDir="false" afterPath="$PROJECT_DIR$/code/manager.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/code/workersManager.py" beforeDir="false" afterPath="$PROJECT_DIR$/code/workersManager.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/code/manager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="90" selection-start-line="1" selection-start-column="90" selection-end-line="1" selection-end-column="90" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/code/workersManager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="217">
<caret line="61" lean-forward="true" selection-start-line="61" selection-end-line="61" />
<folding>
<element signature="e#0#65#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/configs/docker_config.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="48" column="21" selection-start-line="48" selection-start-column="10" selection-end-line="48" selection-end-column="21" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/code/tests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="15" selection-start-line="4" selection-start-column="15" selection-end-line="4" selection-end-column="15" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/code/static/robots.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="16" lean-forward="true" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
......@@ -16,30 +74,88 @@
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>rea</find>
<find>show</find>
<find>demo</find>
<find>.css</find>
<find>#27ae60</find>
<find>?</find>
<find>params</find>
<find>genome</find>
<find>gl</find>
<find>host</find>
<find>= Flask</find>
<find>robo</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectConfigurationFiles">
<option name="files">
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/.idea/transyt-manager-docker.iml" />
<option value="$PROJECT_DIR$/.idea/misc.xml" />
<option value="$PROJECT_DIR$/.idea/modules.xml" />
<option value="$PROJECT_DIR$/.idea/vcs.xml" />
<option value="$PROJECT_DIR$/code/templates/tests.py" />
<option value="$PROJECT_DIR$/code/static/js/collapsible_hint.js" />
<option value="$PROJECT_DIR$/code/static/css/collapsible.css" />
<option value="$PROJECT_DIR$/code/static/css/submit.css" />
<option value="$PROJECT_DIR$/code/static/js/show_number_slider.js" />
<option value="$PROJECT_DIR$/code/test_html.py" />
<option value="$PROJECT_DIR$/code/templates/home.html" />
<option value="$PROJECT_DIR$/configs/workers_addresses.conf" />
<option value="$PROJECT_DIR$/code/tests.py" />
<option value="$PROJECT_DIR$/configs/docker_config.conf" />
<option value="$PROJECT_DIR$/code/manager.py" />
<option value="$PROJECT_DIR$/code/workersManager.py" />
<option value="$PROJECT_DIR$/code/static/robots.txt" />
</list>
</option>
</component>
<component name="ProjectId" id="1oFyGKuj2aapDeHe0r5NhieRhZK" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
<component name="ProjectFrameBounds" fullScreen="true">
<option name="width" value="1280" />
<option name="height" value="800" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="transyt-manager-docker" type="b2602c69:ProjectViewProjectNode" />
<item name="transyt-manager-docker" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="transyt-manager-docker" type="b2602c69:ProjectViewProjectNode" />
<item name="transyt-manager-docker" type="462c0819:PsiDirectoryNode" />
<item name="code" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="transyt-manager-docker" type="b2602c69:ProjectViewProjectNode" />
<item name="transyt-manager-docker" type="462c0819:PsiDirectoryNode" />
<item name="code" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="transyt-manager-docker" type="b2602c69:ProjectViewProjectNode" />
<item name="transyt-manager-docker" type="462c0819:PsiDirectoryNode" />
<item name="configs" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../transyt-workers-docker" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/code/static/css" />
<property name="settings.editor.selected.configurable" value="preferences.externalDependencies" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
......@@ -50,7 +166,19 @@
<recent name="$PROJECT_DIR$/code" />
</key>
</component>
<component name="RunManager" selected="Python.tests">
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Docker.Dockerfile">
<configuration name="test_html" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="transyt-manager-docker" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -63,7 +191,6 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/code/test_html.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
......@@ -85,7 +212,6 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/code/tests.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
......@@ -95,6 +221,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="buildCliOptions" value="" />
<option name="command" value="" />
<option name="containerName" value="" />
<option name="entrypoint" value="" />
<option name="imageTag" value="" />
<option name="commandLineOptions" value="" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.tests" />
......@@ -112,17 +252,168 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1592845601127</updated>
<workItem from="1612896537363" duration="1784000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
<component name="ToolWindowManager">
<frame x="0" y="0" width="1280" height="800" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Favorites" order="0" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.17474186" />
<window_info id="Structure" order="2" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" weight="0.32876712" />
<window_info anchor="bottom" id="Terminal" order="0" weight="0.32876712" />
<window_info anchor="bottom" id="Event Log" order="1" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="2" />
<window_info anchor="bottom" id="Message" order="3" />
<window_info anchor="bottom" id="Find" order="4" />
<window_info anchor="bottom" id="Version Control" order="5" />
<window_info anchor="bottom" id="Run" order="6" weight="0.21643835" />
<window_info anchor="bottom" id="Debug" order="7" weight="0.22876713" />
<window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="10" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/code/workersManager.py</url>
<line>210</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component name="WindowStateProjectService">
<state x="1060" y="275" key="FileChooserDialogImpl" timestamp="1612898321728">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="1060" y="275" key="FileChooserDialogImpl/0.0.2560.1040/2560.0.1440.860@0.0.2560.1040" timestamp="1612898321728" />
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file:///Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flask/app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="888" column="8" selection-start-line="888" selection-start-column="8" selection-end-line="888" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/_pydev_imps/_pydev_execfile.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" selection-start-line="17" selection-end-line="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/templates/home.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3240">
<caret line="216" column="79" selection-start-line="216" selection-start-column="62" selection-end-line="216" selection-end-column="79" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/test_html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="960">
<caret line="65" selection-start-line="65" selection-end-line="65" />
<folding>
<element signature="e#24#93#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/css/submit.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="570">
<caret line="284" column="34" selection-start-line="284" selection-start-column="34" selection-end-line="284" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/css/footer.css">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/code/static/css/accordion_results.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-4886" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/css/center.css">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/code/static/css/collapsible.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="22" selection-start-line="6" selection-start-column="4" selection-end-line="6" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/js/collapsible_hint.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/js/show_filename.js">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/code/static/js/show_number_slider.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="573">
<caret line="75" column="9" selection-start-line="75" selection-start-column="9" selection-end-line="75" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/js/to_show.js">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/configs/workers_addresses.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="32" selection-start-line="3" selection-start-column="32" selection-end-line="3" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/configs/docker_config.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="48" column="21" selection-start-line="48" selection-start-column="10" selection-end-line="48" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/tests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="15" selection-start-line="4" selection-start-column="15" selection-end-line="4" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/workersManager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="217">
<caret line="61" lean-forward="true" selection-start-line="61" selection-end-line="61" />
<folding>
<element signature="e#0#65#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/static/robots.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="16" lean-forward="true" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/code/manager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="90" selection-start-line="1" selection-start-column="90" selection-end-line="1" selection-end-column="90" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
# -*- coding: utf-8 -*-
from flask import Flask, render_template, request, send_file, jsonify
from flask import Flask, render_template, request, send_file, jsonify, send_from_directory
from logging.handlers import TimedRotatingFileHandler
import FilesUtilities
import os
......@@ -33,7 +33,7 @@ logger.info("Docker configurations: " + str(CONFIGURATIONS))
logger.info('Starting server')
app = Flask(__name__)
app = Flask(__name__, static_folder = 'static')
hostname = socket.gethostname()
SUBMISSIONS_LIMIT = int(CONFIGURATIONS["records_limit"])
......@@ -60,6 +60,11 @@ def index():
return render_template("home.html")
@app.route("/robots.txt")
def static_from_root():
return send_from_directory(app.static_folder, request.path[1:])
@app.route("/submit", methods=["POST"])
def submit():
logger.info('HTML submission')
......
User-agent: *
Disallow: /reactions
Disallow: /submit
Disallow: /status
Disallow: /download
Disallow: /debug
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment