-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy pathDetail.tsx
More file actions
60 lines (57 loc) · 1.75 KB
/
Detail.tsx
File metadata and controls
60 lines (57 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import React from 'react';
import { Row, Col } from 'antd';
import _ from 'lodash';
import { useTranslation } from 'react-i18next';
interface Props {
data: any;
}
export default function Index(props: Props) {
const { t } = useTranslation('datasourceManage');
const { data } = props;
return (
<div>
<div className='page-title'>HTTP</div>
<div className='flash-cat-block'>
<Row gutter={16}>
<Col span={24}>URL:</Col>
<Col span={24} className='second-color'>
{data?.http?.url}
</Col>
</Row>
</div>
<div className='page-title'>{t('form.auth')}</div>
<div className='flash-cat-block'>
<Row gutter={16}>
<Col span={8}>{t('form.username')}:</Col>
<Col span={8}>{t('form.password')}:</Col>
<Col span={8}>{t('form.skip_ssl_verify')}:</Col>
<Col span={8} className='second-color'>
{data?.auth?.basic_auth_user || '-'}
</Col>
<Col span={8} className='second-color'>
{data?.auth?.basic_auth_password ? '******' : '-'}
</Col>
<Col span={8} className='second-color'>
{data.http?.tls?.skip_tls_verify ? t('form.yes') : t('form.no')}
</Col>
</Row>
</div>
{!_.isEmpty(data?.http?.headers) && (
<>
<div className='page-title'>{t('form.headers')}</div>
<div className='flash-cat-block'>
<Row gutter={16}>
{_.map(data?.http?.headers, (val, key) => {
return (
<Col key={key} span={24}>
{key + ' : ' + val}
</Col>
);
})}
</Row>
</div>
</>
)}
</div>
);
}