remove permission based view

recent changes that were made always show the primary allocation to the end users even if they don't have the read permission.
This commit is contained in:
Charles Morgan 2020-11-07 17:25:05 -05:00
parent 274ed6c232
commit e340cf16bf
No known key found for this signature in database
GPG key ID: D71946CD723249BD

View file

@ -6,7 +6,6 @@ import { bytesToHuman, megabytesToHuman } from '@/helpers';
import TitledGreyBox from '@/components/elements/TitledGreyBox';
import { ServerContext } from '@/state/server';
import CopyOnClick from '@/components/elements/CopyOnClick';
import Can from '@/components/elements/Can';
interface Stats {
memory: number;
@ -71,14 +70,12 @@ const ServerDetailsBlock = () => {
/>
 {!status ? 'Connecting...' : status}
</p>
<Can action={'allocation.read'}>
<CopyOnClick text={primaryAllocation}>
<p css={tw`text-xs mt-2`}>
<FontAwesomeIcon icon={faEthernet} fixedWidth css={tw`mr-1`}/>
<code css={tw`ml-1`}>{primaryAllocation}</code>
</p>
</CopyOnClick>
</Can>
<CopyOnClick text={primaryAllocation}>
<p css={tw`text-xs mt-2`}>
<FontAwesomeIcon icon={faEthernet} fixedWidth css={tw`mr-1`}/>
<code css={tw`ml-1`}>{primaryAllocation}</code>
</p>
</CopyOnClick>
<p css={tw`text-xs mt-2`}>
<FontAwesomeIcon icon={faMicrochip} fixedWidth css={tw`mr-1`}/> {stats.cpu.toFixed(2)}%
</p>