-
Notifications
You must be signed in to change notification settings - Fork 44
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
updated prefab paths in spreadsheet don't show up in web #4
Comments
Oh, I see that some of the pathways are also hard-coded in two other files too: app/helpers/application_helper.rb and app/assets/javascripts/costs_common_methods.js.coffee |
Thank you. I will update this. Unfortunately the pathways need to be updated in several different spots. A legacy of a time when we thought we might have different example pathways in different spots. Tom Counsell On Sunday, 10 June 2012 at 17:10, energynumbers wrote:
|
The pathways are encoded from the spreadsheet, within the model structure, and are available in ModelStructure.instance.example_pathways So it should be possible to create a single hash for the example pathways, with the short name, the long description and the wiki page, all indexed by the pathway string. And then pass that to javascript in the usual way, as a value of the twentyfifty global javascript variable |
A further step towards fixing this is in 9159fb8 This consolidates all the different example pathway elements into one spot and then passes them to the javascript as a global variable. Note that it doesn't yet read from the underlying model structure. Need to add the other bits of data (e.g., description, wiki page, whether it appears as a cost comparator) to the excel before doing that. |
Nice one, cheers Tom. As you know (but just as a gentle reminder) it does currently read the expert pathways from the underlying model structure - they're all available in the However, although the model gem reads in the pathways from the spreadsheet, it doesn't read in titles of the pathways. Nor can it read in wikipage, short and long descriptions, and comparator flag: as you say, those are not yet present in the spreadsheet. |
In version 2.1 of the spreadsheet, there are updates to the FoE path (column AA on the worbook's "Control" sheet). But because the paths are hardcoded in pathways.js.cofffee lines 226-266, the updates don't automatically appear in the web interface.
By the way, while I'm here: great work on stemming the memory leaks! That's working very well here (using excel_to_code v0.0.10). Now, memory use quickly stabilises just under 200 MB, and then very slowly rises by about 0.1MB or so, now and again. Currently at 200.6MB, after rising to 200.7MB and dropping back a little bit. I don't know if that's a persistent rise, or not ... more news shortly. But it's a huge improvement, and makes it entirely usable now.
The text was updated successfully, but these errors were encountered: