def _generate_expectation_suites_link_table(cls, index_links_dict): table_options = { "search": "true", "trimOnSearch": "false", "visibleSearch": "true", "rowStyle": "rowStyleLinks", "rowAttributes": "rowAttributesLinks", "sortName": "expectation_suite_name", "sortOrder": "asc", "pagination": "true", "iconSize": "sm", "toolbarAlign": "right", } table_columns = [ { "field": "expectation_suite_name", "title": "Expectation Suites", "sortable": "true", }, ] expectation_suite_link_dicts = index_links_dict.get( "expectations_links", []) table_data = [] for dict_ in expectation_suite_link_dicts: table_data.append({ "expectation_suite_name": dict_.get("expectation_suite_name"), "_table_row_link_path": dict_.get("filepath"), }) return RenderedBootstrapTableContent( **{ "table_columns": table_columns, "table_data": table_data, "table_options": table_options, "styling": { "classes": ["col-12", "ge-index-page-table-container"], "body": { "classes": [ "table-sm", "ge-index-page-expectation_suites-table", ] }, }, })
def _generate_profiling_results_link_table(cls, index_links_dict): table_options = { "search": "true", "trimOnSearch": "false", "visibleSearch": "true", "rowStyle": "rowStyleLinks", "rowAttributes": "rowAttributesLinks", "sortName": "run_time", "sortOrder": "desc", "pagination": "true", "filterControl": "true", "iconSize": "sm", "toolbarAlign": "right", } table_columns = [ { "field": "run_time", "title": "Run Time", "sortName": "_run_time_sort", "sortable": "true", "filterControl": "datepicker", }, { "field": "asset_name", "title": "Asset Name", "sortable": "true", "filterControl": "select", }, { "field": "batch_identifier", "title": "Batch ID", "sortName": "_batch_identifier_sort", "sortable": "true", "filterControl": "input", }, { "field": "profiler_name", "title": "Profiler", "sortable": "true", "filterControl": "select", }, ] profiling_link_dicts = index_links_dict.get("profiling_links", []) table_data = [] for dict_ in profiling_link_dicts: table_data.append({ "run_time": cls._get_formatted_datetime(dict_.get("run_time")), "_run_time_sort": cls._get_timestamp(dict_.get("run_time")), "asset_name": dict_.get("asset_name"), "batch_identifier": cls._render_batch_id_cell( dict_.get("batch_identifier"), dict_.get("batch_kwargs"), dict_.get("batch_spec"), ), "_batch_identifier_sort": dict_.get("batch_identifier"), "profiler_name": dict_.get("expectation_suite_name").split(".")[-1], "_table_row_link_path": dict_.get("filepath"), }) return RenderedBootstrapTableContent( **{ "table_columns": table_columns, "table_data": table_data, "table_options": table_options, "styling": { "classes": ["col-12", "ge-index-page-table-container"], "body": { "classes": ["table-sm", "ge-index-page-profiling-results-table"] }, }, })
def _generate_validation_results_link_table(cls, index_links_dict): table_options = { "search": "true", "trimOnSearch": "false", "visibleSearch": "true", "rowStyle": "rowStyleLinks", "rowAttributes": "rowAttributesLinks", "sortName": "run_time", "sortOrder": "desc", "pagination": "true", "filterControl": "true", "iconSize": "sm", "toolbarAlign": "right", } table_columns = [ { "field": "validation_success", "title": "Status", "sortable": "true", "align": "center", "filterControl": "select", "filterDataCollector": "validationSuccessFilterDataCollector", }, { "field": "run_time", "title": "Run Time", "sortName": "_run_time_sort", "sortable": "true", "filterControl": "datepicker", }, { "field": "run_name", "title": "Run Name", "sortable": "true", "filterControl": "input", }, { "field": "asset_name", "title": "Asset Name", "sortable": "true", "filterControl": "select", }, { "field": "batch_identifier", "title": "Batch ID", "sortName": "_batch_identifier_sort", "sortable": "true", "filterControl": "input", }, { "field": "expectation_suite_name", "title": "Expectation Suite", "sortName": "_expectation_suite_name_sort", "sortable": "true", "filterControl": "select", "filterDataCollector": "expectationSuiteNameFilterDataCollector", }, ] validation_link_dicts = index_links_dict.get("validations_links", []) table_data = [] for dict_ in validation_link_dicts: table_data.append({ "validation_success": cls._render_validation_success_cell( dict_.get("validation_success")), "run_time": cls._get_formatted_datetime(dict_.get("run_time")), "_run_time_sort": cls._get_timestamp(dict_.get("run_time")), "run_name": dict_.get("run_name"), "batch_identifier": cls._render_batch_id_cell( dict_.get("batch_identifier"), dict_.get("batch_kwargs"), dict_.get("batch_spec"), ), "_batch_identifier_sort": dict_.get("batch_identifier"), "expectation_suite_name": cls._render_expectation_suite_cell( dict_.get("expectation_suite_name"), dict_.get("expectation_suite_filepath"), ), "_expectation_suite_name_sort": dict_.get("expectation_suite_name"), "_table_row_link_path": dict_.get("filepath"), "_validation_success_text": "Success" if dict_.get("validation_success") else "Failed", "asset_name": dict_.get("asset_name"), }) return RenderedBootstrapTableContent( **{ "table_columns": table_columns, "table_data": table_data, "table_options": table_options, "styling": { "classes": ["col-12", "ge-index-page-table-container"], "body": { "classes": [ "table-sm", "ge-index-page-validation-results-table", ] }, }, })