@patternfly/quickstarts 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/HelpTopicDrawer.d.ts +8 -2
- package/dist/QuickStartDrawer.d.ts +21 -2
- package/dist/controller/QuickStartTaskHeader.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +104 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +104 -3
- package/dist/index.js.map +1 -1
- package/dist/patternfly-docs/quick-starts/design-guidelines/design-guidelines.md +105 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/card-elements copy.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/card-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/catalog-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/check-your-work.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/introduction-screen.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/mixed-catalog.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/prerequisites.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/qs-context.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel-resized.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task-no.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task-yes.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/Basic.jsx +73 -0
- package/dist/patternfly-docs/quick-starts/examples/HelpTopic.jsx +53 -0
- package/dist/patternfly-docs/quick-starts/examples/about.md +77 -0
- package/dist/patternfly-docs/quick-starts/examples/basic.md +27 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/example-help-topics.js +173 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/example-quickstarts.js +215 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/index.js +15 -0
- package/dist/patternfly-docs/quick-starts/examples/help-topics.md +25 -0
- package/dist/patternfly-docs/quick-starts/examples/img/catalog.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/img/help-topic.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/img/side-panel.png +0 -0
- package/dist/quickstarts-full.es.js +104 -4
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/utils/asciidoc-procedure-parser.d.ts +12 -0
- package/package.json +11 -4
- package/src/ConsoleInternal/components/_icon-and-text.scss +14 -0
- package/src/ConsoleInternal/components/_markdown-view.scss +19 -0
- package/src/ConsoleInternal/components/catalog/_catalog.scss +390 -0
- package/src/ConsoleInternal/components/markdown-view.tsx +305 -0
- package/src/ConsoleInternal/components/utils/_status-box.scss +58 -0
- package/src/ConsoleInternal/components/utils/camel-case-wrap.tsx +33 -0
- package/src/ConsoleInternal/components/utils/index.tsx +3 -0
- package/src/ConsoleInternal/components/utils/router.ts +47 -0
- package/src/ConsoleInternal/components/utils/status-box.tsx +94 -0
- package/src/ConsoleInternal/module/k8s/types.ts +53 -0
- package/src/ConsoleShared/index.ts +1 -0
- package/src/ConsoleShared/src/components/index.ts +7 -0
- package/src/ConsoleShared/src/components/layout/PageLayout.scss +29 -0
- package/src/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.tsx +93 -0
- package/src/ConsoleShared/src/components/markdown-extensions/__tests__/MarkdownCopyClipboard.spec.tsx +25 -0
- package/src/ConsoleShared/src/components/markdown-extensions/__tests__/test-data.ts +5 -0
- package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +66 -0
- package/src/ConsoleShared/src/components/markdown-extensions/code-extension.tsx +25 -0
- package/src/ConsoleShared/src/components/markdown-extensions/const.ts +3 -0
- package/src/ConsoleShared/src/components/markdown-extensions/index.ts +5 -0
- package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +45 -0
- package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +50 -0
- package/src/ConsoleShared/src/components/markdown-extensions/showdown-extension.scss +52 -0
- package/src/ConsoleShared/src/components/markdown-extensions/utils.ts +3 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.tsx +64 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/highlight-consts.ts +9 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/index.ts +1 -0
- package/src/ConsoleShared/src/components/modal/Modal.scss +3 -0
- package/src/ConsoleShared/src/components/modal/Modal.tsx +19 -0
- package/src/ConsoleShared/src/components/modal/index.ts +1 -0
- package/src/ConsoleShared/src/components/popper/Portal.tsx +23 -0
- package/src/ConsoleShared/src/components/popper/SimplePopper.tsx +90 -0
- package/src/ConsoleShared/src/components/popper/index.ts +2 -0
- package/src/ConsoleShared/src/components/spotlight/InteractiveSpotlight.tsx +58 -0
- package/src/ConsoleShared/src/components/spotlight/Spotlight.tsx +35 -0
- package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +32 -0
- package/src/ConsoleShared/src/components/spotlight/index.ts +1 -0
- package/src/ConsoleShared/src/components/spotlight/spotlight.scss +63 -0
- package/src/ConsoleShared/src/components/status/GenericStatus.tsx +33 -0
- package/src/ConsoleShared/src/components/status/NotStartedIcon.tsx +27 -0
- package/src/ConsoleShared/src/components/status/PopoverStatus.tsx +42 -0
- package/src/ConsoleShared/src/components/status/Status.tsx +38 -0
- package/src/ConsoleShared/src/components/status/StatusIconAndText.tsx +42 -0
- package/src/ConsoleShared/src/components/status/icons.tsx +77 -0
- package/src/ConsoleShared/src/components/status/index.tsx +1 -0
- package/src/ConsoleShared/src/components/status/statuses.tsx +36 -0
- package/src/ConsoleShared/src/components/status/types.ts +7 -0
- package/src/ConsoleShared/src/components/utils/FallbackImg.tsx +20 -0
- package/src/ConsoleShared/src/components/utils/index.ts +1 -0
- package/src/ConsoleShared/src/constants/index.ts +1 -0
- package/src/ConsoleShared/src/constants/ui.ts +1 -0
- package/src/ConsoleShared/src/hooks/index.ts +6 -0
- package/src/ConsoleShared/src/hooks/scroll.ts +52 -0
- package/src/ConsoleShared/src/hooks/useBoundingClientRect.ts +18 -0
- package/src/ConsoleShared/src/hooks/useEventListener.ts +14 -0
- package/src/ConsoleShared/src/hooks/useForceRender.ts +6 -0
- package/src/ConsoleShared/src/hooks/useResizeObserver.ts +20 -0
- package/src/ConsoleShared/src/hooks/useScrollShadows.ts +45 -0
- package/src/ConsoleShared/src/index.ts +4 -0
- package/src/ConsoleShared/src/utils/index.ts +1 -0
- package/src/ConsoleShared/src/utils/useCombineRefs.ts +17 -0
- package/src/HelpTopicDrawer.tsx +124 -0
- package/src/HelpTopicPanelContent.tsx +152 -0
- package/src/QuickStartCatalogPage.tsx +190 -0
- package/src/QuickStartCloseModal.tsx +47 -0
- package/src/QuickStartController.tsx +113 -0
- package/src/QuickStartDrawer.scss +11 -0
- package/src/QuickStartDrawer.tsx +265 -0
- package/src/QuickStartMarkdownView.tsx +75 -0
- package/src/QuickStartPanelContent.scss +46 -0
- package/src/QuickStartPanelContent.tsx +153 -0
- package/src/__tests__/quick-start-utils.spec.tsx +16 -0
- package/src/catalog/Catalog/QuickStartCatalogHeader.tsx +18 -0
- package/src/catalog/Catalog/QuickStartCatalogSection.tsx +9 -0
- package/src/catalog/Catalog/QuickStartCatalogToolbar.tsx +12 -0
- package/src/catalog/Catalog/index.ts +3 -0
- package/src/catalog/QuickStartCatalog.scss +8 -0
- package/src/catalog/QuickStartCatalog.tsx +42 -0
- package/src/catalog/QuickStartTile.scss +11 -0
- package/src/catalog/QuickStartTile.tsx +105 -0
- package/src/catalog/QuickStartTileDescription.scss +29 -0
- package/src/catalog/QuickStartTileDescription.tsx +79 -0
- package/src/catalog/QuickStartTileFooter.tsx +101 -0
- package/src/catalog/QuickStartTileFooterExternal.tsx +40 -0
- package/src/catalog/QuickStartTileHeader.scss +12 -0
- package/src/catalog/QuickStartTileHeader.tsx +77 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilter.scss +25 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilter.tsx +34 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +199 -0
- package/src/catalog/__tests__/QuickStartCatalog.spec.tsx +35 -0
- package/src/catalog/__tests__/QuickStartTile.spec.tsx +38 -0
- package/src/catalog/__tests__/QuickStartTileDescription.spec.tsx +44 -0
- package/src/catalog/index.ts +9 -0
- package/src/controller/QuickStartConclusion.tsx +63 -0
- package/src/controller/QuickStartContent.scss +12 -0
- package/src/controller/QuickStartContent.tsx +72 -0
- package/src/controller/QuickStartFooter.scss +13 -0
- package/src/controller/QuickStartFooter.tsx +128 -0
- package/src/controller/QuickStartIntroduction.scss +35 -0
- package/src/controller/QuickStartIntroduction.tsx +66 -0
- package/src/controller/QuickStartTaskHeader.scss +58 -0
- package/src/controller/QuickStartTaskHeader.tsx +116 -0
- package/src/controller/QuickStartTaskHeaderList.scss +17 -0
- package/src/controller/QuickStartTaskHeaderList.tsx +35 -0
- package/src/controller/QuickStartTaskReview.scss +30 -0
- package/src/controller/QuickStartTaskReview.tsx +81 -0
- package/src/controller/QuickStartTasks.scss +89 -0
- package/src/controller/QuickStartTasks.tsx +75 -0
- package/src/controller/__tests__/QuickStartConclusion.spec.tsx +95 -0
- package/src/controller/__tests__/QuickStartContent.spec.tsx +52 -0
- package/src/controller/__tests__/QuickStartFooter.spec.tsx +148 -0
- package/src/controller/__tests__/QuickStartTaskHeader.spec.tsx +56 -0
- package/src/controller/__tests__/QuickStartTaskReview.spec.tsx +45 -0
- package/src/controller/__tests__/QuickStartTasks.spec.tsx +81 -0
- package/src/data/mocks/json/explore-pipeline-quickstart.ts +66 -0
- package/src/data/mocks/json/explore-serverless-quickstart.ts +90 -0
- package/src/data/mocks/json/monitor-sampleapp-quickstart.ts +77 -0
- package/src/data/mocks/json/tour-icons.ts +3 -0
- package/src/data/mocks/yamls/add-healthchecks-quickstart.yaml +67 -0
- package/src/data/mocks/yamls/explore-pipeline-quickstart.yaml +57 -0
- package/src/data/mocks/yamls/explore-serverless-quickstart.yaml +83 -0
- package/src/data/mocks/yamls/install-associate-pipeline-quickstart.yaml +74 -0
- package/src/data/mocks/yamls/monitor-sampleapp-quickstart.yaml +66 -0
- package/src/data/mocks/yamls/sample-application-quickstart.yaml +97 -0
- package/src/data/mocks/yamls/serverless-application-quickstart.yaml +141 -0
- package/src/data/quick-start-test-data.ts +10 -0
- package/src/data/test-utils.ts +11 -0
- package/src/declaration.d.ts +2 -0
- package/src/index.ts +17 -0
- package/src/locales/en/quickstart.json +46 -0
- package/src/styles/_base.scss +54 -0
- package/src/styles/_dark-custom-override.scss +62 -0
- package/src/styles/legacy-bootstrap/README.md +21 -0
- package/src/styles/legacy-bootstrap/_code.scss +44 -0
- package/src/styles/legacy-bootstrap/_tables.scss +38 -0
- package/src/styles/legacy-bootstrap/_type.scss +90 -0
- package/src/styles/legacy-bootstrap/_variables.scss +48 -0
- package/src/styles/legacy-bootstrap.scss +5 -0
- package/src/styles/patternfly-global-entry.ts +1 -0
- package/src/styles/patternfly-global.scss +28 -0
- package/src/styles/patternfly-nested-entry.ts +1 -0
- package/src/styles/patternfly-nested.scss +18 -0
- package/src/styles/quickstarts-standalone-entry.ts +1 -0
- package/src/styles/quickstarts-standalone.scss +7 -0
- package/src/styles/style.scss +12 -0
- package/src/styles/vendor-entry.ts +1 -0
- package/src/styles/vendor.scss +7 -0
- package/src/utils/PluralResolver.ts +356 -0
- package/src/utils/asciidoc-procedure-parser.ts +132 -0
- package/src/utils/const.ts +10 -0
- package/src/utils/help-topic-context.tsx +74 -0
- package/src/utils/help-topic-types.ts +16 -0
- package/src/utils/quick-start-context.tsx +477 -0
- package/src/utils/quick-start-types.ts +72 -0
- package/src/utils/quick-start-utils.ts +92 -0
- package/src/utils/useLocalStorage.ts +38 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ShallowWrapper, shallow } from 'enzyme';
|
|
3
|
+
import { allQuickStarts } from '../../data/quick-start-test-data';
|
|
4
|
+
import { QuickStartTaskStatus } from '../../utils/quick-start-types';
|
|
5
|
+
import { getQuickStartByName } from '../../utils/quick-start-utils';
|
|
6
|
+
import QuickStartConclusion from '../QuickStartConclusion';
|
|
7
|
+
import QuickStartContent from '../QuickStartContent';
|
|
8
|
+
import QuickStartIntroduction from '../QuickStartIntroduction';
|
|
9
|
+
import QuickStartTasks from '../QuickStartTasks';
|
|
10
|
+
|
|
11
|
+
type QuickStartContentProps = React.ComponentProps<typeof QuickStartContent>;
|
|
12
|
+
|
|
13
|
+
let wrapper: ShallowWrapper<QuickStartContentProps>;
|
|
14
|
+
|
|
15
|
+
const props: QuickStartContentProps = {
|
|
16
|
+
quickStart: getQuickStartByName('explore-serverless', allQuickStarts),
|
|
17
|
+
allTaskStatuses: [
|
|
18
|
+
QuickStartTaskStatus.INIT,
|
|
19
|
+
QuickStartTaskStatus.INIT,
|
|
20
|
+
QuickStartTaskStatus.INIT,
|
|
21
|
+
],
|
|
22
|
+
taskNumber: -1,
|
|
23
|
+
onTaskReview: jest.fn(),
|
|
24
|
+
onTaskSelect: jest.fn(),
|
|
25
|
+
onQuickStartChange: jest.fn(),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
describe('QuickStartContent', () => {
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
wrapper = shallow(<QuickStartContent {...props} />);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should render QuickStartIntroduction when the tour status is Not Started', () => {
|
|
34
|
+
expect(wrapper.find(QuickStartIntroduction).length).toBe(1);
|
|
35
|
+
expect(wrapper.find(QuickStartTasks).length).toBe(0);
|
|
36
|
+
expect(wrapper.find(QuickStartConclusion).length).toBe(0);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should render QuickStartTasks when the tour is In Progress', () => {
|
|
40
|
+
wrapper = shallow(<QuickStartContent {...props} taskNumber={1} />);
|
|
41
|
+
expect(wrapper.find(QuickStartIntroduction).length).toBe(0);
|
|
42
|
+
expect(wrapper.find(QuickStartTasks).length).toBe(1);
|
|
43
|
+
expect(wrapper.find(QuickStartConclusion).length).toBe(0);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('should render QuickStartConclusion when the tour is Complete', () => {
|
|
47
|
+
wrapper = shallow(<QuickStartContent {...props} taskNumber={2} />);
|
|
48
|
+
expect(wrapper.find(QuickStartIntroduction).length).toBe(0);
|
|
49
|
+
expect(wrapper.find(QuickStartTasks).length).toBe(0);
|
|
50
|
+
expect(wrapper.find(QuickStartConclusion).length).toBe(1);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from '@patternfly/react-core';
|
|
3
|
+
import { shallow } from 'enzyme';
|
|
4
|
+
import { QuickStartStatus } from '../../utils/quick-start-types';
|
|
5
|
+
import QuickStartFooter from '../QuickStartFooter';
|
|
6
|
+
|
|
7
|
+
jest.mock('react', () => {
|
|
8
|
+
const ActualReact = require.requireActual('react');
|
|
9
|
+
return {
|
|
10
|
+
...ActualReact,
|
|
11
|
+
useContext: () => jest.fn(),
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('QuickStartFooter', () => {
|
|
16
|
+
type QuickStartFooterProps = React.ComponentProps<typeof QuickStartFooter>;
|
|
17
|
+
let quickStartFooterProps: QuickStartFooterProps;
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
spyOn(React, 'useContext').and.returnValue({
|
|
20
|
+
activeQuickStartID: '',
|
|
21
|
+
startQuickStart: () => {},
|
|
22
|
+
restartQuickStart: () => {},
|
|
23
|
+
getResource: (key) => `quickstart~${key}`,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should load Start button for not started tours', () => {
|
|
28
|
+
quickStartFooterProps = {
|
|
29
|
+
status: QuickStartStatus.NOT_STARTED,
|
|
30
|
+
footerClass: 'test',
|
|
31
|
+
quickStartId: 'test-quickstart',
|
|
32
|
+
onNext: () => null,
|
|
33
|
+
onBack: () => null,
|
|
34
|
+
totalTasks: 4,
|
|
35
|
+
taskNumber: -1,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const quickStartFooterWrapper = shallow(<QuickStartFooter {...quickStartFooterProps} />);
|
|
39
|
+
const footerButtons = quickStartFooterWrapper.find(Button);
|
|
40
|
+
expect(footerButtons.exists()).toBeTruthy();
|
|
41
|
+
expect(footerButtons.length).toEqual(1);
|
|
42
|
+
expect(
|
|
43
|
+
footerButtons
|
|
44
|
+
.at(0)
|
|
45
|
+
.childAt(0)
|
|
46
|
+
.text(),
|
|
47
|
+
).toBe('quickstart~Start');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should load Continue and Restart buttons for in progress tours at into page', () => {
|
|
51
|
+
quickStartFooterProps = {
|
|
52
|
+
status: QuickStartStatus.IN_PROGRESS,
|
|
53
|
+
footerClass: 'test',
|
|
54
|
+
quickStartId: 'test-quickstart',
|
|
55
|
+
onNext: () => null,
|
|
56
|
+
onBack: () => null,
|
|
57
|
+
totalTasks: 4,
|
|
58
|
+
taskNumber: -1,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const quickStartFooterWrapper = shallow(<QuickStartFooter {...quickStartFooterProps} />);
|
|
62
|
+
const footerButtons = quickStartFooterWrapper.find(Button);
|
|
63
|
+
expect(footerButtons.exists()).toBeTruthy();
|
|
64
|
+
expect(footerButtons.length).toEqual(2);
|
|
65
|
+
expect(
|
|
66
|
+
footerButtons
|
|
67
|
+
.at(0)
|
|
68
|
+
.childAt(0)
|
|
69
|
+
.text(),
|
|
70
|
+
).toBe('quickstart~Continue');
|
|
71
|
+
expect(
|
|
72
|
+
footerButtons
|
|
73
|
+
.at(1)
|
|
74
|
+
.childAt(0)
|
|
75
|
+
.text(),
|
|
76
|
+
).toBe('quickstart~Restart');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('should load Next and Back buttons, and Restart link for in progress tours in task page', () => {
|
|
80
|
+
quickStartFooterProps = {
|
|
81
|
+
status: QuickStartStatus.IN_PROGRESS,
|
|
82
|
+
footerClass: 'test',
|
|
83
|
+
quickStartId: 'test-quickstart',
|
|
84
|
+
onNext: () => null,
|
|
85
|
+
onBack: () => null,
|
|
86
|
+
totalTasks: 4,
|
|
87
|
+
taskNumber: 2,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const quickStartFooterWrapper = shallow(<QuickStartFooter {...quickStartFooterProps} />);
|
|
91
|
+
const footerButtons = quickStartFooterWrapper.find(Button);
|
|
92
|
+
expect(footerButtons.exists()).toBeTruthy();
|
|
93
|
+
expect(footerButtons.length).toEqual(3);
|
|
94
|
+
expect(
|
|
95
|
+
footerButtons
|
|
96
|
+
.at(0)
|
|
97
|
+
.childAt(0)
|
|
98
|
+
.text(),
|
|
99
|
+
).toBe('quickstart~Next');
|
|
100
|
+
expect(
|
|
101
|
+
footerButtons
|
|
102
|
+
.at(1)
|
|
103
|
+
.childAt(0)
|
|
104
|
+
.text(),
|
|
105
|
+
).toBe('quickstart~Back');
|
|
106
|
+
expect(
|
|
107
|
+
footerButtons
|
|
108
|
+
.at(2)
|
|
109
|
+
.childAt(0)
|
|
110
|
+
.text(),
|
|
111
|
+
).toBe('quickstart~Restart');
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it('should load Close, Back and Restart buttons for completed tours in conclusion page', () => {
|
|
115
|
+
quickStartFooterProps = {
|
|
116
|
+
status: QuickStartStatus.COMPLETE,
|
|
117
|
+
footerClass: 'test',
|
|
118
|
+
quickStartId: 'test-quickstart',
|
|
119
|
+
onNext: () => null,
|
|
120
|
+
onBack: () => null,
|
|
121
|
+
totalTasks: 4,
|
|
122
|
+
taskNumber: 4,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const quickStartFooterWrapper = shallow(<QuickStartFooter {...quickStartFooterProps} />);
|
|
126
|
+
const footerButtons = quickStartFooterWrapper.find(Button);
|
|
127
|
+
expect(footerButtons.exists()).toBeTruthy();
|
|
128
|
+
expect(footerButtons.length).toEqual(3);
|
|
129
|
+
expect(
|
|
130
|
+
footerButtons
|
|
131
|
+
.at(0)
|
|
132
|
+
.childAt(0)
|
|
133
|
+
.text(),
|
|
134
|
+
).toBe('quickstart~Close');
|
|
135
|
+
expect(
|
|
136
|
+
footerButtons
|
|
137
|
+
.at(1)
|
|
138
|
+
.childAt(0)
|
|
139
|
+
.text(),
|
|
140
|
+
).toBe('quickstart~Back');
|
|
141
|
+
expect(
|
|
142
|
+
footerButtons
|
|
143
|
+
.at(2)
|
|
144
|
+
.childAt(0)
|
|
145
|
+
.text(),
|
|
146
|
+
).toBe('quickstart~Restart');
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Title, WizardNavItem } from '@patternfly/react-core';
|
|
3
|
+
import { ShallowWrapper, shallow } from 'enzyme';
|
|
4
|
+
import { QuickStartTaskStatus } from '../../utils/quick-start-types';
|
|
5
|
+
import QuickStartTaskHeader from '../QuickStartTaskHeader';
|
|
6
|
+
|
|
7
|
+
type QuickStartTaskHeaderProps = React.ComponentProps<typeof QuickStartTaskHeader>;
|
|
8
|
+
let wrapper: ShallowWrapper<QuickStartTaskHeaderProps>;
|
|
9
|
+
const props: QuickStartTaskHeaderProps = {
|
|
10
|
+
title: 'title',
|
|
11
|
+
taskIndex: 1,
|
|
12
|
+
subtitle: 'subtitle',
|
|
13
|
+
taskStatus: QuickStartTaskStatus.INIT,
|
|
14
|
+
size: 'lg',
|
|
15
|
+
isActiveTask: true,
|
|
16
|
+
onTaskSelect: jest.fn(),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe('QuickStartTaskHeader', () => {
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
// DOMPurify.addHook = jest.fn();
|
|
22
|
+
wrapper = shallow(<QuickStartTaskHeader {...props} />);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('should render subtitle for active task', () => {
|
|
26
|
+
expect(
|
|
27
|
+
wrapper
|
|
28
|
+
.find(WizardNavItem)
|
|
29
|
+
.dive()
|
|
30
|
+
.find(Title).length,
|
|
31
|
+
).toBe(1);
|
|
32
|
+
expect(
|
|
33
|
+
wrapper
|
|
34
|
+
.find(WizardNavItem)
|
|
35
|
+
.dive()
|
|
36
|
+
.find('[data-test-id="quick-start-task-subtitle"]')
|
|
37
|
+
.props().children,
|
|
38
|
+
).toEqual([' ', props.subtitle]);
|
|
39
|
+
});
|
|
40
|
+
it('should not render subtitle if task is not active', () => {
|
|
41
|
+
wrapper = shallow(<QuickStartTaskHeader {...props} isActiveTask={false} />);
|
|
42
|
+
expect(
|
|
43
|
+
wrapper
|
|
44
|
+
.find(WizardNavItem)
|
|
45
|
+
.dive()
|
|
46
|
+
.find(Title).length,
|
|
47
|
+
).toBe(1);
|
|
48
|
+
expect(
|
|
49
|
+
wrapper
|
|
50
|
+
.find(WizardNavItem)
|
|
51
|
+
.dive()
|
|
52
|
+
.find('[data-test-id="quick-start-task-subtitle"]')
|
|
53
|
+
.exists(),
|
|
54
|
+
).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert } from '@patternfly/react-core';
|
|
3
|
+
import { ShallowWrapper, shallow } from 'enzyme';
|
|
4
|
+
import { allQuickStarts } from '../../data/quick-start-test-data';
|
|
5
|
+
import QuickStartMarkdownView from '../../QuickStartMarkdownView';
|
|
6
|
+
import { QuickStartTaskStatus } from '../../utils/quick-start-types';
|
|
7
|
+
import { getQuickStartByName } from '../../utils/quick-start-utils';
|
|
8
|
+
import QuickStartTaskReview from '../QuickStartTaskReview';
|
|
9
|
+
|
|
10
|
+
type QuickStartTaskReviewProps = React.ComponentProps<typeof QuickStartTaskReview>;
|
|
11
|
+
let wrapper: ShallowWrapper<QuickStartTaskReviewProps>;
|
|
12
|
+
const props: QuickStartTaskReviewProps = {
|
|
13
|
+
review: getQuickStartByName('explore-serverless', allQuickStarts).spec.tasks[0].review,
|
|
14
|
+
taskStatus: QuickStartTaskStatus.REVIEW,
|
|
15
|
+
onTaskReview: jest.fn(),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
describe('QuickStartTaskReview', () => {
|
|
19
|
+
it('should render alert with info variant when task status is review', () => {
|
|
20
|
+
wrapper = shallow(<QuickStartTaskReview {...props} />);
|
|
21
|
+
expect(wrapper.find(Alert).props().variant).toBe('info');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('should render alert with success variant when task status is success', () => {
|
|
25
|
+
props.taskStatus = QuickStartTaskStatus.SUCCESS;
|
|
26
|
+
wrapper = shallow(<QuickStartTaskReview {...props} />);
|
|
27
|
+
expect(wrapper.find(Alert).props().variant).toBe('success');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should render alert with danger variant when task status is failed', () => {
|
|
31
|
+
props.taskStatus = QuickStartTaskStatus.FAILED;
|
|
32
|
+
wrapper = shallow(<QuickStartTaskReview {...props} />);
|
|
33
|
+
expect(wrapper.find(Alert).props().variant).toBe('danger');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should render task help in markdown when task status is failed', () => {
|
|
37
|
+
wrapper = shallow(<QuickStartTaskReview {...props} />);
|
|
38
|
+
expect(
|
|
39
|
+
wrapper
|
|
40
|
+
.find(QuickStartMarkdownView)
|
|
41
|
+
.at(1)
|
|
42
|
+
.props().content,
|
|
43
|
+
).toEqual(props.review.failedTaskHelp);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ShallowWrapper, shallow } from 'enzyme';
|
|
3
|
+
import { allQuickStarts } from '../../data/quick-start-test-data';
|
|
4
|
+
import QuickStartMarkdownView from '../../QuickStartMarkdownView';
|
|
5
|
+
import { QuickStartTaskStatus } from '../../utils/quick-start-types';
|
|
6
|
+
import { getQuickStartByName } from '../../utils/quick-start-utils';
|
|
7
|
+
import TaskHeader from '../QuickStartTaskHeader';
|
|
8
|
+
import QuickStartTaskReview from '../QuickStartTaskReview';
|
|
9
|
+
import QuickStartTask from '../QuickStartTasks';
|
|
10
|
+
|
|
11
|
+
jest.mock('react', () => {
|
|
12
|
+
const ActualReact = require.requireActual('react');
|
|
13
|
+
return {
|
|
14
|
+
...ActualReact,
|
|
15
|
+
useContext: () => jest.fn(),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
type QuickStartTaskProps = React.ComponentProps<typeof QuickStartTask>;
|
|
20
|
+
let wrapper: ShallowWrapper<QuickStartTaskProps>;
|
|
21
|
+
const props: QuickStartTaskProps = {
|
|
22
|
+
tasks: getQuickStartByName('monitor-sampleapp', allQuickStarts).spec.tasks,
|
|
23
|
+
allTaskStatuses: [
|
|
24
|
+
QuickStartTaskStatus.SUCCESS,
|
|
25
|
+
QuickStartTaskStatus.INIT,
|
|
26
|
+
QuickStartTaskStatus.INIT,
|
|
27
|
+
],
|
|
28
|
+
taskNumber: 1,
|
|
29
|
+
onTaskReview: jest.fn(),
|
|
30
|
+
onTaskSelect: jest.fn(),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
describe('QuickStartTasks', () => {
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
spyOn(React, 'useContext').and.returnValue({
|
|
36
|
+
activeQuickStartID: '',
|
|
37
|
+
startQuickStart: () => {},
|
|
38
|
+
restartQuickStart: () => {},
|
|
39
|
+
getResource: (key) => `quickstart~${key}`,
|
|
40
|
+
});
|
|
41
|
+
wrapper = shallow(<QuickStartTask {...props} />);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should render correct number of tasks based on currentTaskIndex', () => {
|
|
45
|
+
expect(wrapper.find(TaskHeader).length).toBe(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should render SyncMarkdownView with description if a task is active', () => {
|
|
49
|
+
wrapper = shallow(
|
|
50
|
+
<QuickStartTask
|
|
51
|
+
{...props}
|
|
52
|
+
allTaskStatuses={[
|
|
53
|
+
QuickStartTaskStatus.SUCCESS,
|
|
54
|
+
QuickStartTaskStatus.FAILED,
|
|
55
|
+
QuickStartTaskStatus.VISITED,
|
|
56
|
+
]}
|
|
57
|
+
taskNumber={2}
|
|
58
|
+
/>,
|
|
59
|
+
);
|
|
60
|
+
expect(
|
|
61
|
+
wrapper
|
|
62
|
+
.find(QuickStartMarkdownView)
|
|
63
|
+
.at(0)
|
|
64
|
+
.props().content,
|
|
65
|
+
).toEqual(props.tasks[2].description);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('should render review when task is active and in Review state', () => {
|
|
69
|
+
wrapper = shallow(
|
|
70
|
+
<QuickStartTask
|
|
71
|
+
{...props}
|
|
72
|
+
allTaskStatuses={[
|
|
73
|
+
QuickStartTaskStatus.SUCCESS,
|
|
74
|
+
QuickStartTaskStatus.REVIEW,
|
|
75
|
+
QuickStartTaskStatus.INIT,
|
|
76
|
+
]}
|
|
77
|
+
/>,
|
|
78
|
+
);
|
|
79
|
+
expect(wrapper.find(QuickStartTaskReview).exists()).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { QuickStart } from '@patternfly/quickstarts';
|
|
2
|
+
import { pipelineIcon } from './tour-icons';
|
|
3
|
+
|
|
4
|
+
export const explorePipelinesQuickStart: QuickStart = {
|
|
5
|
+
apiVersion: 'console.openshift.io/v1',
|
|
6
|
+
kind: 'QuickStarts',
|
|
7
|
+
metadata: {
|
|
8
|
+
name: 'explore-pipelines',
|
|
9
|
+
},
|
|
10
|
+
spec: {
|
|
11
|
+
version: 4.7,
|
|
12
|
+
displayName: `Installing the Pipelines Operator`,
|
|
13
|
+
durationMinutes: 10,
|
|
14
|
+
icon: pipelineIcon,
|
|
15
|
+
description: `Install the OpenShift® Pipelines Operator to build Pipelines using Tekton.`,
|
|
16
|
+
prerequisites: [''],
|
|
17
|
+
introduction: `OpenShift® Pipelines is a cloud-native, continuous integration and continuous delivery (CI/CD) solution based on Kubernetes resources. It uses Tekton building blocks to automate deployments across multiple Kubernetes distributions by abstracting away the underlying implementation details.
|
|
18
|
+
* OpenShift Pipelines is a serverless CI/CD system that runs pipelines with all the required dependencies in isolated containers.
|
|
19
|
+
* They are designed for decentralized teams that work on a microservice-based architecture.
|
|
20
|
+
* They are defined using standard Custom Resource Definitions making them extensible and easy to integrate with the existing Kubernetes tools. This enables you to scale on-demand.
|
|
21
|
+
* You can use OpenShift Pipelines to build images with Kubernetes tools such as Source-to-Image (S2I), Buildah, Buildpacks, and Kaniko that are portable across any Kubernetes platform.
|
|
22
|
+
* You can use the Developer perspective to create and manage pipelines and view logs in your namespaces.
|
|
23
|
+
|
|
24
|
+
To start using Pipelines, install the OpenShift® Pipelines Operator on your cluster.`,
|
|
25
|
+
tasks: [
|
|
26
|
+
{
|
|
27
|
+
title: `Installing the OpenShift Pipelines Operator`,
|
|
28
|
+
description: `### To install the OpenShift Pipelines Operator:
|
|
29
|
+
|
|
30
|
+
1. From the **Administrator** perspective in the console navigation panel, click **Operators > OperatorHub**.
|
|
31
|
+
2. In the **Filter by keyword** field, type \`OpenShift Pipelines Operator\`.
|
|
32
|
+
3. If the tile has an Installed label, the Operator is already installed. Proceed to the next quick start to create a Pipeline.
|
|
33
|
+
4. Click the **tile** to open the Operator details.
|
|
34
|
+
5. At the top of the OpenShift Pipelines Operator panel that opens, click **Install**.
|
|
35
|
+
6. Fill out the Operator subscription form by selecting the channel that matches your OpenShift cluster, and then click **Install**.
|
|
36
|
+
7. On the **Installed Operators** page, wait for the OpenShift Pipelines Operator's status to change from **Installing** to **Succeeded**. `,
|
|
37
|
+
review: {
|
|
38
|
+
instructions: `#### To verify that the OpenShift Pipelines Operator is installed:
|
|
39
|
+
1. From the **Operators** section of the navigation, go to the **Installed Operators** page.
|
|
40
|
+
2. Verify that the **OpenShift Pipelines Operator** appears in the list of Operators.
|
|
41
|
+
|
|
42
|
+
In the status column, is the status of the OpenShift Pipelines Operator **Succeeded**?`,
|
|
43
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again, or [read more](https://docs.openshift.com/container-platform/4.6/pipelines/installing-pipelines.html#op-installing-pipelines-operator-in-web-console_installing-pipelines) about this topic.`,
|
|
44
|
+
},
|
|
45
|
+
summary: {
|
|
46
|
+
success: `You have installed the Pipelines Operator!`,
|
|
47
|
+
failed: `Try the steps again.`,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
conclusion: `You successfully installed the OpenShift Pipelines Operator! If you want to learn how to deploy an application and associate a Pipeline with it, take the Creating a Pipeline quick start.`,
|
|
52
|
+
nextQuickStart: [`install-app-and-associate-pipeline`],
|
|
53
|
+
accessReviewResources: [
|
|
54
|
+
{
|
|
55
|
+
group: 'operators.coreos.com',
|
|
56
|
+
resource: 'operatorgroups',
|
|
57
|
+
verb: 'list',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
group: 'packages.operators.coreos.com',
|
|
61
|
+
resource: 'packagemanifests',
|
|
62
|
+
verb: 'list',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { QuickStart } from '@patternfly/quickstarts';
|
|
2
|
+
import { serverlessIcon } from './tour-icons';
|
|
3
|
+
|
|
4
|
+
export const exploreServerlessQuickStart: QuickStart = {
|
|
5
|
+
apiVersion: 'console.openshift.io/v1',
|
|
6
|
+
kind: 'ConsoleQuickStarts',
|
|
7
|
+
metadata: {
|
|
8
|
+
name: 'explore-serverless',
|
|
9
|
+
},
|
|
10
|
+
spec: {
|
|
11
|
+
version: 4.7,
|
|
12
|
+
displayName: `Setting up Serverless`,
|
|
13
|
+
durationMinutes: 10,
|
|
14
|
+
icon: serverlessIcon,
|
|
15
|
+
description: `Install the OpenShift Serverless Operator to deploy stateless, event-trigger-based applications.`,
|
|
16
|
+
prerequisites: [''],
|
|
17
|
+
introduction: `Red Hat® OpenShift® Serverless lets you run stateless, serverless workloads on a single multi-cloud container platform.
|
|
18
|
+
|
|
19
|
+
Serverless reduces the need to manage infrastructure or perform back-end development. Scaling is automated, and applications can run on any cloud, hybrid, or on-premises environment. Choosing Serverless means simplicity, portability, and efficiency.
|
|
20
|
+
|
|
21
|
+
Adding OpenShift Serverless to your OpenShift Container Platform cluster is quick and easy. This quick start walks you through the process.`,
|
|
22
|
+
tasks: [
|
|
23
|
+
{
|
|
24
|
+
title: `Install the OpenShift Serverless Operator`,
|
|
25
|
+
description: `### To install the Serverless Operator:
|
|
26
|
+
1. From the **Administrator** perspective, go to the **OperatorHub** from the **Operators** section of the navigation.
|
|
27
|
+
2. In the **Filter by keyword** field, type \`Serverless\`.
|
|
28
|
+
3. If the tile has an **Installed** label on it, the Operator is already installed. Proceed to task two.
|
|
29
|
+
4. Click the **OpenShift Serverless Operator** tile.
|
|
30
|
+
5. At the top of the OpenShift Serverless Operator panel, click **Install**.
|
|
31
|
+
6. Verify that the **OpenShift Serverless Operator Update Channel** is set to the latest version, then click **Install**.
|
|
32
|
+
7. Wait for the OpenShift Serverless Operator's status to change from **Installing operator** to **Operator installed - Ready for use**.
|
|
33
|
+
`,
|
|
34
|
+
|
|
35
|
+
review: {
|
|
36
|
+
instructions: `#### To verify that the OpenShift Serverless Operator is installed:
|
|
37
|
+
|
|
38
|
+
In the Status column of the **Installed Operators** page, is the OpenShift Serverless Operator’s status **Succeeded?**`,
|
|
39
|
+
failedTaskHelp: `This task is incomplete. Try the task again, or [read more](https://docs.openshift.com/container-platform/4.6/serverless/installing_serverless/installing-openshift-serverless.html) about this topic.`,
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
summary: {
|
|
43
|
+
success: `You just installed the OpenShift Serverless Operator! Next, we'll install the required Knative Eventing and Knative Serving Custom Resource components for this Operator to run.`,
|
|
44
|
+
failed: `This task is incomplete. Try the task again, or read more about this topic.`,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: `Create the Knative Serving and Knative Eventing APIs`,
|
|
49
|
+
description: `Now let’s install the Knative application programming interfaces (APIs) needed to deploy applications and container workloads.
|
|
50
|
+
|
|
51
|
+
**To create the Knative Serving and Knative Eventing APIs:**
|
|
52
|
+
1. Go to the **Installed Operators** page.
|
|
53
|
+
2. Click **OpenShift Serverless Operator**.
|
|
54
|
+
3. If it does not already exist, create a project called “knative-serving” under the Project list at the top of the page. If it does exist, select the project from the list.
|
|
55
|
+
4. Click the Knative Serving link under Provided APIs or, from Knative Serving tile, click **Create Instance**.
|
|
56
|
+
5. Click **Create** to create the custom resource.
|
|
57
|
+
6. If it does not already exist, create a project called “knative-eventing” under the Project list at the top of the page. If it does exist, select the project from the list.
|
|
58
|
+
7. Click the Knative Eventing link under Provided APIs or, from Knative Eventing tile, click **Create Instance**.
|
|
59
|
+
8. Click **Create** to create the custom resource.
|
|
60
|
+
`,
|
|
61
|
+
review: {
|
|
62
|
+
instructions: `#### To verify that the Knative Serving and Knative Eventing APIs were installed successfully:
|
|
63
|
+
Go to the **All Instances** tab of the OpenShift Serverless Operator.
|
|
64
|
+
|
|
65
|
+
Are the Knative Serving and Knative Eventing resources in the list of instances?
|
|
66
|
+
`,
|
|
67
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again, or [read more](https://docs.openshift.com/container-platform/4.6/serverless/installing_serverless/installing-knative-serving.html#serverless-create-serving-project-web-console_installing-knative-serving) about this topic.`,
|
|
68
|
+
},
|
|
69
|
+
summary: {
|
|
70
|
+
success: `You just created instances of the Knative Service and Knative Eventing resources.`,
|
|
71
|
+
failed: `Check your work to make sure that the Knative Service and Knative Eventing resources were created.`,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
conclusion: `Your Serverless Operator is ready! If you want to learn how to deploy a serverless application, take the **Exploring Serverless applications** quick start.`,
|
|
76
|
+
nextQuickStart: [`serverless-application`],
|
|
77
|
+
accessReviewResources: [
|
|
78
|
+
{
|
|
79
|
+
group: 'operators.coreos.com',
|
|
80
|
+
resource: 'operatorgroups',
|
|
81
|
+
verb: 'list',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
group: 'packages.operators.coreos.com',
|
|
85
|
+
resource: 'packagemanifests',
|
|
86
|
+
verb: 'list',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { QuickStart } from '@patternfly/quickstarts';
|
|
2
|
+
|
|
3
|
+
export const monitorSampleAppQuickStart: QuickStart = {
|
|
4
|
+
apiVersion: 'console.openshift.io/v1',
|
|
5
|
+
kind: 'QuickStarts',
|
|
6
|
+
metadata: {
|
|
7
|
+
name: 'monitor-sampleapp',
|
|
8
|
+
},
|
|
9
|
+
spec: {
|
|
10
|
+
version: 4.7,
|
|
11
|
+
displayName: 'Monitoring your sample application',
|
|
12
|
+
durationMinutes: 10,
|
|
13
|
+
icon: '',
|
|
14
|
+
description: `Now that you’ve created a sample application and added health checks, let’s monitor your application.`,
|
|
15
|
+
prerequisites: [`You completed the "Getting started with a sample" quick start.`],
|
|
16
|
+
introduction: `### This quick start shows you how to monitor your sample application.
|
|
17
|
+
You should have previously created the **sample-app** application and **nodejs-sample** deployment via the **Get started with a sample** quick start. If you haven't, you may be able to follow these tasks with any existing deployment.`,
|
|
18
|
+
tasks: [
|
|
19
|
+
{
|
|
20
|
+
title: `Viewing the monitoring details of your sample application`,
|
|
21
|
+
description: `### To view the details of your sample application:
|
|
22
|
+
1. Go to the project your sample application was created in.
|
|
23
|
+
2. In the **</> Developer** perspective, go to **Topology** view.
|
|
24
|
+
3. Click on the **nodejs-sample** deployment to view its details.
|
|
25
|
+
4. Click on the **Monitoring** tab in the side panel.
|
|
26
|
+
You can see context sensitive metrics and alerts in the **Monitoring** tab.`,
|
|
27
|
+
review: {
|
|
28
|
+
instructions: `#### To verify you can view the monitoring information:
|
|
29
|
+
1. Do you see a **Metrics** accordion in the side panel?
|
|
30
|
+
2. Do you see a **View monitoring dashboard** link in the **Metrics** accordion?
|
|
31
|
+
3. Do you see three charts in the **Metrics** accordion: **CPU Usage**, **Memory Usage** and **Receive Bandwidth**?`,
|
|
32
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`,
|
|
33
|
+
},
|
|
34
|
+
summary: {
|
|
35
|
+
success: `You have learned how you can monitor your sample app!`,
|
|
36
|
+
failed: `Try the steps again.`,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: `Viewing your project monitoring dashboard`,
|
|
41
|
+
description: `### To view the project monitoring dashboard in the context of **nodejs-sample**:
|
|
42
|
+
1. Click on the **View monitoring dashboard** link in the side panel.
|
|
43
|
+
2. You can change the **Time Range** and **Refresh Interval** of the dashboard.
|
|
44
|
+
3. You can change the context of the dashboard as well by clicking on the drop-down list. Select a specific workload or **All Workloads** to view the dashboard in the context of the entire project.`,
|
|
45
|
+
review: {
|
|
46
|
+
instructions: `#### To verify that you are able to view the monitoring dashboard:
|
|
47
|
+
Do you see metrics charts in the dashboard?`,
|
|
48
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`,
|
|
49
|
+
},
|
|
50
|
+
summary: {
|
|
51
|
+
success: `You have learned how to view the dashboard in the context of your sample app!`,
|
|
52
|
+
failed: `Try the steps again.`,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: `Viewing custom metrics`,
|
|
57
|
+
description: `### To view custom metrics:
|
|
58
|
+
1. Click on the **Metrics** tab of the **Monitoring** page.
|
|
59
|
+
2. Click the **Select Query** drop-down list to see the available queries.
|
|
60
|
+
3. Click on **Filesystem Usage** from the list to run the query.`,
|
|
61
|
+
review: {
|
|
62
|
+
instructions: `#### Verify you can see the chart associated with the query:
|
|
63
|
+
Do you see a chart displayed with filesystem usage for your project? Note: select **Custom Query** from the dropdown to create and run a custom query utilizing PromQL.
|
|
64
|
+
`,
|
|
65
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`,
|
|
66
|
+
},
|
|
67
|
+
summary: {
|
|
68
|
+
success: `You have learned how to run a query!`,
|
|
69
|
+
failed: `Try the steps again.`,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
conclusion: `You have learned how to access workload monitoring and metrics!`,
|
|
74
|
+
|
|
75
|
+
nextQuickStart: [``],
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const serverlessIcon = `data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2UwMzQwMDt9LmNscy0ye2ZpbGw6I2NlMmUwMDt9LmNscy0ze2ZpbGw6bm9uZTt9LmNscy00e2ZpbGw6I2ZmZjt9LmNscy01e2ZpbGw6I2RjZGNkYzt9LmNscy02e2ZpbGw6I2FhYTt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPlJlZF9IYXQtT3BlbnNoaWZ0NC1DYXRhbG9nX0ljb25zLVNlcnZlcmxlc3M8L3RpdGxlPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iNTAiIGN5PSI1MCIgcj0iNTAiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik04NS4zNiwxNC42NEE1MCw1MCwwLDAsMSwxN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