Skip to content

Commit 2fbc630

Browse files
authored
Merge pull request #3 from metabase/update_version
update to a more recent version + Include the admin password on a reg…
2 parents e9eaa8f + 63c6bc6 commit 2fbc630

File tree

19 files changed

+47
-41
lines changed

19 files changed

+47
-41
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ For the Node application
1313

1414
For the rails application
1515
`rails server -p 3001`
16-
(Note that we're binding to a nonstandard port as Metabase also runs on 3000)
16+
(Note that we're binding to a nonstandard port as Metabase also runs on 3000)
17+
18+
# Helpful info
19+
Admin login is
20+
user: plucky@admin.com
21+
password: Metabase123
0 Bytes
Binary file not shown.

django/embedded_analytics/user_stats/templates/user_stats/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ <h1>Embedding <span class="text-brand">Metabase</span> in Django</h1>
1616
<section id="public">
1717
<h2>Public Embeds</h2>
1818
<p>
19-
One is to simply use the public link urls inside of an iframe. In this case, the same public dashboard you see via a <a href="http://localhost:3000/public/dashboard/be1e6baa-9b97-4534-8ac0-4a45b5bbf4e1">Public Dashboard</a> link, is embedded directly in your application. This can also be embedded in a blog, or really anywhere that you can insert HTML. It has a secure URL in that a user can only look at the contents of the dashboard being shared. An end user never has information they can use to modify the url and gain access to any other resources on your Metabase instance. That same dashboard can be seen embedded in this page below.
19+
One is to simply use the public link urls inside of an iframe. In this case, the same public dashboard you see via a <a href="http://localhost:3000/public/dashboard/e104be98-2ea1-4dce-abff-aa3cfeddfe40">Public Dashboard</a> link, is embedded directly in your application. This can also be embedded in a blog, or really anywhere that you can insert HTML. It has a secure URL in that a user can only look at the contents of the dashboard being shared. An end user never has information they can use to modify the url and gain access to any other resources on your Metabase instance. That same dashboard can be seen embedded in this page below.
2020
</p>
2121

2222
<iframe
23-
src="http://localhost:3000/public/dashboard/be1e6baa-9b97-4534-8ac0-4a45b5bbf4e1"
23+
src="http://localhost:3000/public/dashboard/e104be98-2ea1-4dce-abff-aa3cfeddfe40"
2424
frameborder="0"
2525
width="800"
2626
height="600"
@@ -29,11 +29,11 @@ <h2>Public Embeds</h2>
2929
</iframe>
3030

3131
<p>
32-
Similarly, we can embed a <a href="http://localhost:3000/public/question/2b03b37a-52ec-4ea5-a628-2d1a967c55c8">single question's chart</a> in our application as below.
32+
Similarly, we can embed a <a href="http://localhost:3000/public/question/938a446c-da62-479a-a1bd-913cd29a77ef">single question's chart</a> in our application as below.
3333
</p>
3434

3535
<iframe
36-
src="http://localhost:3000/public/question/2b03b37a-52ec-4ea5-a628-2d1a967c55c8"
36+
src="http://localhost:3000/public/question/938a446c-da62-479a-a1bd-913cd29a77ef"
3737
frameborder="0"
3838
width="800"
3939
height="600"

django/embedded_analytics/user_stats/templates/user_stats/signed_chart.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h1>Embedding charts with signed parameters</h1>
4848
<h1>Orders for User: {{user_id}}</h1>
4949

5050
<iframe
51-
src="http://{{iframeUrl}}"
51+
src="http://{{iframeUrl}}"
5252
frameborder="0"
5353
width="800"
5454
height="600"

django/embedded_analytics/user_stats/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
METABASE_SITE_URL = "localhost:3000"
8-
METABASE_SECRET_KEY = "f8a86a48501150b3561e5cd3ff07865f6b400ecceca58882cdd4adfa07f2c488"
8+
METABASE_SECRET_KEY = "a1c0952f3ff361f1e7dd8433a0a50689a004317a198ecb0a67ba90c73c27a958"
99

1010

1111

@@ -31,9 +31,9 @@ def signed_public_dashboard(request):
3131
@login_required
3232
def signed_chart(request, user_id):
3333
payload = {
34-
"resource": {"question": 6},
34+
"resource": {"question": 2},
3535
"params": {
36-
"user_id": user_id
36+
"person_id": user_id
3737
}
3838
}
3939

laravel/embedded_analytics/resources/views/signed_chart.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@
184184
$signer = new Sha256();
185185
$token = (new Builder())
186186
->set('resource', [
187-
'question' => 6
187+
'question' => 2
188188
])
189189
->set('params', [
190-
'user_id' => $userId
190+
'person_id' => $userId
191191
])
192192
->sign($signer, $metabaseSecretKey)
193193
->getToken();

laravel/embedded_analytics/resources/views/signed_dashboard.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
'dashboard' => 2
192192
])
193193
->set('params', [
194+
'id' => $userId
194195
])
195196
->sign($signer, $metabaseSecretKey)
196197
->getToken();

