import React from 'react'
const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/'
//const ROOT = 'http://10.139.14.212:8000/'
export const API_ROOT = ROOT + 'api/v0/'
export const OLD_API = ROOT

export const analyses = [{
  'analysis':'subtyping',
  'description':'Serotype, Virulence Factors, Antimicrobial Resistance',
  'text':(
    <p>
      Upload genome files & determine associated subtypes.
      <br></br>
      Subtyping is powered by <a href="https://github.com/phac-nml/ecoli_serotyping">ECTyper</a>.
      AMR is powered by <a href="https://card.mcmaster.ca/analyze/rgi">CARD</a>.
    </p>
  )
},{
  'analysis':'fishers',
  'description':"Group comparisons using Fisher's Exact Test",
  'text':'Select groups from uploaded genomes & compare for a chosen target datum.'
}]

export const createErrorMessage = (jobId, msg='') => {
  const message = <div>
    <p style={{'color': 'red'}}>
      ERROR WITH JOB: {jobId}
    </p>
    <p>
      {msg}
    </p>
  </div>
  return message
}

@@ -243,16 +243,132 @@
 es = %5B%7B%0A
+  'analysis': 'database',%0A  'description': 'View all entries currently loaded into the database.',%0A  'text': ''%0A%7D,%7B%0A
   'analy

support for viewing database status