Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for JRS 7.8.0 version #72

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
aad26dd
Create mainJS.js
anthomba-tibco Oct 21, 2020
8205551
Create config.json
anthomba-tibco Oct 21, 2020
ec7b076
Update main.html
anthomba-tibco Oct 21, 2020
3679495
Update main.js
anthomba-tibco Oct 21, 2020
b75ae39
Update main.html
anthomba-tibco Oct 21, 2020
e408e0c
Update main.js
anthomba-tibco Oct 21, 2020
3715e0b
Update locations-dashboard1.js
anthomba-tibco Oct 21, 2020
cd8cb5c
Update locations-dashboard2.js
anthomba-tibco Oct 21, 2020
992ef25
Update locations-main.js
anthomba-tibco Oct 21, 2020
21c13d3
Update locations-dashboard1.html
anthomba-tibco Oct 21, 2020
74f0f1f
Update locations-dashboard2.html
anthomba-tibco Oct 21, 2020
d26558c
Update locations.html
anthomba-tibco Oct 21, 2020
080a575
Update locations-dashboard2.html
anthomba-tibco Oct 21, 2020
6bb0864
Update locations-dashboard1.html
anthomba-tibco Oct 21, 2020
0e40d71
Update roast-main.js
anthomba-tibco Oct 21, 2020
3feb02c
Update roast-report1-main.js
anthomba-tibco Oct 21, 2020
e4cd2c1
Update roast.html
anthomba-tibco Oct 21, 2020
755a25f
Update roast-report1.html
anthomba-tibco Oct 21, 2020
8f1c93d
Update cafe.html
anthomba-tibco Oct 21, 2020
153b667
Update cafe-report1.html
anthomba-tibco Oct 21, 2020
a485441
Update cafe-main.js
anthomba-tibco Oct 21, 2020
5068747
Update cafe-report1-main.js
anthomba-tibco Oct 21, 2020
24c4268
Update script.js
anthomba-tibco Oct 21, 2020
8531159
Update index.html
anthomba-tibco Oct 21, 2020
7374fe4
Update index.html
anthomba-tibco Oct 21, 2020
65bedd3
Update script.js
anthomba-tibco Oct 21, 2020
dc74b98
Update .env
anthomba-tibco Oct 21, 2020
3858f16
Update imports.ejs
anthomba-tibco Oct 21, 2020
5d77e27
Update home.js
anthomba-tibco Oct 21, 2020
14e0629
Update home.html
anthomba-tibco Oct 21, 2020
0bde940
Update roast-main.js
anthomba-tibco Oct 21, 2020
e2fd71d
Rename cup-americano.svg to cup-Americano.svg
anthomba-tibco Oct 21, 2020
99df8b5
Rename cup-blackCoffee.svg to cup-BlackCoffee.svg
anthomba-tibco Oct 21, 2020
a63ad89
Rename cup-cafeBreve.svg to cup-CafeBreve.svg
anthomba-tibco Oct 21, 2020
27b9666
Rename cup-cafeCarajillo.svg to cup-CafeCarajillo.svg
anthomba-tibco Oct 21, 2020
406f501
Rename cup-cafeLatte.svg to cup-CafeLatte.svg
anthomba-tibco Oct 21, 2020
fbc6984
Rename cup-cafeMelange.svg to cup-CafeMelange.svg
anthomba-tibco Oct 21, 2020
c949a56
Rename cup-cafeMocha.svg to cup-CafeMocha.svg
anthomba-tibco Oct 21, 2020
6e846ed
Rename cup-capuccino.svg to cup-Capuccino.svg
anthomba-tibco Oct 21, 2020
d6a3c20
Rename cup-eiskaffee.svg to cup-Eiskaffee.svg
anthomba-tibco Oct 21, 2020
f256285
Rename cup-flatWhite.svg to cup-FlatWhite.svg
anthomba-tibco Oct 21, 2020
8e735a9
Rename cup-galao.svg to cup-Galao.svg
anthomba-tibco Oct 21, 2020
45751cb
Rename cup-icedCoffee.svg to cup-IcedCoffee.svg
anthomba-tibco Oct 21, 2020
9dd0826
Rename cup-irishCoffee.svg to cup-IrishCoffee.svg
anthomba-tibco Oct 21, 2020
6f241c6
Rename cup-longBlack.svg to cup-LongBlack.svg
anthomba-tibco Oct 21, 2020
3c8c992
Rename cup-macchiato.svg to cup-Macchiato.svg
anthomba-tibco Oct 21, 2020
22b8b71
Rename cup-redEye.svg to cup-RedEye.svg
anthomba-tibco Oct 21, 2020
7a083ec
Rename cup-viennaCoffee.svg to cup-ViennaCoffee.svg
anthomba-tibco Oct 21, 2020
cbd589c
Add files via upload
anthomba-tibco Oct 22, 2020
2f7fefb
Update home.html
anthomba-tibco Oct 22, 2020
1fc1641
Update mainJS.js
anthomba-tibco Oct 22, 2020
ae19c81
Update home.js
anthomba-tibco Oct 22, 2020
d7dc8a8
Update home.js
anthomba-tibco Oct 22, 2020
38a797e
Update home.js
anthomba-tibco Oct 23, 2020
3a9b34f
Update script.js
anthomba-tibco Oct 30, 2020
e46ecce
Update config.json
anthomba-tibco Dec 2, 2020
15a2227
Update script.js
anthomba-tibco Dec 2, 2020
403b4ca
Update .env
anthomba-tibco Dec 2, 2020
988d758
Update imports.ejs
anthomba-tibco Dec 2, 2020
e200bb5
Update Readme.md
anthomba-tibco Dec 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Getting started

