turbaszek commented on a change in pull request #14641:
URL: https://github.com/apache/airflow/pull/14641#discussion_r588904906



##########
File path: airflow/www/views.py
##########
@@ -2653,42 +2653,39 @@ class ConfigurationView(AirflowBaseView):
     )
     def conf(self):
         """Shows configuration."""
-        raw = request.args.get('raw') == "true"
         title = "Airflow Configuration"
-        subtitle = AIRFLOW_CONFIG
-        # Don't show config when expose_config variable is False in airflow 
config
+
         if conf.getboolean("webserver", "expose_config"):
-            with open(AIRFLOW_CONFIG) as file:
-                config = file.read()
             table = [
                 (section, key, value, source)
                 for section, parameters in conf.as_dict(True, True).items()
                 for key, (value, source) in parameters.items()
             ]
-        else:
-            config = (
-                "# Your Airflow administrator chose not to expose the "
-                "configuration, most likely for security reasons."
+
+            if request.args.get('raw') == "true":
+                return Response(response=json.dumps(table), status=200, 
mimetype="application/json")
+
+            return self.render_template(
+                'airflow/config.html',
+                title=title,
+                pre_subtitle=settings.HEADER + "  v" + airflow.__version__,

Review comment:
       I'm wondering if we need to render the header? It look good in cli but 
showing it in web UI does not seem a good experience. WDYT?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to