Skip to content

Commit

Permalink
Add warning icon on not installed saptune version only if sap workloa…
Browse files Browse the repository at this point in the history
…d is present
  • Loading branch information
EMaksy committed Jan 23, 2024
1 parent aceba03 commit aaf4629
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion assets/js/pages/HostDetailsPage/HostDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function HostDetails({
const [cleanUpModalOpen, setCleanUpModalOpen] = useState(false);

const versionWarningMessage = agentVersionWarning(agentVersion);

const isSapPresent = sapInstances.length > 0;
const saptuneVersion = get(saptuneStatus, 'package_version');
const saptuneConfiguredVersion = get(saptuneStatus, 'configured_version');
const saptuneTuning = get(saptuneStatus, 'tuning_state');
Expand Down Expand Up @@ -193,6 +193,7 @@ function HostDetails({
/>
<div className="flex flex-col mt-4 bg-white shadow rounded-lg pt-8 px-8 xl:w-2/5 mr-4">
<SaptuneSummary
isSapPresent={isSapPresent}
saptuneVersion={saptuneVersion}
saptuneConfiguredVersion={saptuneConfiguredVersion}
saptuneTuning={saptuneTuning}
Expand Down
8 changes: 7 additions & 1 deletion assets/js/pages/HostDetailsPage/SaptuneSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ListView from '@common/ListView';
import { SaptuneVersion, SaptuneTuningState } from '@pages/SaptuneDetails';

function SaptuneSummary({
isSapPresent,
saptuneVersion,
saptuneConfiguredVersion,
saptuneTuning,
Expand All @@ -32,7 +33,12 @@ function SaptuneSummary({
data={[
{
title: 'Package',
content: <SaptuneVersion version={saptuneVersion} />,
content: (
<SaptuneVersion
isSapPresent={isSapPresent}
version={saptuneVersion}
/>
),
},
{
title: 'Tuning',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/pages/SaptuneDetails/SaptuneVersion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { isVersionSupported, SUPPORTED_VERSION } from '@lib/saptune';
import Tooltip from '@common/Tooltip';
import HealthIcon from '@common/HealthIcon';

function SaptuneVersion({ version }) {
function SaptuneVersion({ version, isSapPresent = true }) {
if (!version) {
return (
<div className="flex">
<HealthIcon health="warning" />
{isSapPresent ? <HealthIcon health="warning" /> : null}
<span className="ml-1">Not installed</span>
</div>
);
Expand Down

0 comments on commit aaf4629

Please sign in to comment.