Skip to content

Commit b0daa16

Browse files
Added Table for results
1 parent f4c9fb7 commit b0daa16

13 files changed

+145
-49
lines changed

Readme.txt

+13-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,16 @@ and click submit
1212

1313
This is the initial Commit. I will be building out additional functionality over time.
1414

15-
A version of this in python runs on the Google App Engine at http://analyze-stock.appspot.com/
15+
A version of this in python runs on the Google App Engine at http://analyze-stock.appspot.com/
16+
17+
From Eclipse:
18+
mvn package
19+
20+
21+
To Push to Pivotal Cloud Foundry:
22+
From a terminal:
23+
24+
25+
cd /Users/ssahadevan/Documents/workspace/StockAnalyzer-java/target
26+
27+
cf push stockAnalyzer -p ./stockAnalyzer-0.1.0.jar

src/main/java/hello/GreetingController.java

+2
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ public String submitTicker(@RequestParam(value="ticker", required=false, default
6464
System.out.println("*** TickerData for " + td.getTickerName() + " at " + td.getPrice()
6565
+ ",yield=" + td.getDivYield()
6666
+ ",pe=" + td.getPe()
67+
+ ",isPeOk=" + td.getIsPeOk()
6768
+",qRevGrowth= "+ td.getQRevGrowth()
6869
+ ", recommendation=" + td.getRecommendation() );
6970

7071
model.addAttribute("tickerName", td.getTickerName());
7172
model.addAttribute("price", td.getPrice());
7273
model.addAttribute("yield", td.getDivYield());
7374
model.addAttribute("pe", td.getPe());
75+
model.addAttribute("isPeOk", td.getIsPeOk());
7476
model.addAttribute("recommendation", td.getRecommendation());
7577

7678
return "results";

src/main/java/hello/TickerData.java

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class TickerData {
1212
private String pe;
1313
private String qRevGrowth;
1414
private String divYield;
15+
private String isPeOk;
1516

1617
public String getTicker() {
1718
return ticker;
@@ -67,6 +68,9 @@ public String getDivYield() {
6768
return divYield;
6869
}
6970

71+
public String getIsPeOk() {
72+
return isPeOk;
73+
}
7074

7175

7276

src/main/resources/templates/mobile/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>

src/main/resources/templates/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>

src/main/resources/templates/tablet/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>
83 Bytes
Binary file not shown.

target/classes/hello/TickerData.class

100 Bytes
Binary file not shown.

target/classes/templates/mobile/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>

target/classes/templates/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>

target/classes/templates/tablet/results.html

+21-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@
2828

2929

3030
<p class="ex1"></p>
31-
<b> <p th:text="'Results for Ticker ' + ${ticker} + '!' " /> </b>
32-
33-
<p th:text="'TickerName is ' + ${tickerName} + ',' " />
34-
<p th:text="'Recommendation is ' + ${recommendation} + ',' " />
35-
<p th:text="'Price = ' + ${price} + '!' " />
36-
<p th:text="'pe = ' + ${pe} + ',' " />
37-
<p th:text="'Yield = ' + ${yield} + ' ' " />
31+
<b> <p th:text="'Results for ' + ${tickerName} + '!' " /> </b>
3832

3933
&nbsp;&nbsp;
40-
34+
<div align="center">
35+
<table id="box-table-a" summary="CurrentConfiguration">
36+
<thead>
37+
<tr>
38+
<th scope="col">Price</th>
39+
<th scope="col">pe</th>
40+
<th scope="col">Yield</th>
41+
<th scope="col">Recommendation</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
<tr>
46+
<td> <p th:text="${price}" /> </td>
47+
<td> <p th:text="${pe}" /> </td>
48+
<td> <p th:text="${yield}" /> </td>
49+
<td> <p th:text="${recommendation}" /> </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
</div>
4154

4255

4356
</div>

target/stockAnalyzer-0.1.0.jar

368 Bytes
Binary file not shown.
368 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)