|
1 | 1 | import {ExternalLink} from 'sentry/components/core/link'; |
2 | 2 | import type { |
3 | | - Docs, |
4 | 3 | DocsParams, |
5 | 4 | OnboardingConfig, |
6 | 5 | OnboardingStep, |
7 | 6 | } from 'sentry/components/onboarding/gettingStartedDoc/types'; |
8 | 7 | import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; |
9 | | -import { |
10 | | - getCrashReportModalConfigDescription, |
11 | | - getCrashReportModalIntroduction, |
12 | | - getCrashReportSDKInstallFirstBlocks, |
13 | | -} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; |
14 | | -import { |
15 | | - feedbackOnboardingJsLoader, |
16 | | - replayOnboardingJsLoader, |
17 | | -} from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader'; |
18 | 8 | import {t, tct} from 'sentry/locale'; |
19 | 9 | import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; |
20 | 10 |
|
21 | | -type Params = DocsParams; |
22 | | - |
23 | | -const getInstallSnippetPackageManager = (params: Params) => ` |
| 11 | +const getInstallSnippetPackageManager = (params: DocsParams) => ` |
24 | 12 | Install-Package Sentry.AspNetCore -Version ${getPackageVersion( |
25 | 13 | params, |
26 | 14 | 'sentry.dotnet.aspnetcore', |
27 | 15 | '4.3.0' |
28 | 16 | )}`; |
29 | 17 |
|
30 | | -const getInstallSnippetCoreCli = (params: Params) => ` |
| 18 | +const getInstallSnippetCoreCli = (params: DocsParams) => ` |
31 | 19 | dotnet add package Sentry.AspNetCore -v ${getPackageVersion( |
32 | 20 | params, |
33 | 21 | 'sentry.dotnet.aspnetcore', |
34 | 22 | '4.3.0' |
35 | 23 | )}`; |
36 | 24 |
|
37 | | -const getConfigureSnippet = (params: Params) => ` |
| 25 | +const getConfigureSnippet = (params: DocsParams) => ` |
38 | 26 | public static IHostBuilder CreateHostBuilder(string[] args) => |
39 | 27 | Host.CreateDefaultBuilder(args) |
40 | 28 | .ConfigureWebHostDefaults(webBuilder => |
@@ -85,7 +73,7 @@ public class HomeController : Controller |
85 | 73 | } |
86 | 74 | }`; |
87 | 75 |
|
88 | | -const onboarding: OnboardingConfig = { |
| 76 | +export const onboarding: OnboardingConfig = { |
89 | 77 | install: params => [ |
90 | 78 | { |
91 | 79 | type: StepType.INSTALL, |
@@ -225,66 +213,3 @@ const onboarding: OnboardingConfig = { |
225 | 213 | }, |
226 | 214 | ], |
227 | 215 | }; |
228 | | - |
229 | | -const crashReportOnboarding: OnboardingConfig = { |
230 | | - introduction: () => getCrashReportModalIntroduction(), |
231 | | - install: (params: Params) => [ |
232 | | - { |
233 | | - type: StepType.INSTALL, |
234 | | - content: [ |
235 | | - ...getCrashReportSDKInstallFirstBlocks(params), |
236 | | - { |
237 | | - type: 'text', |
238 | | - text: tct( |
239 | | - 'If you are rendering the page from the server, for example on ASP.NET MVC, the [code:Error.cshtml] razor page can be:', |
240 | | - {code: <code />} |
241 | | - ), |
242 | | - }, |
243 | | - { |
244 | | - type: 'code', |
245 | | - tabs: [ |
246 | | - { |
247 | | - label: 'cshtml', |
248 | | - value: 'html', |
249 | | - language: 'html', |
250 | | - code: `@using Sentry |
251 | | -@using Sentry.AspNetCore |
252 | | -@inject Microsoft.Extensions.Options.IOptions<SentryAspNetCoreOptions> SentryOptions |
253 | | -
|
254 | | -@if (SentrySdk.LastEventId != SentryId.Empty) { |
255 | | - <script> |
256 | | - Sentry.init({ dsn: "@(SentryOptions.Value.Dsn)" }); |
257 | | - Sentry.showReportDialog({ eventId: "@SentrySdk.LastEventId" }); |
258 | | - </script> |
259 | | -}`, |
260 | | - }, |
261 | | - ], |
262 | | - }, |
263 | | - ], |
264 | | - }, |
265 | | - ], |
266 | | - configure: () => [ |
267 | | - { |
268 | | - type: StepType.CONFIGURE, |
269 | | - content: [ |
270 | | - { |
271 | | - type: 'text', |
272 | | - text: getCrashReportModalConfigDescription({ |
273 | | - link: 'https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/user-feedback/configuration/#crash-report-modal', |
274 | | - }), |
275 | | - }, |
276 | | - ], |
277 | | - }, |
278 | | - ], |
279 | | - verify: () => [], |
280 | | - nextSteps: () => [], |
281 | | -}; |
282 | | - |
283 | | -const docs: Docs = { |
284 | | - onboarding, |
285 | | - replayOnboardingJsLoader, |
286 | | - crashReportOnboarding, |
287 | | - feedbackOnboardingJsLoader, |
288 | | -}; |
289 | | - |
290 | | -export default docs; |
0 commit comments