From aad26dd1b9a1f63deb2923fb2b6d0576e458fd36 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:30:56 +0530 Subject: [PATCH 01/60] Create mainJS.js --- mainJS/mainJS.js | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 mainJS/mainJS.js diff --git a/mainJS/mainJS.js b/mainJS/mainJS.js new file mode 100644 index 0000000..2037f03 --- /dev/null +++ b/mainJS/mainJS.js @@ -0,0 +1,63 @@ + +var initializeVisualize = function(initialize, authentication, configPath) { +//load the config + var path = configPath ? configPath : '../../../../config/config.json'; + jQuery.getJSON(path) + .done(function(jrsConfig) { + //console.log(data); + options = { + dataType: "script", + cache: jrsConfig.cacheVisualizeJS || false, + url: jrsConfig.visualizeJS + }; + + // load visualize.js + jQuery.ajax( options ).done( function() { + // themeHref is a global variable created by loading visualize from a JRS instance + // initially, it is something like: http://localhost:8080/jasperserver-pro/_themes/19BF127D + if (themeHref.indexOf("/") === 0) { + themeHref = jrsConfig.jrsTheme + themeHref; + } + if (typeof themeHref !== 'undefined') { + if (themeHref.indexOf("http") == 0) { + if (jrsConfig.jrsHostname.indexOf("/") == 0) { + // assumes that visualize javascript was loaded via a relative jrsUrl like example above, + // not a full URL like http://host:port/jasperserver-pro + // let's make it relative!!!! + var posOfRelative = themeHref.indexOf(jrsConfig.jrsHostname); + if (posOfRelative > 0) { + themeHref = themeHref.substring(posOfRelative); + } + } else if (jrsConfig.jrsHostname.indexOf("https:") == 0 && themeHref.indexOf("http:") == 0 ) { + // JRS is reached via a full URL + // we have to switch the protocols, since visualize generated the wrong theme URL + themeHref = "https:" + themeHref.substring( "http:".length ); + } + } + } else { + // visualize.js script not loaded from a JRS instance + // point to theme installed in web app + themeHref = "theme"; + } + + visualize({ + server: jrsConfig.jrsHostname, + // assume if a theme is not set in the config, + // set it up based on the above process + theme: { + href: themeHref || jrsConfig.theme + }, + auth: authentication || jrsConfig.jrsAuth + }, function(v) { + initialize(jrsConfig, v); + }, function(err) { + console.log(err); + alert(err.message); + }); + }); + }) + .fail( function (jqxhr, textStatus, error ) { + var err = textStatus + ", " + error; + console.log( "config.json Request Failed: " + err ); + }); +} From 820555166809ee0872295c6915d662fe41a431c7 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:31:58 +0530 Subject: [PATCH 02/60] Create config.json --- config/config.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config/config.json diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..f77e466 --- /dev/null +++ b/config/config.json @@ -0,0 +1,13 @@ +{ + "visualizeJS": "https://infra-platforms-phase2-11723-rsarda.pfa.jaspersoft.com/jasperserver-pro/client/visualize.js", + "cacheVisualizeJS": true, + "visualizeJSFromServer": "https://infra-platforms-phase2-11723-rsarda.pfa.jaspersoft.com/jasperserver-pro/client/visualize.js", + "jrsHostname": "https://infra-platforms-phase2-11723-rsarda.pfa.jaspersoft.com/jasperserver-pro", + "jrsTheme": "https://infra-platforms-phase2-11723-rsarda.pfa.jaspersoft.com", + "jrsAuth": { + "name": "jasperadmin", + "password": "jasperadmin", + "organization": "organization_1" + }, + "theme": "theme" +} From ec7b076dce80a500bb8fca73f7654d756ab4ab4c Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:33:41 +0530 Subject: [PATCH 03/60] Update main.html --- UrbanRoast-tutorial/modules/module1/1-1/main.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-1/main.html b/UrbanRoast-tutorial/modules/module1/1-1/main.html index 2debf35..cda510c 100644 --- a/UrbanRoast-tutorial/modules/module1/1-1/main.html +++ b/UrbanRoast-tutorial/modules/module1/1-1/main.html @@ -46,8 +46,8 @@ crossorigin=""> - + - \ No newline at end of file + From 36794954beab9bea0871db550f8e632af164e212 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:35:54 +0530 Subject: [PATCH 04/60] Update main.js --- .../modules/module1/1-1/javascripts/main.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-1/javascripts/main.js b/UrbanRoast-tutorial/modules/module1/1-1/javascripts/main.js index 6b0caec..051220c 100644 --- a/UrbanRoast-tutorial/modules/module1/1-1/javascripts/main.js +++ b/UrbanRoast-tutorial/modules/module1/1-1/javascripts/main.js @@ -1,13 +1,9 @@ var locations = ["5th Street Cafe","Belmont Street Cafe","Franklin Street Cafe","Main Street Roastery and Cafe"] var selectedLocation = []; -visualize({ - auth: { - name: "jasperadmin", - password: "jasperadmin", - organization: "organization_1" - } -}, function(v) { +initializeVisualize(initPage); + +function initPage(jrsConfig, v) { var barChart = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Management/Net_Sales___Total_Cost_and_Gross_Profit", container: "#bar", @@ -28,4 +24,4 @@ visualize({ }); } -}); \ No newline at end of file +} From b75ae39895e7d874f21ca7e891e6b50b84c19f54 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:37:26 +0530 Subject: [PATCH 05/60] Update main.html --- UrbanRoast-tutorial/modules/module1/1-2/main.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-2/main.html b/UrbanRoast-tutorial/modules/module1/1-2/main.html index 8893b45..0de484b 100644 --- a/UrbanRoast-tutorial/modules/module1/1-2/main.html +++ b/UrbanRoast-tutorial/modules/module1/1-2/main.html @@ -54,8 +54,8 @@ - + - \ No newline at end of file + From e408e0c8d50182519a3ab6e56630b5eea25e40ac Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:40:27 +0530 Subject: [PATCH 06/60] Update main.js --- .../modules/module1/1-2/javascripts/main.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-2/javascripts/main.js b/UrbanRoast-tutorial/modules/module1/1-2/javascripts/main.js index f786e4a..48aed56 100644 --- a/UrbanRoast-tutorial/modules/module1/1-2/javascripts/main.js +++ b/UrbanRoast-tutorial/modules/module1/1-2/javascripts/main.js @@ -1,13 +1,12 @@ var locations = ["5th Street Cafe","Belmont Street Cafe","Franklin Street Cafe","Main Street Roastery and Cafe"] var selectedLocation = []; - -visualize({ - auth: { - name: "jasperadmin", - password: "jasperadmin", - organization: "organization_1" - } -}, function(v) { +var auth = { + name: "jasperadmin", + password: "jasperadmin", + organization: "organization_1" +} +initializeVisualize(initPage, auth); +function initPage(jrsConfig, v) { var barChart = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Management/Net_Sales___Total_Cost_and_Gross_Profit", container: "#bar", @@ -156,5 +155,5 @@ visualize({ clickOnMarker(locations[3]) }) .addTo(mymap); -}); +} From 3715e0bf39ebafe57e723759b119ac5a1c4b52a1 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:42:48 +0530 Subject: [PATCH 07/60] Update locations-dashboard1.js --- .../1-3/javascripts/locations-dashboard1.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard1.js b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard1.js index 5194f92..3632a48 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard1.js +++ b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard1.js @@ -9,13 +9,12 @@ $(document).ready(function(){ //formattedDate = formatDate(selectedDate); //console.log("The formatted date is " + formattedDate); - - visualize({ - auth: { - name: "superuser", - password: "superuser" - } - }, function(v) { + var auth = { + name: "superuser", + password: "superuser" + } + initializeVisualize(initPage, auth); + function initPage(jrsConfig, v) { var first = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Management/DailyDrilldown___Sales_and_Profit", @@ -136,5 +135,5 @@ $(document).ready(function(){ console.log(e); } }); - }); -}); \ No newline at end of file + } +}); From cd8cb5cbb837f2e8c72c5be3892d8187f4c4bfe6 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:43:58 +0530 Subject: [PATCH 08/60] Update locations-dashboard2.js --- .../1-3/javascripts/locations-dashboard2.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard2.js b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard2.js index 4dca48c..146e244 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard2.js +++ b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-dashboard2.js @@ -10,12 +10,12 @@ $(document).ready(function(){ var location = ["5th Street Cafe"]; - visualize({ - auth: { - name: "superuser", - password: "superuser" - } - }, function(v) { + var auth = { + name: "superuser", + password: "superuser" + } + initializeVisualize(initPage, auth); + function initPage(jrsConfig, v) { var first = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Management/DailyDrilldown___Sales_and_Profit", @@ -108,5 +108,5 @@ $(document).ready(function(){ console.log(e); } }); - }); -}); \ No newline at end of file + } +}); From 992ef25a90053d89efac0decd1cb4c352fa7b589 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:45:28 +0530 Subject: [PATCH 09/60] Update locations-main.js --- .../module1/1-3/javascripts/locations-main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-main.js b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-main.js index 8a42674..9c76ab6 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-main.js +++ b/UrbanRoast-tutorial/modules/module1/1-3/javascripts/locations-main.js @@ -7,13 +7,13 @@ maxDate = []; -visualize({ - auth: { - name: "jasperadmin", - password: "jasperadmin", - organization: "organization_1" - } -}, function(v) { +var auth = { + name: "jasperadmin", + password: "jasperadmin", + organization: "organization_1" +} +initializeVisualize(initPage, auth); +function initPage(jrsConfig , v) { var crosstab = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Management/Location_List", container: "#manage-view1", @@ -234,4 +234,4 @@ visualize({ clickOnMarker(locations[3]) }) .addTo(mymap); -}); \ No newline at end of file +} From 21c13d35fff8b97423df5dc90b1947d02d3c56bc Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:47:21 +0530 Subject: [PATCH 10/60] Update locations-dashboard1.html --- .../modules/module1/1-3/locations-dashboard1.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html index 16b8818..f8f65ba 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html +++ b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html @@ -181,7 +181,7 @@ - + From 74f0f1f373d67432586601c438b29e6d65480366 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:48:23 +0530 Subject: [PATCH 11/60] Update locations-dashboard2.html --- .../modules/module1/1-3/locations-dashboard2.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html index 8d185d2..315ec9f 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html +++ b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html @@ -185,9 +185,9 @@ - + - \ No newline at end of file + From d26558c224119c6b8a78b555ec96d5f3db5fa92b Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:49:49 +0530 Subject: [PATCH 12/60] Update locations.html --- UrbanRoast-tutorial/modules/module1/1-3/locations.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/locations.html b/UrbanRoast-tutorial/modules/module1/1-3/locations.html index dfb9c62..60bbbf4 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/locations.html +++ b/UrbanRoast-tutorial/modules/module1/1-3/locations.html @@ -220,8 +220,8 @@ - + - \ No newline at end of file + From 080a575615a572c365cd96077d0ea98ded240491 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:50:19 +0530 Subject: [PATCH 13/60] Update locations-dashboard2.html --- .../modules/module1/1-3/locations-dashboard2.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html index 315ec9f..5a99790 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html +++ b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard2.html @@ -185,7 +185,7 @@ - + From 6bb0864b0627de35bdfc76c60133511a192d79d4 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:50:55 +0530 Subject: [PATCH 14/60] Update locations-dashboard1.html --- .../modules/module1/1-3/locations-dashboard1.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html index f8f65ba..0bdd924 100644 --- a/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html +++ b/UrbanRoast-tutorial/modules/module1/1-3/locations-dashboard1.html @@ -181,7 +181,7 @@ - + From 0e40d71a74296e5fa79b5d410ba938e9a4c9405c Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:54:33 +0530 Subject: [PATCH 15/60] Update roast-main.js --- .../module2/2-1/javascripts/roast-main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-main.js b/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-main.js index f190665..812847b 100644 --- a/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-main.js +++ b/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-main.js @@ -4,12 +4,12 @@ var avgToProfile = []; var avgRoasted = []; var avgShipped = []; -visualize({ - auth: { - name: "superuser", - password: "superuser" - } -}, function(v) { +var auth = { + name: "superuser", + password: "superuser" +} +initializeVisualize(initPage, auth); +function initPage(jrsConfig, v) { var progressGauges = v.adhocView({ resource: "/public/Samples/FreshCoffee/Ad_Hoc_Views/Roastery/Coffee_Percentages", @@ -317,7 +317,7 @@ visualize({ console.log(e); }); } -}); +} function renderGaugeData(data) { //console.log(data); @@ -397,4 +397,4 @@ function createInput() { sessionStorage.setItem("sent", JSON.stringify(window.recentTags)); window.open("roast-report1.html","_self"); -} \ No newline at end of file +} From 3feb02cd45b57917c18c364e41d7caa84b20f87e Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:55:37 +0530 Subject: [PATCH 16/60] Update roast-report1-main.js --- .../2-1/javascripts/roast-report1-main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-report1-main.js b/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-report1-main.js index 3d5475a..34157a9 100644 --- a/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-report1-main.js +++ b/UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-report1-main.js @@ -5,12 +5,12 @@ $(document).ready(function(){ var selectedCoffee = JSON.parse(sessionStorage.getItem("sent")); //console.log(selectedCoffee); - visualize({ - auth: { - name: "superuser", - password: "superuser" - } - }, function (v) { + var auth = { + name: "superuser", + password: "superuser" + } + initializeVisualize(initPage, auth); + function initPage(jrsConfig, v) { //add custom export format //(should throw a proper error) var reportExports = v.report @@ -138,5 +138,5 @@ $(document).ready(function(){ .run() .fail(function(err) { alert(err); }); }); - }); -}); \ No newline at end of file + } +}); From e4cd2c16b2014aa04d299e55059a64718b65f5f1 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:57:36 +0530 Subject: [PATCH 17/60] Update roast.html --- UrbanRoast-tutorial/modules/module2/2-1/roast.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module2/2-1/roast.html b/UrbanRoast-tutorial/modules/module2/2-1/roast.html index 782ae16..9258951 100644 --- a/UrbanRoast-tutorial/modules/module2/2-1/roast.html +++ b/UrbanRoast-tutorial/modules/module2/2-1/roast.html @@ -124,8 +124,8 @@ - + - \ No newline at end of file + From 755a25f76e49dbf185c3a0ad8fcc3460df73bced Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:58:31 +0530 Subject: [PATCH 18/60] Update roast-report1.html --- UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html b/UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html index e00c808..0b432b9 100644 --- a/UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html +++ b/UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html @@ -95,9 +95,9 @@ - + - \ No newline at end of file + From 8f1c93d98f36c7fc68e0b062b1b4fbe6463a6429 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:02:03 +0530 Subject: [PATCH 19/60] Update cafe.html --- UrbanRoast-tutorial/modules/module3/3-1/cafe.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module3/3-1/cafe.html b/UrbanRoast-tutorial/modules/module3/3-1/cafe.html index 4eef791..d1ceb92 100644 --- a/UrbanRoast-tutorial/modules/module3/3-1/cafe.html +++ b/UrbanRoast-tutorial/modules/module3/3-1/cafe.html @@ -369,7 +369,7 @@ - + - \ No newline at end of file + From 153b66744b90f9c728c5e153c9ab0327627eef29 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:03:04 +0530 Subject: [PATCH 20/60] Update cafe-report1.html --- UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html b/UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html index 4765c71..33d0d12 100644 --- a/UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html +++ b/UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html @@ -66,9 +66,9 @@ - + - \ No newline at end of file + From a4854412cc9f7af94f96f82ca7db56a638c66ba2 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:05:58 +0530 Subject: [PATCH 21/60] Update cafe-main.js --- .../modules/module3/3-1/javascripts/cafe-main.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-main.js b/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-main.js index 403b18c..792c400 100644 --- a/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-main.js +++ b/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-main.js @@ -10,6 +10,8 @@ var pageConfig = { } }; +initializeVisualize(initPage); + // create and initialize first selected drink object var drink = { name: 'Americano', @@ -33,15 +35,7 @@ var order = []; var customName = "Custom " + drink.name; // initialize Visualize.js -function initPage() { - visualize({ - auth: { - name: "jasperadmin", - password: "jasperadmin", - organization: "organization_1" - } - }, function(v) { - +function initPage(jrsConfig, v) { // load the ad hoc views and report loadViews(v); @@ -60,11 +54,8 @@ function initPage() { console.log(err); }); }); - }); } -initPage(); - function loadViews(v) { report = v.report({ From 506874776863e4f7d2421d1d6bdee70f4e46bf6c Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:06:51 +0530 Subject: [PATCH 22/60] Update cafe-report1-main.js --- .../module3/3-1/javascripts/cafe-report1-main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-report1-main.js b/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-report1-main.js index 8fd3fc7..9684a61 100644 --- a/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-report1-main.js +++ b/UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-report1-main.js @@ -4,12 +4,12 @@ $(document).ready(function(){ //will retrieve session and get the value; var order = JSON.parse(sessionStorage.getItem("sent")); - visualize({ - auth: { - name: "superuser", - password: "superuser" - } - }, function (v) { + var auth = { + name: "superuser", + password: "superuser" + } + initializeVisualize(initPage, auth); + function initPage(jrsConfig, v) { //add custom export format var reportExports = v.report .exportFormats @@ -143,5 +143,5 @@ var order = JSON.parse(sessionStorage.getItem("sent")); alert(err); }); }); - }); -}); \ No newline at end of file + } +}); From 24c4268b60f1925324ab0b5479610ce53a6f1011 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:08:54 +0530 Subject: [PATCH 23/60] Update script.js --- demopack/demo_build_ui/js/script.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/demopack/demo_build_ui/js/script.js b/demopack/demo_build_ui/js/script.js index a5cfa1e..6a71627 100644 --- a/demopack/demo_build_ui/js/script.js +++ b/demopack/demo_build_ui/js/script.js @@ -1,10 +1,11 @@ -visualize({ - auth: { - name: "jasperadmin", - password: "jasperadmin", - organization: "organization_1" - } -}, function (v) { +var configPath = '../../config/config.json'; +var auth = { + name: "jasperadmin", + password: "jasperadmin", + organization: "organization_1" +} +initializeVisualize(initPage, auth, configPath); +function initPage(jrsConfig, v) { //render report from provided resource var report = v.report({ @@ -42,7 +43,7 @@ visualize({ report.run(); }); -}); +} @@ -97,4 +98,4 @@ function buildParam(controls){ return param; -} \ No newline at end of file +} From 85311596e4ecc5c40900efd72b955a435e301912 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:10:17 +0530 Subject: [PATCH 24/60] Update index.html --- demopack/demo_build_ui/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demopack/demo_build_ui/index.html b/demopack/demo_build_ui/index.html index 5a651aa..4ad8384 100644 --- a/demopack/demo_build_ui/index.html +++ b/demopack/demo_build_ui/index.html @@ -14,7 +14,7 @@ - + @@ -39,4 +39,4 @@ - \ No newline at end of file + From 7374fe462fe3f96ecec194f831ddc4f0f87e1017 Mon Sep 17 00:00:00 2001 From: anthomba-tibco <73111464+anthomba-tibco@users.noreply.github.com> Date: Wed, 21 Oct 2020 16:12:06 +0530 Subject: [PATCH 25/60] Update index.html --- demopack/demo_create_run_report/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demopack/demo_create_run_report/index.html b/demopack/demo_create_run_report/index.html index 0a1fe39..86c70b3 100644 --- a/demopack/demo_create_run_report/index.html +++ b/demopack/demo_create_run_report/index.html @@ -14,7 +14,7 @@ - +