laravel/embedded_analytics/resources/views/welcome.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@
177177
<section id="public">
178178
<h2>Public Embeds</h2>
179179
<p>
180-
One is to simply use the public link urls inside of an iframe. In this case, the same public dashboard you see via a <a href="http://localhost:3000/public/dashboard/be1e6baa-9b97-4534-8ac0-4a45b5bbf4e1">Public Dashboard</a> link, is embedded directly in your application. This can also be embedded in a blog, or really anywhere that you can insert HTML. It has a secure URL in that a user can only look at the contents of the dashboard being shared. An end user never has information they can use to modify the url and gain access to any other resources on your Metabase instance. That same dashboard can be seen embedded in this page below.
180+
One is to simply use the public link urls inside of an iframe. In this case, the same public dashboard you see via a <a href="http://localhost:3000/public/dashboard/e104be98-2ea1-4dce-abff-aa3cfeddfe40">Public Dashboard</a> link, is embedded directly in your application. This can also be embedded in a blog, or really anywhere that you can insert HTML. It has a secure URL in that a user can only look at the contents of the dashboard being shared. An end user never has information they can use to modify the url and gain access to any other resources on your Metabase instance. That same dashboard can be seen embedded in this page below.
181181
</p>
182182
183183
<iframe
184-
src="http://localhost:3000/public/dashboard/be1e6baa-9b97-4534-8ac0-4a45b5bbf4e1"
184+
src="http://localhost:3000/public/dashboard/e104be98-2ea1-4dce-abff-aa3cfeddfe40"
185185
frameborder="0"
186186
width="800"
187187
height="600"
@@ -190,11 +190,11 @@
190190
</iframe>
191191
192192
<p>
193-
Similarly, we can embed a <a href="http://localhost:3000/public/question/2b03b37a-52ec-4ea5-a628-2d1a967c55c8">single question's chart</a> in our application as below.
193+
Similarly, we can embed a <a href="http://localhost:3000/public/question/938a446c-da62-479a-a1bd-913cd29a77ef">single question's chart</a> in our application as below.
194194
</p>
195195
196196
<iframe
197-
src="http://localhost:3000/public/question/2b03b37a-52ec-4ea5-a628-2d1a967c55c8"
197+
src="http://localhost:3000/public/question/938a446c-da62-479a-a1bd-913cd29a77ef"
198198
frameborder="0"
199199
width="800"
200200
height="600"

metabase/metabase.db.mv.db

-476 KB
Binary file not shown.

metabase/metabase.db.trace.db

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
2017-03-09 15:27:44 jdbc[4]: exception
1+
2018-03-29 11:30:55 jdbc[4]: exception
22
org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOGLOCK" not found; SQL statement:
3-
select count(*) from PUBLIC.DATABASECHANGELOGLOCK [42102-193]
3+
select count(*) from PUBLIC.DATABASECHANGELOGLOCK [42102-194]

0 commit comments

Comments
 (0)