- You can also double check your database connection by going to the Jaspersoft Server, opening view > repository and navigating to public > samples > UrbanRoast > Data Sources. Now you can right click the "freshcoffee" data source and select edit to ensure that your Postgres username and password (default: postgres/postgres) is set. If your Postgres data port is different than the default you can change it here as well.

- If you want to setup application on local, replace all the instances of https://mobiledemo.jaspersoft.com to your own local JRS instance(e.g. http://localhost:8080 ).

- You can now run any of the main module pages, for example you can open the module3 folder and run cafe.html on your server. From there you can use the top right nav in the page to run any of the three finished modules.

- Keep in mind that module1 is broken up into three parts as we build, with the module 1-3 and locations.html as the finished result.
Expand Down
12 changes: 4 additions & 8 deletions UrbanRoast-tutorial/modules/module1/1-1/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -28,4 +24,4 @@ visualize({
});
}

});
}
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module1/1-1/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
crossorigin=""></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script src="../../../../mainJS/mainJS.js"></script>
<script type="text/javascript" src="javascripts/main.js"></script>

</body>
</html>
</html>
17 changes: 8 additions & 9 deletions UrbanRoast-tutorial/modules/module1/1-2/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -156,5 +155,5 @@ visualize({
clickOnMarker(locations[3])
})
.addTo(mymap);
});
}

4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module1/1-2/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<script type="text/javascript" src="../../../resources/javascripts/jQDateRangeSlider-min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script src="../../../../mainJS/mainJS.js"></script>
<script type="text/javascript" src="javascripts/main.js"></script>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -136,5 +135,5 @@ $(document).ready(function(){
console.log(e);
}
});
});
});
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -108,5 +108,5 @@ $(document).ready(function(){
console.log(e);
}
});
});
});
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -234,4 +234,4 @@ visualize({
clickOnMarker(locations[3])
})
.addTo(mymap);
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<script type="text/javascript" src="../../../resources/javascripts/bootstrap.min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>

<script type="text/javascript" src="javascripts/locations-dashboard1.js"></script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@
<script type="text/javascript" src="../../../resources/javascripts/bootstrap.min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>

<script type="text/javascript" src="javascripts/locations-dashboard2.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module1/1-3/locations.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@
<script type="text/javascript" src="../../../resources/javascripts/jQDateRangeSlider-min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>
<script type="text/javascript" src="javascripts/locations-main.js"></script>

</body>
</html>
</html>
20 changes: 10 additions & 10 deletions UrbanRoast-tutorial/modules/module2/2-1/javascripts/roast-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -317,13 +317,13 @@ visualize({
console.log(e);
});
}
});
}

function renderGaugeData(data) {
//console.log(data);
//get the col and row count from the ad hoc view data object
//minus 1 to account for only using 4 of the 5 columns
var numCol = (data.levels[0].detail.fields.length) - 1;
var numCol = (data.levels[1].detail.fields.length) - 1;
var numRow = data.counts;
var onGoal = [];
var toProfile = [];
Expand All @@ -333,7 +333,7 @@ function renderGaugeData(data) {
//loop through the desired columns (last 4) and push data to prepared arrays
for (var col = 0; col < numCol; col++) {
for (var i = 0; i < numRow; i++) {
eachRow = data.levelDataNodes[0].detail.data[i][col+1];
eachRow = data.levelDataNodes[0].all.children[0].detail.data[i][col+1];
if (col === 0) { onGoal.push(Number(eachRow)) }
if (col === 1) { toProfile.push(Number(eachRow)) }
if (col === 2) { roasted.push(Number(eachRow)) }
Expand Down Expand Up @@ -397,4 +397,4 @@ function createInput() {

sessionStorage.setItem("sent", JSON.stringify(window.recentTags));
window.open("roast-report1.html","_self");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -138,5 +138,5 @@ $(document).ready(function(){
.run()
.fail(function(err) { alert(err); });
});
});
});
}
});
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module2/2-1/roast-report1.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
<script type="text/javascript" src="../../../resources/javascripts/bootstrap-multiselect.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>

<script type="text/javascript" src="javascripts/roast-report1-main.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module2/2-1/roast.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
<script type="text/javascript" src="../../../resources/javascripts/taggle.min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>
<script type="text/javascript" src="javascripts/roast-main.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module3/3-1/cafe-report1.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
<script type="text/javascript" src="../../../resources/javascripts/bootstrap.min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>

<script type="text/javascript" src="javascripts/cafe-report1-main.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions UrbanRoast-tutorial/modules/module3/3-1/cafe.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
<script type="text/javascript" src="../../../resources/javascripts/bootstrap-slider.min.js"></script>

<!-- Visualize.js -->
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript" src="../../../../mainJS/mainJS.js"></script>
<script src="javascripts/cafe-main.js"></script>

<script>
Expand Down Expand Up @@ -432,4 +432,4 @@
</script>

</body>
</html>
</html>
15 changes: 3 additions & 12 deletions UrbanRoast-tutorial/modules/module3/3-1/javascripts/cafe-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ var pageConfig = {
}
};

initializeVisualize(initPage);

// create and initialize first selected drink object
var drink = {
name: 'Americano',
Expand All @@ -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);

Expand All @@ -60,11 +54,8 @@ function initPage() {
console.log(err);
});
});
});
}

initPage();

function loadViews(v) {

report = v.report({
Expand Down
Loading