Родитель
84cb7e8095
Коммит
2bbcdc3a99
|
@ -89,6 +89,8 @@ def create_app(config=None):
|
|||
models.Connection, Session, name="Connections", category="Admin"))
|
||||
av(vs.VariableView(
|
||||
models.Variable, Session, name="Variables", category="Admin"))
|
||||
av(vs.XComView(
|
||||
models.XCom, Session, name="XComs", category="Admin"))
|
||||
|
||||
admin.add_link(base.MenuLink(
|
||||
category='Docs', name='Documentation',
|
||||
|
|
|
@ -2161,6 +2161,27 @@ class VariableView(wwwutils.DataProfilingMixin, AirflowModelView):
|
|||
form.val.data = '*' * 8
|
||||
|
||||
|
||||
class XComView(wwwutils.LoginMixin, AirflowModelView):
|
||||
verbose_name = "XCom"
|
||||
verbose_name_plural = "XComs"
|
||||
page_size = 20
|
||||
|
||||
form_columns = (
|
||||
'key',
|
||||
'value',
|
||||
'execution_date',
|
||||
'task_id',
|
||||
'dag_id',
|
||||
)
|
||||
|
||||
form_extra_fields = {
|
||||
'value': StringField('Value'),
|
||||
}
|
||||
|
||||
column_filters = ('key', 'timestamp', 'execution_date', 'task_id', 'dag_id')
|
||||
column_searchable_list = ('key', 'timestamp', 'execution_date', 'task_id', 'dag_id')
|
||||
|
||||
|
||||
class JobModelView(ModelViewOnly):
|
||||
verbose_name_plural = "jobs"
|
||||
verbose_name = "job"
|
||||
|
|
|
@ -1399,6 +1399,8 @@ class WebUiTests(unittest.TestCase):
|
|||
response = self.app.get(
|
||||
"/admin/airflow/paused?"
|
||||
"dag_id=example_python_operator&is_paused=false")
|
||||
response = self.app.get("/admin/xcom", follow_redirects=True)
|
||||
assert "Xcoms" in response.data.decode('utf-8')
|
||||
|
||||
def test_charts(self):
|
||||
session = Session()
|
||||
|
|
Загрузка…
Ссылка в новой задаче