import { useState } from 'react'; import { Database, Hash, Server, Tag, Tool } from 'react-feather'; import { DialogOverlay } from '@reach/dialog'; import { useStatus, useVersionStatus, } from '@/portainer/services/api/status.service'; import { Button } from '@@/buttons'; import styles from './Footer.module.css'; export function BuildInfoModalButton() { const [isBuildInfoVisible, setIsBuildInfoVisible] = useState(false); const statusQuery = useStatus(); if (!statusQuery.data) { return null; } const { Version } = statusQuery.data; return ( <> {isBuildInfoVisible && ( setIsBuildInfoVisible(false)} /> )} ); } function BuildInfoModal({ closeModal }: { closeModal: () => void }) { const versionQuery = useVersionStatus(); const statusQuery = useStatus(); if (!statusQuery.data || !versionQuery.data) { return null; } const { Edition } = statusQuery.data; const { ServerVersion, DatabaseVersion, Build } = versionQuery.data; return (
Portainer {Edition}
Server Version: {ServerVersion} Database Version: {DatabaseVersion}
CI Build Number: {Build.BuildNumber} Image Tag: {Build.ImageTag}
Compilation tools:
Nodejs v{Build.NodejsVersion} Yarn v{Build.YarnVersion} Webpack v{Build.WebpackVersion} Go v{Build.GoVersion}
); }