Skip to content

Commit

Permalink
First cut at the ability to frame analysis around questions - issue #183
Browse files Browse the repository at this point in the history
 and issue #184
  • Loading branch information
uniomni committed Nov 30, 2011
1 parent bd0ba1a commit af0dc1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
24 changes: 14 additions & 10 deletions calculator/app/static/script/app/Risiko/Calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ Risiko.Calculator = Ext.extend(gxp.plugins.Tool, {
ptype: "app_calculator",

/* @i18n begin */
hazardComboLabelText: gettext("Hazard"),
exposureComboLabelText: gettext("Exposure"),
functionComboLabelText: gettext("Function"),
hazardComboLabelText: gettext("Apabila Terjadi"),
exposureComboLabelText: gettext("Berapa Banyak"),
functionComboLabelText: gettext("Yang Mungkin"),
resetButtonText: gettext("Reset"),
calculateButtonText: gettext("Calculate"),
calculatingText: gettext("Calculating"),
calculatorTitleText: gettext("Impact Calculator"),
hazardSelectText: gettext("Select Hazard ..."),
calculateButtonText: gettext("Jawab"),
calculatingText: gettext("Sedang menjawab"),
calculatorTitleText: gettext("Pertanyaan"),
hazardSelectText: gettext("Pilih bahaya ..."),
exposureSelectText: gettext("Pilih apa yang terkena ..."),
functionSelectText: gettext("Pilih dampak ..."),
/*hazardSelectText: gettext("Select Hazard ..."),
exposureSelectText: gettext("Select Exposure ..."),
functionSelectText: gettext("Select Function ..."),
functionSelectText: gettext("Select Function ..."),*/
/* @i18n end */

addOutput: function(config) {
Expand Down Expand Up @@ -389,7 +392,7 @@ Risiko.Calculator = Ext.extend(gxp.plugins.Tool, {
}]
}, {
id: "resultpanelcontainer",
title: 'Kalkulasi Hasil',
title: 'Jawaban',
flex: 1,
frame: true,
border: true,
Expand All @@ -408,7 +411,8 @@ Risiko.Calculator = Ext.extend(gxp.plugins.Tool, {
frame: false,
border: false,
html: "<div><p>"+
"<a href='http://bnpb.go.id' target='_blank'><img src='theme/app/img/bnpb_logo.png' alt='BNPB' title='BNPB' style='padding-left: 100px; float: left' /></a>"+
"<a href='http://bnpb.go.id' target='_blank'><img src='theme/app/img/bnpb_logo.png' alt='BNPB' title='BNPB' style='padding-left: 10px; float: left' /></a>"+
"<a href='http://www.jakarta.go.id' target='_blank'><img src='theme/app/img/dki_logo.png' alt='DKI' title='DKI' style='padding-left: 1px; float: left' /></a>"+
"</p></div>",
xtype: "panel",
defaults: {
Expand Down
1 change: 1 addition & 0 deletions impact/plugins/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def pretty_function_name(func):
func_name += c
else:
func_name = func.plugin_name

return func_name


Expand Down
7 changes: 6 additions & 1 deletion impact/plugins/flood/HKV_flood_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class FloodImpactFunction(FunctionProvider):
layer_type=='raster'
"""

plugin_name = 'Perlu evakuasi'

@staticmethod
def run(layers):
"""Risk plugin for earthquake fatalities
Expand Down Expand Up @@ -98,7 +100,10 @@ def run(layers):
count = str(int(sum(I.flat) / 1000))

# Create report
caption = ('<table border="0" width="320px">'
caption = ('<b>Apabila terjadi "%s" perkiraan dampak kepada "%s" '
'mungkin&#58;</b><br><br><p>' % (inundation.get_name(),
population.get_name()))
caption += ('<table border="0" width="320px">'
' <tr><td><b>%s&#58;</b></td>'
'<td align="right"><b>%s</b></td></tr>'
% ('Jumlah Penduduk', total))
Expand Down

0 comments on commit af0dc1b

Please sign in to comment.