Fullstack Portal Created by the HCMR for the Marine Strategy Framework Directive Program in order to cover demands and aspects considering extendability and maintainability
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

509 lines
14 KiB

// structure layer tree
var pTree = {};
let nodeContext = [{
icon:'fa fa-download',
title:'Download Layer',
//context button click event
onClick : async (node) => {
document.getElementById('modal-download-layer').classList.add('is-active');
Alpine.store('downloadName', node.data.code);
document.getElementById('modal-download-layer-name').textContent = "Layer name: " + node.data.code;
// downloadShapefile(node.data.code);
}
}];
let nodeContextLink = [{
icon:'fa fa-link',
title:'Source Link',
//context button click event
onClick : async (node) => {
window.open(node.data.n_hyperlink, '_blank')
// downloadShapefile(node.data.code);
}
}];
let citation = [{
icon:'fa fa-link',
title:'Citation',
//context button click event
onClick : async (node) => {
//console.log('add - '+node.id);
window.open(URL, '_blank');
}
}];
const myData = [{
n_id: 1,
n_title: 'MARINE AREAS',
n_parentid: 0,
},{
n_id: 11,
n_title: 'Assessment Areas',
n_parentid: 1
},{
n_id: 111,
n_title: 'Mediterranean Sea Region',
code: "ms_el_mediterranean_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 112,
n_title: 'Adriatic Sea subregion',
code: "mad_el_ms_ad_adriatic_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 113,
n_title: 'Ionian Sea and Central Mediterranean Sea subregion',
code: "mic_el_ms_io_ionian_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 114,
n_title: 'Aegean-Levantine subregion',
code: "mal_el_ms_al_aegean_levantine_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 115,
n_title: 'Aegean-Levantine subregion – Aegean Sea',
code: "mal_el_aa_ae_aegean_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 116,
n_title: 'Aegean-Levantine subregion – North Aegean Sea',
code: "mal_el_aa_na_north_aegean_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 117,
n_title: 'Aegean-Levantine subregion – Central and South Aegean Sea',
code: "mal_el_aa_csa_central_south_aegean_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 118,
n_title: 'Aegean-Levantine subregion - Levantine Sea',
code: "mal_el_aa_le_levantine_assessment_area",
n_elements: nodeContext,
n_parentid: 11
},{
n_id: 12,
n_title: 'Coastal Waters',
code: "v_el_mrus_nov2021_epsg3035_coastal_waters",
n_elements: nodeContext,
n_parentid: 1
},{
n_id: 16,
n_title: 'Coastal Water Bodies (WFD)',
code: "v_el_mrus_nov2021_epsg3035_coasts",
n_elements: nodeContext,
n_parentid: 1
},{
n_id: 13,
n_title: 'Territorial Waters',
code: "v_el_mrus_nov2021_epsg3035_territorial",
n_elements: nodeContext,
n_parentid: 1
},{
n_id: 14,
n_title: 'Territorial Part beyond Coastal Waters',
code: "v_el_mrus_nov2021_epsg3035_territorial_from_coastal",
n_elements: nodeContext,
n_parentid: 1
},{
n_id: 15,
n_title: 'Beyond Territorial Waters',
code: "v_el_mrus_nov2021_epsg3035_beyond_territorial",
n_elements: nodeContext,
n_parentid: 1
},{
n_id: 2,
n_title: 'DATA SOURCES',
n_parentid: 0,
},{
n_id: 21,
n_title: 'MSFD MONITORING PROGRAMS',
n_parentid: 2,
},{
n_id: 213,
n_title: 'Beach Stations',
code: "beach_stations",
n_elements: nodeContext,
n_parentid: 21
},{
n_id: 211,
n_title: 'MSFD Stations',
code: "cruise_stations",
n_elements: nodeContext,
n_parentid: 21
},{
n_id: 212,
n_title: 'MSFD Cruises',
n_parentid: 21
},{
n_id: 2121,
n_title: 'Cruise 2018',
code: "cruise_2018",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2122,
n_title: 'Cruise 2019 A',
code: "cruise_2019_a",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2123,
n_title: 'Cruise 2019 B',
code: "cruise_2019_b",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2124,
n_title: 'Cruise 2020 A',
code: "cruise_2020_a",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2125,
n_title: 'Cruise 2020 B',
code: "cruise_2020_b",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2126,
n_title: 'Cruise 2021 A',
code: "cruise_2021_a",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 2127,
n_title: 'Cruise 2021 B',
code: "cruise_2021_b",
n_elements: nodeContext,
n_parentid: 212
},{
n_id: 214,
n_title: 'Marine Natura Sites (Monitored under D1)',
code: "v_marine_natura2000_end2021_epsg3035_sitetype", //"marine_natura2000_end2021_epsg3035",
n_elements: nodeContext,
n_parentid: 21
},{
n_id: 215,
n_title: 'EEA Marine Assessment Grid 10x10',
code: "grid_10km_3035",
n_elements: nodeContext,
n_parentid: 21
},{
n_id: 216,
n_title: 'EEA Marine Assessment Grid 25x25',
code: "grid_25km_3035",
n_elements: nodeContext,
n_parentid: 21
},{
n_id: 22,
n_title: 'OTHER',
n_parentid: 2,
}, {
n_id: 221,
n_title: 'Poseidon',
code: "POSEIDON",
n_parentid: 22
},{
n_id: 222,
n_title: 'Argo',
code: "argo_stations",
n_elements: nodeContext,
n_parentid: 22
},{
n_id: 223,
n_title: 'WFD',
code: "coastal_wfd",
n_parentid: 22
},{
n_id: 3,
n_title: 'PRODUCTS',
n_parentid: 0,
}, {
n_id: 31,
n_title: 'MSFD',
n_parentid: 3,
}, {
n_id: 32,
n_title: 'OTHER',
n_parentid: 3,
},{
n_id: 33,
n_title: 'WFD',
n_parentid: 3,
},{
n_id: 311,
n_title: 'D3',
n_parentid: 31,
},{
n_id: 3111,
n_title: 'Annual Fisheries Production per fishing gear per NSSG area (NSSG: National Statistical Service of Greece)',
code: 'AFPPY',
n_parentid: 311,
},{
n_id: 321 ,
n_title: 'EMODNET Bathymetry',
code: 'DPTH',
n_parentid: 32,
n_elements: nodeContextLink,
n_hyperlink: "https://doi.org/10.12770/bb6a87dd-e579-4036-abe1-e649cea9881a"
},{
n_id: 322 ,
n_title: 'EMODNET Habitats',
code: 'HABT',
n_parentid: 32,
n_elements: nodeContextLink,
n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/10d3d35c-8f8e-40ff-898f-32e0b037356c"
},
// {
// n_id: 323 ,
// n_title: 'EMODNET Chemistry',
// code: 'CHEM',
// n_parentid: 32,
// n_elements: nodeContext,
// n_hyperlink: "https://ec.oceanbrowser.net/emodnet/Python/web/wms",
// hidden: true
// },
// {
// n_id: 3231,
// n_title: 'Eutrophication',
// code: 'CHEM_PHPL',
// n_parentid: 323,
// n_elements: nodeContext,
// n_hyperlink: "https://ec.oceanbrowser.net/emodnet/Python/web/wms"
// },
{
n_id: 324,
n_title: 'Probability of coralligenous habitat in the Mediterranean (MEDISEH)',
code: 'mediseh_cora',
n_parentid: 32,
n_elements: nodeContextLink,
n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/4da88de5-b0b8-4de4-8aac-99a9b0980736"
},{
n_id: 325,
n_title: 'Probability of maerl habitat in the Mediterranean (MEDISEH)',
code: 'mediseh_maerl',
n_parentid: 32,
n_elements: nodeContextLink,
n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/43c7ac30-04da-479d-b5c1-ba621f0981e4"
},{
n_id: 326,
n_title: 'Probability of Posidonia oceanica in the Mediterranean (MEDISEH)',
code: 'mediseh_posidonia',
n_parentid: 32,
n_elements: nodeContextLink,
n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/a93cffc8-8f45-47a4-a9bd-c8ffd9ad53fb"
},{
n_id: 327 ,
n_title: 'Seagrass Meadows (<a target="_blank" class="is-link has-text-link" href="https://doi.org/10.1515/bot-2022-0011">citation</a>)',
code: 'greek_seagrass_meadows_v0906_espg3035',
n_parentid: 32,
n_elements: nodeContext.concat(nodeContextLink),
n_hyperlink: "https://www.seanoe.org/data/00765/87740/"
},{
n_id: 331,
n_title: 'Integrated Ecological Status',
n_parentid: 33
},{
n_id: 332,
n_title: 'Benthic MacroInvertebrates – BMI (D2C1, D5C8, D6C3, D6C5)',
n_parentid: 33
},{
n_id: 333,
n_title: 'Macroalgae (MAI)',
n_parentid: 33
},{
n_id: 334,
n_title: 'Angiosperms – AN (D2C1, D6C3, D6C5)',
n_parentid: 33
},{
n_id: 335,
n_title: 'Chlorophyl-a (D4C2, D5C2)',
n_parentid: 33
},{
n_id: 336,
n_title: 'PhysicoChemical Quality Index – PCQI (D5C1, D5C4, D5C5)',
n_parentid: 33
},{
n_id: 337,
n_title: 'Chemical Status – Chem (D8C1)',
n_parentid: 33
},{
n_id: 3311,
n_title: 'Ecological Status 2018',
code: 'wfd_eco_status_2018',
n_elements: nodeContext,
n_parentid: 331
},{
n_id: 3312,
n_title: 'Ecological Status 2019',
code: 'wfd_eco_status_2019',
n_elements: nodeContext,
n_parentid: 331
},{
n_id: 3313,
n_title: 'Ecological Status 2020',
code: 'wfd_eco_status_2020',
n_elements: nodeContext,
n_parentid: 331
},{
n_id: 3314,
n_title: 'Ecological Status 2021',
code: 'wfd_eco_status_2021',
n_elements: nodeContext,
n_parentid: 331
},{
n_id: 3321,
n_title: 'BMI Status 2018',
code: 'wfd_bmi_status_2018',
n_elements: nodeContext,
n_parentid: 332
},{
n_id: 3322,
n_title: 'BMI Status 2019',
code: 'wfd_bmi_status_2019',
n_elements: nodeContext,
n_parentid: 332
},{
n_id: 3323,
n_title: 'BMI Status 2020',
code: 'wfd_bmi_status_2020',
n_elements: nodeContext,
n_parentid: 332
},{
n_id: 3324,
n_title: 'BMI Status 2021',
code: 'wfd_bmi_status_2021',
n_elements: nodeContext,
n_parentid: 332
},{
n_id: 3331,
n_title: 'MA Status 2018',
code: 'wfd_ma_status_2018',
n_elements: nodeContext,
n_parentid: 333
},{
n_id: 3332,
n_title: 'MA Status 2019',
code: 'wfd_ma_status_2019',
n_elements: nodeContext,
n_parentid: 333
},{
n_id: 3333,
n_title: 'MA Status 2020',
code: 'wfd_ma_status_2020',
n_elements: nodeContext,
n_parentid: 333
},{
n_id: 3334,
n_title: 'MA Status 2021',
code: 'wfd_ma_status_2021',
n_elements: nodeContext,
n_parentid: 333
},{
n_id: 3341,
n_title: 'AN Status 2018',
code: 'wfd_an_status_2018',
n_elements: nodeContext,
n_parentid: 334
},{
n_id: 3342,
n_title: 'AN Status 2019',
code: 'wfd_an_status_2019',
n_elements: nodeContext,
n_parentid: 334
},{
n_id: 3343,
n_title: 'AN Status 2020',
code: 'wfd_an_status_2020',
n_elements: nodeContext,
n_parentid: 334
},{
n_id: 3344,
n_title: 'AN Status 2021',
code: 'wfd_an_status_2021',
n_elements: nodeContext,
n_parentid: 334
},{
n_id: 3351,
n_title: 'Chl-a Status 2018',
code: 'wfd_chla_status_2018',
n_elements: nodeContext,
n_parentid: 335
},{
n_id: 3352,
n_title: 'Chl-a Status 2019',
code: 'wfd_chla_status_2019',
n_elements: nodeContext,
n_parentid: 335
},{
n_id: 3353,
n_title: 'Chl-a Status 2020',
code: 'wfd_chla_status_2020',
n_elements: nodeContext,
n_parentid: 335
},{
n_id: 3354,
n_title: 'Chl-a Status 2021',
code: 'wfd_chla_status_2021',
n_elements: nodeContext,
n_parentid: 335
},{
n_id: 3361,
n_title: 'PCQI Status 2018',
code: 'wfd_chla_status_2018',
n_elements: nodeContext,
n_parentid: 336
},{
n_id: 3362,
n_title: 'PCQI Status 2019',
code: 'wfd_chla_status_2019',
n_elements: nodeContext,
n_parentid: 336
},{
n_id: 3363,
n_title: 'PCQI Status 2020',
code: 'wfd_chla_status_2020',
n_elements: nodeContext,
n_parentid: 336
},{
n_id: 3364,
n_title: 'PCQI Status 2021',
code: 'wfd_pcqi_status_2021',
n_elements: nodeContext,
n_parentid: 336
},{
n_id: 3371,
n_title: 'Chemi Status 2018',
code: 'wfd_chem_status_2018',
n_elements: nodeContext,
n_parentid: 337
},{
n_id: 3372,
n_title: 'Chem Status 2019',
code: 'wfd_chem_status_2019',
n_elements: nodeContext,
n_parentid: 337
},{
n_id: 3373,
n_title: 'Chem Status 2020',
code: 'wfd_chem_status_2020',
n_elements: nodeContext,
n_parentid: 337
},{
n_id: 3374,
n_title: 'Chem Status 2021',
code: 'wfd_chem_status_2021',
n_elements: nodeContext,
n_parentid: 337
}
];
/* =======================*/