Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Add the logs tab to container views #184854

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
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ export const hostDetailsTabs: Tab[] = [
];
export const hostDetailsFlyoutTabs: Tab[] = [...hostDetailsTabs, linkToApmTab];

// Profiling and Logs tab would be added in next iteration
export const containerDetailsTabs: Tab[] = [overviewTab, metadataTab];
export const containerDetailsFlyoutTabs: Tab[] = [overviewTab, metadataTab, linkToApmTab];
// The profiling tab would be added in next iteration
export const containerDetailsTabs: Tab[] = [overviewTab, metadataTab, logsTab];
export const containerDetailsFlyoutTabs: Tab[] = [overviewTab, metadataTab, logsTab, linkToApmTab];

export const getAssetDetailsTabs = (type: string): Tab[] => {
switch (type) {
Expand Down
16 changes: 16 additions & 0 deletions x-pack/test/functional/apps/infra/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,22 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});
});

describe('Logs Tab', () => {
before(async () => {
await pageObjects.assetDetails.clickLogsTab();
});

after(async () => {
await retry.try(async () => {
await pageObjects.infraHome.closeFlyout();
});
});

it('should render logs tab', async () => {
await pageObjects.assetDetails.logsExists();
});
});

describe('APM Link Tab', () => {
before(async () => {
await pageObjects.infraHome.clickOnNode();
Expand Down
23 changes: 23 additions & 0 deletions x-pack/test/functional/apps/infra/node_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,29 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
expect(charts.length).to.equal(chartsCount);
});
});
describe('Logs Tab', () => {
before(async () => {
await pageObjects.assetDetails.clickLogsTab();
});

it('should render logs tab', async () => {
await pageObjects.assetDetails.logsExists();
});

it('preserves search term between page reloads', async () => {
const searchInput = await pageObjects.assetDetails.getLogsSearchField();

expect(await searchInput.getAttribute('value')).to.be('');

await searchInput.type('test');
await refreshPageWithDelay();

await retry.try(async () => {
expect(await searchInput.getAttribute('value')).to.be('test');
});
await searchInput.clearValue();
});
});
});
});
});
Expand Down
Loading