Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/home-next/NavbarNext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function buildNavItems(
{ label: 'Blogs', href: '/blog' },
{ label: 'News and Events', href: '/events' },
{ label: 'Course', href: '/course' },
{ label: 'Profile Analysis', href: '/profile-analysis' },
],
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/components/profile-analysis/ProfileAnalysis.scss
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@
}
}

&__ai-warning {
&__ai-warning,
&__version-notice {
margin-bottom: 1rem;
padding: 0.9rem 1rem;
border-left: 4px solid var(--ifm-color-warning);
Expand Down
5 changes: 5 additions & 0 deletions src/components/profile-analysis/ProfileUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export function ProfileUploader({ file, disabled, onFileChange }: ProfileUploade
Profile sections before local visualization or AI upload.
</p>

<div className="profile-analysis__version-notice" role="note">
Use a Profile produced by Apache Doris 4.1 or later. Profiles from earlier versions may fail to
parse.
</div>

<label
className={`profile-analysis__drop-zone${
disabled ? ' profile-analysis__drop-zone--disabled' : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ test('explains the raw file limit and large-profile reduction in English', () =>
assert.match(markup, /Files over 10 MiB are reduced to their aggregated Profile sections/);
});

test('states the supported Doris version before a Profile is chosen', () => {
const markup = renderUploader();

assert.match(markup, /profile-analysis__version-notice/);
assert.match(markup, /Apache Doris 4\.1 or later/);
assert.match(markup, /Profiles from earlier versions may fail to parse/);
// The notice must precede the drop zone so it is read before a file is picked.
assert.ok(markup.indexOf('__version-notice') < markup.indexOf('__drop-zone'));

const styles = fs.readFileSync(path.join(__dirname, 'ProfileAnalysis.scss'), 'utf8');
assert.match(styles, /&__version-notice[\s\S]*?{[^}]*border-left:\s*4px solid var\(--ifm-color-warning\)/);
});

test('disables both tab actions without a file and keeps visualization available during AI processing', () => {
const analyzerSource = fs.readFileSync(path.join(__dirname, 'ProfileAnalyzer.tsx'), 'utf8');

Expand Down
Loading