github.com/minio/console@v1.4.1/web-app/src/screens/Console/Dashboard/Prometheus/Widgets/ScanActivityRenderer.tsx (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2021 MinIO, Inc. 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Affero General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Affero General Public License for more details. 13 // 14 // You should have received a copy of the GNU Affero General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 import React from "react"; 18 import { Box, breakPoints } from "mds"; 19 import TimeStatItem from "../../TimeStatItem"; 20 import { SimpleWidgetRenderProps } from "./HealActivityRenderer"; 21 22 const ScanActivityRenderer = ({ 23 valueToRender = "", 24 loading = false, 25 iconWidget = null, 26 }: SimpleWidgetRenderProps) => { 27 return ( 28 <Box 29 sx={{ 30 display: "flex", 31 height: "47px", 32 borderRadius: "2px", 33 34 "& .dashboard-time-stat-item": { 35 height: "100%", 36 width: "100%", 37 }, 38 }} 39 > 40 <TimeStatItem 41 loading={loading} 42 icon={iconWidget} 43 label={ 44 <Box> 45 <Box 46 sx={{ 47 display: "inline", 48 [`@media (max-width: ${breakPoints.sm}px)`]: { 49 display: "none", 50 }, 51 }} 52 > 53 Time since last 54 </Box>{" "} 55 Scan Activity 56 </Box> 57 } 58 value={valueToRender} 59 /> 60 </Box> 61 ); 62 }; 63 64 export default ScanActivityRenderer;