Skip to content

Commit 24f97d2

Browse files
author
greta.mcgivern
committed
#2778 cleanup and add missing semicolons
1 parent 599569e commit 24f97d2

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

static_examples/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ eg 127.0.0.1 dashboard
1414
2. Configure the dashboard to allow embedding from myapp
1515
3. Update values in html files from https://localhost to https://dashboard (as well as credentials if not default)
1616
4. Run runServer.sh or equivalent
17-
5. Open README.HTML and try some embedding!
18-
6.
17+
5. Open README.HTML and try some embedding!

static_examples/embed_a_category.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ <h1>Need more help?</h1>
4545
var categoryId = "23"; //Change this to the category you want to see
4646
var mode = "0"; //Change this to change the category mode you want to use
4747
var modeKey = "?categoryMode=";
48-
var redirect = "#/dashboard-system/#/redirectToDefaultCategoryState/"
48+
var redirect = "#/dashboard-system/#/redirectToDefaultCategoryState/";
4949
var modeParam = modeKey + mode;
5050

51-
var apiToken = "pi/api/v2/tokens"
52-
51+
var apiToken = "pi/api/v2/tokens";
5352

5453
$.ajax({
5554
// POST to the API with username and password to swap that for a session token

static_examples/embed_report_editor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h1>Example: Opening the Report Editor</h1>
3838
const url = "https://localhost:8224/"; // Change this to your server
3939
const username = "admin"; // Change this to the user you want to login as
4040
const password = "dashboard1"; // Change this to user's password
41-
const apiToken = "pi/api/v2/tokens"
41+
const apiToken = "pi/api/v2/tokens";
4242
const reportIdOne = 1; // Adjust the id to suit your setup
4343
const reportIdTwo = 2; // Adjust the id to suit your setup
4444
const reportIdThree = 3; // Adjust the id to suit your setup
@@ -70,7 +70,7 @@ <h1>Example: Opening the Report Editor</h1>
7070
xhr.setRequestHeader("Authorization", "bearer " + token);
7171
},
7272
success: function (data) {
73-
document.getElementById("iframe").src = "https://dev.pi-dash.uk:8080/pi/?lang=en_GB&editorDisplayMode=CONTENT#/dashboard-system/#/dashboardDesigner"
73+
document.getElementById("iframe").src = "https://dev.pi-dash.uk:8080/pi/?lang=en_GB&editorDisplayMode=CONTENT#/dashboard-system/#/dashboardDesigner";
7474
piEmbedActions = PiEmbedActions.createDashboard('iframe', 'https://dev.pi-dash.uk:8080/pi?lang=en_GB&editorDisplayMode=CONTENT');
7575
}
7676
});

static_examples/filtering_embedded_charts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ <h1>Need more help?</h1>
7878
};
7979

8080
function applyFilter(filter) {
81-
var tmpFilters = "/t-f-p="
81+
var tmpFilters = "/t-f-p=";
8282
var oldUrl = document.getElementById("chart").src.split(tmpFilters);
8383
var simpleUrl = oldUrl[0];
8484
var oldFilters = oldUrl.length > 1 ? oldUrl[1] : '';
8585

86-
var newUrl = simpleUrl + tmpFilters + filter + (oldFilters !== "" ? "/!$!" + oldFilters : "")
86+
var newUrl = simpleUrl + tmpFilters + filter + (oldFilters !== "" ? "/!$!" + oldFilters : "");
8787
document.getElementById("chart").src = newUrl;
8888
};
8989

static_examples/how_to_embed.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- ******************************************************************************************************** -->
1818
<div class="column">
1919
<h1>Example: Embedding a PanIntelligence Chart</h1>
20-
<p>Example code for embedding a panintelligence chart</p>
20+
<p>Example code for embedding a PanIntelligence Chart</p>
2121
<p>The code in this page should be simple enough, but there are inline comments to help you understand (just view the source of this page). There are also <a href="#instructions">instructions</a> on the right side (or below).</p>
2222
<!-- The iFrame where we'll stick the chart into -->
2323
<iframe id="chart" width="500" height="500" src=""></iframe>
@@ -38,13 +38,13 @@ <h1>Need more help?</h1>
3838
*/
3939

4040
//I'm separating this here because it makes it easier to insert the token after /chart
41-
var url = "https://localhost:8224/" //Change this to your server
42-
var username = "admin" //Change this to the user you want to login as
43-
var password = "dashboard" //Change this to user's password
44-
var chartFragment = "#chart-filter/157__1" //Change this to the chart you want to see
41+
var url = "https://localhost:8224/"; //Change this to your server
42+
var username = "admin"; //Change this to the user you want to login as
43+
var password = "dashboard"; //Change this to user's password
44+
var chartFragment = "#chart-filter/157__1"; //Change this to the chart you want to see
4545

46-
var apiToken = "pi/api/v2/tokens"
47-
var piChart = "pi/chart"
46+
var apiToken = "pi/api/v2/tokens";
47+
var piChart = "pi/chart";
4848

4949
$.ajax({
5050
// POST to the API with username and password to swap that for a session token

static_examples/multi-user-embedding.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ <h1>Need more help?</h1>
4343
*/
4444

4545
//I'm separating this here because it makes it easier to insert the token after /chart
46-
var url = "https://localhost:8224/" //Change this to your server
46+
var url = "https://localhost:8224/"; //Change this to your server
4747

48-
var chartFragment = "#chart-filter/198__1" //Change this to the chart you want to see
48+
var chartFragment = "#chart-filter/198__1"; //Change this to the chart you want to see
4949

50-
var apiToken = "pi/api/v2/tokens"
51-
var piChart = "pi/chart"
50+
var apiToken = "pi/api/v2/tokens";
51+
var piChart = "pi/chart";
5252

5353
function loginAndLoad(chart, username, password) {
5454
$.ajax({
@@ -93,7 +93,7 @@ <h1>Need more help?</h1>
9393
var username1 = document.getElementById("u1").value;
9494
var password1 = document.getElementById("p1").value;
9595
loginAndLoad("chart1", username1, password1);
96-
}
96+
};
9797
document.getElementById("c2btn").onclick = function () {
9898
var username2 = document.getElementById("u2").value;
9999
var password2 = document.getElementById("p2").value;

0 commit comments

Comments
 (0)