Created
May 10, 2012 23:25
-
-
Save andyczerwonka/2656538 to your computer and use it in GitHub Desktop.
Code that is trying illustrate my LinkageError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dashboard = Action { | |
val user = User.findByUsername("aczerwonka") | |
val prefs = UserPreferences.findByUsername("aczerwonka") | |
val config = Configuration.get(); | |
Ok(views.html.dashboard(user, prefs, config)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@(user: User, prefs: UserPreferences, config: Configuration) | |
@scripts = { | |
<script src="@routes.Assets.at("javascripts/spin.min.js")" type="text/javascript"></script> | |
<script src="@routes.Assets.at("javascripts/highcharts/highcharts.js")" type="text/javascript"></script> | |
<script src="@routes.Assets.at("javascripts/dashboard.js")" type="text/javascript"></script> | |
} | |
@mainmenu(user, prefs, config, scripts) { | |
<div class="container-fluid"> | |
<div class="row-fluid"> | |
<div class="span12"> | |
<p><h2>@prefs.productionTitle(config) <small>@prefs.productionSubtitle(config)</small></h2></p> | |
<div class="row-fluid"> | |
<div id="productionDecline" class="span6"></div> | |
<div id="productionArea" class="span3"></div> | |
<div class="span3"> | |
<div class="well"> | |
<table class="table table-condensed"> | |
<thead> | |
<th colspan="2">Operational Metrics</th> | |
</thead> | |
<tbody> | |
<tr> | |
<td>Total Reserves</td> | |
<td>55,125,400 BOE</td> | |
</tr> | |
<tr> | |
<td>Average OPEX</td> | |
<td>$5,125,400 USD/d</td> | |
</tr> | |
<tr> | |
<td>F&D Cost</td> | |
<td>$215,500 USD</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<div class="well"> | |
<table class="table table-condensed"> | |
<thead> | |
<th colspan="2">Economic Metrics</th> | |
</thead> | |
<tbody> | |
<tr> | |
<td>IRR</td> | |
<td>17.09%</td> | |
</tr> | |
<tr> | |
<td>NPV (10%)</td> | |
<td>$268,675,250 USD</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class UserPreferences( | |
id: ObjectId = new ObjectId, | |
username: String, | |
program: String, | |
production: Option[ProductionQuery]) { | |
def productionTitle(config: Configuration): String = { | |
config.production.types.filter(_.key == production.get.typ).head.name | |
} | |
def productionSubtitle(config: Configuration): String = { | |
val group = config.production.groupOptions.filter(_.value == production.get.groupBy).head.label | |
production.get.definition + " by " + group + " (" + production.get.unit + ")" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that the UserPreferences case class is persisted to mongodb via Scalat. The error seems to indicate a classloader issue, so I'm wondering if it's an SBT issue.