<commit_before>/**
 * Copyright © 2011-2013 EMBL - European Bioinformatics Institute
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.  
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * searchAndFacetConfig: definition of variables for the search and facet 
 * see searchAndFacet directory
 * 
 * Author: <NAME>
 * 
 */
 
MPI2 = {};
MPI2.buttCount = 0;
	
MPI2.searchAndFacetConfig = {};
var config = MPI2.searchAndFacetConfig;

// on drupal side this is not available
if ( typeof solrUrl == 'undefined' ){
	var domain = document.domain;
	if ( /^beta/.test(domain) ){		
		solrUrl = '/mi/impc/beta/solr';
	}
	else if ( /^dev/.test(domain) ){	
		solrUrl = '/mi/impc/dev/solr';
	}
	else {
		solrUrl = '/mi/impc/solr';
	}
}
if ( typeof baseUrl == 'undefined' ){
	baseUrl = '/phenotype-archive';
}

config.cores = ['gene', 'mp', 'pipeline', 'images'];
config.restfulPrefix = {
		'gene' : 'genes',
		'mp'   : 'phenotypes'
};

//config.solrBaseURL_bytemark = 'http://dev.mousephenotype.org/bytemark/solr/';
config.solrBaseURL_bytemark = solrUrl + '/';
config.solrBaseURL_ebi = solrUrl + '/';

config.spinner = "<img src='img/loading_small.gif' /> Processing search ...";
config.spinnerExport = "<img src='img/loading_small.gif' /> Processing data for export, please do not interrupt ... ";
config.endOfSearch = "Search result";

