Skip to content

Commit 96150d7

Browse files
author
Luka Fontanilla
committed
docs: doc updates for new port and manifest
1 parent 401de64 commit 96150d7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ GENAI_CLIENT_SECRET=<same secret value used to secure Cloud Run service>
188188
npm run develop
189189
```
190190

191-
Great! Your extension is now running and serving the JavaScript at http://localhost:8080/bundle.js.
191+
Great! Your extension is now running and serving the JavaScript at https://localhost:3000/dashboard_summarization.js.
192192

193193
6. Now log in to Looker and create a new project.
194194

@@ -207,7 +207,7 @@ GENAI_CLIENT_SECRET=<same secret value used to secure Cloud Run service>
207207
application: dashboard-summarization {
208208
label: "Dashboard Insights Powered by Vertex AI"
209209
# file: "dashboard_summarization.js"
210-
url: "http://localhost:8080/dashboard_summarization.js"
210+
url: "https://localhost:3000/dashboard_summarization.js"
211211
mount_points: {
212212
dashboard_vis: yes
213213
dashboard_tile: yes
@@ -249,7 +249,7 @@ GENAI_CLIENT_SECRET=<same secret value used to secure Cloud Run service>
249249
9. Commit your changes and deploy your them to production through the Project UI.
250250

251251
10. Reload the page and click the `Browse` dropdown menu. You should see your extension in the list.
252-
- The extension will load the JavaScript from the `url` provided in the `application` definition. By default, this is https://localhost:8080/bundle.js. If you change the port your server runs on in the package.json, you will need to also update it in the manifest.lkml.
252+
- The extension will load the JavaScript from the `url` provided in the `application` definition. By default, this is https://localhost:3000/dashboard_summarization.js. If you change the port your server runs on in the package.json, you will need to also update it in the manifest.lkml.
253253

254254
- Refreshing the extension page will bring in any new code changes from the extension template, although some changes will hot reload.
255255

@@ -260,7 +260,7 @@ The process above requires your local development server to be running to load t
260260

261261
1. In your extension project directory on your development machine, build the extension by running the command `npm run build`.
262262
2. Drag and drop the generated JavaScript file(bundle.js) contained in the `dist` directory into the Looker project interface.
263-
3. Modify your `manifest.lkml` to use `file` instead of `url` and point it at the `bundle.js` file.
263+
3. Modify your `manifest.lkml` to use `file` instead of `url` and point it at the `dashboard_summarization.js` file.
264264
4. [IMPORTANT] Create a User Attribute in Looker following this naming convention `<extension_id>_genai_client_secret`. Note any dash or :: in the extension_id name will need to be replaced with an underscore. Typically the extension id will be your lookml project name where the extension lives followed by the name of the extension ie. `dashboard-summarization`. See [the docs](https://cloud.google.com/looker/docs/extension-framework-react-and-js-code-examples#user_attributes) for more details
265265

266266
Note that the additional JavaScript files generated during the production build process do not have to be mentioned in the manifest. These files will be loaded dynamically by the extension as and when they are needed. Note that to utilize code splitting, the Looker server must be at version 7.21 or above.

manifest.lkml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project_name: "dashboard-summarization"
33

44
application: dashboard-summarization {
55
label: "Dashboard Insights Powered by Vertex AI"
6-
url: "http://localhost:8080/bundle.js"
6+
url: "https://localhost:3000/dashboard_summarization.js"
77
mount_points: {
88
dashboard_vis: yes
99
dashboard_tile: yes
@@ -12,7 +12,7 @@ application: dashboard-summarization {
1212
entitlements: {
1313
local_storage: yes
1414
use_form_submit: yes
15-
core_api_methods: ["me","run_inline_query","all_lookml_models","dashboard","dashboard_dashboard_elements"]
15+
core_api_methods: ["me","run_inline_query","run_query","all_lookml_models","dashboard","dashboard_dashboard_elements"]
1616
external_api_urls: [
1717
"YOUR_CLOUD_RUN_URL","http://localhost:5000","http://localhost:3000","https://*.googleapis.com","https://slack.com/api/*","https://slack.com/*"
1818
]
@@ -28,7 +28,7 @@ application: dashboard-summarization {
2828
"https://www.googleapis.com/auth/chat.messages.create",
2929
"https://slack.com/oauth/v2/authorize"
3030
]
31-
scoped_user_attributes: []
31+
scoped_user_attributes: ["genai_client_secret"]
3232
global_user_attributes: []
3333
}
3434
}

0 commit comments

Comments
 (0)