2019-07-10 06:00:29 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { ServerDatabase } from '@/api/server/getServerDatabases';
|
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
|
import { faDatabase } from '@fortawesome/free-solid-svg-icons/faDatabase';
|
|
|
|
import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt';
|
|
|
|
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye';
|
2019-07-17 05:43:11 +01:00
|
|
|
import classNames from 'classnames';
|
2019-07-10 06:00:29 +01:00
|
|
|
|
2019-07-17 05:43:11 +01:00
|
|
|
export default ({ database, className }: { database: ServerDatabase; className?: string }) => {
|
2019-07-10 06:00:29 +01:00
|
|
|
return (
|
2019-07-17 05:43:11 +01:00
|
|
|
<div className={classNames('grey-row-box no-hover', className)}>
|
2019-07-10 06:00:29 +01:00
|
|
|
<div className={'icon'}>
|
|
|
|
<FontAwesomeIcon icon={faDatabase}/>
|
|
|
|
</div>
|
|
|
|
<div className={'flex-1 ml-4'}>
|
|
|
|
<p className={'text-lg'}>{database.name}</p>
|
|
|
|
</div>
|
|
|
|
<div className={'ml-6'}>
|
|
|
|
<p className={'text-center text-xs text-neutral-500 uppercase mb-1 select-none'}>Endpoint:</p>
|
|
|
|
<p className={'text-center text-sm'}>{database.connectionString}</p>
|
|
|
|
</div>
|
|
|
|
<div className={'ml-6'}>
|
|
|
|
<p className={'text-center text-xs text-neutral-500 uppercase mb-1 select-none'}>Connections From:</p>
|
|
|
|
<p className={'text-center text-sm'}>{database.allowConnectionsFrom}</p>
|
|
|
|
</div>
|
|
|
|
<div className={'ml-6'}>
|
|
|
|
<p className={'text-center text-xs text-neutral-500 uppercase mb-1 select-none'}>Username:</p>
|
|
|
|
<p className={'text-center text-sm'}>{database.username}</p>
|
|
|
|
</div>
|
|
|
|
<div className={'ml-6'}>
|
|
|
|
<button className={'btn btn-sm btn-secondary mr-2'}>
|
2019-07-10 06:06:42 +01:00
|
|
|
<FontAwesomeIcon icon={faEye} fixedWidth={true}/>
|
2019-07-10 06:00:29 +01:00
|
|
|
</button>
|
|
|
|
<button className={'btn btn-sm btn-secondary btn-red'}>
|
2019-07-10 06:06:42 +01:00
|
|
|
<FontAwesomeIcon icon={faTrashAlt} fixedWidth={true}/>
|
2019-07-10 06:00:29 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|