clearwing

changeset 209:61065c8da3b2

More VPHAS changes..Added db info list in query form
author Stelios <stv@roe.ac.uk>
date Mon Nov 13 19:11:05 2017 +0200 (2017-11-13)
parents e1e12d1f9048
children 61122d06a0d0
files src/static/static_getImage_form/js/getImage.js src/static/static_vo_tool/js/freeformJS.js src/survey_globals.py src/templates/dbaccess_SQL_form.html src/templates/dbaccess_login.html src/templates/releasehistory.html
line diff
     1.1 --- a/src/static/static_getImage_form/js/getImage.js	Mon Nov 13 16:13:13 2017 +0200
     1.2 +++ b/src/static/static_getImage_form/js/getImage.js	Mon Nov 13 19:11:05 2017 +0200
     1.3 @@ -746,6 +746,7 @@
     1.4    	});
     1.5     	
     1.6     	jQuery("#programmeID").change(function(){
     1.7 +           console.log(jQuery(this).val());
     1.8  
     1.9  	   if(jQuery(this).val()=="190")
    1.10  	   {    
    1.11 @@ -773,6 +774,7 @@
    1.12  	 });
    1.13  
    1.14  	jQuery("#database").change(function(){
    1.15 +           console.log(jQuery("#database option:selected").attr("class"));
    1.16  
    1.17  	   if(jQuery("#database option:selected").attr("class")=="190")
    1.18  	   {    
     2.1 --- a/src/static/static_vo_tool/js/freeformJS.js	Mon Nov 13 16:13:13 2017 +0200
     2.2 +++ b/src/static/static_vo_tool/js/freeformJS.js	Mon Nov 13 19:11:05 2017 +0200
     2.3 @@ -131,6 +131,7 @@
     2.4  
     2.5         		});
     2.6  
     2.7 +
     2.8         		/**
     2.9  			 * Send a Samp Message to highlight a row by its index (trNumber)
    2.10  			 * 
    2.11 @@ -554,7 +555,6 @@
    2.12  				                               jQuery('#content_dbaccess_SQL_form #loading_options').hide();
    2.13  				                               jQuery('#content_dbaccess_SQL_form #load').hide();	
    2.14  				                               var message = null;
    2.15 -				                               console.log(x, t, m);
    2.16  				                               if(t==="timeout") {
    2.17                                                      message = "The server reached a timeout (4 hours) while processing your request.";
    2.18                                                 } 
    2.19 @@ -1255,7 +1255,6 @@
    2.20  				                    	
    2.21  				                    },
    2.22  				                    success: function(data) {	
    2.23 -				                    	
    2.24  				                    	    if (!processing){
    2.25  				                    		    jQuery('#content_dbaccess_SQL_form #load').hide();
    2.26  				                        	}
    2.27 @@ -1289,7 +1288,6 @@
    2.28  							         	     	$('body').on('click','#facebox .delete, #facebox .add', function(e) {
    2.29  							         	     	    e.preventDefault();
    2.30  							         	     		item_a = $(this).parent();
    2.31 -							         	     		console.log(item_a);
    2.32  
    2.33  							         	     	   $( item_a).fadeOut(function() {
    2.34  							         	     	    
    2.35 @@ -1394,16 +1392,27 @@
    2.36  
    2.37  	       		var count = 0;
    2.38  	       		var db_list = [];
    2.39 +                        var dbinfotext ="<div id='dbinfotext' style='float:right;'>Selected Database List: <select id='dbinfotext' name='dbinfotext'>";
    2.40 +
    2.41 +                        var elementLength =  jQuery('#facebox #selected_catalogues li').length;
    2.42  	       		jQuery('#facebox #selected_catalogues li').each(function() {
    2.43  	       			
    2.44  	       			var name = jQuery(this).children('span').html();
    2.45  	       			var alias = jQuery(this).children('input:first').val();
    2.46  	       			var ident =  jQuery(this).find('input').eq(1).val();
    2.47  	       			count = count + 1;
    2.48 -	       			db_list.push({'name' : name, 'alias' : alias, 'ident' : ident })
    2.49 +	       			db_list.push({'name' : name, 'alias' : alias, 'ident' : ident });
    2.50 +				if (count<=elementLength){
    2.51 +                                    dbinfotext += '<option value="' + alias +'">' +  alias + '</option>';      
    2.52 +                                } else {
    2.53 +                                    dbinfotext += '<option value="' + alias +'" selected="">' +  alias + '</option>';
    2.54 +                                }
    2.55 +
    2.56  	       		});
    2.57 -	       	
    2.58 -	       		
    2.59 +
    2.60 +                        dbinfotext+="</select></div>"
    2.61 +	       		jQuery("#dbinfotext").replaceWith( dbinfotext );
    2.62 +
    2.63         			if (db_list==[]){
    2.64               		jQuery('#content_dbaccess_SQL_form #error').html("Please select from the list of catalogues");
    2.65  					jQuery('#content_dbaccess_SQL_form #error').fadeIn('normal');
     3.1 --- a/src/survey_globals.py	Mon Nov 13 16:13:13 2017 +0200
     3.2 +++ b/src/survey_globals.py	Mon Nov 13 19:11:05 2017 +0200
     3.3 @@ -28,16 +28,16 @@
     3.4  
     3.5  for i in FULL_SURVEYDBS:
     3.6      if i==PRIVATE_SURVEY_DB_VPHAS:
     3.7 -        db_options += '<option class="170" value="' + i + '">' + i + '</option>'  
     3.8 -        private_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
     3.9 -        region_db_options += '<option value="' + i + '">' + i + '</option>' 
    3.10 -        private_db_options_vphas += '<option class="170" value="' + i + '" selected>' + i + '</option>'
    3.11 -        region_db_options_vphas += '<option class="170" value="' + i + '" selected>' + i + '</option>'
    3.12 +        db_options += '<option class="190" value="' + i + '">' + i + '</option>'  
    3.13 +        private_db_options += '<option class="190" value="' + i + '">' + i + '</option>' 
    3.14 +        region_db_options += '<option class="190" value="' + i + '">' + i + '</option>' 
    3.15 +        private_db_options_vphas += '<option class="190" value="' + i + '" selected>' + i + '</option>'
    3.16 +        region_db_options_vphas += '<option class="190" value="' + i + '" selected>' + i + '</option>'
    3.17  
    3.18      else:
    3.19          db_options += '<option class="170" value="' + i + '">' + i + '</option>'  
    3.20          private_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
    3.21 -        region_db_options += '<option value="' + i + '">' + i + '</option>' 
    3.22 +        region_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
    3.23          private_db_options_vphas += '<option class="170" value="' + i + '">' + i + '</option>'
    3.24          region_db_options_vphas += '<option class="170" value="' + i + '">' + i + '</option>'
    3.25                 
    3.26 @@ -59,7 +59,11 @@
    3.27      region_db_options_vphas +=  '<option class="190" value="' + i + '">' + i + '</option>'
    3.28  
    3.29  
    3.30 -programmes = """<tr><td align="right"><b>Programme: </td></b><td> ATLAS (VST ATLAS) <input value="170" name="programmeID" type="hidden" /></td></tr>"""
    3.31 +programmes = """<tr><td align="right"><b>Programme: </td></b><td> <select id="programmeID" name="programmeID">
    3.32 +<option value="170" selected="">VST ATLAS
    3.33 +</option><option value="190">VPHAS: VST Photometric H-alpha Survey
    3.34 +</option></select>
    3.35 +</td></tr>"""
    3.36  #vphas_programmes = """<tr><td align="right"><b>Programme: </td></b><td> ATLAS (VST ATLAS) </td></tr>"""
    3.37  vphas_programmes = """<tr><td align="right"><b>Programme: </td></b><td> <select id="programmeID" name="programmeID">
    3.38  <option value="170">VST ATLAS
     4.1 --- a/src/templates/dbaccess_SQL_form.html	Mon Nov 13 16:13:13 2017 +0200
     4.2 +++ b/src/templates/dbaccess_SQL_form.html	Mon Nov 13 19:11:05 2017 +0200
     4.3 @@ -36,7 +36,7 @@
     4.4  		class="facebox_links" href="#sqlvsadqlNotes_div">ADQL or Native SQL?</a> ) page to help you decide which language to use.
     4.5  	   <br/>
     4.6  		    <b>Start by</b> selecting from the list of <b>available databases</b> and then send your query. <br />Use the metadata link to find names and info on available tables and columns.
     4.7 -	            <br/><b style="color:green">Please note</b>: <span style="font-style:italic;">If no database is selected, you will be able to query <b>$selected_catalogue_name </b> only, which is selected by default</span>
     4.8 +	            <br/><b style="color:green">Please note</b>: <span style="font-style:italic;">If no database is selected, you will be able to query <b>$selected_catalogue_name </b> only, which is selected by default <br/> To query the latest VPHAS version (<b>VPHASDR3</b>), import it using the Database(s) button</span>
     4.9  	
    4.10          
    4.11  
    4.12 @@ -73,6 +73,11 @@
    4.13  	          		 
    4.14  		        	<div id="bottom_buttons">
    4.15  				        	
    4.16 +                                                     <div id='dbinfotext' style='float:right;'>Selected Database List: 
    4.17 +                                                          <select id='dbinfotext' name='dbinfotext'>
    4.18 +                                                              <option value="$selected_catalogue_name" selected="">$selected_catalogue_name</option>
    4.19 +							  </select>
    4.20 +                                                     </div>
    4.21  						     <div class="sub_button toggle_metadata">
    4.22  							    <a id="toggle_metadata" >Metadata</a>
    4.23  						    </div>
     5.1 --- a/src/templates/dbaccess_login.html	Mon Nov 13 16:13:13 2017 +0200
     5.2 +++ b/src/templates/dbaccess_login.html	Mon Nov 13 19:11:05 2017 +0200
     5.3 @@ -52,6 +52,32 @@
     5.4  						}
     5.5                      			});
     5.6  
     5.7 +                                            jQuery.ajax({
     5.8 +                                                    type: "POST",
     5.9 +                                                    url: path + "dbaccess_SQL_form",
    5.10 +                                                    dataType: "text",
    5.11 +                                                    data: {endpoint_form : 'display', use_cached_endpoints : 1, endpoint_arrangement : 'freeform'},
    5.12 +                                                    timeout: 1000000,
    5.13 +                                                    error: function() {
    5.14 +
    5.15 +                                                    },
    5.16 +                                                    success: function(data) {
    5.17 +                                                     	 var json_data = jQuery.parseJSON(data);
    5.18 +                                                         var json_data_selected = json_data['selected'];
    5.19 +                        var dbinfotext ="<div id='dbinfotext' style='float:right;'>Selected Database List: <select id='dbinfotext' name='dbinfotext'>";
    5.20 +                        var selected_elements = jQuery(json_data_selected);
    5.21 +                        jQuery('input[name*=catalogue]', selected_elements).each(function() { 
    5.22 +
    5.23 +                                    dbinfotext += '<option value="' +  jQuery(this).val()  + '" selected="">' +  jQuery(this).val()  + '</option>';
    5.24 +
    5.25 +                        });
    5.26 +
    5.27 +                        dbinfotext+="</select></div>"
    5.28 +                        jQuery("#dbinfotext").replaceWith( dbinfotext );
    5.29 +
    5.30 +                                                    }
    5.31 +                                           });
    5.32 +
    5.33  
    5.34          			jQuery.ajax({
    5.35                                      type: "POST",
     6.1 --- a/src/templates/releasehistory.html	Mon Nov 13 16:13:13 2017 +0200
     6.2 +++ b/src/templates/releasehistory.html	Mon Nov 13 19:11:05 2017 +0200
     6.3 @@ -2,10 +2,11 @@
     6.4  
     6.5  <h2>Release history page</h2>
     6.6  <br/><br/>
     6.7 -<div>
     6.8 +<div> 
     6.9 +    <b>13 Nov 2017</b> - <i>VPHASDR3<i> : 
    6.10 +    VPHASS public release, including data up to 30 September 2015 (P95)
    6.11      <b>22 Feb 2017</b> - <i>VPHASv20170222</i>: 
    6.12 -    VPHAS release, including data up to 31 March 2015. There is an issue with the ordering of the r-band filters in the vphasMergeLog and vphasSource tables. See KnownIssues<br/><br/>
    6.13 -  
    6.14 +    VPHAS release, including data up to 31 March 2015. There is an issue with the ordering of the r-band filters in the vphasMergeLog and vphasSource tables. See KnownIssues<br/><br/>  
    6.15      <b>29 Apr 2016</b> - <i>ATLASv20160425</i>: 
    6.16      ATLAS proprietary release, including data up to 30 September 2015. <br/><br/>
    6.17      <b>12 Jan 2016</b> - <i>VPHASv20160112</i>: