Skip to content

Commit f915e8b

Browse files
committed
Update naming of exports
1 parent 631c300 commit f915e8b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

_static/RDL_MDE.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4540,14 +4540,21 @@ <h5 class="modal-title" id="githubConfigModalLabel">GitHub Configuration</h5>
45404540
}
45414541

45424542
function generateDatasetId() {
4543-
// Format: rdls_{risk_data_type}-{country}_{shortname}_{item}
4543+
// Format: rdls_{short_types}-{countries}_{shortname}_{items}
45444544
// Example: rdls_hzd-ury_ucra_fl or rdls_exp+lss-ury+ita_project_fl+pl
45454545

4546-
const parts = ['rdls'];
4546+
const parts = [];
45474547

4548-
// 1. Build risk_data_type part (required)
4548+
// 1. Build risk_data_type part (required) with short codes
45494549
const riskDataTypes = currentFormData.risk_data_type || [];
4550-
let riskTypePart = riskDataTypes.length > 0 ? riskDataTypes.join('+') : 'data';
4550+
const typeMap = {
4551+
'hazard': 'hzd',
4552+
'exposure': 'exp',
4553+
'vulnerability': 'vln',
4554+
'loss': 'lss'
4555+
};
4556+
const shortTypes = riskDataTypes.map(type => typeMap[type] || type);
4557+
let riskTypePart = shortTypes.length > 0 ? shortTypes.join('+') : 'data';
45514558

45524559
// 2. Get country codes (optional)
45534560
let countryCodes = [];
@@ -4561,7 +4568,7 @@ <h5 class="modal-title" id="githubConfigModalLabel">GitHub Configuration</h5>
45614568
if (countryCodes.length > 0) {
45624569
riskTypePart += '-' + countryCodes.join('+');
45634570
}
4564-
parts.push(riskTypePart);
4571+
parts.push('rdls_' + riskTypePart);
45654572

45664573
// 3. Get shortname from project or publisher (required)
45674574
let shortname = 'dataset';

0 commit comments

Comments
 (0)