<template>
	<ObjectList class="px-5 pt-5" :options="options" />
</template>
<script>
import ObjectList from '../../ObjectList.vue';

export default {
	props: ['name'],
	components: {
		ObjectList
	},
	computed: {
		options() {
			return {
				data: () => [
					{
						title: '请求日志报告',
						description:
							'查看对网站进行的所有HTTP请求的详细日志。',
						route: 'Site Performance Request Logs'
					},
					{
						title: '二进制日志报告',
						description:
							'分析对数据库所做的更改，包括数据更改和模式更改。',
						route: 'Site Performance Binary Logs'
					},
					{
						title: '进程列表报告',
						description:
							'监控活动数据库进程、其状态和资源使用情况。',
						route: 'Site Performance Process List'
					},
					{
						title: '慢查询报告',
						description:
							'识别并优化运行缓慢的数据库查询以提高性能。',
						route: 'Site Performance Slow Queries'
					},
					{
						title: '死锁报告',
						description: '显示阻止事务的数据库冲突。',
						route: 'Site Performance Deadlock Report'
					}
				],
				columns: [
					{
						label: '标题',
						fieldname: 'title',
						width: 0.3
					},
					{
						label: '描述',
						fieldname: 'description',
						class: 'text-gray-700'
					},
					{
						label: '',
						fieldname: 'action',
						type: 'Button',
						align: 'right',
						width: 0.1,
						Button: ({ row }) => {
							return {
								label: '查看',
								type: 'primary',
								iconRight: 'arrow-right',
								onClick: () => {
									this.$router.push({ name: row.route });
								}
							};
						}
					}
				]
			};
		}
	}
};
</script>