You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-71Lines changed: 47 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This project was created using React with Python. This application aims to demon
4
4
5
5
## Dashboard view
6
6
7
-

7
+

8
8
9
9
## Prerequisites
10
10
@@ -20,79 +20,55 @@ The samples require the following to run.
20
20
21
21
#### Supported browsers
22
22
23
-
* Google Chrome, Microsoft Edge, Mozilla Firefox, and Safari.
23
+
* Google Chrome, Microsoft Edge, and Mozilla Firefox.
24
+
25
+
## Configuration
26
+
27
+
* Please [get](https://github.com/boldbi/react-with-aspnet-core-sample/tree/master/React-with-ASP.NETCore) the React with ASP.NET Core sample from GitHub.
28
+
29
+
* Please ensure you have enabled embed authentication on the `embed settings` page. If it is not currently enabled, please refer to the following image or detailed [instructions](https://help.boldbi.com/site-administration/embed-settings/#get-embed-secret-code?utm_source=github&utm_medium=backlinks) to enable it.
* To download the `embedConfig.json` file, please follow this [link](https://help.boldbi.com/site-administration/embed-settings/#get-embed-configuration-file?utm_source=github&utm_medium=backlinks) for reference. Additionally, you can refer to the following image for visual guidance.
* Copy the downloaded `embedConfig.json` file and paste it into the designated [location](https://github.com/boldbi/react-with-python/tree/master/python/django-sample-master) within the application. Please ensure you have placed it in the application, as shown in the following image.
* Visual studio code(<https://code.visualstudio.com/download>)
28
-
29
-
### Run a Sample Using Visual Studio Code
30
-
31
-
1. The React application acts as a client, and the Python application acts as a server. In the `models.py` file of the Python application, you need to set the User Email and Embed Secret properties.
32
-
33
-
<metacharset="utf-8"/>
34
-
<table>
35
-
<tbody>
36
-
<tr>
37
-
<td align="left">UserEmail</td>
38
-
<td align="left">UserEmail of the Admin in your Bold BI, which would be used to get the dashboard list.</td>
39
-
</tr>
40
-
<tr>
41
-
<td align="left">User Password</td>
42
-
<td align="left">Password of the Admin in Bold BI, which will be used to get the dashboards list.</td>
43
-
</tr>
44
-
</tbody>
45
-
</table>
46
-
47
-
2. Once you have provided the details, run the application using the command "python manage.py runserver." The application will be running on port number 8000.
48
-
49
-
3. Then, once you run your Python application, you will see results similar to those of the React application.
50
-
51
-

52
-
53
-
4. To run the React application, we need to set the following properties in the DashboardListing.js file:
54
-
55
-

56
-
57
-
<metacharset="utf-8"/>
58
-
<table>
59
-
<tbody>
60
-
<tr>
61
-
<td align="left">SiteIdentifier</td>
62
-
<td align="left">For the Bold BI Enterprise edition, it should be like `site/site1`. For Bold BI Cloud, it should be an empty string.</td>
63
-
</tr>
64
-
<tr>
65
-
<td align="left">RootUrl</td>
66
-
<td align="left">Dashboard Server URL (Eg: http://localhost:5000/bi, http://demo.boldbi.com/bi).</td>
67
-
</tr>
68
-
<tr>
69
-
<td align="left">Authorization URL</td>
70
-
<td align="left">Provide the API end point(get_embed_details) of python application.</td>
71
-
</tr>
72
-
<tr>
73
-
<td align="left">Environment</td>
74
-
<td align="left">Your Bold BI application environment. (If Cloud, you should use `cloud,` if Enterprise, you should use `onpremise`).</td>
75
-
</tr>
76
-
<tr>
77
-
<td align="left">API Host</td>
78
-
<td align="left">URL of python application(example: http://localhost:8000/).</td>
79
-
</tr>
80
-
<tr>
81
-
<td align="left">UserEmail</td>
82
-
<td align="left">UserEmail of the Admin in your Bold BI, which would be used to get the dashboard list.</td>
83
-
</tr>
84
-
<tr>
85
-
<td align="left">User Password</td>
86
-
<td align="left">Password of the Admin in Bold BI, which will be used to get the dashboards list.</td>
87
-
</tr>
88
-
</tbody>
89
-
</table>
90
-
91
-
5. Once you provide these details, run the command “npm install.” After all the packages are installed, run the command “npm start.”
92
-
93
-

94
-
95
-
> **NOTE:** If the API host is already in use, modify the port number per your preference in embed.js and update that Dashboard.js file.
43
+
*[Visual Studio Code](<https://code.visualstudio.com/download>)
44
+
45
+
## Run a Sample Using Visual Studio Code
46
+
47
+
### Python sample via VS Code
48
+
49
+
1. Open the [Python Django](https://github.com/boldbi/react-with-python/tree/master/python/django-sample-master) folder in Visual Studio Code.
50
+
51
+
2. Open the terminal in Visual Studio Code and execute the command `python manage.py runserver` to run the application. It will display a URL in the command line interface, typically something like http://localhost:8000. Copy this URL and paste it into your default web browser, as shown in the image below.
52
+
53
+

54
+
55
+
### React sample via VS Code
56
+
57
+
1. Open the [React](https://github.com/boldbi/react-with-python/tree/master/React) folder in Visual Studio Code.
58
+
59
+
2. To install all dependent packages, use the following command `npm install`.
60
+
61
+
> **NOTE:** If you are using Node.js version higher than v16.17, you can update the `package.json` file by adding the following line as a `script` within the `start` command. Make ensure that you replace the existing line with this updated script.
3. To run the application, use the command`npm start`in the terminal. After executing the command, the application will automatically launch in the default browser. You can access it at the specified port number (<http://localhost:3000>). Please refer to the following image.
68
+
69
+

70
+
71
+
>**NOTE:** We represent the dashboard embedding by default without the dashboard listing sidebar. To view the dashboard listing, provide userEmail and embedSecret values in the `DashboardListing.js` file and then navigate to the URL (such as http://localhost:3000/dashboardlisting).
0 commit comments