mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
feat(ask-ai): integrate kapa-ai page [BE-11409] (#214)
This commit is contained in:
parent
783ab253af
commit
441afead10
24 changed files with 102 additions and 50 deletions
|
@ -23,22 +23,25 @@ import styles from './Footer.module.css';
|
|||
export function BuildInfoModalButton() {
|
||||
const [isBuildInfoVisible, setIsBuildInfoVisible] = useState(false);
|
||||
const statusQuery = useSystemStatus();
|
||||
const versionQuery = useSystemVersion();
|
||||
|
||||
if (!statusQuery.data) {
|
||||
if (!statusQuery.data || !versionQuery.data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { Version } = statusQuery.data;
|
||||
const { VersionSupport } = versionQuery.data;
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
data-cy="portainerSidebar-versionNumber"
|
||||
className="btn-none"
|
||||
className="btn-none hover:underline"
|
||||
onClick={() => setIsBuildInfoVisible(true)}
|
||||
title="About Portainer"
|
||||
>
|
||||
{Version}
|
||||
{`${Version} (${VersionSupport})`}
|
||||
</button>
|
||||
{isBuildInfoVisible && (
|
||||
<BuildInfoModal closeModal={() => setIsBuildInfoVisible(false)} />
|
||||
|
@ -57,8 +60,14 @@ function BuildInfoModal({ closeModal }: { closeModal: () => void }) {
|
|||
}
|
||||
|
||||
const { Edition } = statusQuery.data;
|
||||
const { ServerVersion, DatabaseVersion, Build, Dependencies, Runtime } =
|
||||
versionQuery.data;
|
||||
const {
|
||||
ServerVersion,
|
||||
DatabaseVersion,
|
||||
Build,
|
||||
Dependencies,
|
||||
Runtime,
|
||||
VersionSupport,
|
||||
} = versionQuery.data;
|
||||
|
||||
return (
|
||||
<Modal onDismiss={closeModal} aria-label="build-info-modal">
|
||||
|
@ -69,13 +78,13 @@ function BuildInfoModal({ closeModal }: { closeModal: () => void }) {
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span className="inline-flex items-center">
|
||||
<span className="inline-flex items-center flex-wrap">
|
||||
<Server size="13" className="space-right" />
|
||||
Server Version: {ServerVersion}
|
||||
Server Version: {ServerVersion} ({VersionSupport})
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span className="inline-flex items-center">
|
||||
<span className="inline-flex items-center flex-wrap">
|
||||
<Database size="13" className="space-right" />
|
||||
Database Version: {DatabaseVersion}
|
||||
</span>
|
||||
|
@ -83,13 +92,13 @@ function BuildInfoModal({ closeModal }: { closeModal: () => void }) {
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span className="inline-flex items-center">
|
||||
<span className="inline-flex items-center flex-wrap">
|
||||
<Hash size="13" className="space-right" />
|
||||
CI Build Number: {Build.BuildNumber}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
<span className="inline-flex items-center flex-wrap">
|
||||
<Tag size="13" className="space-right" />
|
||||
Image Tag: {Build.ImageTag}
|
||||
</span>
|
||||
|
@ -97,8 +106,10 @@ function BuildInfoModal({ closeModal }: { closeModal: () => void }) {
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<GitCommit size="13" className="space-right" />
|
||||
Git Commit: {Build.GitCommit}
|
||||
<span className="inline-flex items-center flex-wrap">
|
||||
<GitCommit size="13" className="space-right" />
|
||||
Git Commit: {Build.GitCommit}
|
||||
</span>
|
||||
</td>
|
||||
<td />
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue