airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kengo Seki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-652) Endpoint /admin/airflow/sandbox seems unnecessary
Date Fri, 25 Nov 2016 04:28:58 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15694799#comment-15694799
] 

Kengo Seki commented on AIRFLOW-652:
------------------------------------

Thanks! I've just sent a PR.
[~bolke], just let me know if it shouldn't be removed.

> Endpoint /admin/airflow/sandbox seems unnecessary
> -------------------------------------------------
>
>                 Key: AIRFLOW-652
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-652
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: webserver
>            Reporter: Kengo Seki
>            Priority: Minor
>
> airflow/www/views.py exposes an endpoint /sandbox as follows:
> {code}
>  627     @expose('/sandbox')
>  628     @login_required
>  629     def sandbox(self):
>  630         title = "Sandbox Suggested Configuration"
>  631         cfg_loc = conf.AIRFLOW_CONFIG + '.sandbox'
>  632         f = open(cfg_loc, 'r')
>  633         config = f.read()
>  634         f.close()
>  635         code_html = Markup(highlight(
>  636             config,
>  637             lexers.IniLexer(),  # Lexer call
>  638             HtmlFormatter(noclasses=True))
>  639         )
>  640         return self.render(
>  641             'airflow/code.html',
>  642             code_html=code_html, title=title, subtitle=cfg_loc)
> {code}
> But this endpoint seems unused. If there is no airflow.cfg.sandbox file, "Ooops" page
is shown. I think we can remove this for code cleanup.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message