// custom 404 page does not know about baseUrl
var path = window.location.pathname.replace(/^\//,"");
path = '/' + path.substring(0, path.indexOf('/'));
//var trailingPath = '/searchAndFacet';
var trailingPath = '/search';
var trailingPathDataTable = '/dataTable';

config.pathname = typeof baseUrl == 'undefined' ? path + trailingPath : baseUrl + trailingPath;
config.dataTablePath = typeof baseUrl == 'undefined' ? path + trailingPathDataTable : baseUrl + trailingPathDataTable;
		
config.facetParams = {	
	 geneFacet:      {
		 type: 'genes',			
		 solrCoreName: 'gene',			 
		 tableCols: 3, 
		 tableHeader: "<thead><th>Gene</th><th>Latest Status</th><th>Register for Updates</th></thead>",
		 fq: undefined,
		 gridName: 'geneGrid',
		 gridFields: 'marker_symbol,synonym,marker_name', // should include status soon
		 params: {'sort': "marker_symbol asc"}	 
	 },	
	 pipelineFacet: {		
		 type: 'procedures',		 
		 solrCoreName: 'pipeline',			
		 tableCols: 3, 
		 tableHeader: '<thead><th>Parameter</th><th>Procedure</th><th>Pipeline</th></thead>', 
		 fq: "pipeline_stable_id:IMPC_001", 
		 qf: 'auto_suggest', 
		 defType: 'edismax',
		 wt: 'json',
		 gridFields: 'parameter_name,procedure_name,pipeline_name',
		 gridName: 'pipelineGrid',	
		 params:{'fq': 'pipeline_stable_id:IMPC_001'}	 
	 },	
	 mpFacet: {	
		 type: 'phenotypes',
		 solrCoreName: 'mp', 
		 tableCols: 2, 
		 tableHeader: '<thead><th>Phenotype</th><th>Definition</thead>', 
		 fq: "ontology_subset:*", 
		 qf: 'auto_suggest', <commit_msg>Adding new file to Git<commit_after>/**
 * Copyright © 2011-2013 EMBL - European Bioinformatics Institute
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.  
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * searchAndFacetConfig: definition of variables for the search and facet 
 * see searchAndFacet directory
 * 
 * Author: <NAME>
 * 
 */


if(typeof(window.MPI2) === 'undefined') {
    window.MPI2 = {};
}
MPI2.buttCount = 0;
	
MPI2.searchAndFacetConfig = {};
var config = MPI2.searchAndFacetConfig;


// on drupal side this is not available
if ( typeof solrUrl == 'undefined' ){
	var domain = document.domain;
	if ( /^beta/.test(domain) ){		
		solrUrl = '/mi/impc/beta/solr';
	}
	else if ( /^dev/.test(domain) ){	
		solrUrl = '/mi/impc/dev/solr';	
	}
	else {
		solrUrl = '/mi/impc/solr';			
	}
}

if ( typeof baseUrl == 'undefined' ){
	baseUrl = '/phenotype-archive';
}

config.cores = ['gene', 'mp', 'pipeline', 'images'];
config.restfulPrefix = {
		'gene' : 'genes',
		'mp'   : 'phenotypes'
};

config.geneStatuses = ['Phenotype Data Available',
               'Mice Produced',
               'Assigned for Mouse Production and Phenotyping',
               'ES Cells Produced',
               'Assigned for ES Cell Production',
               'Not Assigned for ES Cell Production'];

//config.solrBaseURL_bytemark = 'http://dev.mousephenotype.org/bytemark/solr/';
config.solrBaseURL_bytemark = solrUrl + '/';
config.solrBaseURL_ebi = solrUrl + '/';

config.spinner = "<img src='img/loading_small.gif' /> Processing search ...";
config.spinnerExport = "<img src='img/loading_small.gif' /> Processing data for export, please do not interrupt ... ";
config.endOfSearch = "Search result";

// custom 404 page does not know about baseUrl
var path = window.location.pathname.replace(/^\//,"");
path = '/' + path.substring(0, path.indexOf('/'));
//var trailingPath = '/searchAndFacet';
var trailingPath = '/search';
var trailingPathDataTable = '/dataTable';

config.pathname = typeof baseUrl == 'undefined' ? path + trailingPath : baseUrl + trailingPath;
config.dataTablePath = typeof baseUrl == 'undefined' ? path + trailingPathDataTable : baseUrl + trailingPathDataTable;

config.facetParams = {	
	 geneFacet:      {
		 type: 'genes',			
		 solrCoreName: 'gene',			 
		 tableCols: 3, 
		 tableHeader: "<thead><th>Gene</th><th>Latest Status</th><th>Register for Updates</th></thead>",
		 fq: undefined,
		 gridName: 'geneGrid',
		 gridFields: 'marker_symbol,marker_synonym,marker_name,status', 
		 params: {fq:'marker_type:* -marker_type:"heritable phenotypic marker"',			      
			      qf:"marker_symbol^100.0 marker_name^10.0 allele^10 marker_synonym mgi_accession_id auto_suggest",
			      bq:'marker_type:"protein coding gene"^100'}	 
	 },	
	 pipelineFacet: {		
		 type: 'procedures',		 
		 solrCoreName: 'pipeline',			
		 tableCols: 3, 
		 tableHeader: '<thead><th>Parameter</th><th>Procedure</th><th>Pipeline</th></thead>', 
		 fq: "pipeline_stable_id:IMPC_001", 
		 qf: 'auto_suggest', 
		 defType: 'edismax',
		 wt: 'json',
		 gridFields: 'parameter_name,procedure_name,pipeline_name',
		 gridName: 'pipelineGrid',	
		 params:{'fq': 'pipeline_stable_id:IMPC_001'}	 
	 },	
	 mpFacet: {	
		 type: 'phenotypes',
		 solrCoreName: 'mp', 
		 tableCols: 2, 
		 tableHeader: '<thead><th>Phenotype</th><th>Definition</thead>', 
		 fq: "ontology_subset:*", 
		 qf: 'auto_suggest', 
{'fraction_non_alphanumeric': 0.1449741367258493, 'fraction_numerical': 0.010205508178386691, 'mean_word_length': 3.7757009345794392, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2767768', 'n_tokens_mistral': 2566, 'n_tokens_neox': 2290, 'n_words': 590}