Remove new hosts count from homepage (#4283)

This commit is contained in:
gillespi314 2022-02-17 17:27:29 -06:00 committed by GitHub
parent 1526a1b336
commit 3734cbd3a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 22 deletions

View file

@ -0,0 +1 @@
* Remove new hosts count from homepage

View file

@ -48,7 +48,6 @@ const Homepage = (): JSX.Element => {
const [windowsCount, setWindowsCount] = useState<string>("0");
const [onlineCount, setOnlineCount] = useState<string | undefined>();
const [offlineCount, setOfflineCount] = useState<string | undefined>();
const [newCount, setNewCount] = useState<string | undefined>();
const [showActivityFeedTitle, setShowActivityFeedTitle] = useState<boolean>(
false
);
@ -88,7 +87,6 @@ const Homepage = (): JSX.Element => {
onSuccess: (data: IHostSummary) => {
setOnlineCount(data.online_count.toLocaleString("en-US"));
setOfflineCount(data.offline_count.toLocaleString("en-US"));
setNewCount(data.new_count.toLocaleString("en-US"));
const macHosts = data.platforms?.find(
(platform: IHostSummaryPlatforms) => platform.platform === "darwin"
) || { platform: "darwin", hosts_count: 0 };
@ -147,7 +145,6 @@ const Homepage = (): JSX.Element => {
<HostsStatus
onlineCount={onlineCount}
offlineCount={offlineCount}
newCount={newCount}
isLoadingHosts={isHostSummaryFetching}
showHostsUI={showHostsUI}
/>

View file

@ -5,7 +5,6 @@ const baseClass = "hosts-status";
interface IHostSummaryProps {
onlineCount: string | undefined;
offlineCount: string | undefined;
newCount: string | undefined;
isLoadingHosts: boolean;
showHostsUI: boolean;
}
@ -13,7 +12,6 @@ interface IHostSummaryProps {
const HostsStatus = ({
onlineCount,
offlineCount,
newCount,
isLoadingHosts,
showHostsUI,
}: IHostSummaryProps): JSX.Element => {
@ -45,16 +43,6 @@ const HostsStatus = ({
<div className={`${baseClass}__tile-description`}>Offline hosts</div>
</div>
</div>
<div className={`${baseClass}__tile new-tile`}>
<div>
<div
className={`${baseClass}__tile-count ${baseClass}__tile-count--new`}
>
{newCount}
</div>
<div className={`${baseClass}__tile-description`}>New hosts</div>
</div>
</div>
</div>
);
};

View file

@ -9,13 +9,6 @@
display: flex;
justify-content: center;
align-items: center;
&:first-of-type {
justify-content: flex-end;
}
&:last-of-type {
justify-content: flex-start;
}
}
&__tile-count {