|
1 | 1 | = <Title: Verb + Object, e.g. "Configure Single Sign-On"> |
2 | 2 | :toc: true |
3 | 3 | :toclevels: 1 |
4 | | -:page-pageid: |
| 4 | + |
| 5 | +:page-title: <Title — must match the = Title above> |
| 6 | +:page-description: <One sentence: what this procedure does and who it is for.> |
| 7 | +:page-pageid: <Add a unique ID for this page, e.g. "embed-sdk-concepts". Required for developer documentation.> |
5 | 8 | :page-type: procedure |
| 9 | +:keywords: <comma-separated terms for search indexing, e.g. "configure, SSO, SAML, setup"> |
6 | 10 | :page-role: |
7 | 11 | :product-version: <version> |
8 | 12 | :jira-ref: <DOC-XXXX> |
9 | 13 | // author: |
10 | 14 | // last-reviewed: |
11 | 15 |
|
| 16 | +//// |
| 17 | +TEMPLATE GUIDE |
| 18 | +============== |
| 19 | +How to use this template: |
| 20 | + 1. Copy this file from modules/_templates/procedure.adoc. |
| 21 | + 2. Rename the copy to <file-name>.adoc (lowercase, hyphen-separated, e.g. "configure-saml-sso.adoc"). |
| 22 | + 3. Place the file in modules/ROOT/pages/. |
| 23 | + 4. If this page will be included as a partial inside another page (via include::), |
| 24 | + remove all front-matter attributes — partials do not need them. |
| 25 | +
|
| 26 | +Use this template for pages that describe HOW TO DO something — a sequence of steps |
| 27 | +the reader must follow to achieve a specific outcome. |
| 28 | +Do NOT explain background theory here — link to a concept page for that. |
| 29 | +
|
| 30 | +Section labels: |
| 31 | + REQUIRED — must be present on every page of this type |
| 32 | + RECOMMENDED — include unless there is a clear reason not to |
| 33 | + OPTIONAL — include only when relevant to the topic |
| 34 | +
|
| 35 | +Code samples: |
| 36 | + SDK procedures : JavaScript or TypeScript code sample is REQUIRED. |
| 37 | + REST API procedures: cURL code sample is REQUIRED. JSON request/response is REQUIRED. |
| 38 | + UI-only procedures : screenshots are RECOMMENDED (use image:: after the relevant step). |
| 39 | +
|
| 40 | +Style elements you can use: |
| 41 | + Admonitions : [NOTE], [TIP], [IMPORTANT], [WARNING], [CAUTION] |
| 42 | + Images : image::<path>[alt text] |
| 43 | + Code blocks : [source,JavaScript] / [source,TypeScript] / [source,cURL] / [source,JSON] |
| 44 | + Inline badge : [beta betaBackground]^Beta^ |
| 45 | + Version badge: [.version-badge.new]#New# [.version-badge.deprecated]#Deprecated# |
| 46 | + [.version-badge.breaking]#Breaking# |
| 47 | +//// |
| 48 | +
|
12 | 49 | == Overview |
13 | 50 |
|
14 | | -// 1-2 sentences: what this procedure accomplishes and who it is for. |
15 | | -// TODO: verify with engineering |
| 51 | +// REQUIRED: 1-2 sentences — what this procedure accomplishes and who it is for. |
| 52 | +// Mention the product area and the role of the reader (developer, administrator, etc.). |
| 53 | +// TODO: verify scope with engineering |
| 54 | +// |
| 55 | +// OPTIONAL: Add a workflow diagram or screenshot of the starting UI state if it helps |
| 56 | +// the reader orient themselves before starting: |
| 57 | +// image::./images/<workflow-diagram>.png[Workflow overview diagram] |
16 | 58 |
|
17 | 59 | == Before you begin |
18 | 60 |
|
19 | | -// Prerequisites as a list. Use "You must" or "You need" for each. |
20 | | -* |
21 | | -* |
| 61 | +// REQUIRED if there are prerequisites. Use "You must" or "You need" for each item. |
| 62 | +// Remove this section only if there are genuinely no prerequisites. |
| 63 | +
|
| 64 | +* You must have <role or permission, e.g. "Developer or Administrator privilege">. |
| 65 | +* You need access to <system or resource, e.g. "a ThoughtSpot Cloud instance with the Embed feature enabled">. |
| 66 | +* <Any additional prerequisite.> |
22 | 67 |
|
23 | 68 | == Procedure |
24 | 69 |
|
25 | | -. Step one. Include the exact command or UI action. |
| 70 | +// REQUIRED. Use numbered steps. Each step must describe exactly one action. |
| 71 | +// Include the exact command, UI label, menu path, or code for each step. |
| 72 | +// Add a `+` continuation after a step to attach a code block or image to it. |
| 73 | +
|
| 74 | +. Step one. Describe the exact UI action or navigation path. |
| 75 | ++ |
| 76 | +// OPTIONAL: Screenshot showing the UI state after this step: |
| 77 | +// image::./images/<step1-screenshot>.png[Description of what to see after step 1] |
| 78 | +
|
| 79 | +. Step two. For SDK procedures, provide a complete, runnable code sample — REQUIRED. |
26 | 80 | + |
27 | | -[source,bash] |
| 81 | +[source,JavaScript] |
28 | 82 | ---- |
29 | | -# example command here |
| 83 | +import { LiveboardEmbed, AuthType, init } from '@thoughtspot/visual-embed-sdk'; |
| 84 | +
|
| 85 | +init({ |
| 86 | + thoughtSpotHost: 'https://<your-instance>.thoughtspot.cloud', |
| 87 | + authType: AuthType.TrustedAuthToken, |
| 88 | + username: '<username>', |
| 89 | + getAuthToken: () => getTokenFromYourServer(), |
| 90 | +}); |
| 91 | +
|
| 92 | +const embed = new LiveboardEmbed('#embed-container', { |
| 93 | + liveboardId: '<liveboard-GUID>', |
| 94 | +}); |
| 95 | +embed.render(); |
30 | 96 | ---- |
| 97 | ++ |
| 98 | +[NOTE] |
| 99 | +==== |
| 100 | +Replace `<your-instance>` with your ThoughtSpot Cloud hostname and `<liveboard-GUID>` with the ID of the Liveboard you want to embed. |
| 101 | +==== |
31 | 102 |
|
32 | | -. Step two. |
| 103 | +. Step three. For REST API procedures, provide a cURL request — REQUIRED. |
| 104 | ++ |
| 105 | +[source,cURL] |
| 106 | +---- |
| 107 | +curl -X POST \ |
| 108 | + 'https://<your-instance>.thoughtspot.cloud/api/rest/2.0/<endpoint>' \ |
| 109 | + -H 'Authorization: Bearer <token>' \ |
| 110 | + -H 'Content-Type: application/json' \ |
| 111 | + -d '{ |
| 112 | + "param": "value" |
| 113 | + }' |
| 114 | +---- |
| 115 | ++ |
| 116 | +// OPTIONAL: Show the expected JSON response inline: |
| 117 | +// [source,JSON] |
| 118 | +// ---- |
| 119 | +// { |
| 120 | +// "field": "value" |
| 121 | +// } |
| 122 | +// ---- |
33 | 123 |
|
34 | | -. Step three. |
| 124 | +// OPTIONAL: Add a WARNING or NOTE for common pitfalls at the end of the procedure. |
| 125 | +// [WARNING] |
| 126 | +// ==== |
| 127 | +// If you see <error>, verify that <condition> before retrying. |
| 128 | +// ==== |
35 | 129 |
|
36 | 130 | == Result |
37 | 131 |
|
38 | | -// What the user should see or be able to do after completing the procedure. |
| 132 | +// REQUIRED. Describe what the user should see or be able to do after completing the procedure. |
| 133 | +// Be specific — name the UI element, API response, or behaviour that confirms success. |
| 134 | +// |
| 135 | +// OPTIONAL: Screenshot of the expected result: |
| 136 | +// image::./images/<result-screenshot>.png[Expected result after completing the procedure] |
39 | 137 |
|
40 | 138 | == Next steps |
41 | 139 |
|
42 | | -// Optional. Link to related procedures or concepts. |
| 140 | +// OPTIONAL. Link to the next logical task or a related procedure. |
| 141 | +
|
| 142 | +* xref:<module>/next-procedure.adoc[Next task name] |
43 | 143 |
|
44 | 144 | == Related information |
45 | 145 |
|
46 | | -* xref:<component>:<module>/page.adoc[Link text] |
| 146 | +// REQUIRED. |
| 147 | +// Link to related concept and reference pages. |
| 148 | +// "Related information" is the standard heading — do not use "Additional resources" or "See also". |
| 149 | +
|
| 150 | +* xref:<module>/concept-page.adoc[Related concept] |
| 151 | +* xref:<module>/reference-page.adoc[API reference] |
0 commit comments