function yarnTab(cluster, title, queueNames = 'root', searchName = undefined) {
    return {
        title: `${title}集群`,
        icon: 'fa fa-rotate',
        tab: [
            {
                id: `${cluster}-yarn-service`,
                name: `${cluster}-yarn-service`,
                type: 'service',
                body: [
                    {
                        type: 'tpl',
                        tpl: '<span class="font-bold text-xl">集群资源</span>',
                    },
                    yarnQueueCrud(cluster, queueNames),
                    {
                        type: 'tpl',
                        tpl: '<span class="font-bold text-xl">集群任务</span>',
                        // className: 'mb-2 block',
                    },
                    {
                        type: 'crud',
                        api: {
                            method: 'get',
                            url: '${base}/yarn/job_list',
                            data: {
                                clusters: `${cluster}`,
                                page: '${page|default:undefined}',
                                count: '${perPage|default:undefined}',
                                order: '${orderBy|default:undefined}',
                                direction: '${orderDir|default:undefined}',
                                filter_state: '${state|default:undefined}',
                                filter_final_status: '${finalStatus|default:undefined}',
                                search_id: '${id|default:undefined}',
                                search_name: '${name|default:undefined}',
                                completion: 'true',
                            }
                        },
                        defaultParams: {
                            name: searchName
                        },
                        ...crudCommonOptions(),
                        interval: 10000,
                        filter: {
                            mode: 'inline',
                            title: '任务筛选',
                            body: [
                                {
                                    type: 'group',
                                    body: [
                                        {
                                            type: 'input-text',
                                            name: 'id',
                                            label: 'ID',
                                            clearable: true,
                                            placeholder: '通过 ID 搜索',
                                            size: 'md'
                                        },
                                        {
                                            type: 'input-text',
                                            name: 'name',
                                            label: '名称',
                                            clearable: true,
                                            placeholder: '通过名称搜索',
                                            size: 'md'
                                        },
                                    ]
                                },
                            ],
                            actions: [
                                {
                                    type: "submit",
                                    level: "primary",
                                    label: "查询",
                                },
                                {
                                    type: "reset",
                                    label: "重置",
                                },
                            ]
                        },
                        filterTogglable: true,
                        filterDefaultVisible: false,
                        perPage: 20,
                        headerToolbar: [
                            "reload",
                            'filter-toggler',
                            {
                                type: "tpl",
                                tpl: "共 <span class='text-primary font-bold'>${total|default:0}</span> 个任务，其中 <span class='text-success font-bold'>${running|default:0}</span> 个任务运行中，<span class='text-danger font-bold'>${unRunning|default:0}</span> 个任务处于非运行状态"
                            },
                            paginationCommonOptions(),
                        ],
                        footerToolbar: [
                            paginationCommonOptions(),
                        ],
                        columns: yarnCrudColumns(),
                    }
                ]
            }
        ]
    }
}