No stats found.
) : (
Manage dashboards
}
/>
Manage data sources
)
}
/>
Manage alerts
}
/>
Manage users
)
}
/>
)}
>
);
};
const getAnonymousStatsContent = (stats: ServerStat | null, config: GrafanaBootConfig) => {
if (!config.anonymousEnabled || !config.featureToggles.displayAnonymousStats || !stats?.activeDevices) {
return [];
}
if (!config.anonymousDeviceLimit) {
return [
{
name: 'Active anonymous devices',
value: `${stats.activeDevices}`,
tooltip: 'Detected devices that are not logged in, in last 30 days.',
},
];
} else {
return [
{
name: 'Active anonymous devices',
value: `${stats.activeDevices} / ${config.anonymousDeviceLimit}`,
tooltip: 'Detected devices that are not logged in, in last 30 days.',
highlight: stats.activeDevices > config.anonymousDeviceLimit,
},
];
}
};
const getStyles = (theme: GrafanaTheme2) => {
return {
title: css({
marginBottom: theme.spacing(4),
}),
row: css({
display: 'flex',
justifyContent: 'space-between',
width: '100%',
'& > div:not(:last-of-type)': {
marginRight: theme.spacing(2),
},
'& > div': {
width: '33.3%',
},
}),
doubleRow: css({
display: 'flex',
flexDirection: 'column',
'& > div:first-of-type': {
marginBottom: theme.spacing(2),
},
}),
notFound: css({
fontSize: theme.typography.h6.fontSize,
textAlign: 'center',
height: '290px',
}),
};
};