diff --git a/.cypress/integration/notebooks_test/notebooks.spec.js b/.cypress/integration/notebooks_test/notebooks.spec.js
index f1a6d044c..6e21785c1 100644
--- a/.cypress/integration/notebooks_test/notebooks.spec.js
+++ b/.cypress/integration/notebooks_test/notebooks.spec.js
@@ -135,7 +135,7 @@ describe('Testing paragraphs', () => {
cy.get('a[data-test-subj="createNotebookPrimaryBtn"]').click();
cy.get('input[data-test-subj="custom-input-modal-input"]').focus().type(TEST_NOTEBOOK);
cy.get('button[data-test-subj="custom-input-modal-confirm-button"]').click();
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
});
beforeEach(() => {
@@ -166,7 +166,7 @@ describe('Testing paragraphs', () => {
it('Has working breadcrumbs', () => {
cy.get('a[data-test-subj="breadcrumb last"]').contains(TEST_NOTEBOOK).click();
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('a[data-test-subj="breadcrumb"]').contains('Notebooks').click();
cy.get('h3[data-test-subj="notebookTableTitle"]').should('exist');
cy.get('a[data-test-subj="breadcrumb first"]').contains('Observability').click();
@@ -336,7 +336,7 @@ describe('Testing paragraphs', () => {
});
it('Clears outputs', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Clear all outputs').click();
@@ -346,7 +346,7 @@ describe('Testing paragraphs', () => {
});
it('Runs all paragraphs', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Run all paragraphs').click();
@@ -354,7 +354,7 @@ describe('Testing paragraphs', () => {
});
it('Adds paragraph to top', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Add paragraph to top').click();
@@ -364,7 +364,7 @@ describe('Testing paragraphs', () => {
});
it('Adds paragraph to bottom', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Add paragraph to bottom').click();
cy.get('.euiContextMenuItem__text').contains('Code block').click();
@@ -374,7 +374,7 @@ describe('Testing paragraphs', () => {
});
it('Moves paragraphs', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('.euiButtonIcon[aria-label="Open paragraph menu"').eq(0).click();
cy.get('.euiContextMenuItem-isDisabled').should('have.length.gte', 2);
cy.get('.euiContextMenuItem__text').contains('Move to bottom').click();
@@ -383,7 +383,7 @@ describe('Testing paragraphs', () => {
});
it('Duplicates and renames the notebook', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-notebook-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Duplicate notebook').click();
cy.get('.euiButton__text').contains('Duplicate').click();
@@ -394,14 +394,14 @@ describe('Testing paragraphs', () => {
cy.get('.euiButton__text').last().contains('Rename').click();
cy.reload();
- cy.get('.euiTitle')
+ cy.get('.euiText')
.contains(TEST_NOTEBOOK + ' (rename)')
.should('exist');
cy.get(`a[href="${SAMPLE_URL}"]`).should('have.length.gte', 2);
});
it('Deletes paragraphs', () => {
- cy.get('h1[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
+ cy.get('div[data-test-subj="notebookTitle"]').contains(TEST_NOTEBOOK).should('exist');
cy.get('[data-test-subj="notebook-paragraph-actions-button"]').click();
cy.get('.euiContextMenuItem__text').contains('Delete all paragraphs').click();
cy.get('button[data-test-subj="confirmModalConfirmButton"]').click();
diff --git a/public/components/notebooks/components/__tests__/__snapshots__/note_table.test.tsx.snap b/public/components/notebooks/components/__tests__/__snapshots__/note_table.test.tsx.snap
index 59bd9e38f..508ac33e8 100644
--- a/public/components/notebooks/components/__tests__/__snapshots__/note_table.test.tsx.snap
+++ b/public/components/notebooks/components/__tests__/__snapshots__/note_table.test.tsx.snap
@@ -16,11 +16,13 @@ exports[` spec renders the component 1`] = `
spec Renders the empty component 1`] = `
-
- sample-notebook-1
-
+
+ sample-notebook-1
+
+
@@ -203,7 +205,7 @@ exports[` spec Renders the empty component 1`] = `
No paragraphs
Add a paragraph to compose your document or story. Notebooks now support two types of input:
@@ -426,10 +428,12 @@ exports[`
spec Renders the visualization component 1`] = `
-
+ >
+
+
@@ -485,7 +489,7 @@ exports[`
spec Renders the visualization component 1`] = `
class="euiFlexItem euiFlexItem--flexGrowZero"
>
@@ -517,7 +521,7 @@ exports[` spec Renders the visualization component 1`] = `
No paragraphs
Add a paragraph to compose your document or story. Notebooks now support two types of input:
diff --git a/public/components/notebooks/components/helpers/__tests__/__snapshots__/modal_containers.test.tsx.snap b/public/components/notebooks/components/helpers/__tests__/__snapshots__/modal_containers.test.tsx.snap
index e4bd51e8a..ff1a3680a 100644
--- a/public/components/notebooks/components/helpers/__tests__/__snapshots__/modal_containers.test.tsx.snap
+++ b/public/components/notebooks/components/helpers/__tests__/__snapshots__/modal_containers.test.tsx.snap
@@ -8,14 +8,24 @@ exports[`modal_containers spec render delete notebooks modal 1`] = `
>
- title
+
+
+ title
+
+
-
+
message
-
+
The action cannot be undone.
@@ -69,7 +79,13 @@ exports[`modal_containers spec render get custom modal 1`] = `
>
- title
+
+
+ title
+
+
diff --git a/public/components/notebooks/components/helpers/custom_modals/__tests__/__snapshots__/custom_input_modal.test.tsx.snap b/public/components/notebooks/components/helpers/custom_modals/__tests__/__snapshots__/custom_input_modal.test.tsx.snap
index e90e49399..4f15d856d 100644
--- a/public/components/notebooks/components/helpers/custom_modals/__tests__/__snapshots__/custom_input_modal.test.tsx.snap
+++ b/public/components/notebooks/components/helpers/custom_modals/__tests__/__snapshots__/custom_input_modal.test.tsx.snap
@@ -8,7 +8,13 @@ exports[` spec renders the component 1`] = `
>
- title
+
+
+ title
+
+
@@ -58,7 +64,13 @@ exports[` spec renders the component 2`] = `
>
- title
+
+
+ title
+
+
diff --git a/public/components/notebooks/components/helpers/custom_modals/custom_input_modal.tsx b/public/components/notebooks/components/helpers/custom_modals/custom_input_modal.tsx
index 10ade574a..a3fdaea88 100644
--- a/public/components/notebooks/components/helpers/custom_modals/custom_input_modal.tsx
+++ b/public/components/notebooks/components/helpers/custom_modals/custom_input_modal.tsx
@@ -16,6 +16,7 @@ import {
EuiCompressedFormRow,
EuiCompressedFieldText,
EuiSmallButton,
+ EuiText,
} from '@elastic/eui';
/*
@@ -30,7 +31,7 @@ import {
* btn2txt - string as content to fill "confirm button"
* openNoteName - Default input value for the field
*/
-type CustomInputModalProps = {
+interface CustomInputModalProps {
runModal: (value: string) => void;
closeModal: (
event?: React.KeyboardEvent | React.MouseEvent
@@ -41,10 +42,19 @@ type CustomInputModalProps = {
btn2txt: string;
openNoteName: string;
helpText: string;
-};
+}
export const CustomInputModal = (props: CustomInputModalProps) => {
- const { runModal, closeModal, labelTxt, titletxt, btn1txt, btn2txt, openNoteName, helpText } = props;
+ const {
+ runModal,
+ closeModal,
+ labelTxt,
+ titletxt,
+ btn1txt,
+ btn2txt,
+ openNoteName,
+ helpText,
+ } = props;
const [value, setValue] = useState(openNoteName || ''); // sets input value
const onChange = (e: React.ChangeEvent) => {
@@ -55,7 +65,11 @@ export const CustomInputModal = (props: CustomInputModalProps) => {
- {titletxt}
+
+
+ {titletxt}
+
+
@@ -73,7 +87,11 @@ export const CustomInputModal = (props: CustomInputModalProps) => {
{btn1txt}
- runModal(value)} fill>
+ runModal(value)}
+ fill
+ >
{btn2txt}
diff --git a/public/components/notebooks/components/helpers/custom_modals/reporting_loading_modal.tsx b/public/components/notebooks/components/helpers/custom_modals/reporting_loading_modal.tsx
index 4f28904d7..d6e586d90 100644
--- a/public/components/notebooks/components/helpers/custom_modals/reporting_loading_modal.tsx
+++ b/public/components/notebooks/components/helpers/custom_modals/reporting_loading_modal.tsx
@@ -7,21 +7,18 @@ import {
EuiOverlayMask,
EuiModal,
EuiModalHeader,
- EuiTitle,
EuiText,
EuiModalBody,
EuiSpacer,
EuiFlexGroup,
EuiFlexItem,
EuiLoadingSpinner,
- EuiSmallButton
-} from "@elastic/eui";
-import React from "react";
+ EuiSmallButton,
+} from '@elastic/eui';
+import React from 'react';
-export function GenerateReportLoadingModal(props: { setShowLoading: any; }) {
- const {
- setShowLoading
- } = props;
+export function GenerateReportLoadingModal(props: { setShowLoading: any }) {
+ const { setShowLoading } = props;
const closeModal = () => {
setShowLoading(false);
@@ -36,15 +33,15 @@ export function GenerateReportLoadingModal(props: { setShowLoading: any; }) {
id="downloadInProgressLoadingModal"
>
-
-
- Generating report
-
-
+
+ Generating report
+
- Preparing your file for download.
- You can close this dialog while we continue in the background.
+ Preparing your file for download.
+
+ You can close this dialog while we continue in the background.
+
@@ -67,4 +64,4 @@ export function GenerateReportLoadingModal(props: { setShowLoading: any; }) {
);
-};
+}
diff --git a/public/components/notebooks/components/helpers/modal_containers.tsx b/public/components/notebooks/components/helpers/modal_containers.tsx
index 5b31c78a1..412767597 100644
--- a/public/components/notebooks/components/helpers/modal_containers.tsx
+++ b/public/components/notebooks/components/helpers/modal_containers.tsx
@@ -18,7 +18,7 @@ import {
EuiModalHeader,
EuiModalHeaderTitle,
EuiText,
- EuiSpacer
+ EuiSpacer,
} from '@elastic/eui';
import { CustomInputModal } from './custom_modals/custom_input_modal';
@@ -38,7 +38,7 @@ export const getCustomModal = (
btn1txt: string,
btn2txt: string,
openNoteName?: string,
- helpText?: string,
+ helpText?: string
) => {
return (
- Do you want to add sample notebooks? This will also add Dashboards sample flights and logs data if they have not been added.
+
+
+ Do you want to add sample notebooks? This will also add Dashboards sample flights and
+ logs data if they have not been added.
+
+
);
@@ -105,7 +110,7 @@ export const getDeleteModal = (
onConfirm: (event?: React.MouseEvent) => void,
title: string,
message: string,
- confirmMessage?: string,
+ confirmMessage?: string
) => {
return (
@@ -114,11 +119,11 @@ export const getDeleteModal = (
onCancel={onCancel}
onConfirm={onConfirm}
cancelButtonText="Cancel"
- confirmButtonText={confirmMessage || "Delete"}
+ confirmButtonText={confirmMessage || 'Delete'}
buttonColor="danger"
defaultFocusedButton="confirm"
>
- {message}
+ {message}
);
@@ -145,12 +150,16 @@ export const DeleteNotebookModal = ({
- {title}
+
+
+ {title}
+
+
- {message}
- The action cannot be undone.
+ {message}
+ The action cannot be undone.
diff --git a/public/components/notebooks/components/note_table.tsx b/public/components/notebooks/components/note_table.tsx
index 68995a6f3..e677ddd20 100644
--- a/public/components/notebooks/components/note_table.tsx
+++ b/public/components/notebooks/components/note_table.tsx
@@ -234,9 +234,9 @@ export function NoteTable({
-
+
Notebooks
-
+
@@ -266,7 +266,7 @@ export function NoteTable({
isOpen={isActionsPopoverOpen}
closePopover={() => setIsActionsPopoverOpen(false)}
>
-
+
@@ -322,7 +322,7 @@ export function NoteTable({
No notebooks
-
+
Use notebooks to create post-mortem reports, build live infrastructure
reports, or foster explorative collaborations with data.
diff --git a/public/components/notebooks/components/notebook.tsx b/public/components/notebooks/components/notebook.tsx
index 146dcbc93..d7d82fabb 100644
--- a/public/components/notebooks/components/notebook.tsx
+++ b/public/components/notebooks/components/notebook.tsx
@@ -21,7 +21,6 @@ import {
EuiPopover,
EuiSpacer,
EuiText,
- EuiTitle,
} from '@elastic/eui';
import CSS from 'csstype';
import moment from 'moment';
@@ -1007,7 +1006,7 @@ export class Notebook extends Component {
isOpen={this.state.isReportingActionsPopoverOpen}
closePopover={() => this.setState({ isReportingActionsPopoverOpen: false })}
>
-
+
) : null;
@@ -1059,7 +1058,7 @@ export class Notebook extends Component
{
isOpen={this.state.isParaActionsPopoverOpen}
closePopover={() => this.setState({ isParaActionsPopoverOpen: false })}
>
-
+
)}
@@ -1084,7 +1083,7 @@ export class Notebook extends Component {
isOpen={this.state.isNoteActionsPopoverOpen}
closePopover={() => this.setState({ isNoteActionsPopoverOpen: false })}
>
-
+
) : (
@@ -1109,9 +1108,9 @@ export class Notebook extends Component {
)}
-
+
{this.state.path}
-
+
{!this.state.savedObjectNotebook && (
@@ -1133,7 +1132,7 @@ export class Notebook extends Component {
- {createdText}
+ {createdText}
{this.state.parsedPara.length > 0 ? (
@@ -1198,7 +1197,7 @@ export class Notebook extends Component {
isOpen={this.state.isAddParaPopoverOpen}
closePopover={() => this.setState({ isAddParaPopoverOpen: false })}
>
-
+
>
)}
@@ -1210,7 +1209,7 @@ export class Notebook extends Component {
No paragraphs
-
+
Add a paragraph to compose your document or story. Notebooks now support two
types of input:
diff --git a/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap b/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap
index 5c0e7b6fd..e00e0947f 100644
--- a/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap
+++ b/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap
@@ -11,7 +11,7 @@ exports[` spec renders dashboards visualization outputs 1`] = `
exports[` spec renders markdown outputs 1`] = `
spec renders the component 1`] = `
class="euiFlexItem euiFlexItem--flexGrowZero"
>
@@ -293,7 +293,7 @@ exports[` spec renders the component 1`] = `
class="euiFlexItem"
>
spec renders the component 1`] = `
style="opacity: 1; padding: 15px;"
>
setIsModalOpen(false)} style={{ width: 500 }}>
- Browse visualizations
+
+
+ Browse visualizations
+
+
@@ -219,7 +223,9 @@ export const ParaInput = (props: {
- setIsModalOpen(false)}>Cancel
+ setIsModalOpen(false)}>
+ Cancel
+
onSelect()}
diff --git a/public/components/notebooks/components/paragraph_components/para_output.tsx b/public/components/notebooks/components/paragraph_components/para_output.tsx
index b82d8f091..c4ab9a017 100644
--- a/public/components/notebooks/components/paragraph_components/para_output.tsx
+++ b/public/components/notebooks/components/paragraph_components/para_output.tsx
@@ -108,6 +108,7 @@ const OutputBody = ({
key={key}
className="wrapAll markdown-output-text"
data-test-subj="markdownOutputText"
+ size="s"
>
diff --git a/public/components/notebooks/components/paragraph_components/paragraphs.tsx b/public/components/notebooks/components/paragraph_components/paragraphs.tsx
index 1d740b76b..c7b517f79 100644
--- a/public/components/notebooks/components/paragraph_components/paragraphs.tsx
+++ b/public/components/notebooks/components/paragraph_components/paragraphs.tsx
@@ -447,7 +447,7 @@ export const Paragraphs = forwardRef((props: ParagraphProps, ref) => {
isOpen={isPopoverOpen}
closePopover={() => setIsPopoverOpen(false)}
>
-
+
@@ -469,7 +469,7 @@ export const Paragraphs = forwardRef((props: ParagraphProps, ref) => {
)}
-
+
{`Last successful run ${moment(props.dateModified).format(UI_DATE_FORMAT)}.`}
@@ -484,12 +484,12 @@ export const Paragraphs = forwardRef((props: ParagraphProps, ref) => {
-
+
{`Output available from ${moment(props.dateModified).format(UI_DATE_FORMAT)}`}
-
+
props.setSelectedViewId('view_both', index)}
@@ -618,7 +618,6 @@ export const Paragraphs = forwardRef((props: ParagraphProps, ref) => {
onRunPara()}
- fill
>
{isOutputAvailable ? 'Refresh' : 'Run'}