def display_export_main_taskbar():

    from dfcleanser.common.display_utils import display_dfcleanser_taskbar
    if (cfg.get_dfc_mode() == cfg.INLINE_MODE):
        display_dfcleanser_taskbar(
            ButtonGroupForm(export_task_bar_id, export_task_bar_keyTitleList,
                            export_task_bar_jsList, export_task_bar_centered))
    else:
        display_dfcleanser_taskbar(
            ButtonGroupForm(export_task_bar_id,
                            export_task_bar_pu_keyTitleList,
                            export_task_bar_jsList, export_task_bar_centered))
Ejemplo n.º 2
0
def get_sw_utilities_main_taskbar():

    from dfcleanser.common.display_utils import display_dfcleanser_taskbar
    display_dfcleanser_taskbar(
        ButtonGroupForm(build_utility_tb_id, build_utility_tb_keyTitleList,
                        build_utility_tb_jsList, build_utility_tb_centered),
        False)
Ejemplo n.º 3
0
def display_zipcode_main_taskbar():

    from dfcleanser.common.display_utils import display_dfcleanser_taskbar
    display_dfcleanser_taskbar(
        ButtonGroupForm(zipcode_main_tb_id, zipcode_main_tb_keyTitleList,
                        zipcode_main_tb_jsList, zipcode_main_tb_centered),
        False)
Ejemplo n.º 4
0
def display_system_chapters_taskbar():
    """
    * -------------------------------------------------------------------------- 
    * function : display system taskbar
    * 
    * parms :
    *  N/A
    *
    * returns : N/A
    * --------------------------------------------------------
    """

    print("\n")
    dfc_utils_modules_checkbox = CheckboxGroupForm(
        dfc_utils_modules_checkbox_id, dfc_utils_modules_checkbox_idList,
        dfc_utils_modules_checkbox_labelList,
        dfc_utils_modules_checkbox_jsList,
        get_current_checkboxes(sysm.UTILITIES))

    if (not (cfg.get_dfc_mode() == cfg.INLINE_MODE)):
        dfc_utils_modules_checkbox.set_rows_count([2, 2, 1])

    dfc_utils_modules_heading_html = "<div>dfcleanser Utilities</div><br>"
    dfc_utils_modules_checkbox_html = dfc_utils_modules_checkbox.get_html()

    gridclasses = ["dfcleanser-common-grid-header", "dfc-main"]
    gridhtmls = [
        dfc_utils_modules_heading_html, dfc_utils_modules_checkbox_html
    ]

    if (cfg.get_dfc_mode() == cfg.INLINE_MODE):
        display_generic_grid("dfcleanser-chapters-wrapper", gridclasses,
                             gridhtmls)
    else:
        display_generic_grid("dfc-common-480px-2-vert-wrapper", gridclasses,
                             gridhtmls, True)

    dfc_script_modules_tb = ButtonGroupForm(system_chapters_tb_doc_id,
                                            system_chapters_tb_keyTitleList,
                                            system_chapters_tb_jsList,
                                            system_chapters_tb_centered)

    dfc_script_modules_tb.set_gridwidth(480)
    dfc_script_modules_tb.set_custombwidth(160)

    dfc_script_modules_tb_html = dfc_script_modules_tb.get_html()

    gridclasses = ["dfc-footer"]
    gridhtmls = [dfc_script_modules_tb_html]

    display_generic_grid("dfcleanser-chapters-tb-wrapper", gridclasses,
                         gridhtmls)

    print("\n")
def get_dfsubset_main_taskbar():

    from dfcleanser.common.display_utils import display_dfcleanser_taskbar
    display_dfcleanser_taskbar(
        ButtonGroupForm(dfsubset_tb_id, dfsubset_tb_keyTitleList,
                        dfsubset_tb_jsList, dfsubset_tb_centered), False)
