airflow 優化

1. 頁面默認加載數據過多,加載慢。html

   修改 .../python2.7/site-packages/airflow/www/views.py文件, 1823行, page_size參數, 好比改爲18  。重啓webserver。  而後速度嗖嗖的。python

class AirflowModelView(ModelView):
    list_template = 'airflow/model_list.html'
    edit_template = 'airflow/model_edit.html'
    create_template = 'airflow/model_create.html'
    column_display_actions = True
    page_size = 18

 

   2. 界面的時候看起來比較蛋疼, utc-0的時間,web

  修改.../python2.7/site-packages/airflow/www/templates/admin/master.html以下(註釋掉UCTSeconds,新增一行UTCSeconds), 這樣時間就是本地時間了。python2.7

<script>
    x = new Date()
    //var UTCseconds = (x.getTime() + x.getTimezoneOffset()*60*1000);
    var UTCseconds = x.getTime();
    $("#clock").clock({
        "seconds":"false",
        "calendar":"false",
        "format":"24",
        "timestamp":UTCseconds
    }).click(function(){
        alert('{{ hostname }}');
    });
    $('span').tooltip();
</script>

 

原始地址:https://i.cnblogs.com/EditPosts.aspx?postid=6249407post

相關文章
相關標籤/搜索