Commit 78c2f505d48140de9ebba9213d17beba62a1f81f

Authored by Nathanael Jourdane
1 parent 67a4e0da

Improve granules and services grids

@@ -13,4 +13,3 @@ php/my_config.php @@ -13,4 +13,3 @@ php/my_config.php
13 DD.res 13 DD.res
14 logs/* 14 logs/*
15 *~ 15 *~
16 -generic_data/EpnTapData/services.json  
generic_data/EpnTapData/EpnTapServices.json deleted
@@ -1,184 +0,0 @@ @@ -1,184 +0,0 @@
1 -[  
2 - {  
3 - "accessurl": "http://voparis-tap-helio.obspm.fr/__system__/tap/run/tap",  
4 - "title": "Heliophysics Feature Catalog active regions",  
5 - "shortname": "HFC1AR",  
6 - "schema": "hfc1ar",  
7 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,reference,service_title,target_region,institut,code,version,feature_name,enc_met,person,contact,observat,instrume,telescop,obsinst_key,units,wavemin,wavemax,wavename,waveunit,spectral_domain,obs_type,obs_cat,date_obs,date_end,jdint,jdfrac,c_rotation,filename,url,cdelt1,cdelt2,naxis1,naxis2,center_x,center_y,r_sun,bitpix,bscale,bzero,exp_time,file_format,data_type,qclk_url,qclk_fname,id_ar,noaa_number,feat_x_pix,feat_y_pix,feat_x_arcsec,feat_y_arcsec,feat_hg_long_deg,feat_hg_lat_deg,feat_carr_long_deg,feat_carr_lat_deg,br_x0_pix,br_y0_pix,br_x1_pix,br_y1_pix,br_x2_pix,br_y2_pix,br_x3_pix,br_y3_pix,br_x0_arcsec,br_y0_arcsec,br_x1_arcsec,br_y1_arcsec,br_x2_arcsec,br_y2_arcsec,br_x3_arcsec,br_y3_arcsec,br_hg_long0_deg,br_hg_lat0_deg,br_hg_long1_deg,br_hg_lat1_deg,br_hg_long2_deg,br_hg_lat2_deg,br_hg_long3_deg,br_hg_lat3_deg,br_carr_long0_deg,br_carr_lat0_deg,br_carr_long1_deg,br_carr_lat1_deg,br_carr_long2_deg,br_carr_lat2_deg,br_carr_long3_deg,br_carr_lat3_deg,feat_area_pix,feat_area_deg2,feat_area_mm2,feat_max_int,feat_min_int,feat_mean_int,feat_mean2qsun,feat_min_bz,feat_max_bz,feat_mean_bz,feat_mean_grad,feat_median_grad,feat_max_grad,feat_length_nl,feat_length_sg,cc_x_pix,cc_y_pix,cc_x_arcsec,cc_y_arcsec,cc,cc_length,snapshot,track_id,phenom,ref_feat,track_lvl_trust,release_date,creation_date,modification_date,s_region"  
8 - },  
9 - {  
10 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
11 - "title": "Extrasolar Planets Encyclopaedia",  
12 - "shortname": "ExoPlanet",  
13 - "schema": "exoplanet",  
14 - "columns": "granule_gid,granule_uid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,spatial_origin,local_time_min,local_time_max,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,release_date,creation_date,modification_date,service_title,target_region,species,detection_type,publication_status,mass,mass_error_min,mass_error_max,radius,radius_error_min,radius_error_max,semi_major_axis,semi_major_axis_error_min,semi_major_axis_error_max,period,period_error_min,period_error_max,eccentricity,eccentricity_error_min,eccentricity_error_max,periastron,periastron_error_min,periastron_error_max,tzero_tr,tzero_tr_error_min,tzero_tr_error_max,tzero_vr,tzero_vr_error_min,tzero_vr_error_max,t_peri,t_peri_error_min,t_peri_error_max,t_conj,t_conj_error_min,t_conj_error_max,inclination,inclination_error_min,inclination_error_max,tzero_tr_sec,tzero_tr_sec_error_min,tzero_tr_sec_error_max,lambda_angle,lambda_angle_error_min,lambda_angle_error_max,discovered,updated,remarks,other_web,detect_mode,angular_distance,temp_calculated,temp_measured,hot_point_lon,log_g,albedo,albedo_error_min,albedo_error_max,mass_detection_type,radius_detection_type,mass_sin_i,mass_sin_i_error_min,mass_sin_i_error_max,impact_parameter,impact_parameter_error_min,impact_parameter_error_max,k,k_error_min,k_error_max,alt_target_name,star_name,star_distance,star_spec_type,mag_v,mag_i,mag_j,mag_h,mag_k,star_metallicity,star_mass,star_radius,star_age,star_teff,magnetic_field,detected_disc"  
15 - },  
16 - {  
17 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
18 - "title": "Main characteristics of solar system planets",  
19 - "shortname": "planets",  
20 - "schema": "planets",  
21 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_scale,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,spatial_origin,s_region,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,semi_major_axis,mean_radius,mean_radius_uncertainty,equatorial_radius,equatorial_radius_uncertainty,polar_radius,polar_radius_uncertainty,rms_deviation,elevation_min,elevation_max,mass,sideral_rotation_period,bib_reference,creation_date,modification_date,release_date,service_title,processing_level"  
22 - },  
23 - {  
24 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
25 - "title": "M4AST - Modeling for Asteroids",  
26 - "shortname": "M4AST",  
27 - "schema": "m4ast",  
28 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c2min,c3min,c1max,c2max,c3max,c1_resol_min,c2_resol_min,c3_resol_min,c1_resol_max,c2_resol_max,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,reference,processing_level,service_title,release_date,creation_date,modification_date,thumbnail_url,alt_target_name,s_region"  
29 - },  
30 - {  
31 - "accessurl": "http://voparis-tap-helio.obspm.fr/__system__/tap/run/tap",  
32 - "title": "Heliophysics Feature Catalog type 3 radio bursts",  
33 - "shortname": "HFC1T3",  
34 - "schema": "hfc1t3",  
35 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,reference,service_title,target_region,institut,code,version,feature_name,enc_met,person,contact,observat,instrume,telescop,obsinst_key,units,wavemin,wavemax,wavename,waveunit,freqmin,freqmax,frequnit,spectral_domain,obs_type,obs_cat,date_obs,date_end,jdint,jdfrac,c_rotation,filename,url,cdelt1,cdelt2,naxis1,naxis2,center_x,center_y,file_format,data_type,qclk_url,qclk_fname,id_type_iii,feat_max_int,feat_mean_int,multiple,feat_filename,snapshot,cc_x_pix,cc_y_pix,cc_x_utc,cc_y_mhz,cc,cc_length,ske_cc_x_pix,ske_cc_y_pix,ske_cc_x_utc,ske_cc_y_mhz,ske_cc,ske_cc_length,br_x0_pix,br_y0_pix,br_x1_pix,br_y1_pix,br_x2_pix,br_y2_pix,br_x3_pix,br_y3_pix,br_x0_utc,br_y0_mhz,br_x1_utc,br_y1_mhz,br_x2_utc,br_y2_mhz,br_x3_utc,br_y3_mhz,time_start,time_end,drift_start,drift_end,fit_a0,fit_a1,lvl_trust,release_date,creation_date,modification_date,s_region"  
36 - },  
37 - {  
38 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
39 - "title": "IR spectroscopy of comet Halley",  
40 - "shortname": "IKS",  
41 - "schema": "iks",  
42 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,alt_target_name,target_class,acquisition_id,target_distance_min,target_distance_max,sun_distance_min,sun_distance_max,earth_distance_min,earth_distance_max,time_min,time_max,target_time_min,target_time_max,time_scale,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,s_region,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,thumbnail_url,file_name,bib_reference,creation_date,modification_date,release_date,service_title,processing_level"  
43 - },  
44 - {  
45 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
46 - "title": "Vertical Profiles in Titan Middle Atmosphere",  
47 - "shortname": "Titan",  
48 - "schema": "titan",  
49 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,bib_reference,service_title,target_region,species,solar_longitude,local_time_min,local_time_max,time_scale,release_date,creation_date,modification_date,s_region,thumbnail_url"  
50 - },  
51 - {  
52 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
53 - "title": "Base de Donnรฉes d'Images Planรฉtaires",  
54 - "shortname": "BDIP",  
55 - "schema": "bdip",  
56 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,service_title,ra,dec,release_date,creation_date,modification_date,s_region,thumbnail_url"  
57 - },  
58 - {  
59 - "accessurl": "http://vogate.obs-nancay.fr/__system__/tap/run/tap",  
60 - "title": "Jupiter Routine Observations",  
61 - "shortname": "RoutineJupiter",  
62 - "schema": "nda_routine",  
63 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,bib_reference,service_title,target_region,release_date,creation_date,modification_date,s_region,thumbnail_url"  
64 - },  
65 - {  
66 - "accessurl": "http://ia2-tap.oats.inaf.it:8080/epntap",  
67 - "title": "INAF-IAPS RDB NASA dust catalogue TAP service",  
68 - "shortname": "nasadustcat",  
69 - "schema": "nasadustcat",  
70 - "columns": ""  
71 - },  
72 - {  
73 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
74 - "title": "The Nanรงay Cometary Database",  
75 - "shortname": "BASECOM",  
76 - "schema": "basecom",  
77 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,bib_reference,service_title,release_date,creation_date,modification_date,target_region,species,alt_target_name,tperihelion,dsun0,comettype,obsqual,status,tepoch,tstart,tend,freq,pola,dgeo,dsun,rdot,inv1,inv2,tbg,line_area,aerr,slin,serr,vo,voerr,dvo,dvoerr,q1oh,q1err,q2oh,q2err,file_name,ra,offra,dec,offdec,snr,thumbnail_url"  
78 - },  
79 - {  
80 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
81 - "title": "Auroral Planetary Imaging and Spectroscopy",  
82 - "shortname": "APIS",  
83 - "schema": "apis",  
84 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,reference,service_title,target_region,ra,dec,release_date,creation_date,modification_date,s_region,thumbnail_url"  
85 - },  
86 - {  
87 - "accessurl": "http://thebe.gp.tohoku.ac.jp/__system__/tap/run/tap",  
88 - "title": "Iitate HF data",  
89 - "shortname": "Iitate",  
90 - "schema": "iitate",  
91 - "columns": "dataproduct_type,target_name,target_class,feature_name,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,spatial_origin,spatial_coordinate_description,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,solar_longitude_min,solar_longitude_max,local_time_min,local_time_max,target_distance_min,target_distance_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,publisher,bib_reference,service_title,target_region,instrument_type,time_scale,granule_uid,granule_gid,obs_id,thumbnail_url,release_date,creation_date,modification_date,s_region"  
92 - },  
93 - {  
94 - "accessurl": "http://epn-tap.oeaw.ac.at/__system__/tap/run/tap",  
95 - "title": "IMPEx Simulation Data",  
96 - "shortname": "IMPEx_EPN20",  
97 - "schema": "impex_epn20",  
98 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_estsize,access_url,access_format,file_name,publisher"  
99 - },  
100 - {  
101 - "accessurl": "http://epn-tap.oeaw.ac.at/__system__/tap/run/tap",  
102 - "title": "Venus-Express Magnetometer Data",  
103 - "shortname": "VExMag_EPN20",  
104 - "schema": "vexmag_epn20",  
105 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,file_name,bib_reference,time_scale,publisher,target_region,target_distance_min,target_distance_max"  
106 - },  
107 - {  
108 - "accessurl": "http://epn1.epn-vespa.jacobs-university.de/__system__/tap/run/tap",  
109 - "title": "CRISM data from Earth Server 2",  
110 - "shortname": "CRISM",  
111 - "schema": "crism",  
112 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,thumbnail_url,counter,activity,activity_macro,sensor_id,filetype,version,e,n,subgranule_url,f_region"  
113 - },  
114 - {  
115 - "accessurl": "http://epn1.epn-vespa.jacobs-university.de/__system__/tap/run/tap",  
116 - "title": "Martian Impact Craters",  
117 - "shortname": "Mars_Craters",  
118 - "schema": "mars_craters",  
119 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,bib_reference,diameter,depth,crater_name,degradation_state,crater_morphology_1,crater_morphology_2,crater_morphology_3,ejecta_morphology_1,ejecta_morphology_2"  
120 - },  
121 - {  
122 - "accessurl": "http://epn1.epn-vespa.jacobs-university.de/__system__/tap/run/tap",  
123 - "title": "USGS WMS",  
124 - "shortname": "USGS_WMS",  
125 - "schema": "usgs_wms",  
126 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,thumbnail_url,preview_url"  
127 - },  
128 - {  
129 - "accessurl": "http://sery.lmd.jussieu.fr/__system__/tap/run/tap",  
130 - "title": "EPN-TAP access to the MCD database",  
131 - "shortname": "MCD",  
132 - "schema": "mcd",  
133 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,spatial_coordinate_description,solar_longitude_min,solar_longitude_max,local_time_min,local_time_max,time_scale"  
134 - },  
135 - {  
136 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
137 - "title": "RadioJOVE Data Archive",  
138 - "shortname": "RadioJOVE",  
139 - "schema": "radiojove",  
140 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,processing_level,target_region,target_element,instrument_type,observer_name,observatory_location,observatory_longitude,observatory_latitude,n_channel,dipole_orientation_angle,thumbnail_url,release_date,creation_date,modification_date,s_region,service_title"  
141 - },  
142 - {  
143 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
144 - "title": "VIRTIS Venus Express nominal mission (demo)",  
145 - "shortname": "VVEx",  
146 - "schema": "vvex",  
147 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,target_distance_min,target_distance_max,time_min,time_max,target_time_min,target_time_max,time_scale,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,s_region,local_time_min,local_time_max,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_mode,sc_pointing_mode,ra,dec,instrument_host_name,instrument_name,measurement_type,access_url,access_format,access_estsize,thumbnail_url,file_name,bib_reference,creation_date,modification_date,release_date,service_title,processing_level"  
148 - },  
149 - {  
150 - "accessurl": "http://vo.projet.latmos.ipsl.fr/__system__/tap/run/tap",  
151 - "title": "SIPCAM Mars Atmospheric Vertical Distribution",  
152 - "shortname": "SPICAM",  
153 - "schema": "spicam",  
154 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,spatial_coordinate_description,solar_longitude_min,solar_longitude_max,local_time_min,local_time_max,time_scale"  
155 - },  
156 - {  
157 - "accessurl": "http://voparis-tap-planeto.obspm.fr/__system__/tap/run/tap",  
158 - "title": "TNOs are Cool",  
159 - "shortname": "tnosarecool",  
160 - "schema": "tnosarecool",  
161 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,alt_target_name,bib_reference,target_distance_min,target_distance_max,publisher,time_scale,sun_distance_min,sun_distance_max,flux,flux_sigma_plus,flux_sigma_minus,color_indicator,magnitude,magnitude_sigma_plus,magnitude_sigma_minus,diameter,diameter_sigma_plus,diameter_sigma_minus,albedo,albedo_sigma_plus,albedo_sigma_minus,reference_band,eta,eta_sigma_plus,eta_sigma_minus,code_eta,comment,dynamical_type,taxonomy_code,semi_major_axis,inclination,eccentricity"  
162 - },  
163 - {  
164 - "accessurl": "http://vespa-ae.oma.be/__system__/tap/run/tap",  
165 - "title": "Profiles from SPICAV-SOIR/VEx",  
166 - "shortname": "BIRA-IASB TAP",  
167 - "schema": "soir",  
168 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,access_estsize,access_md5,thumbnail_url,file_name,species,target_region,feature_name,bib_reference,ra,dec,solar_longitude_min,solar_longitude_max,local_time_min,local_time_max,target_distance_min,target_distance_max,target_time_min,target_time_max,publisher,spatial_coordinate_description,spatial_origin,time_origin,time_scale"  
169 - },  
170 - {  
171 - "accessurl": "http://spectrum.iaa.es/__system__/tap/run/tap",  
172 - "title": "Data for numerical modeling of planetary atmospheres",  
173 - "shortname": "abs_cs",  
174 - "schema": "abs_cs",  
175 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,measurement_type,processing_level,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,service_title,release_date,creation_date,modification_date,access_format,access_url,access_estsize,species,formula,cas_number,comments,molecule_group,bibreferences,s_region,thumbnail_url"  
176 - },  
177 - {  
178 - "accessurl": "http://climso.irap.omp.eu/__system__/tap/run/tap",  
179 - "title": "CLIMSO coronagraphs at pic du midi de Bigorre",  
180 - "shortname": "CLIMSO",  
181 - "schema": "climso",  
182 - "columns": "granule_uid,granule_gid,obs_id,dataproduct_type,target_name,target_class,time_min,time_max,time_sampling_step_min,time_sampling_step_max,time_exp_min,time_exp_max,spectral_range_min,spectral_range_max,spectral_sampling_step_min,spectral_sampling_step_max,spectral_resolution_min,spectral_resolution_max,c1min,c1max,c2min,c2max,c3min,c3max,s_region,c1_resol_min,c1_resol_max,c2_resol_min,c2_resol_max,c3_resol_min,c3_resol_max,spatial_frame_type,incidence_min,incidence_max,emergence_min,emergence_max,phase_min,phase_max,instrument_host_name,instrument_name,measurement_type,processing_level,creation_date,modification_date,release_date,service_title,access_url,access_format,thumbnail_url"  
183 - }  
184 -]  
js/app/controllers/EpnTapModule.js
@@ -24,6 +24,44 @@ function loadTextFileAjaxSync(filePath, mimeType) { @@ -24,6 +24,44 @@ function loadTextFileAjaxSync(filePath, mimeType) {
24 } 24 }
25 } 25 }
26 26
  27 +function prettify(name) {
  28 + return name.charAt(0).toUpperCase() + name.replace(/_/g, ' ').substr(1).toLowerCase();
  29 +}
  30 +
  31 +function all_prettify(name) {
  32 + return 'All ' + (name[name.length-1] == 's' ? name : name + 's').replace(/_/g, ' ').toLowerCase();
  33 +}
  34 +
  35 +function is_latest(new_str_date, old_str_date) {
  36 + if (new_str_date === null) {
  37 + return false;
  38 + }
  39 + if (old_str_date === null) {
  40 + return true;
  41 + }
  42 +
  43 + var new_date = new_str_date.split('/');
  44 + var old_date = old_str_date.split('/');
  45 +
  46 + if(new_date[2]>old_date[2]) {
  47 + return true;
  48 + } else if(new_date[2]<old_date[2]) {
  49 + return false;
  50 + }
  51 + if(new_date[1]>old_date[1]) {
  52 + return true;
  53 + } else if(new_date[1]<old_date[1]) {
  54 + return false;
  55 + }
  56 + if(new_date[0]>old_date[0]) {
  57 + return true;
  58 + } else {
  59 + return false;
  60 + }
  61 +}
  62 +
  63 +
  64 +
27 Ext.define('amdaDesktop.EpnTapModule', { 65 Ext.define('amdaDesktop.EpnTapModule', {
28 66
29 extend: 'amdaDesktop.AmdaModule', 67 extend: 'amdaDesktop.AmdaModule',
@@ -41,55 +79,113 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, { @@ -41,55 +79,113 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, {
41 /** The name of the documentation file related to the module. */ 79 /** The name of the documentation file related to the module. */
42 helpFile : 'epnTapHelp', 80 helpFile : 'epnTapHelp',
43 81
44 - width : 800, 82 + /** Window dimentions. */
  83 + width : 1000,
