All files / src/ui/flow zcl_abapgit_gui_page_flowcons.clas.abap

100% Statements 102/102
100% Branches 0/0
100% Functions 0/0
100% Lines 102/102

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1031x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS zcl_abapgit_gui_page_flowcons DEFINITION
  PUBLIC
  INHERITING FROM zcl_abapgit_gui_component
  FINAL
  CREATE PRIVATE .
 
  PUBLIC SECTION.
 
    INTERFACES zif_abapgit_gui_event_handler .
    INTERFACES zif_abapgit_gui_renderable .
    INTERFACES zif_abapgit_gui_menu_provider .
 
    CLASS-METHODS create
      IMPORTING
        ii_repo        TYPE REF TO zif_abapgit_repo_online
      RETURNING
        VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
      RAISING
        zcx_abapgit_exception .
 
    METHODS constructor
      IMPORTING
        ii_repo TYPE REF TO zif_abapgit_repo_online
      RAISING
        zcx_abapgit_exception .
 
  PROTECTED SECTION.
  PRIVATE SECTION.
 
    DATA mo_repo TYPE REF TO zif_abapgit_repo_online.
 
ENDCLASS.
 
 
 
CLASS ZCL_ABAPGIT_GUI_PAGE_FLOWCONS IMPLEMENTATION.
 
 
  METHOD constructor.
    super->constructor( ).
    mo_repo = ii_repo.
  ENDMETHOD.
 
 
  METHOD create.
 
    DATA lo_component TYPE REF TO zcl_abapgit_gui_page_flowcons.
 
    CREATE OBJECT lo_component EXPORTING ii_repo = ii_repo.
 
    ri_page = zcl_abapgit_gui_page_hoc=>create(
      iv_page_title         = 'Flow Consolidate'
      ii_page_menu_provider = lo_component
      ii_child_component    = lo_component ).
 
  ENDMETHOD.
 
 
  METHOD zif_abapgit_gui_event_handler~on_event.
* the back button is handled in the default router
    RETURN.
  ENDMETHOD.
 
 
  METHOD zif_abapgit_gui_menu_provider~get_menu.
 
    ro_toolbar = zcl_abapgit_html_toolbar=>create( 'toolbar-flow' ).
 
    ro_toolbar->add(
      iv_txt = 'Back'
      iv_act = zif_abapgit_definitions=>c_action-go_back ).
 
  ENDMETHOD.
 
 
  METHOD zif_abapgit_gui_renderable~render.
 
    DATA ls_consolidate TYPE zif_abapgit_flow_logic=>ty_consolidate.
    DATA lv_error       TYPE string.
 
    register_handlers( ).
 
    CREATE OBJECT ri_html TYPE zcl_abapgit_html.
    ri_html->add( '<div class="repo-overview">' ).
 
    ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top(
      ii_repo                 = mo_repo
      iv_interactive_favorite = abap_false
      iv_show_commit          = abap_false
      iv_show_branch          = abap_false ) ).
 
    ls_consolidate = zcl_abapgit_flow_logic=>consolidate( ).
    LOOP AT ls_consolidate-errors INTO lv_error.
      ri_html->add( zcl_abapgit_gui_chunk_lib=>render_error( iv_error = lv_error ) ).
    ENDLOOP.
 
    ri_html->add( 'todo' ).
 
    ri_html->add( '</div>' ).
 
  ENDMETHOD.
ENDCLASS.