mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Pre Filter Backend and GUI Logic (#5227)
* Initial * Adjustments * Router * Abaplint * abaplint * diff between eclipse and vscode * Multiple Adjustments * Split Backend And GUI Logic * Multiple Adjustments * No Unit Tests * abaplint * Rename ZCL_ABAPGIT_REPO_PRE_FILTER to ...TR * Multiple Adjustments * Refactor the OVP action links into a toolbar * abaplint * Replace BAPI_MSG by STRING * Rename Pre Filter to Object Filter * Rename Pre Filter also in abap_transpile.json * restore from main * Check if <ls_item>-li_class is filled in Toolbar * Adj. toolbars and move TR Req to zif_abapgit_popup * abaplint * Move ty_trrngtrkor_tt to zif_abapgit_definitions * abaplint * Move and rename filter menu entries Co-authored-by: Lars Hvam <larshp@hotmail.com> Co-authored-by: IBM <mbox-060-sap-extern-tbom@daimler.com> Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
This commit is contained in:
parent
d7cdb65243
commit
c932426b44
|
@ -6,7 +6,6 @@ CLASS zcl_abapgit_object_filter_tran DEFINITION
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
INTERFACES zif_abapgit_object_filter.
|
INTERFACES zif_abapgit_object_filter.
|
||||||
|
|
||||||
TYPES ty_trrngtrkor_tt TYPE RANGE OF trkorr.
|
|
||||||
TYPES: BEGIN OF ty_e071_filter,
|
TYPES: BEGIN OF ty_e071_filter,
|
||||||
pgmid TYPE tadir-pgmid,
|
pgmid TYPE tadir-pgmid,
|
||||||
object TYPE tadir-object,
|
object TYPE tadir-object,
|
||||||
|
@ -17,14 +16,14 @@ CLASS zcl_abapgit_object_filter_tran DEFINITION
|
||||||
METHODS set_filter_values
|
METHODS set_filter_values
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_package TYPE tadir-devclass
|
iv_package TYPE tadir-devclass
|
||||||
it_r_trkorr TYPE ty_trrngtrkor_tt
|
it_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
METHODS get_filter_values
|
METHODS get_filter_values
|
||||||
EXPORTING
|
EXPORTING
|
||||||
ev_package TYPE tadir-devclass
|
ev_package TYPE tadir-devclass
|
||||||
et_r_trkorr TYPE ty_trrngtrkor_tt.
|
et_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
METHODS adjust_local_filter
|
METHODS adjust_local_filter
|
||||||
|
@ -38,13 +37,13 @@ CLASS zcl_abapgit_object_filter_tran DEFINITION
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
DATA mt_filter TYPE zif_abapgit_definitions=>ty_tadir_tt .
|
DATA mt_filter TYPE zif_abapgit_definitions=>ty_tadir_tt .
|
||||||
DATA mt_r_trkorr TYPE ty_trrngtrkor_tt .
|
DATA mt_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt .
|
||||||
DATA mv_package TYPE tadir-devclass.
|
DATA mv_package TYPE tadir-devclass.
|
||||||
|
|
||||||
METHODS generate_local_filter
|
METHODS generate_local_filter
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_package TYPE tadir-devclass
|
iv_package TYPE tadir-devclass
|
||||||
it_r_trkorr TYPE ty_trrngtrkor_tt
|
it_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rt_filter) TYPE zif_abapgit_definitions=>ty_tadir_tt
|
VALUE(rt_filter) TYPE zif_abapgit_definitions=>ty_tadir_tt
|
||||||
RAISING
|
RAISING
|
||||||
|
|
|
@ -628,14 +628,16 @@ table.db_tab td.data {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.action_link.enabled{
|
li.action_link.enabled{
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.action_link:not(enabled){
|
li.action_link:not(enabled){
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: fixed; /* so it does not take up space when hidden */
|
position: fixed; /* so it does not take up space when hidden */
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ CLASS zcl_abapgit_gui_page_repo_over DEFINITION
|
||||||
iv_only_favorites TYPE abap_bool.
|
iv_only_favorites TYPE abap_bool.
|
||||||
METHODS
|
METHODS
|
||||||
get_only_favorites RETURNING VALUE(rv_result) TYPE abap_bool.
|
get_only_favorites RETURNING VALUE(rv_result) TYPE abap_bool.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,9 +135,8 @@ CLASS zcl_abapgit_gui_page_repo_over DEFINITION
|
||||||
iv_css_class TYPE string OPTIONAL
|
iv_css_class TYPE string OPTIONAL
|
||||||
RETURNING VALUE(rv_html) TYPE string.
|
RETURNING VALUE(rv_html) TYPE string.
|
||||||
|
|
||||||
METHODS action_link
|
|
||||||
IMPORTING iv_content TYPE string
|
|
||||||
RETURNING VALUE(rv_html) TYPE string.
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -477,83 +477,76 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
||||||
METHOD render_actions.
|
METHOD render_actions.
|
||||||
|
|
||||||
CONSTANTS:
|
CONSTANTS:
|
||||||
lc_separator TYPE string VALUE `<span class="separator">|</span>`,
|
|
||||||
lc_dummy_key TYPE string VALUE `?key=#`,
|
lc_dummy_key TYPE string VALUE `?key=#`,
|
||||||
lc_offline_class TYPE string VALUE `action_offline_repo`,
|
lc_offline_class TYPE string VALUE `action_offline_repo`,
|
||||||
lc_online_class TYPE string VALUE `action_online_repo`,
|
lc_online_class TYPE string VALUE `action_online_repo`,
|
||||||
lc_action_class TYPE string VALUE `action_link`.
|
lc_action_class TYPE string VALUE `action_link`.
|
||||||
|
|
||||||
DATA:
|
DATA lo_toolbar TYPE REF TO zcl_abapgit_html_toolbar.
|
||||||
lv_settings_link TYPE string,
|
DATA lo_toolbar_more_sub TYPE REF TO zcl_abapgit_html_toolbar.
|
||||||
lv_check_link TYPE string,
|
|
||||||
lv_stage_link TYPE string,
|
|
||||||
lv_patch_link TYPE string,
|
|
||||||
lv_diff_link TYPE string,
|
|
||||||
lv_pull_link TYPE string.
|
|
||||||
|
|
||||||
DATA:
|
CREATE OBJECT lo_toolbar EXPORTING iv_id = 'toolbar-ovp'.
|
||||||
lv_zip_import_link TYPE string,
|
|
||||||
lv_zip_export_link TYPE string.
|
|
||||||
|
|
||||||
ii_html->add( |<div class="float-right">| ).
|
lo_toolbar->add( iv_txt = |Pull|
|
||||||
|
|
||||||
lv_pull_link = ii_html->a(
|
|
||||||
iv_txt = |Pull|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-git_reset }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-git_reset }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_online_class }| ).
|
iv_class = |{ lc_action_class } { lc_online_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_pull_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Stage|
|
||||||
|
|
||||||
lv_stage_link = ii_html->a(
|
|
||||||
iv_txt = |Stage|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-go_stage }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-go_stage }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_online_class } | ).
|
iv_class = |{ lc_action_class } { lc_online_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_stage_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Patch|
|
||||||
|
|
||||||
lv_patch_link = ii_html->a(
|
|
||||||
iv_txt = |Patch|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-go_patch }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-go_patch }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_online_class } | ).
|
iv_class = |{ lc_action_class } { lc_online_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_patch_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Diff|
|
||||||
|
|
||||||
lv_diff_link = ii_html->a(
|
|
||||||
iv_txt = |Diff|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-go_repo_diff }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-go_repo_diff }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_online_class }| ).
|
iv_class = |{ lc_action_class } { lc_online_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_diff_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Check|
|
||||||
|
|
||||||
lv_check_link = ii_html->a(
|
|
||||||
iv_txt = |Check|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_code_inspector }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-repo_code_inspector }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class }| ).
|
iv_class = |{ lc_action_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_check_link && lc_separator ) ).
|
|
||||||
|
|
||||||
lv_zip_import_link = ii_html->a(
|
lo_toolbar->add( iv_txt = |Import|
|
||||||
iv_txt = |Import|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-zip_import }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-zip_import }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_offline_class }| ).
|
iv_class = |{ lc_action_class } { lc_offline_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_zip_import_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Export|
|
||||||
|
|
||||||
lv_zip_export_link = ii_html->a(
|
|
||||||
iv_txt = |Export|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-zip_export }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-zip_export }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class } { lc_offline_class }| ).
|
iv_class = |{ lc_action_class } { lc_offline_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_zip_export_link && lc_separator ) ).
|
lo_toolbar->add( iv_txt = |Settings|
|
||||||
|
|
||||||
lv_settings_link = ii_html->a(
|
|
||||||
iv_txt = |Settings|
|
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_settings }{ lc_dummy_key }|
|
iv_act = |{ zif_abapgit_definitions=>c_action-repo_settings }{ lc_dummy_key }|
|
||||||
iv_class = |{ lc_action_class }| ).
|
iv_class = |{ lc_action_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
ii_html->add( action_link( lv_settings_link ) ).
|
CREATE OBJECT lo_toolbar_more_sub EXPORTING iv_id = 'toolbar-ovp-more_sub'.
|
||||||
|
|
||||||
|
lo_toolbar_more_sub->add( iv_txt = |Stage by Transport|
|
||||||
|
iv_act = |{ zif_abapgit_definitions=>c_action-go_stage_transport }{ lc_dummy_key }|
|
||||||
|
iv_class = |{ lc_action_class } { lc_online_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
|
lo_toolbar_more_sub->add( iv_txt = |Export by Transport|
|
||||||
|
iv_act = |{ zif_abapgit_definitions=>c_action-zip_export_transport }{ lc_dummy_key }|
|
||||||
|
iv_class = |{ lc_action_class } { lc_offline_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
|
lo_toolbar->add( iv_txt = |More|
|
||||||
|
io_sub = lo_toolbar_more_sub
|
||||||
|
iv_class = |{ lc_action_class }|
|
||||||
|
iv_li_class = |{ lc_action_class }| ).
|
||||||
|
|
||||||
|
ii_html->add( lo_toolbar->render( iv_right = abap_true ) ).
|
||||||
|
|
||||||
ii_html->add( |</div>| ).
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD shorten_repo_url.
|
METHOD shorten_repo_url.
|
||||||
|
@ -751,11 +744,6 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD action_link.
|
|
||||||
rv_html = |<span class="action_link">| && iv_content && |</span>|.
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD set_only_favorites.
|
METHOD set_only_favorites.
|
||||||
mv_only_favorites = iv_only_favorites.
|
mv_only_favorites = iv_only_favorites.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
|
@ -174,6 +174,7 @@ CLASS zcl_abapgit_gui_page_repo_view DEFINITION
|
||||||
VALUE(ri_html) TYPE REF TO zif_abapgit_html
|
VALUE(ri_html) TYPE REF TO zif_abapgit_html
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception.
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
METHODS order_files
|
METHODS order_files
|
||||||
CHANGING
|
CHANGING
|
||||||
ct_files TYPE zif_abapgit_definitions=>ty_repo_file_tt.
|
ct_files TYPE zif_abapgit_definitions=>ty_repo_file_tt.
|
||||||
|
@ -289,7 +290,13 @@ CLASS zcl_abapgit_gui_page_repo_view IMPLEMENTATION.
|
||||||
iv_txt = 'Add All Objects to Transport'
|
iv_txt = 'Add All Objects to Transport'
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_add_all_obj_to_trans_req }?key={ mv_key }| ).
|
iv_act = |{ zif_abapgit_definitions=>c_action-repo_add_all_obj_to_trans_req }?key={ mv_key }| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
IF mo_repo->is_offline( ) = abap_true.
|
||||||
|
ro_advanced_dropdown->add( iv_txt = 'Export by Transport'
|
||||||
|
iv_act = |{ zif_abapgit_definitions=>c_action-zip_export_transport }?key={ mv_key }| ).
|
||||||
|
ELSE.
|
||||||
|
ro_advanced_dropdown->add( iv_txt = 'Stage by Transport'
|
||||||
|
iv_act = |{ zif_abapgit_definitions=>c_action-go_stage_transport }?key={ mv_key }| ).
|
||||||
|
ENDIF.
|
||||||
ro_advanced_dropdown->add( iv_txt = 'Syntax Check'
|
ro_advanced_dropdown->add( iv_txt = 'Syntax Check'
|
||||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_syntax_check }?key={ mv_key }| ).
|
iv_act = |{ zif_abapgit_definitions=>c_action-repo_syntax_check }?key={ mv_key }| ).
|
||||||
ro_advanced_dropdown->add( iv_txt = 'Run Code Inspector'
|
ro_advanced_dropdown->add( iv_txt = 'Run Code Inspector'
|
||||||
|
|
|
@ -18,6 +18,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
|
||||||
io_repo TYPE REF TO zcl_abapgit_repo_online
|
io_repo TYPE REF TO zcl_abapgit_repo_online
|
||||||
iv_seed TYPE string OPTIONAL
|
iv_seed TYPE string OPTIONAL
|
||||||
iv_sci_result TYPE zif_abapgit_definitions=>ty_sci_result DEFAULT zif_abapgit_definitions=>c_sci_result-no_run
|
iv_sci_result TYPE zif_abapgit_definitions=>ty_sci_result DEFAULT zif_abapgit_definitions=>c_sci_result-no_run
|
||||||
|
ii_obj_filter TYPE REF TO zif_abapgit_object_filter OPTIONAL
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception.
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
|
||||||
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
||||||
DATA mv_filter_value TYPE string .
|
DATA mv_filter_value TYPE string .
|
||||||
DATA mv_sci_result TYPE zif_abapgit_definitions=>ty_sci_result.
|
DATA mv_sci_result TYPE zif_abapgit_definitions=>ty_sci_result.
|
||||||
|
DATA mi_obj_filter TYPE REF TO zif_abapgit_object_filter.
|
||||||
|
|
||||||
METHODS check_selected
|
METHODS check_selected
|
||||||
IMPORTING
|
IMPORTING
|
||||||
|
@ -197,6 +199,7 @@ CLASS zcl_abapgit_gui_page_stage IMPLEMENTATION.
|
||||||
mo_repo = io_repo.
|
mo_repo = io_repo.
|
||||||
mv_seed = iv_seed.
|
mv_seed = iv_seed.
|
||||||
mv_sci_result = iv_sci_result.
|
mv_sci_result = iv_sci_result.
|
||||||
|
mi_obj_filter = ii_obj_filter.
|
||||||
|
|
||||||
IF mv_seed IS INITIAL. " Generate based on time unless obtained from diff page
|
IF mv_seed IS INITIAL. " Generate based on time unless obtained from diff page
|
||||||
GET TIME STAMP FIELD lv_ts.
|
GET TIME STAMP FIELD lv_ts.
|
||||||
|
@ -361,7 +364,9 @@ CLASS zcl_abapgit_gui_page_stage IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD init_files.
|
METHOD init_files.
|
||||||
ms_files = zcl_abapgit_factory=>get_stage_logic( )->get( mo_repo ).
|
ms_files = zcl_abapgit_factory=>get_stage_logic( )->get( io_repo = mo_repo
|
||||||
|
ii_obj_filter = mi_obj_filter ).
|
||||||
|
|
||||||
IF lines( ms_files-local ) = 0 AND lines( ms_files-remote ) = 0.
|
IF lines( ms_files-local ) = 0 AND lines( ms_files-remote ) = 0.
|
||||||
zcx_abapgit_exception=>raise( 'There are no changes that could be staged' ).
|
zcx_abapgit_exception=>raise( 'There are no changes that could be staged' ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -89,6 +89,7 @@ CLASS zcl_abapgit_gui_router DEFINITION
|
||||||
METHODS get_page_stage
|
METHODS get_page_stage
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!ii_event TYPE REF TO zif_abapgit_gui_event
|
!ii_event TYPE REF TO zif_abapgit_gui_event
|
||||||
|
ii_obj_filter TYPE REF TO zif_abapgit_object_filter OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
|
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -205,7 +206,10 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
METHOD general_page_routing.
|
METHOD general_page_routing.
|
||||||
|
|
||||||
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
|
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
|
||||||
lv_last_repo_key TYPE zif_abapgit_persistence=>ty_repo-key.
|
lv_last_repo_key TYPE zif_abapgit_persistence=>ty_repo-key,
|
||||||
|
lo_obj_filter_trans TYPE REF TO zcl_abapgit_object_filter_tran,
|
||||||
|
lo_repo TYPE REF TO zcl_abapgit_repo,
|
||||||
|
lt_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt.
|
||||||
|
|
||||||
lv_key = ii_event->query( )->get( 'KEY' ).
|
lv_key = ii_event->query( )->get( 'KEY' ).
|
||||||
|
|
||||||
|
@ -244,6 +248,19 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
WHEN zif_abapgit_definitions=>c_action-go_stage. " Go Staging page
|
WHEN zif_abapgit_definitions=>c_action-go_stage. " Go Staging page
|
||||||
rs_handled-page = get_page_stage( ii_event ).
|
rs_handled-page = get_page_stage( ii_event ).
|
||||||
rs_handled-state = get_state_diff( ii_event ).
|
rs_handled-state = get_state_diff( ii_event ).
|
||||||
|
WHEN zif_abapgit_definitions=>c_action-go_stage_transport. " Go Staging page by Transport
|
||||||
|
|
||||||
|
lt_r_trkorr = zcl_abapgit_ui_factory=>get_popups( )->popup_select_wb_tc_tr_and_tsk( ).
|
||||||
|
|
||||||
|
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
|
||||||
|
|
||||||
|
CREATE OBJECT lo_obj_filter_trans.
|
||||||
|
lo_obj_filter_trans->set_filter_values( iv_package = lo_repo->get_package( )
|
||||||
|
it_r_trkorr = lt_r_trkorr ).
|
||||||
|
|
||||||
|
rs_handled-page = get_page_stage( ii_event = ii_event
|
||||||
|
ii_obj_filter = lo_obj_filter_trans ).
|
||||||
|
rs_handled-state = get_state_diff( ii_event ).
|
||||||
WHEN zif_abapgit_definitions=>c_action-go_branch_overview. " Go repo branch overview
|
WHEN zif_abapgit_definitions=>c_action-go_branch_overview. " Go repo branch overview
|
||||||
rs_handled-page = get_page_branch_overview( lv_key ).
|
rs_handled-page = get_page_branch_overview( lv_key ).
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
|
||||||
|
@ -364,7 +381,9 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
EXPORTING
|
EXPORTING
|
||||||
io_repo = lo_repo
|
io_repo = lo_repo
|
||||||
iv_seed = lv_seed
|
iv_seed = lv_seed
|
||||||
iv_sci_result = zif_abapgit_definitions=>c_sci_result-passed.
|
iv_sci_result = zif_abapgit_definitions=>c_sci_result-passed
|
||||||
|
ii_obj_filter = ii_obj_filter.
|
||||||
|
|
||||||
ri_page = lo_stage_page.
|
ri_page = lo_stage_page.
|
||||||
ELSE.
|
ELSE.
|
||||||
ri_page = lo_code_inspector_page.
|
ri_page = lo_code_inspector_page.
|
||||||
|
@ -390,7 +409,8 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
CREATE OBJECT lo_stage_page
|
CREATE OBJECT lo_stage_page
|
||||||
EXPORTING
|
EXPORTING
|
||||||
io_repo = lo_repo
|
io_repo = lo_repo
|
||||||
iv_seed = lv_seed.
|
iv_seed = lv_seed
|
||||||
|
ii_obj_filter = ii_obj_filter.
|
||||||
|
|
||||||
ri_page = lo_stage_page.
|
ri_page = lo_stage_page.
|
||||||
|
|
||||||
|
@ -732,7 +752,9 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
lv_xstr TYPE xstring,
|
lv_xstr TYPE xstring,
|
||||||
lv_package TYPE zif_abapgit_persistence=>ty_repo-package,
|
lv_package TYPE zif_abapgit_persistence=>ty_repo-package,
|
||||||
lv_folder_logic TYPE string,
|
lv_folder_logic TYPE string,
|
||||||
lv_main_lang_only TYPE zif_abapgit_persistence=>ty_local_settings-main_language_only.
|
lv_main_lang_only TYPE zif_abapgit_persistence=>ty_local_settings-main_language_only,
|
||||||
|
lo_obj_filter_trans TYPE REF TO zcl_abapgit_object_filter_tran,
|
||||||
|
lt_r_trkorr TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt.
|
||||||
|
|
||||||
CONSTANTS:
|
CONSTANTS:
|
||||||
BEGIN OF lc_page,
|
BEGIN OF lc_page,
|
||||||
|
@ -803,6 +825,20 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
file_download( iv_package = lo_repo->get_package( )
|
file_download( iv_package = lo_repo->get_package( )
|
||||||
iv_xstr = lv_xstr ).
|
iv_xstr = lv_xstr ).
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
||||||
|
WHEN zif_abapgit_definitions=>c_action-zip_export_transport. " Export repo as ZIP
|
||||||
|
|
||||||
|
lt_r_trkorr = zcl_abapgit_ui_factory=>get_popups( )->popup_select_wb_tc_tr_and_tsk( ).
|
||||||
|
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
|
||||||
|
lo_repo->refresh( ).
|
||||||
|
CREATE OBJECT lo_obj_filter_trans.
|
||||||
|
lo_obj_filter_trans->set_filter_values( iv_package = lo_repo->get_package( )
|
||||||
|
it_r_trkorr = lt_r_trkorr ).
|
||||||
|
|
||||||
|
lv_xstr = zcl_abapgit_zip=>encode_files( lo_repo->get_files_local( ii_obj_filter = lo_obj_filter_trans ) ).
|
||||||
|
lo_repo->refresh( ).
|
||||||
|
file_download( iv_package = lo_repo->get_package( )
|
||||||
|
iv_xstr = lv_xstr ).
|
||||||
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
||||||
WHEN zif_abapgit_definitions=>c_action-zip_package. " Export package as ZIP
|
WHEN zif_abapgit_definitions=>c_action-zip_package. " Export package as ZIP
|
||||||
rs_handled-page = zcl_abapgit_gui_page_ex_pckage=>create( ).
|
rs_handled-page = zcl_abapgit_gui_page_ex_pckage=>create( ).
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
|
||||||
|
|
|
@ -91,6 +91,12 @@ CLASS ltcl_popups_mock IMPLEMENTATION.
|
||||||
mv_user_decision = iv_user_decision.
|
mv_user_decision = iv_user_decision.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_tr_requests.
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk.
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
CLASS ltcl_test_form DEFINITION
|
CLASS ltcl_test_form DEFINITION
|
||||||
|
|
|
@ -20,6 +20,8 @@ CLASS zcl_abapgit_html_toolbar DEFINITION
|
||||||
!iv_aux TYPE string OPTIONAL
|
!iv_aux TYPE string OPTIONAL
|
||||||
!iv_id TYPE string OPTIONAL
|
!iv_id TYPE string OPTIONAL
|
||||||
!iv_title TYPE string OPTIONAL
|
!iv_title TYPE string OPTIONAL
|
||||||
|
!iv_class TYPE string OPTIONAL
|
||||||
|
!iv_li_class TYPE string OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_self) TYPE REF TO zcl_abapgit_html_toolbar .
|
VALUE(ro_self) TYPE REF TO zcl_abapgit_html_toolbar .
|
||||||
METHODS count
|
METHODS count
|
||||||
|
@ -56,6 +58,8 @@ CLASS zcl_abapgit_html_toolbar DEFINITION
|
||||||
aux TYPE string,
|
aux TYPE string,
|
||||||
id TYPE string,
|
id TYPE string,
|
||||||
title TYPE string,
|
title TYPE string,
|
||||||
|
class TYPE string,
|
||||||
|
li_class TYPE string,
|
||||||
END OF ty_item .
|
END OF ty_item .
|
||||||
TYPES:
|
TYPES:
|
||||||
ty_items TYPE STANDARD TABLE OF ty_item .
|
ty_items TYPE STANDARD TABLE OF ty_item .
|
||||||
|
@ -72,7 +76,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_HTML_TOOLBAR IMPLEMENTATION.
|
CLASS zcl_abapgit_html_toolbar IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD add.
|
METHOD add.
|
||||||
|
@ -97,6 +101,8 @@ CLASS ZCL_ABAPGIT_HTML_TOOLBAR IMPLEMENTATION.
|
||||||
ls_item-aux = iv_aux.
|
ls_item-aux = iv_aux.
|
||||||
ls_item-id = iv_id.
|
ls_item-id = iv_id.
|
||||||
ls_item-title = iv_title.
|
ls_item-title = iv_title.
|
||||||
|
ls_item-class = iv_class.
|
||||||
|
ls_item-li_class = iv_li_class.
|
||||||
|
|
||||||
APPEND ls_item TO mt_items.
|
APPEND ls_item TO mt_items.
|
||||||
|
|
||||||
|
@ -163,6 +169,7 @@ CLASS ZCL_ABAPGIT_HTML_TOOLBAR IMPLEMENTATION.
|
||||||
METHOD render_items.
|
METHOD render_items.
|
||||||
|
|
||||||
DATA: lv_class TYPE string,
|
DATA: lv_class TYPE string,
|
||||||
|
lv_class_value TYPE string,
|
||||||
lv_icon TYPE string,
|
lv_icon TYPE string,
|
||||||
lv_id TYPE string,
|
lv_id TYPE string,
|
||||||
lv_check TYPE string,
|
lv_check TYPE string,
|
||||||
|
@ -193,7 +200,7 @@ CLASS ZCL_ABAPGIT_HTML_TOOLBAR IMPLEMENTATION.
|
||||||
|
|
||||||
" Render items
|
" Render items
|
||||||
LOOP AT mt_items ASSIGNING <ls_item>.
|
LOOP AT mt_items ASSIGNING <ls_item>.
|
||||||
CLEAR: lv_class, lv_icon.
|
CLEAR: lv_class, lv_class_value, lv_icon.
|
||||||
|
|
||||||
IF <ls_item>-typ = zif_abapgit_html=>c_action_type-separator.
|
IF <ls_item>-typ = zif_abapgit_html=>c_action_type-separator.
|
||||||
ri_html->add( |<li class="separator">{ <ls_item>-txt }</li>| ).
|
ri_html->add( |<li class="separator">{ <ls_item>-txt }</li>| ).
|
||||||
|
@ -212,29 +219,41 @@ CLASS ZCL_ABAPGIT_HTML_TOOLBAR IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF <ls_item>-cur = abap_true.
|
|
||||||
lv_class = ' class="current-menu-item"'.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
|
IF <ls_item>-cur = abap_true.
|
||||||
|
IF <ls_item>-li_class IS INITIAL.
|
||||||
|
lv_class_value = 'current-menu-item'.
|
||||||
|
ELSE.
|
||||||
|
lv_class_value = |current-menu-item { <ls_item>-li_class }|.
|
||||||
|
ENDIF.
|
||||||
|
ELSE.
|
||||||
|
lv_class_value = <ls_item>-li_class.
|
||||||
|
ENDIF.
|
||||||
|
IF lv_class_value IS NOT INITIAL.
|
||||||
|
lv_class = | class="{ lv_class_value }"|.
|
||||||
|
ENDIF.
|
||||||
IF <ls_item>-aux IS NOT INITIAL.
|
IF <ls_item>-aux IS NOT INITIAL.
|
||||||
lv_aux = | data-aux="{ <ls_item>-aux }"|.
|
lv_aux = | data-aux="{ <ls_item>-aux }"|.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ri_html->add( |<li{ lv_class }{ lv_check }{ lv_aux }>| ).
|
ri_html->add( |<li{ lv_class }{ lv_check }{ lv_aux }>| ).
|
||||||
|
|
||||||
IF <ls_item>-sub IS INITIAL.
|
IF <ls_item>-sub IS INITIAL.
|
||||||
ri_html->add_a( iv_txt = lv_icon && <ls_item>-txt
|
ri_html->add_a( iv_txt = lv_icon && <ls_item>-txt
|
||||||
iv_typ = <ls_item>-typ
|
iv_typ = <ls_item>-typ
|
||||||
iv_act = <ls_item>-act
|
iv_act = <ls_item>-act
|
||||||
iv_id = <ls_item>-id
|
iv_id = <ls_item>-id
|
||||||
iv_opt = <ls_item>-opt
|
iv_opt = <ls_item>-opt
|
||||||
iv_title = <ls_item>-title ).
|
iv_title = <ls_item>-title
|
||||||
|
iv_class = <ls_item>-class ).
|
||||||
ELSE.
|
ELSE.
|
||||||
ri_html->add_a( iv_txt = lv_icon && <ls_item>-txt
|
ri_html->add_a( iv_txt = lv_icon && <ls_item>-txt
|
||||||
iv_typ = zif_abapgit_html=>c_action_type-dummy
|
iv_typ = zif_abapgit_html=>c_action_type-dummy
|
||||||
iv_act = ''
|
iv_act = ''
|
||||||
iv_id = <ls_item>-id
|
iv_id = <ls_item>-id
|
||||||
iv_opt = <ls_item>-opt
|
iv_opt = <ls_item>-opt
|
||||||
iv_title = <ls_item>-title ).
|
iv_title = <ls_item>-title
|
||||||
|
iv_class = <ls_item>-class ).
|
||||||
ri_html->add( <ls_item>-sub->render_items( iv_sort ) ).
|
ri_html->add( <ls_item>-sub->render_items( iv_sort ) ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ri_html->add( '</li>' ).
|
ri_html->add( '</li>' ).
|
||||||
|
|
|
@ -1046,4 +1046,59 @@ CLASS zcl_abapgit_popups IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
METHOD zif_abapgit_popups~popup_select_tr_requests.
|
||||||
|
DATA ls_r_trkorr TYPE LINE OF zif_abapgit_definitions=>ty_trrngtrkor_tt.
|
||||||
|
DATA lr_request TYPE REF TO trwbo_request_header.
|
||||||
|
DATA lt_request TYPE trwbo_request_headers.
|
||||||
|
|
||||||
|
CALL FUNCTION 'TRINT_SELECT_REQUESTS'
|
||||||
|
EXPORTING
|
||||||
|
iv_username_pattern = iv_username_pattern
|
||||||
|
is_selection = is_selection
|
||||||
|
iv_complete_projects = abap_false
|
||||||
|
iv_via_selscreen = 'X'
|
||||||
|
iv_title = iv_title
|
||||||
|
IMPORTING
|
||||||
|
et_requests = lt_request
|
||||||
|
EXCEPTIONS
|
||||||
|
action_aborted_by_user = 1
|
||||||
|
OTHERS = 2.
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise( 'Selection Canceled' ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
IF lt_request IS INITIAL.
|
||||||
|
zcx_abapgit_exception=>raise( 'No Request Found' ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
LOOP AT lt_request REFERENCE INTO lr_request.
|
||||||
|
ls_r_trkorr-sign = 'I'.
|
||||||
|
ls_r_trkorr-option = 'EQ'.
|
||||||
|
ls_r_trkorr-low = lr_request->trkorr.
|
||||||
|
INSERT ls_r_trkorr INTO TABLE rt_r_trkorr.
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk.
|
||||||
|
DATA ls_selection TYPE trwbo_selection.
|
||||||
|
DATA lv_title TYPE trwbo_title.
|
||||||
|
|
||||||
|
ls_selection-trkorrpattern = space.
|
||||||
|
ls_selection-connect_req_task_conditions = 'X'.
|
||||||
|
ls_selection-reqfunctions = 'KTRXS'.
|
||||||
|
ls_selection-reqstatus = 'RNODL'.
|
||||||
|
ls_selection-taskstatus = 'RNODL'.
|
||||||
|
CONDENSE ls_selection-reqfunctions NO-GAPS.
|
||||||
|
ls_selection-taskfunctions = 'QRSX'.
|
||||||
|
CONCATENATE sy-sysid '*' INTO ls_selection-trkorrpattern.
|
||||||
|
|
||||||
|
lv_title = 'Select Transports / Tasks'.
|
||||||
|
|
||||||
|
rt_r_trkorr = zif_abapgit_popups~popup_select_tr_requests(
|
||||||
|
is_selection = ls_selection
|
||||||
|
iv_title = lv_title
|
||||||
|
iv_username_pattern = '*' ).
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -407,4 +407,12 @@ CLASS ltcl_popups_mock IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_tr_requests.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -76,6 +76,14 @@ CLASS ltcl_abapgit_popups_mock IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_tr_requests.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
CLASS ltcl_no_dependency_injection IMPLEMENTATION.
|
CLASS ltcl_no_dependency_injection IMPLEMENTATION.
|
||||||
|
|
|
@ -109,4 +109,13 @@ INTERFACE zif_abapgit_popups
|
||||||
VALUE(rs_pull) TYPE zif_abapgit_pr_enum_provider=>ty_pull_request
|
VALUE(rs_pull) TYPE zif_abapgit_pr_enum_provider=>ty_pull_request
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
METHODS popup_select_tr_requests
|
||||||
|
IMPORTING is_selection TYPE trwbo_selection
|
||||||
|
iv_title TYPE trwbo_title
|
||||||
|
iv_username_pattern TYPE any DEFAULT sy-uname
|
||||||
|
RETURNING VALUE(rt_r_trkorr) TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt
|
||||||
|
RAISING zcx_abapgit_exception.
|
||||||
|
METHODS popup_select_wb_tc_tr_and_tsk
|
||||||
|
RETURNING VALUE(rt_r_trkorr) TYPE zif_abapgit_definitions=>ty_trrngtrkor_tt
|
||||||
|
RAISING zcx_abapgit_exception.
|
||||||
ENDINTERFACE.
|
ENDINTERFACE.
|
||||||
|
|
|
@ -448,6 +448,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
abapgit_home TYPE string VALUE 'abapgit_home',
|
abapgit_home TYPE string VALUE 'abapgit_home',
|
||||||
zip_import TYPE string VALUE 'zip_import',
|
zip_import TYPE string VALUE 'zip_import',
|
||||||
zip_export TYPE string VALUE 'zip_export',
|
zip_export TYPE string VALUE 'zip_export',
|
||||||
|
zip_export_transport TYPE string VALUE 'zip_export_transport',
|
||||||
zip_package TYPE string VALUE 'zip_package',
|
zip_package TYPE string VALUE 'zip_package',
|
||||||
zip_transport TYPE string VALUE 'zip_transport',
|
zip_transport TYPE string VALUE 'zip_transport',
|
||||||
zip_object TYPE string VALUE 'zip_object',
|
zip_object TYPE string VALUE 'zip_object',
|
||||||
|
@ -475,6 +476,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
go_repo_diff TYPE string VALUE 'go_repo_diff',
|
go_repo_diff TYPE string VALUE 'go_repo_diff',
|
||||||
go_file_diff TYPE string VALUE 'go_fill_diff',
|
go_file_diff TYPE string VALUE 'go_fill_diff',
|
||||||
go_stage TYPE string VALUE 'go_stage',
|
go_stage TYPE string VALUE 'go_stage',
|
||||||
|
go_stage_transport TYPE string VALUE 'go_stage_transport',
|
||||||
go_commit TYPE string VALUE 'go_commit',
|
go_commit TYPE string VALUE 'go_commit',
|
||||||
go_branch_overview TYPE string VALUE 'go_branch_overview',
|
go_branch_overview TYPE string VALUE 'go_branch_overview',
|
||||||
go_tag_overview TYPE string VALUE 'go_tag_overview',
|
go_tag_overview TYPE string VALUE 'go_tag_overview',
|
||||||
|
@ -531,5 +533,5 @@ INTERFACE zif_abapgit_definitions
|
||||||
main_language_only TYPE abap_bool,
|
main_language_only TYPE abap_bool,
|
||||||
translation_languages TYPE ty_languages,
|
translation_languages TYPE ty_languages,
|
||||||
END OF ty_i18n_params .
|
END OF ty_i18n_params .
|
||||||
|
TYPES ty_trrngtrkor_tt TYPE RANGE OF trkorr.
|
||||||
ENDINTERFACE.
|
ENDINTERFACE.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user