all repo diff at stage page

This commit is contained in:
sbcgua 2016-10-14 22:09:03 +02:00
parent e5361702cb
commit 3ee89b3dfc
3 changed files with 23 additions and 6 deletions

View File

@ -221,6 +221,7 @@ CLASS lcl_html_action_utils IMPLEMENTATION.
CLEAR: ev_key, eg_file, eg_object.
lt_fields = cl_http_utility=>if_http_utility~string_to_fields( |{ iv_string }| ).
field_keys_to_upper( CHANGING ct_fields = lt_fields ).
get_field( EXPORTING name = 'KEY' it = lt_fields CHANGING cv = ev_key ).

View File

@ -56,7 +56,6 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
super->constructor( ).
ASSERT is_file IS SUPPLIED OR is_object IS SUPPLIED.
ASSERT is_file IS INITIAL OR is_object IS INITIAL. " just one passed
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
@ -70,14 +69,29 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
iv_path = is_file-path
iv_filename = is_file-filename ).
ELSE. " is_object is supplied
ELSEIF is_object IS NOT INITIAL.
lt_results = lo_repo->status( ).
LOOP AT lt_results ASSIGNING <ls_result>
WHERE obj_type = is_object-obj_type
AND obj_name = is_object-obj_name
AND match IS INITIAL.
AND obj_name = is_object-obj_name
AND match IS INITIAL.
append_diff( it_remote = lt_remote
it_local = lt_local
iv_path = <ls_result>-path
iv_filename = <ls_result>-filename ).
ENDLOOP.
ELSE. " For the whole repo
lt_results = lo_repo->status( ).
LOOP AT lt_results ASSIGNING <ls_result>
WHERE obj_type IS NOT INITIAL
AND match IS INITIAL.
append_diff( it_remote = lt_remote
it_local = lt_local

View File

@ -150,8 +150,10 @@ CLASS lcl_gui_page_stage IMPLEMENTATION.
LOOP AT ms_files-local ASSIGNING <ls_local>.
AT FIRST.
ro_html->add('<thead><tr>').
ro_html->add('<th></th><th colspan="3">LOCAL</th>' ).
ro_html->add('</tr></thead>').
ro_html->add('<th></th><th colspan="2">LOCAL</th><th>' ).
ro_html->add_anchor( iv_txt = |{ lines( ms_files-local ) } diffs|
iv_act = |{ gc_action-go_diff }?key={ mo_repo->get_key( ) }| ).
ro_html->add('</th></tr></thead>').
ro_html->add('<tbody class="local">').
ENDAT.