mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
40 lines
1.5 KiB
JavaScript
40 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import StyledWrapper from './StyledWrapper';
|
|
import { getTotalRequestCountInCollection } from 'utils/collections/';
|
|
|
|
const Info = ({ collection }) => {
|
|
const totalRequestsInCollection = getTotalRequestCountInCollection(collection);
|
|
|
|
return (
|
|
<StyledWrapper className="w-full flex flex-col h-full">
|
|
<div className="text-xs mb-4 text-muted">General information about the collection.</div>
|
|
<table className="w-full border-collapse">
|
|
<tbody>
|
|
<tr className="">
|
|
<td className="py-2 px-2 text-right">Name :</td>
|
|
<td className="py-2 px-2">{collection.name}</td>
|
|
</tr>
|
|
<tr className="">
|
|
<td className="py-2 px-2 text-right">Location :</td>
|
|
<td className="py-2 px-2 break-all">{collection.pathname}</td>
|
|
</tr>
|
|
<tr className="">
|
|
<td className="py-2 px-2 text-right">Ignored files :</td>
|
|
<td className="py-2 px-2 break-all">{collection.brunoConfig?.ignore?.map((x) => `'${x}'`).join(', ')}</td>
|
|
</tr>
|
|
<tr className="">
|
|
<td className="py-2 px-2 text-right">Environments :</td>
|
|
<td className="py-2 px-2">{collection.environments?.length || 0}</td>
|
|
</tr>
|
|
<tr className="">
|
|
<td className="py-2 px-2 text-right">Requests :</td>
|
|
<td className="py-2 px-2">{totalRequestsInCollection}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</StyledWrapper>
|
|
);
|
|
};
|
|
|
|
export default Info;
|