All files / output zcl_abapgit_web_progress.clas.mjs

9.09% Statements 6/66
66.66% Branches 2/3
50% Functions 1/2
9.09% Lines 6/66

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 661x 1x                                                                                                                         1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_web_progress.clas.abap
class zcl_abapgit_web_progress {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_WEB_PROGRESS';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_PROGRESS"];
  static ATTRIBUTES = {"MV_TOTAL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_TYPE": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_type"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {};
  #mv_total;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
    this.#mv_total = new abap.types.Integer({qualifiedName: "I"});
    this.FRIENDS_ACCESS_INSTANCE["mv_total"] = this.#mv_total;
    this.c_type = zcl_abapgit_web_progress.c_type;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async zif_abapgit_progress$show(INPUT) {
    let iv_current = INPUT?.iv_current;
    if (iv_current?.getQualifiedName === undefined || iv_current.getQualifiedName() !== "I") { iv_current = undefined; }
    if (iv_current === undefined) { iv_current = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_current); }
    let iv_text = INPUT?.iv_text;
    let lr_content = new abap.types.DataReference(new abap.types.Character(4));
    let fs_ls_content_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_lv_field_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    abap.statements.createData(lr_content,{"name": 'ZABAPGIT'});
    abap.statements.assign({target: fs_ls_content_, source: lr_content.dereference()});
    abap.statements.assign({component: abap.CharacterFactory.get(4, 'TYPE'), target: fs_lv_field_, source: fs_ls_content_});
    fs_lv_field_.set(zcl_abapgit_web_progress.c_type);
    abap.statements.assign({component: abap.CharacterFactory.get(5, 'VALUE'), target: fs_lv_field_, source: fs_ls_content_});
    fs_lv_field_.set(abap.builtin.sy.get().uname);
    abap.statements.assign({component: abap.CharacterFactory.get(8, 'DATA_STR'), target: fs_lv_field_, source: fs_ls_content_});
    fs_lv_field_.set(iv_text);
    await abap.statements.modifyDatabase("zabapgit", {"values": fs_ls_content_});
  }
  async zif_abapgit_progress$set_total(INPUT) {
    let iv_total = INPUT?.iv_total;
    if (iv_total?.getQualifiedName === undefined || iv_total.getQualifiedName() !== "I") { iv_total = undefined; }
    if (iv_total === undefined) { iv_total = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_total); }
    this.#mv_total.set(iv_total);
  }
  async zif_abapgit_progress$off() {
    let lr_content = new abap.types.DataReference(new abap.types.Character(4));
    let fs_ls_content_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_lv_field_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    abap.statements.createData(lr_content,{"name": 'ZABAPGIT'});
    abap.statements.assign({target: fs_ls_content_, source: lr_content.dereference()});
    abap.statements.assign({component: abap.CharacterFactory.get(4, 'TYPE'), target: fs_lv_field_, source: fs_ls_content_});
    fs_lv_field_.set(zcl_abapgit_web_progress.c_type);
    abap.statements.assign({component: abap.CharacterFactory.get(5, 'VALUE'), target: fs_lv_field_, source: fs_ls_content_});
    fs_lv_field_.set(abap.builtin.sy.get().uname);
    await abap.statements.deleteDatabase("zabapgit", {});
  }
}
abap.Classes['ZCL_ABAPGIT_WEB_PROGRESS'] = zcl_abapgit_web_progress;
zcl_abapgit_web_progress.c_type = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_type"});
zcl_abapgit_web_progress.c_type.set('PROGRESS');
export {zcl_abapgit_web_progress};