572. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/6/2017 8:23:27 PM 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.

572.1 Files compared

# Location File Last Modified
1 OSCIF_CTT_v4_build 1.zip\rails_prisme\app\controllers utilities_controller.rb Wed May 31 03:59:06 2017 UTC
2 OSCIF_CTT_v4_build 1.zip\rails_prisme\app\controllers utilities_controller.rb Mon Jul 3 23:21:44 2017 UTC

572.2 Comparison summary

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

572.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

572.4 Active regular expressions

No regular expressions were active.

572.5 Comparison detail

  1   class Util itiesContr oller < Ap plicationC ontroller
  2     skip_aft er_action  :verify_au thorized
  3     skip_bef ore_action  :verify_a uthenticit y_token
  4  
  5     #warm up  apache
  6     def warm up
  7       @heade rs = {}
  8       @warmu p_count =  $PROPS['PR ISME.warmu p_apache'] .to_i
  9       reques t.headers. each do |e lem|
  10         @hea ders[elem. first.to_s ] = elem.l ast.to_s
  11       end
  12       respon d_to do |f ormat|
  13         form at.html #  list_heade rs.html.er b
  14         form at.json {  render :js on => para ms['counte r'] }
  15       end
  16     end
  17  
  18     #https:/ /DNS                     
  19     def time _stats
  20       stats  = request. headers['H TTP_APACHE _TIME']
  21   #    stats  = 'D=2265 716,t=1490 2865935183 05' #examp le ssoi he ader retur n value
  22       if sta ts
  23         stat s = stats. split(',') .map do |e | e.split( '=') end.t o_h
  24         dura tion_of_ap ache_reque st = stats ['D'].to_i /1000000.0
  25         epoc h_time = s tats['t']. to_i/10000 00.0
  26         apac he_to_rail s_delta =  (@req_star t_time - e poch_time) .round(3)
  27         mill is = apach e_to_rails _delta.mod ulo(1).rou nd(3).to_s .split('.' ).last.to_ i.to_s + ' ms'
  28         @del ta_time =  Applicatio nHelper.co nvert_seco nds_to_tim e(apache_t o_rails_de lta) + ' '  + millis
  29         mill is = durat ion_of_apa che_reques t.modulo(1 ).round(3) .to_s.spli t('.').las t.to_i.to_ s + 'ms'
  30         @apa che_time =  Applicati onHelper.c onvert_sec onds_to_ti me(duratio n_of_apach e_request)  + ' ' + m illis
  31       end
  32     end
  33  
  34     def log_ level
  35       level  = params[: level].to_ sym if Log ging::RAIL S_COMMON_L EVELS.incl ude? param s[:level]. to_sym
  36       if lev el.nil?
  37           render tex t: "Valid  log levels  are #{Log ging::RAIL S_COMMON_L EVELS.insp ect}.<br>< br>Sample  invocation : http://l ocalhost: PORT /utilities /log_level ?level=inf o"
  38         retu rn
  39       end
  40       ALL_LO GGERS.each  do |logge r|
  41         logg er.level=  level
  42       end
  43       render  text: "Ne w level se t"
  44     end
  45  
  46     def git_ not_availa ble
  47     end
  48  
  49     def nexu s_not_avai lable
  50     end
  51  
  52     def not_ configured
  53     end
  54  
  55     def term inology_co nfig_error
  56     end
  57  
  58     def brow ser_tz_off set
  59       tz = p arams[:tzO ffset]
  60       sessio n[:tzOffse t] = tz
  61       render  json: {st atus: 'don e'}
  62     end
  63  
  64     def pris me_config
  65       prisme _config =  PrismeUtil ities.serv er_config
  66       prisme _config.me rge!({'ait c_environm ent' => Pr ismeUtilit ies.aitc_e nvironment })
  67       render  :json =>  prisme_con fig
  68     end
  69  
  70       # http://l ocalhost: PORT /utilities /seed_data base?db=lo calhost
  71     def seed _services
  72       ret =  nil
  73       seeds  = []
  74       valid_ seeds = %w (localhost  va_dev_db  aitc_dev_ db aitc_sq a_db aitc_ test_db)
  75       db_see d = params [:db]
  76       v = $V ERBOSE
  77       $VERBO SE = nil
  78       if val id_seeds.i nclude?(db _seed)
  79         case  db_seed
  80           wh en 'localh ost'
  81              load './li b/dbseeds/ localhost. rb'
  82              seeds = Se edData::LO CALHOST
  83           wh en 'va_dev _db'
  84              load './li b/dbseeds/ va_dev_db. rb'
  85              seeds = Se edData::VA _DEV
  86           wh en 'aitc_d ev_db'
  87              load './li b/dbseeds/ aitc_dev_d b.rb'
  88              seeds = Se edData::AI TC_DEV
  89           wh en 'aitc_t est_db'
  90              load './li b/dbseeds/ aitc_test_ db.rb'
  91              seeds = Se edData::AI TC_TEST
  92           wh en 'aitc_s qa_db'
  93              load './li b/dbseeds/ aitc_sqa_d b.rb'
  94              seeds = Se edData::AI TC_SQA
  95           el se
  96              ret = 'A v alid key w as passed  but we hav e not crea ted the co rrespondin g file in  the lib/db seeds'
  97         end
  98         $VER BOSE = v
  99         unle ss ret
  100           re t = write_ service_se eds(seeds)
  101         end
  102       else
  103         ret  = 'bad dat abase seed  parameter  passed'
  104       end
  105  
  106       render  text: ret
  107     end
  108  
  109     private
  110  
  111     def setu p_time
  112       @req_s tart_time  = Time.now .to_f
  113     end
  114  
  115     def writ e_service_ seeds(seed s)
  116       # trun cate the t ables and  seed them
  117       Servic e.destroy_ all
  118       servic es = []
  119  
  120       seeds. each do |s vc|
  121         serv ice = Serv ice.create (svc[:serv ice])
  122         serv ices << se rvice
  123  
  124         svc[ :props].ea ch_with_in dex do |pr ops, idx|
  125           Se rvicePrope rty.create ({service_ id: servic e.id, orde r_idx: idx }.merge(pr ops))
  126         end
  127       end
  128  
  129       "<h1>C reated Ser vices!</h1 ><br>#{ser vices.map( &:to_json) }"
  130     end
  131   end