mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Correct statistics for offline repos (#4489)
* Correct statistics for offline repos - Adjust labels: "Remote" to "ZIP" - Fix some file counts * ZIP Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
901d877206
commit
3766260312
|
@ -191,10 +191,18 @@ CLASS zcl_abapgit_gui_page_sett_info IMPLEMENTATION.
|
|||
|
||||
METHOD get_form_schema.
|
||||
|
||||
DATA lv_label TYPE string.
|
||||
|
||||
ro_form = zcl_abapgit_html_form=>create(
|
||||
iv_form_id = 'repo-infos-form'
|
||||
iv_help_page = 'https://docs.abapgit.org/guide-repo-infos.html' ).
|
||||
|
||||
IF mo_repo->is_offline( ) = abap_true.
|
||||
lv_label = 'ZIP File'.
|
||||
ELSE.
|
||||
lv_label = 'Remote'.
|
||||
ENDIF.
|
||||
|
||||
ro_form->start_group(
|
||||
iv_name = c_id-info
|
||||
iv_label = 'Stats'
|
||||
|
@ -226,10 +234,10 @@ CLASS zcl_abapgit_gui_page_sett_info IMPLEMENTATION.
|
|||
iv_width = '25%'
|
||||
iv_readonly = abap_true
|
||||
)->column(
|
||||
iv_label = 'Remote'
|
||||
iv_label = lv_label
|
||||
iv_width = '25%'
|
||||
iv_readonly = abap_true
|
||||
)->command(
|
||||
)->command(
|
||||
iv_label = 'Back'
|
||||
iv_action = c_event-go_back ).
|
||||
|
||||
|
@ -332,7 +340,10 @@ CLASS zcl_abapgit_gui_page_sett_info IMPLEMENTATION.
|
|||
|
||||
IF lt_remote IS NOT INITIAL.
|
||||
ls_stats-measure = 'Number of Ignored Files'.
|
||||
ls_stats-local = ls_stats-remote - ls_stats-local. " should be >= 0
|
||||
ls_stats-local = ls_stats-remote - ls_stats-local.
|
||||
IF ls_stats-local < 0.
|
||||
ls_stats-local = 0.
|
||||
ENDIF.
|
||||
ls_stats-remote = 0.
|
||||
APPEND ls_stats TO mt_stats.
|
||||
ENDIF.
|
||||
|
@ -358,7 +369,7 @@ CLASS zcl_abapgit_gui_page_sett_info IMPLEMENTATION.
|
|||
IF <ls_result>-lstate = lv_state.
|
||||
ls_stats-local = ls_stats-local + 1.
|
||||
ENDIF.
|
||||
IF <ls_result>-rstate = lv_state.
|
||||
IF <ls_result>-rstate = lv_state AND mo_repo->has_remote_source( ) = abap_true.
|
||||
ls_stats-remote = ls_stats-remote + 1.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
|
|
Loading…
Reference in New Issue
Block a user