Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix issue #5, limit the display length of the text box content #12

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/layout/components/admin/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ const columns = ref([
{
title: '用户名',
key: 'userName',

ellipsis: {
tooltip: true
},
},
{
title: '邮箱',
key: 'email',

ellipsis: {
tooltip: true
},
},
{
title: '用户角色',
Expand Down
13 changes: 12 additions & 1 deletion src/views/alertPage/alert-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const columns = ref([
title: '名称',
width: 'auto',
key: 'name',
ellipsis: {
tooltip: true
},
},
{
title: '级别',
Expand Down Expand Up @@ -84,17 +87,25 @@ const columns = ref([
title: '规则',
width: 'auto',
key: 'rule',
ellipsis: {
tooltip: true
},
},
{
title: '描述',
width: 'auto',
key: 'desc',
ellipsis: {
tooltip: true
},
},
{
title: '接收人',
width: 'auto',
key: 'alertUsers',

ellipsis: {
tooltip: true
},
render: row => {
return <span>{row.alertUsers.join(', ')}</span>
},
Expand Down
3 changes: 3 additions & 0 deletions src/views/alertPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ const columns = ref([
title: '告警内容',
width: 'auto',
key: 'summary',
ellipsis: {
tooltip: true
},
},
])

Expand Down
27 changes: 11 additions & 16 deletions src/views/alertPage/system-log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const columns = ref([
title: '访问者',
width: 'auto',
key: 'user',
ellipsis: {
tooltip: true
},
},
{
title: '模块',
Expand All @@ -99,7 +102,9 @@ const columns = ref([
title: '操作',
width: 'auto',
key: 'method',

ellipsis: {
tooltip: true
},
// render: (row) => {
// return (
// <span>{row.enable? '开启' : '关闭'}</span>
Expand All @@ -110,26 +115,16 @@ const columns = ref([
title: '结果',
width: 'auto',
key: 'errorMsg',
ellipsis: {
tooltip: true
},
},
{
title: '内容',
width: 'auto',
key: 'content',
render(row) {
return (
<NTooltip trigger='hover'>
{{
trigger: () => (
<span>
{row.content.length < 15
? row.content
: row.content.substring(0, 15) + '...'}
</span>
),
default: () => <span>{row.content}</span>,
}}
</NTooltip>
)
ellipsis: {
tooltip: true
},
},
])
Expand Down
16 changes: 12 additions & 4 deletions src/views/clusterManagement/DiskManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ const columns = ref([
title: '主机名',
width: 'auto',
key: 'hostName',

ellipsis: {
tooltip: true
},
},
{
title: '盘符',
Expand All @@ -104,13 +106,17 @@ const columns = ref([
title: '类型',
width: 'auto',
key: 'diskType',

ellipsis: {
tooltip: true
},
},
{
title: '型号',
width: 'auto',
key: 'model',

ellipsis: {
tooltip: true
},
},
// {
// title: '写缓存',
Expand All @@ -121,7 +127,9 @@ const columns = ref([
title: '挂载点',
key: 'mountPoint',
width: 'auto',

ellipsis: {
tooltip: true
},
render(row) {
if (row.mountPoint) {
return <span>{row.mountPoint}</span>
Expand Down
4 changes: 3 additions & 1 deletion src/views/clusterManagement/ServerManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const columns = ref([
title: '主机名',
key: 'hostName',
width: 'auto',

ellipsis: {
tooltip: true
},
render(row) {
return h(
NButton,
Expand Down
3 changes: 3 additions & 0 deletions src/views/storagePool/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const columns: DataTableColumns<StoragePoolInfo> = [
title: '逻辑池名称',
width: 'auto',
key: 'name',
ellipsis: {
tooltip: true
},
render(row) {
return h(
NButton,
Expand Down