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