From b852f53402ee2390cbcf5fcda00b4d7a9b1a82e9 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 8 Apr 2021 13:49:22 -0500 Subject: [PATCH 1/2] Add devops and app insights to get started fixes #6555 --- .../GetStarted/GetStartedNextSteps.tsx | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx b/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx index fd184571cb..e90671ed1e 100644 --- a/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx +++ b/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx @@ -58,7 +58,11 @@ export const GetStartedNextSteps: React.FC = (props) => { const openLink = (link) => { TelemetryClient.track('GettingStartedLinkClicked', { method: 'link', url: link }); - navigateTo(link); + if (link.startsWith('http')) { + window.open(link, '_blank'); + } else { + navigateTo(link); + } }; const doNextStep = (currentStep) => { @@ -93,6 +97,8 @@ export const GetStartedNextSteps: React.FC = (props) => { const linktoQNASettings = `/bot/${rootBotProjectId}/botProjectsSettings/#qnaKey`; const linkToLGEditor = `/bot/${rootBotProjectId}/language-generation`; const linkToLUEditor = `/bot/${rootBotProjectId}/language-understanding`; + const linkToAppInsights = 'http://aka.ms/botinsights'; + const linkToDevOps = 'https://aka.ms/bfcomposercicd'; useEffect(() => { const newNextSteps: NextSteps[] = []; @@ -194,6 +200,28 @@ export const GetStartedNextSteps: React.FC = (props) => { openLink(linkToLUEditor); }, }, + { + key: 'insights', + label: formatMessage('Enable Insights'), + description: formatMessage( + 'Collect service-level and conversation-level data to help gauge the performance and efficacy of your bot.' + ), + learnMore: '', + checked: false, + onClick: () => { + openLink(linkToAppInsights); + }, + }, + { + key: 'devops', + label: formatMessage('Publish to Dev Ops'), + description: formatMessage('Learn how to publish to a Dev Ops pipeline using CI / CD.'), + learnMore: '', + checked: false, + onClick: () => { + openLink(linkToDevOps); + }, + }, ]; if (hasPublishingProfile) { From 90123b846095726b0d87595f4668c1b7c0704433 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 8 Apr 2021 14:14:21 -0500 Subject: [PATCH 2/2] fix lint --- .../client/src/components/GetStarted/GetStartedNextSteps.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx b/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx index e90671ed1e..522d267c37 100644 --- a/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx +++ b/Composer/packages/client/src/components/GetStarted/GetStartedNextSteps.tsx @@ -59,6 +59,7 @@ export const GetStartedNextSteps: React.FC = (props) => { const openLink = (link) => { TelemetryClient.track('GettingStartedLinkClicked', { method: 'link', url: link }); if (link.startsWith('http')) { + // eslint-disable-next-line security/detect-non-literal-fs-filename window.open(link, '_blank'); } else { navigateTo(link);