def display_dc_data_scripting(optionId, parms=None):

    from IPython.display import clear_output
    clear_output()

    from dfcleanser.common.cfg import check_if_dc_init
    if (not check_if_dc_init()):

        from dfcleanser.common.display_utils import display_dfcleanser_taskbar
        display_dfcleanser_taskbar(
            ButtonGroupForm(dc_script_tb_id, dc_script_tb_keyTitleList,
                            dc_script_tb_jsList, dc_script_tb_centered), False)

        from dfcleanser.scripting.data_scripting_control import clear_data_scripting_data
        clear_data_scripting_data()

        return

    from dfcleanser.common.display_utils import display_dfcleanser_taskbar
    display_dfcleanser_taskbar(
        ButtonGroupForm(dc_script_tb_id, dc_script_tb_keyTitleList,
                        dc_script_tb_jsList, dc_script_tb_centered), False)

    if (parms == None):
        from dfcleanser.scripting.data_scripting_control import clear_data_scripting_data
        clear_data_scripting_data()

    else:

        funcid = int(parms[0])

        if (funcid == dsm.TURN_ON_SCRIPTING):
            from dfcleanser.scripting.data_scripting_control import set_scripting_status
            set_scripting_status(True)
            from dfcleanser.common.common_utils import display_status_note
            display_status_note("Scripting is turned on")

        elif (funcid == dsm.TURN_OFF_SCRIPTING):
            from dfcleanser.scripting.data_scripting_control import set_scripting_status
            set_scripting_status(False)
            from dfcleanser.common.common_utils import display_status_note
            display_status_note("Scripting is turned off")

        elif (funcid == dsm.SHOW_CURRENT_SCRIPT):
            display_scripting_forms()

        elif (funcid == dsm.ADD_TO_CURRENT_SCRIPT):
            script_form = InputForm(
                dc_add_code_input_id, dc_add_code_input_idList,
                dc_add_code_input_labelList, dc_add_code_input_typeList,
                dc_add_code_input_placeholderList, dc_add_code_input_jsList,
                dc_add_code_input_reqList)

            script_form.set_shortForm(True)
            script_form.set_buttonstyle({
                "font-size": 12,
                "height": 75,
                "width": 140,
                "left-margin": 70
            })
            script_form.set_gridwidth(880)
            script_form.set_fullparms(True)

            script_form_html = script_form.get_html()
            script_title_html = "<div>Scripting</div><br>"

            gridclasses = ["dfcleanser-common-grid-header", "dfc-footer"]
            gridhtmls = [script_title_html, script_form_html]

            from dfcleanser.common.common_utils import display_generic_grid
            display_generic_grid("data-scripting-wrapper", gridclasses,
                                 gridhtmls)

        elif (funcid == dsm.ADD_CODE_SCRIPT):
            from dfcleanser.scripting.data_scripting_control import add_code_to_script
            add_code_to_script(parms)
            display_status("Code added to Current Script succesfully ")

        elif (funcid == dsm.DELETE_CURRENT_SCRIPT):
            from dfcleanser.scripting.data_scripting_control import drop_current_script
            drop_current_script()
            display_status("Current Script Cleared succesfully ")

        elif (funcid == dsm.LOAD_BACKUP_SCRIPT):
            from dfcleanser.scripting.data_scripting_control import load_backup_scriptlog_to_current
            load_backup_scriptlog_to_current()
            display_scripting_forms()

            display_status("Current Script Loaded from Backup ")

        elif (funcid == dsm.SAVE_BACKUP_SCRIPT):

            codeparms = get_parms_for_input(parms[1], dc_script_input_idList)
            save_code = get_code_from_form(codeparms)

            from dfcleanser.scripting.data_scripting_control import (
                set_current_scriptlog, save_current_scriptlog_to_backup)
            set_current_scriptlog(save_code)
            save_current_scriptlog_to_backup(save_code)
            display_scripting_forms()

            display_status("Current Script Backed up successfully ")

        elif (funcid == dsm.RUN_CURRENT_SCRIPT):

            opstat = opStatus()
            from dfcleanser.scripting.data_scripting_control import run_scriptlog
            run_scriptlog(parms, opstat)

            if (opstat.get_status()):
                display_status("Current Script Run successfully ")
            else:
                display_exception(opstat)
Ejemplo n.º 7
0
def display_system_main_taskbar():

    if (cfg.get_dfc_mode() == cfg.INLINE_MODE):
        from dfcleanser.common.display_utils import display_dfcleanser_taskbar
        display_dfcleanser_taskbar(
            ButtonGroupForm(system_environment_doc_id,
                            system_environment_keyTitleList,
                            system_environment_jsList,
                            system_environment_centered))
    else:

        system_tb_A = ButtonGroupForm(system_environmentA_doc_id,
                                      system_environmentA_keyTitleList,
                                      system_environmentA_jsList,
                                      system_environmentA_centered)

        system_tb_A.set_gridwidth(480)
        system_tb_A_html = system_tb_A.get_html()

        system_tb_B = ButtonGroupForm(system_environmentB_doc_id,
                                      system_environmentB_keyTitleList,
                                      system_environmentB_jsList,
                                      system_environmentB_centered)

        system_tb_B.set_gridwidth(480)
        system_tb_B_html = system_tb_B.get_html()

        gridclasses = ["dfc-top-", "dfc-footer"]
        gridhtmls = [system_tb_A_html, system_tb_B_html]

        display_generic_grid("dfcleanser-system-tb-pop-up-wrapper",
                             gridclasses, gridhtmls)