Skip to content

Commit 9167c70

Browse files
authored
(DOCSP-21002) Added relnotes for Charts 1.31.1 release and (DOCSP-20996) Added links to GH examples of embedded dashboards (#524)
* Add relnotes for Charts 1.31.1 release * edits * edits * (DOCSP-20996) Added links to GitHub examples of embedded dashboards * Edits * Copy review * Copy review
1 parent 070adeb commit 9167c70

File tree

2 files changed

+65
-28
lines changed

2 files changed

+65
-28
lines changed

source/get-started-embedding-sdk.txt

Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,34 @@ Create a Web App
106106
.. tab:: Dashboard
107107
:tabid: dashboard
108108

109-
Proceed with the remaining steps to create a new app in
110-
which to display your dashboard.
109+
.. tabs::
110+
:hidden: true
111+
112+
.. tab:: Unauthenticated
113+
:tabid: unauthenticated
114+
115+
Proceed with the remaining steps to create a new app in
116+
which to display your dashboard.
117+
118+
.. note::
119+
120+
MongoDB offers a :github:`pre-built example of an unauthenticated embedded dashboard </mongodb-js/charts-embed-sdk/tree/master/examples/dashboard/unauthenticated>`
121+
in the GitHub Repository. This example shows how to use the
122+
Embedding SDK to display an unauthenticated embedded dashboard.
123+
124+
.. tab:: Authenticated
125+
:tabid: authenticated
126+
127+
Proceed with the remaining steps to create a new app in
128+
which to display your dasbhoard.
129+
130+
.. note::
131+
132+
MongoDB offers :github:`examples of authenticated embedded dashboards </mongodb-js/charts-embed-sdk/tree/master/examples/dashboard/>`
133+
in the GitHub Repository. These examples show you how to use
134+
the Embedding SDK to authenticate an embedded dashboard using
135+
:stitch:`MongoDB Realm </>`, Google, or |jwt| authentication
136+
providers.
111137

112138
Add Embedding Code to Your App
113139
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -205,51 +231,53 @@ To learn how to install the Embedding SDK into your app, see
205231
.. tab:: Unauthenticated
206232
:tabid: unauthenticated
207233

208-
Add the following code to your web app to execute where you
209-
want your dashboard to render:
234+
Add the following code to your web app to execute where you
235+
want your dashboard to render.
210236

211237
.. note::
212238

213-
Replace the existing Dashboards Base URL and dashboard
214-
ID with the values for the dashboard that you want to
215-
display. Your Dashboards Base URL and dashboard ID are
216-
visible in the embedding options modal window.
239+
Replace the existing :guilabel:`Dashboards Base URL`
240+
and dashboard ID with the values for the dashboard that
241+
you want to display. Your :guilabel:`Dashboards Base URL`
242+
and dashboard ID are visible in the embedding options
243+
modal window.
217244

218245
.. code-block:: javascript
219246
:copyable: false
220247

221248
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
222249

223250
const sdk = new ChartsEmbedSDK({
224-
baseUrl: "https://charts.mongodb.com/charts-embedding-examples-wgffp", // ~REPLACE~ with the Base URL from your Embed Dashboard dialog.
251+
baseUrl: "https://charts.mongodb.com/charts-embedding-examples-wgffp", // ~REPLACE~ with the Base URL from your Embed Dashboard dialog.
225252
});
226253

227254
const chart = sdk.createChart({
228-
dashboardId: "735cfa75-15b8-483a-bc2e-7c6659511c7c", // ~REPLACE~ with the Dashboard ID from your Embed Dashboard dialog.
229-
height: "700px",
230-
widthMode: "scale",
231-
heightMode: "fixed"
232-
// Additional options go here
255+
dashboardId: "735cfa75-15b8-483a-bc2e-7c6659511c7c", // ~REPLACE~ with the Dashboard ID from your Embed Dashboard dialog.
256+
height: "700px",
257+
widthMode: "scale",
258+
heightMode: "fixed"
259+
// Additional options go here
233260
});
234261

235262
dashboard.render(document.getElementById("dashboard"));
236263

237264
.. tab:: Authenticated
238265
:tabid: authenticated
239266

240-
Add the following code to your web app to execute where you
241-
want your dashboard to render. The following example
267+
Add the following code to your web app to run it where you
268+
want your dashboard to render. The following example
242269
:ref:`authenticates <configure-auth-providers>` with
243270
:stitch:`MongoDB Realm </>`.
244271

245272
.. note::
246273

247-
Replace the existing Realm App ID with your Realm App
248-
ID, which you can find on the left side of your Realm
249-
app UI. Replace the existing Dashboards Base URL and
250-
dashboard ID with the values for the dashboard that you
251-
want to display. Your Dashboards Base URL and dashboard
252-
ID are visible in the embedding options modal window.
274+
Replace the existing Realm App ID with your Realm
275+
App ID. You can find the Realm ID on the left side
276+
of your Realm app UI. Replace the existing :guilabel:`Dashboards
277+
Base URL` and dashboard ID with the values for the
278+
dashboard that you want to display. Your :guilabel:`Dashboards Base URL`
279+
and dashboard ID are visible in the embedding options
280+
modal window.
253281

254282
.. code-block:: javascript
255283
:copyable: false
@@ -258,15 +286,15 @@ To learn how to install the Embedding SDK into your app, see
258286

259287
// Needed only if you are using the Realm authentication provider
260288
const client = Stitch.initializeAppClient(
261-
'realm-authentication-sample-eibkj', // ~REPLACE~ with your Realm App ID
289+
'realm-authentication-sample-eibkj', // ~REPLACE~ with your Realm App ID
262290
});
263291

264292
const sdk = new ChartsEmbedSDK({
265-
baseUrl: "https://charts.mongodb.com/charts-embedding-examples-wgffp", // ~REPLACE~ with the Base URL from your Embed Dashboard dialog.
266-
getUserToken: () => getRealmUserToken(client),
267-
// getUserToken is a callback to provide the auth token to the SDK.
268-
// Use the getRealmUserToken helper when using the Realm auth provider.
269-
// If using Custom JWT or Google providers, provide your own code to retrieve the JWT
293+
baseUrl: "https://charts.mongodb.com/charts-embedding-examples-wgffp", // ~REPLACE~ with the Base URL from your Embed Dashboard dialog.
294+
getUserToken: () => getRealmUserToken(client),
295+
// getUserToken is a callback to provide the auth token to the SDK.
296+
// Use the getRealmUserToken helper when using the Realm auth provider.
297+
// If using Custom JWT or Google providers, provide your own code to retrieve the JWT
270298
});
271299

272300
const chart = sdk.createChart({

source/release-notes.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ MongoDB Charts Cloud Release Notes
1010
:depth: 1
1111
:class: twocols
1212

13+
|charts| v1.30.1
14+
----------------
15+
16+
*Released February 24, 2022*
17+
18+
Bug fixes in this release:
19+
20+
- Fixes a bug where a lookup field was not added.
21+
1322
|charts| v1.30
1423
--------------
1524

0 commit comments

Comments
 (0)