24. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/22/2017 10:29:11 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

24.1 Files compared

# Location File Last Modified
1 RAMS_CIF.zip\RAMS_CIF\RAMS_CIF\scripts\RAMS_SQA_Deployment_Files_V3_20150128\rams-ui\Production Environment RAMS-UI\js dynamicHome.js Thu Jun 22 12:35:46 2017 UTC
2 RAMS_CIF.zip\RAMS_CIF\RAMS_CIF\scripts\RAMS_SQA_Deployment_Files_V3_20150128\rams-ui\Production Environment RAMS-UI\js dynamicHome.js Thu Jun 22 14:34:06 2017 UTC

24.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 280
Changed 2 4
Inserted 0 0
Removed 0 0

24.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

24.4 Active regular expressions

No regular expressions were active.

24.5 Comparison detail

  1   /********* ********** ********** ********** ********** **
  2   E1.1.0 RAM  Increment  1 Patch C ode
  3   January 20 15
  4   Department  of Vetera n's Affair s/Booz All en Hamilto n
  5   dynamicDas hboard.js
  6   ********** ********** ********** ********** ********** */
  7  
  8   //Linking  in the sql  database
  9   var restPa th = "http :// SERVER : PORT /RAMS-0.0. 1/";
  10   //Linking  in the sha repoint si te
  11   var siteUr l = "http: // SERVE R
/sites/IRB Applicatio ns/";
  12  
  13   //globals  that have  to be shar ed between  functions
  14   var retrie vedUser, i d;
  15       
  16   function p rocess(){
  17       //load ing connec tion to sh arepoint
  18       var cl ientContex t = new SP .ClientCon text(siteU rl);
  19       
  20       this.w ebsite = c lientConte xt.get_web ();
  21       this.c urrentUser _SP = webs ite.get_cu rrentUser( );
  22       client Context.lo ad(current User_SP);
  23       //tryi ng to grab  username  informatio n from sha repoint
  24       client Context.ex ecuteQuery Async(Func tion.creat eDelegate( this, this .userQuery Succeeded) , Function .createDel egate(this , this.use rQueryFail ed));
  25   };
  26  
  27   //When we  know that  we have su ccessfully  retrieved  a usernam e from
  28   //sharepon it, then w e can set  up the bas eline info rmation th at is need ed.
  29   function u serQuerySu cceeded(se nder, args ) {
  30       var us ername_SP,  split;
  31       
  32       //pars ing out th e needed u sername fr om sharepo int
  33       userna me_SP = cu rrentUser_ SP.get_log inName();
  34       split  = username _SP.split( "\\");
  35       retrie vedUser =  split[1];
  36           
  37       id = 1 ;
  38  
  39       checkU ser();
  40  
  41       $('.st art').attr ("href", " irb-applic ations-gen eral.html? " + id + " ?" + retri evedUser);
  42           $( '.start'). html("Star t IRB Appl ication");
  43   };
  44  
  45   function u serQueryFa iled(sende r, args) {
  46       alert( 'request f ailed ' +  args.get_m essage() +  '\n' + ar gs.get_sta ckTrace()) ;
  47   };
  48  
  49   //checks t o see if t he current  user is i n the sql  database
  50   function c heckUser() {
  51       var us ers;
  52       var us erTable =  new HashSe t();
  53  
  54       //grab bing all t he users i n the data base and f ormatting  the reciev ed JSON
  55       users  = sendREST ("GET", "u ser", null , false);
  56       if(use rs.user.le ngth === u ndefined)
  57           us ers.user =  [users.us er];
  58  
  59       //chec king to se e if the u ser is in  the sql da tabase
  60       for(va r i=0; i<u sers.user. length; i+ +){
  61           us erTable.ad d(users.us er[i].disp layName);
  62       }
  63  
  64       if(!us erTable.co ntains(ret rievedUser )){
  65           va r addUser  = {
  66                "display Name": ret rievedUser ,
  67                "loginNa me": curre ntUser_SP. get_title( ),
  68                "permane ntLoginIde ntifier":  retrievedU ser,
  69                "usersID ": current User_SP.ge t_id()
  70           };
  71  
  72           va r data = {
  73                "user":  addUser
  74           };
  75  
  76           se ndREST("PO ST", "mana ge/user",  data, fals e);
  77       }
  78   };
  79  
  80   //connects  to a rest  endpoint  and either  sends or
  81   //recieves  data
  82   function s endREST(ht tpMethod,  endpoint,  data, sync ){
  83       var xm lResponse;
  84  
  85       //acco unting for  internet  explorer's  needs
  86       if(win dow.XMLHtt pRequest){
  87           xm lResponse  = new XMLH ttpRequest ();
  88       }else{
  89           xm lResponse  = new Acti veXObject( "Microsoft .XMLHTTP") ;
  90       }
  91  
  92       try{
  93           // setting up  general h eaders
  94           xm lResponse. open(httpM ethod, res tPath.conc at(endpoin t), sync);
  95           xm lResponse. setRequest Header("Co ntent-Type ", "applic ation/json ");
  96  
  97           if ((httpMeth od == "PUT ")||(httpM ethod == " DELETE")){
  98                xmlRespo nse.setReq uestHeader ("sm_user" , data);
  99                xmlRespo nse.send(n ull);
  100  
  101                //204 is  the respo nse status  indicatin g success,  while
  102                //403 in dicates fa ilure
  103                if(xmlRe sponse.sta tus === 20 4){
  104                    retu rn true;
  105                }else if (xmlRespon se.status  === 403){
  106                    retu rn false;
  107                }
  108           }
  109           if (httpMetho d == "POST "){
  110                try{
  111                    //se nding data
  112                    xmlR esponse.se nd(JSON.st ringify(da ta));
  113                }catch(e ){
  114                    aler t(e.toStri ng());
  115                }
  116           }
  117           if (httpMetho d == "GET" ){
  118                //retrie ving the n eeded data
  119                xmlRespo nse.onread ystatechan ge = funct ion(){
  120                    if(x mlResponse .readyStat e === 4){
  121                         if(xmlResp onse.statu s === 200) {
  122                             try{
  123                                 xm lResponse  = JSON.par se(xmlResp onse.respo nseText);
  124  
  125                             }catch (e){
  126                                 al ert(e.toSt ring());
  127                             }
  128  
  129                         }else{
  130                             alert( xmlRespons e.statusTe xt);
  131                         }
  132                    }
  133                };
  134                xmlRespo nse.send(n ull);
  135                //passin g the need ed data to  the funct ion that i s requesti ng it
  136                return x mlResponse ;
  137           }
  138  
  139       }catch (e){
  140           al ert(e.toSt ring());
  141       }
  142   };