This page gathers progress works lead during Q1 and Q2 2012 to develop generic web portal for OAR eco-system. See Web Portal proposal for the context.

Participants

  • Benjamin Galaud: Projet M1 WIC
  • Olivier Richard

ExtJS 3 Prototype version

  • KVM image:
  wget http://oar.imag.fr/live/oar-devel-poar-amd64.qcow2
  sudo kvm -m 512 -redir tcp:2222::22 -redir tcp:8080::80  -redir tcp:4343::443 oar-devel-poar-amd64.qcow2
  firefox http://localhost:8080/poar/poar.htm

Todo

  • Porting extj3 portal prototype to extj4
  • History Support (see Ext.History in poar extjs 3 version)
  • User Login and service access (see below http-basic-auth)
  • User Preference (?)
  • Coffeescript

Technicals Notes

http basic auth (in-ajax)

  http://coderseye.com/2007/how-to-do-http-basic-auth-in-ajax.html
  How to do HTTP Basic Auth in Ajax
  --------------------------------------
  function make_base_auth(user, password) {
    var tok = user + ':' + pass;
    var hash = Base64.encode(tok);
    return "Basic " + hash;
  

Step 3

Use it in your Ajax call.

  var auth = make_basic_auth('me','mypassword');
  var url = 'http://example.com'

RAW

  xml = new XMLHttpRequest();
  xml.setRequestHeader('Authorization', auth);
  xml.open('GET',url)
  // ExtJS
  Ext.Ajax.request({
    url : url,
    method : 'GET',
    headers : { authorization : auth }
  })

jQuery

  $.ajax({
    url : url,
    method : 'GET',
    beforeSend : function(req) {
        req.setRequestHeader('Authorization', auth);
    }
  })
wiki/old/web_portal_2012.txt · Last modified: 2013/07/10 20:53 by 127.0.0.1
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki