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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | 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 | const {zcl_abapgit_gui_component} = await import("./zcl_abapgit_gui_component.clas.mjs"); const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_gui_page_sett_bckg.clas.abap class zcl_abapgit_gui_page_sett_bckg extends zcl_abapgit_gui_component { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG'; static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_GUI_EVENT_HANDLER","ZIF_ABAPGIT_GUI_RENDERABLE"]; static ATTRIBUTES = {"MO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MI_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MV_SETTINGS_COUNT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "C_ID": {"type": () => {return new abap.types.Structure({ "mode_selection": new abap.types.String({qualifiedName: "STRING"}), "method": new abap.types.String({qualifiedName: "STRING"}), "authentication": new abap.types.String({qualifiedName: "STRING"}), "username": new abap.types.String({qualifiedName: "STRING"}), "password": new abap.types.String({qualifiedName: "STRING"}), "mode_settings": new abap.types.String({qualifiedName: "STRING"}), "settings": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"}, "C_EVENT": {"type": () => {return new abap.types.Structure({ "run_now": new abap.types.String({qualifiedName: "STRING"}), "save": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"}}; static METHODS = {"GET_FORM_SCHEMA": {"visibility": "I", "parameters": {"RO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "is_optional": " "}}}, "READ_SETTINGS": {"visibility": "I", "parameters": {"RO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}}}, "READ_PERSIST": {"visibility": "I", "parameters": {"RS_PERSIST": {"type": () => {return new abap.types.Structure({ "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}), "method": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-METHOD"}), "username": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-USERNAME"}), "password": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-PASSWORD"}), "settings": abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt")}, "zif_abapgit_persist_background=>ty_background", undefined, {}, {});}, "is_optional": " "}}}, "SAVE_SETTINGS": {"visibility": "I", "parameters": {}}, "CREATE": {"visibility": "U", "parameters": {"RI_PAGE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});}, "is_optional": " "}, "II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}}}, "CONSTRUCTOR": {"visibility": "U", "parameters": {"II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}}}}; #mo_form; #mo_form_data; #mi_repo; #mv_settings_count; constructor() { const sup = super(); this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "SUPER": sup.FRIENDS_ACCESS_INSTANCE, "get_form_schema": this.#get_form_schema.bind(this), "read_settings": this.#read_settings.bind(this), "read_persist": this.#read_persist.bind(this), "save_settings": this.#save_settings.bind(this), }; this.#mo_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"}); this.FRIENDS_ACCESS_INSTANCE["mo_form"] = this.#mo_form; this.#mo_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"}); this.FRIENDS_ACCESS_INSTANCE["mo_form_data"] = this.#mo_form_data; this.#mi_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}); this.FRIENDS_ACCESS_INSTANCE["mi_repo"] = this.#mi_repo; this.#mv_settings_count = new abap.types.Integer({qualifiedName: "I"}); this.FRIENDS_ACCESS_INSTANCE["mv_settings_count"] = this.#mv_settings_count; this.c_id = zcl_abapgit_gui_page_sett_bckg.c_id; this.c_event = zcl_abapgit_gui_page_sett_bckg.c_event; } async constructor_(INPUT) { let ii_repo = INPUT?.ii_repo; if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; } if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); } await super.constructor_(); this.#mo_form_data.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_()); this.#mi_repo.set(ii_repo); this.#mo_form.set((await this.#get_form_schema())); this.#mo_form_data.set((await this.#read_settings())); return this; } async create(INPUT) { return zcl_abapgit_gui_page_sett_bckg.create(INPUT); } static async create(INPUT) { let ri_page = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}); let ii_repo = INPUT?.ii_repo; if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; } if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); } let lo_component = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG", RTTIName: "\\CLASS=ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG"}); lo_component.set(await (new abap.Classes['ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG']()).constructor_({ii_repo: ii_repo})); ri_page.set((await abap.Classes['ZCL_ABAPGIT_GUI_PAGE_HOC'].create({iv_page_title: abap.CharacterFactory.get(15, 'Background Mode'), io_page_menu: (await abap.Classes['ZCL_ABAPGIT_GUI_MENUS'].repo_settings({iv_key: (await ii_repo.get().zif_abapgit_repo$get_key()), iv_act: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_background})), ii_child_component: lo_component}))); return ri_page; } async #get_form_schema() { let ro_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"}); let lt_methods = abap.types.TableFactory.construct(new abap.types.Structure({ "class": new abap.types.Character(30, {"qualifiedName":"SEOCLSNAME","ddicName":"SEOCLSNAME","description":"SEOCLSNAME"}), "description": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_BACKGROUND=>TY_METHOD-DESCRIPTION"})}, "zcl_abapgit_background=>ty_method", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["CLASS"]},"secondary":[]}, "zcl_abapgit_background=>ty_methods"); let ls_method = new abap.types.Structure({ "class": new abap.types.Character(30, {"qualifiedName":"SEOCLSNAME","ddicName":"SEOCLSNAME","description":"SEOCLSNAME"}), "description": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_BACKGROUND=>TY_METHOD-DESCRIPTION"})}, "zcl_abapgit_background=>ty_method", undefined, {}, {}); let lv_hint = new abap.types.String({qualifiedName: "STRING"}); lt_methods.set((await abap.Classes['ZCL_ABAPGIT_BACKGROUND'].list_methods())); ro_form.set((await abap.Classes['ZCL_ABAPGIT_HTML_FORM'].create({iv_form_id: abap.CharacterFactory.get(20, 'repo-background-form'), iv_help_page: abap.CharacterFactory.get(54, 'https://docs.abapgit.org/settings-background-mode.html')}))); await (await (await ro_form.get().start_group({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().mode_selection, iv_label: abap.CharacterFactory.get(4, 'Mode')})).get().radio({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().method, iv_default_value: abap.CharacterFactory.get(1, ''), iv_label: abap.CharacterFactory.get(9, 'Selection'), iv_hint: abap.CharacterFactory.get(58, 'Define the action that will be executed in background mode')})).get().option({iv_label: abap.CharacterFactory.get(10, 'Do Nothing'), iv_value: abap.CharacterFactory.get(1, '')}); for await (const unique884 of abap.statements.loop(lt_methods)) { ls_method.set(unique884); await ro_form.get().option({iv_label: ls_method.get().description, iv_value: ls_method.get().class}); } await (await (await ro_form.get().table({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().settings, iv_hint: abap.CharacterFactory.get(48, 'Settings required for selected background action'), iv_label: abap.CharacterFactory.get(19, 'Additional Settings')})).get().column({iv_label: abap.CharacterFactory.get(3, 'Key'), iv_width: abap.CharacterFactory.get(3, '50%'), iv_readonly: abap.builtin.abap_true})).get().column({iv_label: abap.CharacterFactory.get(5, 'Value'), iv_width: abap.CharacterFactory.get(3, '50%')}); lv_hint.set(abap.CharacterFactory.get(37, 'Password will be saved in clear text!')); await (await (await ro_form.get().start_group({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().authentication, iv_label: abap.CharacterFactory.get(30, 'HTTP Authentication (Optional)'), iv_hint: lv_hint})).get().text({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().username, iv_label: abap.CharacterFactory.get(8, 'Username'), iv_hint: lv_hint})).get().text({iv_name: zcl_abapgit_gui_page_sett_bckg.c_id.get().password, iv_label: abap.CharacterFactory.get(8, 'Password'), iv_hint: lv_hint, iv_placeholder: lv_hint}); await (await (await ro_form.get().command({iv_label: abap.CharacterFactory.get(13, 'Save Settings'), iv_cmd_type: abap.Classes['ZIF_ABAPGIT_HTML_FORM'].zif_abapgit_html_form$c_cmd_type.get().input_main, iv_action: zcl_abapgit_gui_page_sett_bckg.c_event.get().save})).get().command({iv_label: abap.CharacterFactory.get(20, 'Run Background Logic'), iv_action: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_background_run})).get().command({iv_label: abap.CharacterFactory.get(4, 'Back'), iv_action: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_back}); return ro_form; } async #read_persist() { let rs_persist = new abap.types.Structure({ "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}), "method": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-METHOD"}), "username": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-USERNAME"}), "password": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-PASSWORD"}), "settings": abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt")}, "zif_abapgit_persist_background=>ty_background", undefined, {}, {}); try { rs_persist.set((await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_background()).get().zif_abapgit_persist_background$get_by_key({iv_key: (await this.#mi_repo.get().zif_abapgit_repo$get_key())}))); } catch (e) { if ((abap.Classes['ZCX_ABAPGIT_NOT_FOUND'] && e instanceof abap.Classes['ZCX_ABAPGIT_NOT_FOUND'])) { rs_persist.clear(); } else { throw e; } } return rs_persist; } async #read_settings() { let ro_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"}); let ls_per = new abap.types.Structure({ "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}), "method": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-METHOD"}), "username": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-USERNAME"}), "password": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-PASSWORD"}), "settings": abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt")}, "zif_abapgit_persist_background=>ty_background", undefined, {}, {}); let lv_row = new abap.types.Integer({qualifiedName: "I"}); let lv_val = new abap.types.String({qualifiedName: "STRING"}); let lt_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); let ls_settings = new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}); ls_per.set((await this.#read_persist())); ro_form_data.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_()); await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().method, iv_val: ls_per.get().method}); if (abap.compare.initial(ls_per.get().method) === false) { lt_settings.set(ls_per.get().settings); if (abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(4, 'push')) && abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(4, 'pull')) && abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(7, 'nothing'))) { try { if (abap.Classes[ls_per.get().method.get().trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } } await abap.Classes[ls_per.get().method.get().trimEnd()].zif_abapgit_background$get_settings({ct_settings: lt_settings}); } catch (e) { if ((abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'])) { lt_settings.clear(); } else { throw e; } } } for await (const unique885 of abap.statements.loop(lt_settings)) { ls_settings.set(unique885); lv_row.set(abap.operators.add(lv_row,abap.IntegerFactory.get(1))); const indexBackup1 = abap.builtin.sy.get().index.get(); const unique886 = abap.IntegerFactory.get(3).get(); for (let unique887 = 0; unique887 < unique886; unique887++) { abap.builtin.sy.get().index.set(unique887 + 1); let unique888 = abap.builtin.sy.get().index; if (abap.compare.eq(unique888, abap.IntegerFactory.get(1))) { lv_val.set(ls_settings.get().key); } else if (abap.compare.eq(unique888, abap.IntegerFactory.get(2))) { lv_val.set(ls_settings.get().value); } await ro_form_data.get().set({iv_key: new abap.types.String().set(`${abap.templateFormatting(zcl_abapgit_gui_page_sett_bckg.c_id.get().settings)}-${abap.templateFormatting(lv_row)}-${abap.templateFormatting(abap.builtin.sy.get().index)}`), iv_val: lv_val}); } abap.builtin.sy.get().index.set(indexBackup1); } } this.#mv_settings_count.set(lv_row); await ro_form_data.get().set({iv_key: new abap.types.String().set(`${abap.templateFormatting(zcl_abapgit_gui_page_sett_bckg.c_id.get().settings)}-${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_HTML_FORM'].zif_abapgit_html_form$c_rows)}`), iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#mv_settings_count)}`)}); await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().username, iv_val: ls_per.get().username}); await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().password, iv_val: ls_per.get().password}); return ro_form_data; } async #save_settings() { let ls_per = new abap.types.Structure({ "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}), "method": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-METHOD"}), "username": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-USERNAME"}), "password": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_BACKGROUND=>TY_XML-PASSWORD"}), "settings": abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt")}, "zif_abapgit_persist_background=>ty_background", undefined, {}, {}); let lt_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); let fs_ls_settings_ = new abap.types.FieldSymbol(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {})); ls_per.get().key.set((await this.#mi_repo.get().zif_abapgit_repo$get_key())); ls_per.get().method.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().method}))); if (abap.compare.initial(ls_per.get().method) === false) { lt_settings.set(ls_per.get().settings); if (abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(4, 'push')) && abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(4, 'pull')) && abap.compare.ne(ls_per.get().method, abap.CharacterFactory.get(7, 'nothing'))) { if (abap.Classes[ls_per.get().method.get().trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } } await abap.Classes[ls_per.get().method.get().trimEnd()].zif_abapgit_background$get_settings({ct_settings: lt_settings}); } for await (const unique889 of abap.statements.loop(lt_settings)) { fs_ls_settings_.assign(unique889); fs_ls_settings_.get().value.set((await this.#mo_form_data.get().get({iv_key: new abap.types.String().set(`${abap.templateFormatting(zcl_abapgit_gui_page_sett_bckg.c_id.get().settings)}-${abap.templateFormatting(abap.builtin.sy.get().tabix)}-2`)}))); } ls_per.get().settings.set(lt_settings); } ls_per.get().username.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().username}))); ls_per.get().password.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_bckg.c_id.get().password}))); if (abap.compare.initial(ls_per.get().method)) { await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_background()).get().zif_abapgit_persist_background$delete({iv_key: ls_per.get().key}); } else { await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_background()).get().zif_abapgit_persist_background$modify({is_data: ls_per}); } abap.statements.commit(); await abap.statements.message({text: abap.CharacterFactory.get(27, 'Settings successfully saved'), type: abap.CharacterFactory.get(1, 'S')}); this.#mo_form_data.set((await this.#read_settings())); } async zif_abapgit_gui_event_handler$on_event(INPUT) { let rs_handled = new abap.types.Structure({ "page": new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}), "state": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER=>TY_HANDLING_RESULT-STATE"})}, "zif_abapgit_gui_event_handler=>ty_handling_result", undefined, {}, {}); let ii_event = INPUT?.ii_event; if (ii_event?.getQualifiedName === undefined || ii_event.getQualifiedName() !== "ZIF_ABAPGIT_GUI_EVENT") { ii_event = undefined; } if (ii_event === undefined) { ii_event = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT"}).set(INPUT.ii_event); } await this.#mo_form_data.get().merge({io_string_map: (await (await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})).get().normalize({io_form_data: (await ii_event.get().zif_abapgit_gui_event$form_data())}))}); let unique890 = ii_event.get().zif_abapgit_gui_event$mv_action; if (abap.compare.eq(unique890, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_back)) { rs_handled.get().state.set((await (await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})).get().exit({io_form_data: this.#mo_form_data, io_compare_with: (await this.#read_settings())}))); } else if (abap.compare.eq(unique890, zcl_abapgit_gui_page_sett_bckg.c_event.get().save)) { await this.#save_settings(); rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().re_render); } return rs_handled; } async zif_abapgit_gui_renderable$render() { let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}); await this.register_handlers(); ri_html.set(await (new abap.Classes['ZCL_ABAPGIT_HTML']()).constructor_()); await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`<div class="repo">`)}); await ri_html.get().zif_abapgit_html$add({ig_chunk: (await abap.Classes['ZCL_ABAPGIT_GUI_CHUNK_LIB'].render_repo_top({ii_repo: this.#mi_repo, iv_show_commit: abap.builtin.abap_false, iv_interactive_branch: abap.builtin.abap_true}))}); await ri_html.get().zif_abapgit_html$add({ig_chunk: (await this.#mo_form.get().render({iv_form_class: abap.CharacterFactory.get(6, 'w800px'), io_values: this.#mo_form_data}))}); await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`</div>`)}); return ri_html; } } abap.Classes['ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG'] = zcl_abapgit_gui_page_sett_bckg; zcl_abapgit_gui_page_sett_bckg.c_id = new abap.types.Structure({ "mode_selection": new abap.types.String({qualifiedName: "STRING"}), "method": new abap.types.String({qualifiedName: "STRING"}), "authentication": new abap.types.String({qualifiedName: "STRING"}), "username": new abap.types.String({qualifiedName: "STRING"}), "password": new abap.types.String({qualifiedName: "STRING"}), "mode_settings": new abap.types.String({qualifiedName: "STRING"}), "settings": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {}); zcl_abapgit_gui_page_sett_bckg.c_id.get().mode_selection.set('mode_selection'); zcl_abapgit_gui_page_sett_bckg.c_id.get().method.set('method'); zcl_abapgit_gui_page_sett_bckg.c_id.get().authentication.set('authentication'); zcl_abapgit_gui_page_sett_bckg.c_id.get().username.set('username'); zcl_abapgit_gui_page_sett_bckg.c_id.get().password.set('password'); zcl_abapgit_gui_page_sett_bckg.c_id.get().mode_settings.set('mode_settings'); zcl_abapgit_gui_page_sett_bckg.c_id.get().settings.set('settings'); zcl_abapgit_gui_page_sett_bckg.c_event = new abap.types.Structure({ "run_now": new abap.types.String({qualifiedName: "STRING"}), "save": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {}); zcl_abapgit_gui_page_sett_bckg.c_event.get().run_now.set('run_now'); zcl_abapgit_gui_page_sett_bckg.c_event.get().save.set('save'); export {zcl_abapgit_gui_page_sett_bckg}; |