45 height: 550, 84 height: 550,
46 85
47 - dpt_dic: { "im": "Image", "ma": "Map", "sp": "Spectrum", "ds": "Dynamic spectrum", "sc": "Spectral cube", "pr": "Profile",  
48 - "vo": "Volume", "mo": "Movie", "cu": "Cube", "ts": "Time series", "ca": "Catalogue", "ci": "Catalogue item" }, 86 + onWindowLoaded: function() {
  87 + this.dpt_cb = Ext.getCmp('productTypeCB');
  88 + this.tc_cb = Ext.getCmp('targetClassCB');
  89 + this.tn_cb = Ext.getCmp('targetNameCB');
  90 + this.sp_grid = Ext.getCmp('servicesGrid');
  91 + this.gp_grid = Ext.getCmp('granulesGrid');
49 92
50 - prettify: function(name) {  
51 - return name.charAt(0).toUpperCase() + name.replace(/_/g, ' ').substr(1).toLowerCase();  
52 - }, 93 + this.dpt_cb.getStore().removeAll();
  94 + this.tc_cb.getStore().removeAll();
  95 + this.tn_cb.getStore().removeAll();
  96 + this.tc_cb.disable();
  97 + this.tn_cb.disable();
  98 +
  99 + this.dpt_cb.getStore().add({'id': 'all', 'name': 'All data product types'});
  100 + this.tc_cb.getStore().add({'id': 'all', 'name': 'All target names'});
  101 + this.tn_cb.getStore().add({'id': 'all', 'name': 'All target classes'});
53 102
54 - all_prettify: function(name) {  
55 - return 'All ' + (name[name.length-1] == 's' ? name : name + 's').replace(/_/g, ' ').toLowerCase(); 103 + for (var dpt_id in this.metadata) {
  104 + if (dpt_id in this.dpt_dic) {
  105 + this.dpt_cb.getStore().add({'id': dpt_id, 'name': prettify(this.dpt_dic[dpt_id])});
  106 + } else {
  107 + console.log('Unknown data product type "' + dpt_id + '"');
  108 + }
  109 + }
  110 + this.dpt_cb.select('all');
  111 + this.tc_cb.select('all');
  112 + this.tn_cb.select('all');
56 }, 113 },
57 114
58 update_services: function() { 115 update_services: function() {
59 this.sp_grid.getStore().removeAll(); 116 this.sp_grid.getStore().removeAll();
60 this.gp_grid.getStore().removeAll(); 117 this.gp_grid.getStore().removeAll();
61 118
  119 + var service = null;
  120 + var time_min_arr = null;
  121 + var time_max_arr = null;
  122 + var time_min = null;
  123 + var time_max = null;
  124 +
62 var filter_dic = new Array(); 125 var filter_dic = new Array();
63 - if(this.dpt_cb.value == 'all') { 126 + if(this.dataproduct_type == 'all') {
64 for (var dpt in this.metadata) { 127 for (var dpt in this.metadata) {
65 for (var tc in this.metadata[dpt]) { 128 for (var tc in this.metadata[dpt]) {
66 for (tn in this.metadata[dpt][tc]) { 129 for (tn in this.metadata[dpt][tc]) {
67 for (serv in this.metadata[dpt][tc][tn]) { 130 for (serv in this.metadata[dpt][tc][tn]) {
68 - filter_dic[serv] = this.metadata[dpt][tc][tn][serv][0] + (serv in filter_dic ? filter_dic[serv] : 0); 131 + service = this.metadata[dpt][tc][tn][serv];
  132 + time_min_arr = service[1].split('/');
  133 + filter_dic[serv] = service[0] + (serv in filter_dic ? filter_dic[serv] : 0);
  134 + if (is_latest(service[1], time_min)) {
  135 + time_min = service[1];
  136 + }
  137 + if (is_latest(service[2], time_max)) {
  138 + time_max = service[2];
  139 + }
69 } 140 }
70 } 141 }
71 } 142 }
72 } 143 }
73 - } else if (this.tc_cb.value == 'all') {  
74 - for (var tc in this.metadata[this.dpt_cb.value]) {  
75 - for (tn in this.metadata[this.dpt_cb.value][tc]) {  
76 - for (serv in this.metadata[this.dpt_cb.value][tc][tn]) {  
77 - filter_dic[serv] = this.metadata[this.dpt_cb.value][tc][tn][serv][0] + (serv in filter_dic ? filter_dic[serv] : 0); 144 + } else if (this.target_class == 'all') {
  145 + for (var tc in this.metadata[this.dataproduct_type]) {
  146 + for (tn in this.metadata[this.dataproduct_type][tc]) {
  147 + for (serv in this.metadata[this.dataproduct_type][tc][tn]) {
  148 + service = this.metadata[this.dataproduct_type][tc][tn][serv];
  149 + filter_dic[serv] = service[0] + (serv in filter_dic ? filter_dic[serv] : 0);
  150 + if (is_latest(service[1], time_min)) {
  151 + time_min = service[1];
  152 + }
  153 + if (is_latest(service[2], time_max)) {
  154 + time_max = service[2];
  155 + }
78 } 156 }
79 } 157 }
80 } 158 }
81 } else if (this.tn_cb.value == 'all') { 159 } else if (this.tn_cb.value == 'all') {
82 - for (tn in this.metadata[this.dpt_cb.value][this.tc_cb.value]) {  
83 - for (serv in this.metadata[this.dpt_cb.value][this.tc_cb.value][tn]) {  
84 - filter_dic[serv] = this.metadata[this.dpt_cb.value][this.tc_cb.value][tn][serv][0] + (serv in filter_dic ? filter_dic[serv] : 0); 160 + for (tn in this.metadata[this.dataproduct_type][this.target_class]) {
  161 + for (serv in this.metadata[this.dataproduct_type][this.target_class][tn]) {
  162 + service = this.metadata[this.dataproduct_type][this.target_class][tn][serv];
  163 + filter_dic[serv] = service[0] + (serv in filter_dic ? filter_dic[serv] : 0);
  164 + if (is_latest(service[1], time_min)) {
  165 + time_min = service[1];
  166 + }
  167 + if (is_latest(service[2], time_max)) {
  168 + time_max = service[2];
  169 + }
85 } 170 }
86 } 171 }
87 } else { 172 } else {
88 - for (serv in this.metadata[this.dpt_cb.value][this.tc_cb.value][this.tn_cb.value]) {  
89 - filter_dic[serv] = this.metadata[this.dpt_cb.value][this.tc_cb.value][this.tn_cb.value][serv][0] + (serv in filter_dic ? filter_dic[serv] : 0); 173 + for (serv in this.metadata[this.dataproduct_type][this.target_class][this.tn_cb.value]) {
  174 + service = this.metadata[this.dataproduct_type][this.target_class][this.tn_cb.value][serv];
  175 + filter_dic[serv] = service[0] + (serv in filter_dic ? filter_dic[serv] : 0);
  176 + if (is_latest(service[1], time_min)) {
  177 + time_min = service[1];
  178 + }
  179 + if (is_latest(service[2], time_max)) {
  180 + time_max = service[2];
  181 + }
90 } 182 }
91 } 183 }
92 184
  185 + console.log('times min/max: [' + time_min + ' ; ' + time_max + ']');
  186 + // TODO: charger times min/max dans formulaire
  187 + // TODO: dans formulaire, mettre ร  jour duration avec times min/max
  188 +
93 var filter = Object.keys(filter_dic).map(function(key) { 189 var filter = Object.keys(filter_dic).map(function(key) {
94 return [key, filter_dic[key]]; 190 return [key, filter_dic[key]];
95 }); 191 });
@@ -97,63 +193,31 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, { @@ -97,63 +193,31 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, {
97 return second[1] - first[1]; 193 return second[1] - first[1];
98 }); 194 });
99 for (var s = 0; s < filter.length; s++) { 195 for (var s = 0; s < filter.length; s++) {
100 - this.sp_grid.getStore().add({'id': filter[s][0], 'nb_results': filter[s][1]});  
101 - }  
102 - },  
103 -  
104 - onWindowLoaded: function(services) {  
105 - this.metadata = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/metadata.json', "application/json"));  
106 - this.services = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/EpnTapServices.json', "application/json"));  
107 - console.log(Object.keys(this.metadata).length + " dataproduct_type rรฉpertoriรฉs.");  
108 -  
109 - this.dpt_cb = Ext.getCmp('productTypeCB');  
110 - this.tc_cb = Ext.getCmp('targetClassCB');  
111 - this.tn_cb = Ext.getCmp('targetNameCB');  
112 - this.sp_grid = Ext.getCmp('servicesPanel');  
113 - this.gp_grid = Ext.getCmp('granulesPanel');  
114 -  
115 - this.dpt_cb.getStore().removeAll();  
116 - this.tc_cb.getStore().removeAll();  
117 - this.tn_cb.getStore().removeAll();  
118 - this.tc_cb.disable();  
119 - this.tn_cb.disable();  
120 -  
121 - this.dpt_cb.getStore().add({'id': 'all', 'name': 'All data product types'});  
122 - this.tc_cb.getStore().add({'id': 'all', 'name': 'All target names'});  
123 - this.tn_cb.getStore().add({'id': 'all', 'name': 'All target classes'});  
124 -  
125 - for (var dpt_id in this.metadata) {  
126 - if (dpt_id in this.dpt_dic) {  
127 - this.dpt_cb.getStore().add({'id': dpt_id, 'name': this.prettify(this.dpt_dic[dpt_id])});  
128 - } else {  
129 - console.log("Unknown data product type '" + dpt_id + "'");  
130 - } 196 + var service = this.services[filter[s][0]];
  197 + this.sp_grid.getStore().add({'id': filter[s][0], 'nb_results': filter[s][1], 'shortname': service['shortname'], 'title': service['title'], 'accessurl': service['accessurl']});
131 } 198 }
132 - this.dpt_cb.select('all');  
133 - this.tc_cb.select('all');  
134 - this.tn_cb.select('all');  
135 - this.update_services();  
136 }, 199 },
137 200
138 - onProductTypeCB: function() { 201 + onProductTypeCB: function(dataproduct_type) {
  202 + this.dataproduct_type = dataproduct_type;
139 this.tc_cb.getStore().removeAll(); 203 this.tc_cb.getStore().removeAll();
140 this.tn_cb.getStore().removeAll(); 204 this.tn_cb.getStore().removeAll();
141 this.tn_cb.disable(); 205 this.tn_cb.disable();
142 206
143 - if (this.dpt_cb.value == 'all') { 207 + if (this.dataproduct_type == 'all') {
144 this.tc_cb.disable(); 208 this.tc_cb.disable();
145 } else { 209 } else {
146 - var target_classes = this.metadata[this.dpt_cb.value]; 210 + var target_classes = this.metadata[this.dataproduct_type];
147 211
148 if (Object.keys(target_classes).length == 1) { 212 if (Object.keys(target_classes).length == 1) {
149 - this.tc_cb.getStore().add({'id': Object.keys(target_classes)[0], 'name': this.prettify(Object.keys(target_classes)[0])}); 213 + this.tc_cb.getStore().add({'id': Object.keys(target_classes)[0], 'name': prettify(Object.keys(target_classes)[0])});
150 this.tc_cb.disable(); 214 this.tc_cb.disable();
151 this.tc_cb.select(this.tc_cb.getStore().getAt(0)['internalId']); 215 this.tc_cb.select(this.tc_cb.getStore().getAt(0)['internalId']);
152 this.onTargetClassCB(); 216 this.onTargetClassCB();
153 } else { 217 } else {
154 - this.tc_cb.getStore().add({'id': 'all', 'name': this.all_prettify(this.dpt_dic[this.dpt_cb.value])}); 218 + this.tc_cb.getStore().add({'id': 'all', 'name': all_prettify(this.dpt_dic[this.dataproduct_type])});
155 for (var tc_id in target_classes) { 219 for (var tc_id in target_classes) {
156 - this.tc_cb.getStore().add({'id': tc_id, 'name': this.prettify(tc_id)}); 220 + this.tc_cb.getStore().add({'id': tc_id, 'name': prettify(tc_id)});
157 } 221 }
158 this.tc_cb.select('all'); 222 this.tc_cb.select('all');
159 this.tc_cb.enable(); 223 this.tc_cb.enable();
@@ -164,24 +228,26 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, { @@ -164,24 +228,26 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, {
164 this.update_services(); 228 this.update_services();
165 }, 229 },
166 230
167 - onTargetClassCB: function() { 231 + onTargetClassCB: function(target_class) {
  232 + this.target_class = target_class;
168 this.tn_cb.getStore().removeAll(); 233 this.tn_cb.getStore().removeAll();
169 234
170 - if (this.tc_cb.value == 'all') { 235 + if (this.target_class == 'all') {
171 this.tn_cb.getStore().add({'id': 'all', 'name': 'All target names'}); 236 this.tn_cb.getStore().add({'id': 'all', 'name': 'All target names'});
172 this.tn_cb.select('all'); 237 this.tn_cb.select('all');
173 this.tn_cb.disable(); 238 this.tn_cb.disable();
174 } else { 239 } else {
175 - var target_names = this.metadata[this.dpt_cb.value][this.tc_cb.value]; 240 + var target_names = this.metadata[this.dataproduct_type][this.target_class];
  241 + console.log('target_names: ', target_names)
176 242
177 if (Object.keys(target_names).length == 1) { 243 if (Object.keys(target_names).length == 1) {
178 - this.tn_cb.getStore().add({'id': Object.keys(target_names)[0], 'name': this.prettify(Object.keys(target_names)[0])}); 244 + this.tn_cb.getStore().add({'id': Object.keys(target_names)[0], 'name': prettify(Object.keys(target_names)[0])});
179 this.tn_cb.select(this.tn_cb.getStore().getAt(0)['internalId']); 245 this.tn_cb.select(this.tn_cb.getStore().getAt(0)['internalId']);
180 this.tn_cb.disable(); 246 this.tn_cb.disable();
181 } else { 247 } else {
182 - this.tn_cb.getStore().add({'id': 'all', 'name': this.all_prettify(this.tc_cb.value)}); 248 + this.tn_cb.getStore().add({'id': 'all', 'name': all_prettify(this.target_class)});
183 for (var tn_id in target_names) { 249 for (var tn_id in target_names) {
184 - this.tn_cb.getStore().add({'id': tn_id, 'name': this.prettify(tn_id)}); 250 + this.tn_cb.getStore().add({'id': tn_id, 'name': prettify(tn_id)});
185 } 251 }
186 this.tn_cb.select('all'); 252 this.tn_cb.select('all');
187 this.tn_cb.enable(); 253 this.tn_cb.enable();
@@ -190,40 +256,87 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, { @@ -190,40 +256,87 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, {
190 this.update_services(); 256 this.update_services();
191 }, 257 },
192 258
193 - onTargetNameCB: function() { 259 + onTargetNameCB: function(target_name) {
  260 + this.target_name = target_name;
194 this.update_services(); 261 this.update_services();
195 }, 262 },
196 263
197 - onSearchBtnClicked: function() {  
198 - // console.log("onSearchBtnClicked"); 264 + fillGranules: function(granules) {
  265 + if (granules == null) {
  266 + console.log("There is no granules to add.");
  267 + } else {
  268 + try {
  269 + // console.log('Added granules:', granules);
  270 + Ext.getCmp('granulesGrid').getStore().removeAll();
  271 + Ext.getCmp('granulesGrid').getStore().add(granules);
  272 + } catch( e ) {
  273 + console.log('Can not add granules: ' + e);
  274 + }
  275 + }
  276 + },
  277 +
  278 + updatePage: function(nb_rows) {
  279 + this.nb_rows = nb_rows;
  280 +
  281 + var rows_per_page = Ext.getCmp('rowsPerPageNf').value;
  282 + var nb_pages = Math.ceil(nb_rows / rows_per_page);
  283 + this.current_page = 1;
  284 + Ext.getCmp('pageLb').setText('1/' + nb_pages);
  285 + Ext.getCmp('previousPageBtn').setDisabled(true);
  286 + Ext.getCmp('firstPageBtn').setDisabled(true);
  287 + if (nb_pages==1) {
  288 + Ext.getCmp('nextPageBtn').setDisabled(true);
  289 + Ext.getCmp('lastPageBtn').setDisabled(true);
  290 + } else {
  291 + Ext.getCmp('nextPageBtn').setDisabled(false);
  292 + Ext.getCmp('lastPageBtn').setDisabled(false);
  293 + }
199 }, 294 },
200 295
201 - fillGranules: function(granules) {  
202 - console.log(granules);  
203 296
204 - Ext.getCmp('granulesPanel').getStore().removeAll();  
205 - Ext.getCmp('granulesPanel').getStore().add(granules); 297 + onFirstPageBtnClicked: function() {
  298 + var limit = Ext.getCmp('rowsPerPageNf').value;
  299 + AmdaAction.epnTapGetGranules(service['id'], this.url, this.filter, this.select, limit, offset, this.fillGranules);
  300 + },
  301 +
  302 + onPreviousPageBtnClicked: function() {
  303 + AmdaAction.epnTapGetGranules(service['id'], this.url, this.filter, this.select, limit, offset, this.fillGranules);
  304 + },
  305 +
  306 + onNextPageBtnClicked: function() {
  307 + AmdaAction.epnTapGetGranules(service['id'], this.url, this.filter, this.select, limit, offset, this.fillGranules);
  308 + },
  309 +
  310 + onLastPageBtnClicked: function() {
  311 + AmdaAction.epnTapGetGranules(service['id'], this.url, this.filter, this.select, limit, offset, this.fillGranules);
206 }, 312 },
207 313
208 onServiceSelected: function(service) { 314 onServiceSelected: function(service) {
209 - var select = Array();  
210 - for (var i_s = 0 ; i_s < this.services.length ; i_s++) {  
211 - if (this.services[i_s]['schema'] === service['id']) {  
212 - var columns = this.services[i_s]['columns'].split(',');  
213 - for (var i_c=0 ; i_c<this.gp_grid.columns.length ; i_c++) {  
214 - if (columns.indexOf(this.gp_grid.columns[i_c].dataIndex) != -1)  
215 - select.push(this.gp_grid.columns[i_c].dataIndex)  
216 - }  
217 - var filter = Array(  
218 - this.dpt_cb.value !== 'all' ? this.dpt_cb.value : null,  
219 - this.tn_cb.value !== 'all' ? this.dpt_cb.value : null,  
220 - Ext.getCmp('startTimeDF').rawValue !== '' ? this.dpt_cb.value : null,  
221 - Ext.getCmp('stopTimeDF').rawValue !== '' ? this.dpt_cb.value : null);  
222 - break; 315 + this.select = Array();
  316 + if (! service['id'] in this.services) {
  317 + throw service['id'] + ' not found in the list of services.';
  318 + return;
  319 + }
  320 +
  321 + var columns = this.services[service['id']]['columns'].split(',');
  322 + for (var i_c=0 ; i_c<this.gp_grid.columns.length ; i_c++) {
  323 + if (columns.indexOf(this.gp_grid.columns[i_c].dataIndex) != -1) {
  324 + this.select.push(this.gp_grid.columns[i_c].dataIndex);
223 } 325 }
224 } 326 }
225 - console.log("Getting granules of " + service['id'] + "...");  
226 - AmdaAction.epnTapGetGranules(service['id'], this.services[i_s]['accessurl'], filter, select, this.fillGranules); 327 + this.filter = Array(
  328 + this.dataproduct_type !== 'all' ? this.dataproduct_type : null, // dataproduct type
  329 + this.tn_cb.value !== 'all' ? this.tn_cb.value : null, // target name
  330 + Ext.getCmp('startTimeDF').getRawValue() !== '' ? Ext.getCmp('startTimeDF').getRawValue() : null, // start time
  331 + Ext.getCmp('stopTimeDF').getRawValue() !== '' ? Ext.getCmp('stopTimeDF').getRawValue() : null // stop time
  332 + );
  333 +
  334 + this.url = this.services[service['id']]['accessurl'];
  335 + this.db_name = service['id'];
  336 + var limit = Ext.getCmp('rowsPerPageNf').value;
  337 +
  338 + AmdaAction.epnTapGetGranules(this.db_name, this.url, this.filter, this.select, limit, 0, this.fillGranules);
  339 + AmdaAction.epnTapGetNbRows(this.db_name, this.url, this.filter, this.updatePage);
227 }, 340 },
228 341
229 onGranuleSelected: function(granule) { 342 onGranuleSelected: function(granule) {
@@ -232,6 +345,24 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, { @@ -232,6 +345,24 @@ Ext.define(&#39;amdaDesktop.EpnTapModule&#39;, {
232 345
233 /** @class Module initialisation. */ 346 /** @class Module initialisation. */
234 init: function() { 347 init: function() {
  348 + this.metadata = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/metadata.json', 'application/json'));
  349 + this.services = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/services.json', 'application/json'));
  350 + this.dpt_dic = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/dataproduct_types.json', 'application/json'));
  351 + this.mimetype_dic = JSON.parse(loadTextFileAjaxSync('../../generic_data/EpnTapData/mimetypes.json', 'application/json'));
  352 +
  353 + console.log(Object.keys(this.metadata).length + ' dataproduct types rรฉpertoriรฉs.');
  354 +
  355 + this.current_page = 0;
  356 + this.nb_rows = 0;
  357 + this.select = Array();
  358 + this.filter = Array();
  359 + this.url = '';
  360 + this.db_name = '';
  361 +
  362 + this.dataproduct_type = 'all';
  363 + this.target_name = 'all';
  364 +
  365 +
235 this.launcher = { 366 this.launcher = {
236 text: this.title, 367 text: this.title,
237 iconCls: this.icon, 368 iconCls: this.icon,
js/app/views/EpnTapUI.js
@@ -25,7 +25,7 @@ Ext.create(&#39;Ext.data.Store&#39;, { @@ -25,7 +25,7 @@ Ext.create(&#39;Ext.data.Store&#39;, {
25 25
26 Ext.create('Ext.data.Store', { 26 Ext.create('Ext.data.Store', {
27 storeId: 'services_store', 27 storeId: 'services_store',
28 - fields: ['id', 'nb_results'] 28 + fields: ['id', 'nb_results', 'shortname', 'title', 'accessurl']
29 }); 29 });
30 30
31 Ext.create('Ext.data.Store', { 31 Ext.create('Ext.data.Store', {
@@ -33,19 +33,130 @@ Ext.create(&#39;Ext.data.Store&#39;, { @@ -33,19 +33,130 @@ Ext.create(&#39;Ext.data.Store&#39;, {
33 fields:['dataproduct_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url'] 33 fields:['dataproduct_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url']
34 }); 34 });
35 35
36 -var serviceFilterPanel = {  
37 - id: 'serviceFilterPanel',  
38 - xtype: 'panel',  
39 - region : 'north',  
40 - layout: { type: 'hbox', pack: 'start', align: 'stretch' },  
41 - defaults: { margin: 5 },  
42 - items: [{ // Left part  
43 - xtype : 'container',  
44 - layout: 'form',  
45 - flex: 2,  
46 - items: [{ 36 +Ext.define('amdaUI.EpnTapUI', {
  37 + extend: 'Ext.container.Container',
  38 + alias: 'widget.panelEpnTap',
  39 +
  40 + txt_render: function(val) {
  41 + return '<p style="white-space: normal;">' + val + '</p>';
  42 + },
  43 + link_render: function(val) {
  44 + return '<a href="' + val + '">data</a>';
  45 + },
  46 + img_render: function(val) {
  47 + return '<img src="' + val + '">';
  48 + },
  49 + dpt_render: function(val) {
  50 + var dpt_dic = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).dpt_dic;
  51 + return (val in dpt_dic) ? '<p style="white-space: normal;">' + dpt_dic[val] + '</p>' : '<em>' + val + '</em>';
  52 + },
  53 + format_render: function(val) {
  54 + var mimetype_dic = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).mimetype_dic;
  55 + return (val in mimetype_dic) ? mimetype_dic[val] : '<em style="white-space: normal;">' + val + '</em>';
  56 + },
  57 + size_render: function(val) {
  58 + var size = parseInt(val);
  59 + if (isNaN(size)) {
  60 + return '';
  61 + } else if (size >= 1024*1024) {
  62 + return (size/(1024*1024)).toPrecision(3) + 'Go';
  63 + } else if (size >= 1024) {
  64 + return (size/1024).toPrecision(3) + 'Mo';
  65 + } else {
  66 + return size + 'Ko';
  67 + }
  68 + },
  69 +
  70 + constructor: function(config) {
  71 + this.init(config);
  72 + this.callParent(arguments);
  73 + },
  74 +
  75 +
  76 + init: function(config) {
  77 +
  78 + // *** Grids ***
  79 +
  80 + this.servicesGrid = new Ext.grid.Panel({
  81 + id: 'servicesGrid',
  82 + title: 'Services',
  83 + store: Ext.data.StoreManager.lookup('services_store'),
  84 + flex: 1,
  85 + columns: [
  86 + {text: 'Name', dataIndex: 'id', flex: 3},
  87 + {text: 'Results', dataIndex: 'nb_results', flex: 2}
  88 + ],
  89 + renderer: function(value, metadata,record) { return getExpandableImage(value, metadata,record); },
  90 + listeners: {
  91 + 'cellclick': function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {
  92 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onServiceSelected(record.data);
  93 + }
  94 + },
  95 + renderTo: Ext.getBody()
  96 + });
  97 +
  98 + var servicesGridView = this.servicesGrid.getView();
  99 + this.serviceTooltip = new Ext.tip.ToolTip({
  100 + id: 'serviceTooltip',
  101 + target: servicesGridView.el,
  102 + delegate: servicesGridView.itemSelector,
  103 + trackMouse: true,
  104 + listeners: {
  105 + beforeshow: function updateTipBody(tooltip) {
  106 + var service = servicesGridView.getRecord(tooltip.triggerElement);
  107 + var tt_content = '<h3>' + service.get('shortname') + '</h3>';
  108 + tt_content += '<p>' + service.get('title') + '</p>';
  109 + tt_content += '<p>' + service.get('accessurl') + '</p>';
  110 + tooltip.update(tt_content);
  111 + }
  112 + },
  113 + renderTo: Ext.getBody()
  114 + });
  115 +
  116 + this.granulesGrid = new Ext.grid.Panel({
  117 + id: 'granulesGrid',
  118 + title: 'Granules',
  119 + store: Ext.data.StoreManager.lookup('granules_store'),
  120 + flex: 5,
  121 + cls: 'epntap_granules',
  122 + columns: [
  123 + { text: 'Type', dataIndex: 'dataproduct_type', flex: 2, renderer: this.dpt_render },
  124 + { text: 'Target', dataIndex: 'target_name', flex: 2, renderer: this.txt_render },
  125 + { text: 'Time min', dataIndex: 'time_min', flex: 2, renderer: this.txt_render },
  126 + { text: 'Time max', dataIndex: 'time_max', flex: 2, renderer: this.txt_render },
  127 + { text: 'Format', dataIndex: 'access_format', flex: 2, renderer: this.format_render },
  128 + { text: 'uid', dataIndex: 'granule_uid', flex: 2, renderer: this.txt_render },
  129 + { text: 'Size', dataIndex: 'access_estsize', flex: 1, renderer: this.size_render },
  130 + { text: 'URL', dataIndex: 'access_url', flex: 1, renderer: this.link_render },
  131 + { text: 'Thumb.', dataIndex: 'thumbnail_url', flex: 1, renderer: this.img_render}
  132 + ],
  133 + listeners: {
  134 + 'cellclick': function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {
  135 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onGranuleSelected(record.data);
  136 + }
  137 + },
  138 + renderTo: Ext.getBody()
  139 + });
  140 +
  141 + var granulesGridView = this.granulesGrid.getView();
  142 + this.granuleTooltip = new Ext.tip.ToolTip({
  143 + id: 'granuleTooltip',
  144 + target: granulesGridView.el,
  145 + delegate: granulesGridView.itemSelector,
  146 + trackMouse: true,
  147 + listeners: {
  148 + beforeshow: function updateTipBody(tooltip) {
  149 + var thumb = granulesGridView.getRecord(tooltip.triggerElement).get('thumbnail_url');
  150 + tooltip.update('<img src="' + thumb + '">');
  151 + }
  152 + },
  153 + renderTo: Ext.getBody()
  154 + });
  155 +
  156 + // *** Service filter elements, left part ***
  157 +
  158 + this.productTypeCB = new Ext.form.field.ComboBox({
47 id: 'productTypeCB', 159 id: 'productTypeCB',
48 - xtype: 'combobox',  
49 fieldLabel: 'Product type', 160 fieldLabel: 'Product type',
50 store: Ext.data.StoreManager.lookup('productTypes_store'), 161 store: Ext.data.StoreManager.lookup('productTypes_store'),
51 queryMode: 'local', 162 queryMode: 'local',
@@ -55,13 +166,12 @@ var serviceFilterPanel = { @@ -55,13 +166,12 @@ var serviceFilterPanel = {
55 editable: false, 166 editable: false,
56 listeners: { 167 listeners: {
57 scope: window, 168 scope: window,
58 - 'select': function(store, records) {  
59 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onProductTypeCB();  
60 - } 169 + 'change': function(cb) { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onProductTypeCB(cb.value); }
61 } 170 }
62 - }, { 171 + });
  172 +
  173 + this.targetClassCB = new Ext.form.field.ComboBox({
63 id: 'targetClassCB', 174 id: 'targetClassCB',
64 - xtype: 'combobox',  
65 fieldLabel: 'Target class', 175 fieldLabel: 'Target class',
66 store: Ext.data.StoreManager.lookup('targetClasses_store'), 176 store: Ext.data.StoreManager.lookup('targetClasses_store'),
67 queryMode: 'local', 177 queryMode: 'local',
@@ -71,13 +181,12 @@ var serviceFilterPanel = { @@ -71,13 +181,12 @@ var serviceFilterPanel = {
71 editable: false, 181 editable: false,
72 listeners: { 182 listeners: {
73 scope: window, 183 scope: window,
74 - 'select': function(store, records) {  
75 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onTargetClassCB();  
76 - } 184 + 'select': function(store, records) { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onTargetClassCB(records[0]['internalId']); }
77 } 185 }
78 - }, { 186 + });
  187 +
  188 + this.targetNameCB = new Ext.form.field.ComboBox({
79 id: 'targetNameCB', 189 id: 'targetNameCB',
80 - xtype: 'combobox',  
81 fieldLabel: 'Target name', 190 fieldLabel: 'Target name',
82 store: Ext.data.StoreManager.lookup('targetNames_store'), 191 store: Ext.data.StoreManager.lookup('targetNames_store'),
83 queryMode: 'local', 192 queryMode: 'local',
@@ -91,149 +200,153 @@ var serviceFilterPanel = { @@ -91,149 +200,153 @@ var serviceFilterPanel = {
91 forceSelection: true, 200 forceSelection: true,
92 listeners: { 201 listeners: {
93 scope: window, 202 scope: window,
94 - 'select': function(store, records) {  
95 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onTargetNameCB();  
96 - } 203 + 'select': function(store, records) { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onTargetNameCB(records[0]['internalId']);}
97 } 204 }
98 - }]  
99 - }, { // Right part  
100 - xtype : 'container',  
101 - layout: 'form',  
102 - flex: 2,  
103 - items: [{ 205 + });
  206 +
  207 + // *** Service filter elements, right part ***
  208 +
  209 + this.startTimeDF = new Ext.form.field.Date({
104 id: 'startTimeDF', 210 id: 'startTimeDF',
105 - xtype: 'datefield',  
106 fieldLabel: 'Start time', 211 fieldLabel: 'Start time',
107 - name: 'start_time',  
108 - allowBlank:false  
109 - }, { 212 + format: 'Y/m/d H:i:s',
  213 + width: 100
  214 + });
  215 +
  216 + this.stopTimeDF = new Ext.form.field.Date({
110 id: 'stopTimeDF', 217 id: 'stopTimeDF',
111 - xtype: 'datefield',  
112 fieldLabel: 'Stop time', 218 fieldLabel: 'Stop time',
113 - name: 'stop_time',  
114 - allowBlank:false  
115 - }, {  
116 - id: 'searchServicesBtn',  
117 - xtype: 'button',  
118 - text: 'Search services',  
119 - handler: function() {  
120 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onSearchBtnClicked(); 219 + format: 'Y/m/d H:i:s',
  220 + width: 100
  221 + });
  222 +
  223 + this.durationPanel = new Ext.panel.Panel({
  224 + id: 'duration',
  225 + layout: { type: 'hbox', pack: 'start', align: 'stretch' },
  226 + border: false,
  227 + defaults: { width: 60, margin: '0, 5, 0, 5', xtype: 'numberfield'},
  228 + items: [{
  229 + id: 'days',
  230 + margin: '0, 5, 0, 0',
  231 + fieldLabel: 'Duration',
  232 + emptyText: 'Days',
  233 + width: 170
  234 + }, {
  235 + id: 'hours',
  236 + emptyText: 'Hours'
  237 + }, {
  238 + id: 'minutes',
  239 + emptyText: 'Min.'
  240 + }, {
  241 + id: 'seconds',
  242 + emptyText: 'Sec.'
  243 + }]
  244 + });
  245 +
  246 + this.rowPerPageNf = new Ext.form.field.Number({
  247 + id: 'rowsPerPageNf',
  248 + fieldLabel: 'Rows per page',
  249 + margin: '4 0 4 0',
  250 + width: 160,
  251 + height: 20,
  252 + value: 20,
  253 + minValue: 1,
  254 + maxValue: 500,
  255 + listeners: {
  256 + 'change': function(newValue, oldValue) { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).updateRowsPerPage(newValue); }
121 } 257 }
122 - }]  
123 - }]  
124 -}  
125 -  
126 -var servicesPanel = {  
127 - id: 'servicesPanel',  
128 - xtype : 'grid',  
129 - title: 'Services',  
130 - multiSelect: true,  
131 - store: Ext.data.StoreManager.lookup('services_store'),  
132 - flex: 1,  
133 - columns: [  
134 - {text: 'Name', dataIndex: 'id', flex: 1},  
135 - {text: 'Results', dataIndex: 'nb_results', flex: 1}  
136 - ],  
137 - renderer: function(value, metadata,record) {  
138 - return getExpandableImage(value, metadata,record);  
139 - },  
140 - listeners: {  
141 - 'cellclick': function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {  
142 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onServiceSelected(record.data);  
143 - }  
144 - }  
145 -}  
146 -  
147 -var txt_render = function(val) { return '<p style="white-space: normal;">' + val + '</p>'; };  
148 -var link_render = function(val) { return '<a href="' + val + '">get</a>'; };  
149 -var img_render = function(val) { return '<img src="' + val + '">' };  
150 -  
151 -var granulesPanel = Ext.create('Ext.grid.Panel', {  
152 - id: 'granulesPanel',  
153 - title: 'Granules',  
154 - store: Ext.data.StoreManager.lookup('granules_store'),  
155 - flex: 3,  
156 - cls: 'epntap_granules',  
157 - columns: [  
158 - { text: 'Type', dataIndex: 'dataproduct_type', flex: 1, renderer: txt_render },  
159 - { text: 'Target', dataIndex: 'target_name', flex: 2, renderer: txt_render },  
160 - { text: 'Time min', dataIndex: 'time_min', flex: 2, renderer: txt_render },  
161 - { text: 'Time max', dataIndex: 'time_max', flex: 2, renderer: txt_render },  
162 - { text: 'Format', dataIndex: 'access_format', flex: 2, renderer: txt_render },  
163 - { text: 'uid', dataIndex: 'granule_uid', flex: 2, renderer: txt_render },  
164 - { text: 'Size', dataIndex: 'access_estsize', flex: 2, renderer: txt_render },  
165 - { text: 'URL', dataIndex: 'access_url', flex: 1, renderer: link_render },  
166 - { text: 'Thumbnail', dataIndex: 'thumbnail_url', flex: 2, renderer: img_render}  
167 - ],  
168 - listeners: {  
169 - 'cellclick': function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {  
170 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onGranuleSelected(record.data);  
171 - }  
172 - },  
173 - renderTo: Ext.getBody()  
174 -}); 258 + });
175 259
176 -var tooltip = Ext.create('Ext.tip.ToolTip', {  
177 - target: granulesPanel.getView().el,  
178 - delegate: granulesPanel.getView().itemSelector,  
179 - trackMouse: true,  
180 - renderTo: Ext.getBody(),  
181 - listeners: {  
182 - beforeshow: function updateTipBody(tip) {  
183 - var thumb = granulesPanel.getView().getRecord(tooltip.triggerElement).get('thumbnail_url');  
184 - tooltip.update('<img src="' + thumb + '">');  
185 - }  
186 - }  
187 -}); 260 + // *** Panels ***
188 261
189 -var mainPanel = {  
190 - id: 'mainPanel',  
191 - xtype: 'panel',  
192 - region: 'center',  
193 - height: 350,  
194 - layout: { type: 'hbox', pack: 'start', align: 'stretch' },  
195 - items: [ servicesPanel, granulesPanel ],  
196 - listeners: {  
197 - afterrender: function() {  
198 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onWindowLoaded();  
199 - }  
200 - }  
201 -}  
202 -  
203 -var infoPanel = {  
204 - id: 'infoPanel',  
205 - xtype : 'panel',  
206 - region: 'south',  
207 - title: 'Information',  
208 - collapsible: true,  
209 - flex: 0,  
210 - height: 100,  
211 - autoHide: false,  
212 - bodyStyle: 'padding: 5px',  
213 - iconCls: 'icon-information',  
214 - loader: { autoLoad: true, url: helpDir + 'epnTapHOWTO' }  
215 -} 262 + this.pageSelectPanel = new Ext.panel.Panel({
  263 + id: 'pageSelect',
  264 + border: false,
  265 + margin: '2 0 2 50',
  266 + defaults: { margin: '0 5 0 5', width: 20, xtype: 'button', disabled: true},
  267 + items: [{
  268 + xtype: 'label',
  269 + text: 'Page:'
  270 + }, {
  271 + id: 'previousPageBtn',
  272 + text: '|<',
  273 + handler: function() { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onFirstPageBtnClicked(); }
  274 + }, {
  275 + id: 'firstPageBtn',
  276 + text: '<',
  277 + handler: function() { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onPreviousPageBtnClicked(); }
  278 + }, {
  279 + xtype: 'label',
  280 + id: 'pageLb',
  281 + text: '0/0'
  282 + }, {
  283 + id: 'nextPageBtn',
  284 + text: '>',
  285 + handler: function() { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onNextPageBtnClicked(); }
  286 + }, {
  287 + id: 'lastPageBtn',
  288 + text: '>|',
  289 + handler: function() { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onLastPageBtnClicked(); }
  290 + }]
  291 + });
216 292
217 -Ext.define('amdaUI.EpnTapUI', {  
218 - extend: 'Ext.container.Container',  
219 - alias: 'widget.panelEpnTap', 293 + this.granulePagePanel = new Ext.panel.Panel({
  294 + id: 'granulePagePanel',
  295 + layout: { type: 'hbox', pack: 'start', align: 'stretch' },
  296 + border: false,
  297 + items: [this.rowPerPageNf, this.pageSelectPanel]
  298 + });
220 299
221 - constructor: function(config) {  
222 - this.init(config);  
223 - this.callParent(arguments);  
224 - }, 300 + this.serviceFilterPanel = new Ext.panel.Panel({
  301 + id: 'serviceFilterPanel',
  302 + region : 'north',
  303 + layout: { type: 'hbox', pack: 'start', align: 'stretch' },
  304 + defaults: { margin: 5 },
  305 + items: [{ // Left part
  306 + xtype : 'container',
  307 + layout: 'form',
  308 + flex: 2,
  309 + items: [ this.productTypeCB, this.targetClassCB, this.targetNameCB ]
  310 + }, { // Right part
  311 + xtype : 'container',
  312 + layout: 'form',
  313 + flex: 2,
  314 + items: [ this.startTimeDF, this.stopTimeDF, this.durationPanel, this.granulePagePanel ]
  315 + }]
  316 + });
  317 +
  318 + this.gridsPanel = new Ext.panel.Panel({
  319 + id: 'gridsPanel',
  320 + region: 'center',
  321 + height: 350,
  322 + layout: { type: 'hbox', pack: 'start', align: 'stretch' },
  323 + items: [ this.servicesGrid, this.granulesGrid ],
  324 + listeners: {
  325 + afterrender: function() { myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.epntap.id).onWindowLoaded(); }
  326 + }
  327 + });
  328 +
  329 + this.infoPanel = new Ext.panel.Panel({
  330 + id: 'infoPanel',
  331 + region: 'south',
  332 + title: 'Information',
  333 + collapsible: true,
  334 + flex: 0,
  335 + height: 100,
  336 + autoHide: false,
  337 + bodyStyle: 'padding: 5px',
  338 + iconCls: 'icon-information',
  339 + loader: { autoLoad: true, url: helpDir + 'epnTapHOWTO' }
  340 + });
225 341
226 - init : function(config) {  
227 var myConf = { 342 var myConf = {
228 - width: 800, 343 + width: 1000,
229 height: 550, 344 height: 550,
230 layout: 'border', 345 layout: 'border',
231 - items: [  
232 - serviceFilterPanel,  
233 - mainPanel,  
234 - infoPanel  
235 - ] 346 + items: [ this.serviceFilterPanel, this.gridsPanel, this.infoPanel ]
236 }; 347 };
  348 +
237 Ext.apply(this, Ext.apply(arguments, myConf)); 349 Ext.apply(this, Ext.apply(arguments, myConf));
  350 +
238 } 351 }
239 }); 352 });