Commit 055ffd85 by zhaochengxiang

JDBC信息增加提示

parent 2d4b11c9
{ {
"impala": { "impala": {
"url": "", "url": "",
"downloadUrl": "" "downloadUrl": "",
"urlTip": "复制地址",
"downloadTip": "下载驱动"
}, },
"hana": { "hana": {
"url": "", "url": "",
"downloadUrl": "" "downloadUrl": "",
"urlTip": "复制地址",
"downloadTip": "下载驱动"
} }
} }
\ No newline at end of file
...@@ -584,6 +584,8 @@ const AssetTable = (props) => { ...@@ -584,6 +584,8 @@ const AssetTable = (props) => {
if (refresh) { if (refresh) {
setCheckedKeys([]); setCheckedKeys([]);
getDataAssets(); getDataAssets();
showMessage('success', (reference === AssetRecycleReference)?'挂载成功':'变更目录成功');
} }
} }
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Modal, Typography, Button, Space } from 'antd'; import { Modal, Typography, Button, Space, Tooltip } from 'antd';
import { CopyOutlined, DownloadOutlined } from '@ant-design/icons'; import { CopyOutlined, DownloadOutlined } from '@ant-design/icons';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
...@@ -40,17 +40,21 @@ const FC = (props) => { ...@@ -40,17 +40,21 @@ const FC = (props) => {
</Typography.Text> </Typography.Text>
</div> </div>
<Space> <Space>
<Button type='text' icon={<CopyOutlined />} onClick={() => { <Tooltip title={information?.impala?.urlTip}>
<Button type='link' icon={<CopyOutlined />} onClick={() => {
if (information?.impala?.url) { if (information?.impala?.url) {
copy(information?.impala?.url); copy(information?.impala?.url);
showMessage('success', '复制成功'); showMessage('success', '复制成功');
} }
}} /> }} />
<Button type='text' icon={<DownloadOutlined />} onClick={() => { </Tooltip>
<Tooltip title={information?.impala?.downloadTip}>
<Button type='link' icon={<DownloadOutlined />} onClick={() => {
if (information?.impala?.downloadUrl) { if (information?.impala?.downloadUrl) {
window.open(information?.impala?.downloadUrl); window.open(information?.impala?.downloadUrl);
} }
}} /> }} />
</Tooltip>
</Space> </Space>
</div> </div>
<div className='flex' style={{ justifyContent: 'space-between', alignItems: 'baseline' }}> <div className='flex' style={{ justifyContent: 'space-between', alignItems: 'baseline' }}>
...@@ -60,17 +64,21 @@ const FC = (props) => { ...@@ -60,17 +64,21 @@ const FC = (props) => {
</Typography.Text> </Typography.Text>
</div> </div>
<Space> <Space>
<Button type='text' icon={<CopyOutlined />} onClick={() => { <Tooltip title={information?.hana?.urlTip}>
<Button type='link' icon={<CopyOutlined />} onClick={() => {
if (information?.hana?.url) { if (information?.hana?.url) {
copy(information?.hana?.url); copy(information?.hana?.url);
showMessage('success', '复制成功'); showMessage('success', '复制成功');
} }
}} /> }} />
<Button type='text' icon={<DownloadOutlined />} onClick={() => { </Tooltip>
<Tooltip title={information?.hana?.downloadTip}>
<Button type='link' icon={<DownloadOutlined />} onClick={() => {
if (information?.hana?.downloadUrl) { if (information?.hana?.downloadUrl) {
window.open(information?.hana?.downloadUrl); window.open(information?.hana?.downloadUrl);
} }
}} /> }} />
</Tooltip>
</Space> </Space>
</div> </div>
</Modal> </Modal>
......
...@@ -187,7 +187,6 @@ const ModelTable = (props) => { ...@@ -187,7 +187,6 @@ const ModelTable = (props) => {
// dataIndex: 'path', // dataIndex: 'path',
// width: 120, // width: 120,
// ellipsis: true, // ellipsis: true,
// filter: false,
// render: (text, _, __) => { // render: (text, _, __) => {
// return ( // return (
// <Tooltip title={text||''}> // <Tooltip title={text||''}>
...@@ -201,7 +200,6 @@ const ModelTable = (props) => { ...@@ -201,7 +200,6 @@ const ModelTable = (props) => {
dataIndex: 'state', dataIndex: 'state',
width: 100, width: 100,
ellipsis: true, ellipsis: true,
filter: false,
render: (_, record) => { render: (_, record) => {
let color = ''; let color = '';
...@@ -226,7 +224,6 @@ const ModelTable = (props) => { ...@@ -226,7 +224,6 @@ const ModelTable = (props) => {
dataIndex: 'editor', dataIndex: 'editor',
width: 100, width: 100,
ellipsis: true, ellipsis: true,
filter: false,
render: (editor, record) => { render: (editor, record) => {
const user = users?.filter((user)=>user.pernr===editor); const user = users?.filter((user)=>user.pernr===editor);
if (user && user.length > 0) { if (user && user.length > 0) {
...@@ -574,19 +571,18 @@ const ModelTable = (props) => { ...@@ -574,19 +571,18 @@ const ModelTable = (props) => {
} }
newCols.push(col); newCols.push(col);
}); });
if ((visibleColNames||[]).length > 0) {
newCols = newCols.filter(col => visibleColNames.indexOf(col.title)!==-1);
}
if (!modelId) { if (!modelId) {
newCols = [indexCol, ...newCols, ...fixedCols, actionCol]; newCols = [indexCol, ...newCols, ...fixedCols, actionCol];
} else { } else {
newCols = [...newCols, ...fixedCols, actionCol]; newCols = [...newCols, ...fixedCols, actionCol];
} }
if ((visibleColNames||[]).length > 0) {
newCols = newCols.filter(col => visibleColNames.indexOf(col.title)!==-1 || col.filter===false);
}
return newCols; return newCols;
}, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem, users]) }, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem, users])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment