From da59f8e289625f21124780c3788e1e88804a11b5 Mon Sep 17 00:00:00 2001 From: Guilherme de Freitas Date: Wed, 13 Nov 2024 10:05:26 +0000 Subject: [PATCH] Remove references to summary pages/DB --- api/config_sample.php | 5 - api/index.php | 10 +- .../Database/DatabaseConnectionFactory.php | 11 - api/src/Database/DatabaseFactory.php | 1 - api/src/Page/Summary.php | 423 ----- client/src/js/app/components/navbar.vue | 14 - client/src/js/app/layouts/main.vue | 4 +- client/src/js/app/router/router.js | 2 - client/src/js/app/store/store.js | 2 - .../summary/collections/summaryresults.js | 23 - .../modules/summary/models/summaryresult.js | 13 - client/src/js/modules/summary/routes.js | 14 - .../js/modules/summary/styles/_summary.scss | 248 --- client/src/js/modules/summary/utils/utils.js | 28 - .../src/js/modules/summary/views/summary.vue | 1485 ----------------- 15 files changed, 2 insertions(+), 2281 deletions(-) delete mode 100644 api/src/Page/Summary.php delete mode 100644 client/src/js/modules/summary/collections/summaryresults.js delete mode 100644 client/src/js/modules/summary/models/summaryresult.js delete mode 100644 client/src/js/modules/summary/routes.js delete mode 100644 client/src/js/modules/summary/styles/_summary.scss delete mode 100644 client/src/js/modules/summary/utils/utils.js delete mode 100644 client/src/js/modules/summary/views/summary.vue diff --git a/api/config_sample.php b/api/config_sample.php index a178d48cd..ccec88ec1 100644 --- a/api/config_sample.php +++ b/api/config_sample.php @@ -13,11 +13,6 @@ $isb = array('user' => 'user', 'pass' => 'pass', 'db' => 'localhost/ispyb'); $dbtype = 'mysql'; - # Summary Database credentials - ######### DELETE if not using connection. - $summarydbconfig = array('user' => 'user', 'pass' => 'pass', 'db' => 'localhost/ispyb'); - $ifsummary = true; - # Encoded JWT key, used to sign and check validaty of jwt tokens # - Create one of these using /api/authenticate/key # This can be changed to invalidate all currently active tokens diff --git a/api/index.php b/api/index.php index ace25a44c..5ba1bd6eb 100644 --- a/api/index.php +++ b/api/index.php @@ -70,7 +70,7 @@ function setupApplication($mode): Slim global $motd, $authentication_type, $cas_url, $cas_sso, $sso_url, $package_description, $facility_courier_countries, $facility_courier_countries_nde, $facility_courier_countries_link, $dhl_enable, $scale_grid, $scale_grid_end_date, $preset_proposal, $timezone, - $valid_components, $enabled_container_types, $ifsummary, $synchweb_version, $redirects, + $valid_components, $enabled_container_types, $synchweb_version, $redirects, $shipping_service_app_url, $use_shipping_service_redirect, $use_shipping_service_redirect_incoming_shipments; $app->contentType('application/json'); $options = $app->container['options']; @@ -91,7 +91,6 @@ function setupApplication($mode): Slim 'timezone' => $timezone, 'valid_components' => $valid_components, 'enabled_container_types' => $enabled_container_types, - 'ifsummary' => $ifsummary, 'synchweb_version' => $synchweb_version, 'shipping_service_app_url' => $use_shipping_service_redirect || $use_shipping_service_redirect_incoming_shipments ? $shipping_service_app_url : null, 'shipping_service_app_url_incoming' => $use_shipping_service_redirect_incoming_shipments ? $shipping_service_app_url : null, @@ -110,13 +109,6 @@ function setupDependencyInjectionContainer($app) return $db; }); - $app->container->singleton('dbsummary', function () use ($app): DatabaseParent { - $dbFactory = new DatabaseFactory(new DatabaseConnectionFactory()); - $db = $dbFactory->get("summary"); - $db->set_app($app); - return $db; - }); - $app->container->singleton('authData', function () use ($app) { return new AuthenticationData($app->container['db']); }); diff --git a/api/src/Database/DatabaseConnectionFactory.php b/api/src/Database/DatabaseConnectionFactory.php index 0afb84363..0889645f9 100644 --- a/api/src/Database/DatabaseConnectionFactory.php +++ b/api/src/Database/DatabaseConnectionFactory.php @@ -9,7 +9,6 @@ class DatabaseConnectionFactory public function get($databaseType) { global $isb; - global $summarydbconfig; if (!$databaseType) { error_log('Database type variable, dbtype, is not specified in config.php - defaulting to MySql.'); @@ -25,16 +24,6 @@ public function get($databaseType) $conn = new \mysqli($host, $isb['user'], $isb['pass'], $dbn, $port); $conn->set_charset("utf8mb4"); } - elseif ($databaseType == 'PureMySQL') { - $port = array_key_exists('port', $summarydbconfig) ? $summarydbconfig['port'] : null; - if (!$port) { - $port = ini_get("mysqli.default_port"); - } - list($host, $dbn) = explode('/', $summarydbconfig['db']); - $conn = new \mysqli($host, $summarydbconfig['user'], $summarydbconfig['pass'], $dbn, $port); - $conn->set_charset("utf8mb4"); - } - if ($conn == null) { Utils::returnError("Database Configuration Error", "Database connection for type '$databaseType' does not exist."); diff --git a/api/src/Database/DatabaseFactory.php b/api/src/Database/DatabaseFactory.php index 61ba33c04..7409013ce 100644 --- a/api/src/Database/DatabaseFactory.php +++ b/api/src/Database/DatabaseFactory.php @@ -10,7 +10,6 @@ class DatabaseFactory // Key is lower case representation of class name. public $database_types = array( 'mysql' => ["dbClassName" =>'MySQL', "dataConnectionName" => 'MySQL'], - 'summary' => ["dbClassName" =>'PureMySQL', "dataConnectionName" => 'PureMySQL'] ); function __construct($databaseConnectionFactory) diff --git a/api/src/Page/Summary.php b/api/src/Page/Summary.php deleted file mode 100644 index 7b34bc8d7..000000000 --- a/api/src/Page/Summary.php +++ /dev/null @@ -1,423 +0,0 @@ - '(\w|\s|\-|\(|\))+', - 'propid' => '(.*)', - - // visit - 'com' => '(\[[^\ \]]*\],(asc|desc))', //comment - 'PROPOSALID' => '(\[[^\ \]]*\],(asc|desc))', - - 'BEAMLINENAME' => '(\[[^\ \]]*\],(asc|desc))', - // 'VISITNUMBER' => '(\[[^\ \]]*\],(asc|desc))', - - // Filter Parameters - array of parameter orders e.g. ascending, descending and the comparison value - 'sample' => '(^(\w+),(asc|desc|)+$)', //sample name - 'filetemp' => '(^(\w+),(asc|desc|)+$)', //file template - // 'dcid' => '(.*)', //data collection id - 'pp' => '(\[[^\ \]]*\],(asc|desc|))', // processing programs - 'sg' => '(\[[^\ \]]*\],(asc|desc|))', // space group - - - // Filter Parameters - array of parameter operands and orders such as greater than, equal to, between, less than, like, ascending, descending and the comparison value. - 'STARTDATE' => '(.*)', // visit start date - 'rca' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type a - 'rcb' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type b - 'rcc' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type c - 'rcal' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type alpha - 'rcbe' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type beta - 'rcga' => '(^(\d+),(.+),(asc|desc|)+$)', // refined cell type gamma - 'rlho' => '(^(\d+),(.+),(asc|desc|)+$)', // resolution limit high outer - 'rmpmi' => '(^(\d+),(.+),(asc|desc|)+$)', // rmeaswithiniplusiminus inner - 'riso' => '(^(\d+),(.+),(asc|desc|)+$)', // resioversigi2 overall - 'cci' => '(^(\d+),(.+),(asc|desc|)+$)', // ccanomalous inner - 'cco' => '(^(\d+),(.+),(asc|desc|)+$)', // ccanomalous overall - 'rfsi' => '(^(\d+),(.+),(asc|desc|)+$)', // rfreevaluestart inner - 'rfei' => '(^(\d+),(.+),(asc|desc|)+$)', // rfreevalueend inner - 'nobi' => '(^(\d+),(.+),(asc|desc|)+$)', // noofblobs inner - - - ); - - public static $dispatch = array( - array('/results', 'get', '_get_results'), - array('/proposal', 'get', '_get_proposal'), - array('/spacegroup', 'get', '_get_spacegroup'), - array('/procprogram', 'get', '_get_processingprogram'), - array('/bl', 'get', '_get_beamline') - ); - - public $string_arg_types = array( - 'pp' => ["order" =>'ppt.processingPrograms ', "where" => 'lower(ppt.processingPrograms) = lower( ? ) '], - 'sg' => ["order" =>'sgt.spaceGroup ', "where" => 'lower(sgt.spaceGroup) = lower( ? ) '], - 'BEAMLINENAME' => ["order" =>'vt.beamLineName ', "where" => 'lower(vt.beamLineName) LIKE lower( ? ) '] - ); - - - public $val_arg_types = array( - 'rca' => ["arg" => 'sf.refinedCell_a '], - 'rcb' => ["arg" => 'sf.refinedCell_b '], - 'rcc' => ["arg" => 'sf.refinedCell_c '], - 'rcal' => ["arg" => 'sf.refinedCell_alpha '], - 'rcbe' => ["arg" => 'sf.refinedCell_beta '], - 'rcga' => ["arg" => 'sf.refinedCell_gamma '], - 'rlho' => ["arg" => 'sf.resolutionLimitHighOuter '], - 'rmpmi' => ["arg" => 'sf.rMeasWithinIPlusIMinusInner '], - 'riso' => ["arg" => 'sf.resIOverSigI2Overall '], - 'cci' => ["arg" => 'sf.ccAnomalousInner '], - 'cco' => ["arg" => 'sf.ccAnomalousOverall '], - 'rfsi' => ["arg" => 'sf.rFreeValueStartInner '], - 'rfei' => ["arg" => 'sf.rFreeValueEndInner '], - 'nobi' => ["arg" => 'sf.noofblobs '] - - ); - - - private $summarydb; - - - function __construct(Slim $app, $db, $user) - { - global $summarydbconfig; - - parent::__construct($app, $db, $user); - - if ($summarydbconfig) { - $dbFactory = new DatabaseFactory(new DatabaseConnectionFactory()); - $db = $dbFactory->get("summary"); - $this->summarydb = $db; - } - - } - - private function error_on_no_summary_db(){ - global $summarydbconfig; - if (!$summarydbconfig) { - $this->_error("Not valid when summary database not configured."); - } - } - - function _get_results() { - $this->error_on_no_summary_db(); - $where = ''; - $where_arr = array(); - $order = ''; - $order_arr = array(); - $args = array(); - - $op_array = array(">", "LIKE", "=", "<"); - - if (!$this->has_arg('propid')) $this->_error('No proposal defined'); - - // $propid_array = explode(',', $this->arg('propid')); - $propid_args = preg_split('/[,]+(?![^\[]*\])/', urldecode($this->arg('propid'))); - $propid_array = explode(',', implode(str_replace(array('[',']'),'', $propid_args))); - array_push($order_arr, 'sf.autoProcIntegrationId DESC'); - - - if (!$this->staff) { - $person_id = $this->user->personId; - - $where_propid_personid_array = array(); - - - // # check user can see selected proposals and get all available visits if so - foreach ($propid_array as $value) { - array_push($where_propid_personid_array, '(sf.personid = ?'); - array_push($where_propid_personid_array, 'AND pt.proposalid = ? )'); - array_push($args, $person_id); - array_push($args, $value); - }; - - array_push($where_arr, '('.implode(' OR ', $where_propid_personid_array).')'); - - - } else { - $where_propid_array = array(); - - foreach ($propid_array as $value) { - array_push($where_propid_array, 'pt.proposalid = ?'); - array_push($args, $value); - }; - - array_push($where_arr, '('.implode(' OR ', $where_propid_array).')'); - - } - - - // [VALUE, ORDER] - - if ($this->has_arg('sample')) { - $sample_args = explode(',', urldecode($this->arg('sample'))); - - array_push($args, $sample_args[0]); - array_push($where_arr, "lower(sf.name) LIKE lower(CONCAT(CONCAT('%',?),'%')) ESCAPE '$' "); - - if (isset($sample_args[1]) == 'desc' || isset($sample_args[1]) == 'asc') { - array_push($order_arr, 'sf.name '.$sample_args[2]); - } - - } - - - if ($this->has_arg('filetemp')) { - $filetemp_args = explode(',', urldecode($this->arg('filetemp'))); - - array_push($args, $filetemp_args[0]); - array_push($where_arr, "lower(sf.fileTemplate) LIKE lower(CONCAT(CONCAT('%',?),'%')) ESCAPE '$' "); - - if (isset($filetemp_args[1]) == 'desc' || isset($filetemp_args[1]) == 'asc') { - array_push($order_arr, 'sf.fileTemplate '.$filetemp_args[1]); - } - - } - - - foreach ($this->string_arg_types as $key => $value) { - - if ($this->has_arg($key)) { - - $temp_array = array(); - - $temp_args = preg_split('/[,]+(?![^\[]*\])/', urldecode($this->arg($key))); - - $temp_values = explode(',', str_replace(array('[',']'),'', $temp_args[0])); - - foreach ($temp_values as $temp_value) { - array_push($temp_array, $value['where']); - array_push($args, $temp_value); - } - - array_push($where_arr, '('.implode(" OR ", $temp_array).')'); - - if (isset($temp_args[1]) == 'desc' || isset($temp_args[1]) == 'asc') { - array_push($order_arr, $value['order'].$temp_args[1]); - } - } - } - - - // [VALUE, OPERAND, ORDER] - - foreach ($this->val_arg_types as $key => $value) { - - if ($this->has_arg($key)) { - $temp_args = explode(',', $this->arg($key)); - - array_push($args, $temp_args[0]); - - if (in_array($temp_args[1], $op_array) ) { - array_push($where_arr, $value['arg'].$temp_args[1].' ?'); - } - - - if (isset($temp_args[2]) == 'desc' || isset($temp_args[2]) == 'asc') { - array_push($order_arr, $value['arg'].$temp_args[2]); - } - - } - - } - - - // AND is the delimieter between seperate queries, converted to string - $where = implode(" AND ", $where_arr); - - if (count($order_arr) > 0) { - $order = implode(", ", $order_arr); - } - - - // add multiselect params to end of where clause. - // $where = $where.$pp_where.$sg_where.$BEAMLINENAME_where; - - // get tot query - $tot_args = $args; - - $tot = $this->summarydb->pq( - "SELECT COUNT(sf.autoProcIntegrationId) as TOT - FROM SummaryFact sf - JOIN ProposalDimension pt on pt.proposalDimId = sf.proposalDimId - JOIN VisitDimension vt on vt.sessionDimId = sf.sessionDimId - JOIN ProcessingProgramDimension ppt on ppt.processingProgramsDimId = sf.processingProgramsDimId - JOIN SpaceGroupDimension sgt on sgt.spaceGroupDimId = sgt.spaceGroupDimId - WHERE $where - GROUP BY sf.datacollectionId" - , $tot_args); - - $tot = sizeof($tot) ? intval($tot[0]['TOT']) : 0; - - // paginate - $pp = $this->has_arg('per_page') ? $this->arg('per_page') : 15; - $pg = $this->has_arg('page') ? $this->arg('page')-1 : 0; - $start = $pg*$pp; - $end = $pg*$pp+$pp; - - $st = sizeof($args)+1; - $en = $st + 1; - array_push($args, $start); - array_push($args, $end); - - $pgs = intval($tot/$pp); - if ($tot % $pp != 0) $pgs++; - - - $rows = $this->summarydb->paginate( - "SELECT - pt.prop, - sf.autoProcIntegrationId, - sf.dataCollectionId, - sf.personId, - sf.visit_number, - sf.startTime, - vt.beamLineName, - sf.comments, - GROUP_CONCAT(COALESCE(sf.fileTemplate, 'NULL')) as FILETEMPLATE, - GROUP_CONCAT(COALESCE(sf.name, 'NULL')) as SAMPLENAME, - GROUP_CONCAT(COALESCE(sgt.spaceGroup, 'NULL')) as SPACEGROUP, - GROUP_CONCAT(COALESCE(ppt.processingPrograms, 'NULL')) as PROCESSINGPROGRAMS, - GROUP_CONCAT(COALESCE(sf.refinedCell_a, 'NULL')) as REFINEDCELL_A, - GROUP_CONCAT(COALESCE(sf.refinedCell_b, 'NULL')) as REFINEDCELL_B, - GROUP_CONCAT(COALESCE(sf.refinedCell_c, 'NULL')) as REFINEDCELL_C, - GROUP_CONCAT(COALESCE(sf.refinedCell_alpha, 'NULL')) as REFINEDCELL_ALPHA, - GROUP_CONCAT(COALESCE(sf.refinedCell_beta, 'NULL')) as REFINEDCELL_BETA, - GROUP_CONCAT(COALESCE(sf.refinedCell_gamma, 'NULL')) as REFINEDCELL_GAMMA, - GROUP_CONCAT(COALESCE(sf.resolutionLimitHighOuter, 'NULL')) as RESOLUTIONLIMITHIGHOUTER, - GROUP_CONCAT(COALESCE(sf.rMeasWithinIPlusIMinusInner, 'NULL')) as RMEASWITHINIPLUSIMINUSINNER, - GROUP_CONCAT(COALESCE(sf.resIOverSigI2Overall, 'NULL')) as RESIOVERSIGI2OVERALL, - GROUP_CONCAT(COALESCE(sf.ccAnomalousInner, 'NULL')) as CCANOMALOUSINNER, - GROUP_CONCAT(COALESCE(sf.ccAnomalousOverall, 'NULL')) as CCANOMALOUSOVERALL, - GROUP_CONCAT(COALESCE(sf.rFreeValueStartInner, 'NULL')) as RFREEVALUESTARTINNER, - GROUP_CONCAT(COALESCE(sf.rFreeValueEndInner, 'NULL')) as RFREEVALUEENDINNER, - GROUP_CONCAT(COALESCE(sf.noofblobs, 'NULL')) as NOOFBLOBS - FROM SummaryFact sf - JOIN ProposalDimension pt on pt.proposalDimId = sf.proposalDimId - JOIN VisitDimension vt on vt.sessionDimId = sf.sessionDimId - JOIN ProcessingProgramDimension ppt on ppt.processingProgramsDimId = sf.processingProgramsDimId - JOIN SpaceGroupDimension sgt on sgt.spaceGroupDimId = sf.spaceGroupDimId - WHERE $where - GROUP BY sf.dataCollectionId - ORDER BY $order " - , $args); - - - if (!$rows) { - $this->_error($this->arg('TITLE') . ' could not be found anywhere!', 404); - } - - // sql query output - - // $this->_output(array('data' => $where, 'args' => $args)); - $this->_output(array('data' => $rows, 'total' => $tot )); - // $this->_output(array('data' => $rows, 'where' => $where, 'order' => $order, 'args' => $args)); - - - - } - - function _get_proposal() { - $this->error_on_no_summary_db(); - $args = array(); - $where = "WHERE 1=1"; - - if (!$this->staff) { - $person_id = $this->user->personId; - - // $person_id = 16565; - - $where_person = "sf.personId = ".$person_id; - - $rows = $this->summarydb->pq( - "SELECT pt.prop, pt.proposalid - FROM ProposalDimension pt - JOIN SummaryFact sf on pt.proposalDimId = sf.proposalDimId - WHERE $where_person - GROUP BY pt.proposalid"); - - $this->_output($rows); - - } else { - - $tot = $this->summarydb->pq( - "SELECT COUNT(proposalid) as TOT - FROM ProposalDimension pt - $where", $args); - - - $tot = sizeof($tot) ? intval($tot[0]['TOT']) : 0; - - // paginate - $pp = $this->has_arg('per_page') ? $this->arg('per_page') : 15; - $pg = $this->has_arg('page') ? $this->arg('page')-1 : 0; - $start = $pg*$pp; - $end = $pg*$pp+$pp; - - $st = sizeof($args)+1; - $en = $st + 1; - array_push($args, $start); - array_push($args, $end); - - $pgs = intval($tot/$pp); - if ($tot % $pp != 0) $pgs++; - - $order = 'p.proposalid DESC'; - - $rows = $this->summarydb->paginate( - "SELECT prop, proposalid - FROM ProposalDimension pt - $where", $args); - - $this->_output($rows); - - } - - - - } - - function _get_spacegroup() { - $this->error_on_no_summary_db(); - $rows = $this->summarydb->pq( - "SELECT spaceGroup - FROM SpaceGroupDimension sgt"); - - $this->_output($rows); - - } - - function _get_processingprogram() { - $this->error_on_no_summary_db(); - $rows = $this->summarydb->pq( - "SELECT processingPrograms - FROM ProcessingProgramDimension ppt"); - - $this->_output($rows); - - } - - function _get_beamline() { - $this->error_on_no_summary_db(); - $rows = $this->summarydb->pq( - "SELECT beamLineName - FROM VisitDimension vt"); - - $this->_output($rows); - - } - - - - -} - diff --git a/client/src/js/app/components/navbar.vue b/client/src/js/app/components/navbar.vue index fba7d0302..81c53026b 100644 --- a/client/src/js/app/components/navbar.vue +++ b/client/src/js/app/components/navbar.vue @@ -9,18 +9,6 @@ data-cy="navbar" class="tw-hidden tw-z-10 md:tw-flex md:flex-row tw-bg-sidebar-grad-end tw-justify-center tw-my-4 md:tw-mx-auto tw-border tw-border-gray-400 tw-divide-x tw-divide-gray-400" > - - - - Summary - - - - - - + diff --git a/client/src/js/app/router/router.js b/client/src/js/app/router/router.js index 33ef36c22..3815217f3 100644 --- a/client/src/js/app/router/router.js +++ b/client/src/js/app/router/router.js @@ -38,7 +38,6 @@ import FaultRoutes from 'modules/fault/routes.js' import StatsRoutes from 'modules/stats/routes.js' import SubmissionRoutes from 'modules/submission/routes.js' import VisitsRoutes from 'modules/visits/routes.js' -import SummaryRoutes from 'modules/summary/routes.js' import { resolve } from 'promise' @@ -104,7 +103,6 @@ router.addRoutes(FaultRoutes) router.addRoutes(StatsRoutes) router.addRoutes(SubmissionRoutes) router.addRoutes(VisitsRoutes) -router.addRoutes(SummaryRoutes) // Hook the marionette navigation methods into vue-router methods diff --git a/client/src/js/app/store/store.js b/client/src/js/app/store/store.js index 7832304e5..1c943b813 100644 --- a/client/src/js/app/store/store.js +++ b/client/src/js/app/store/store.js @@ -43,7 +43,6 @@ const store = new Vuex.Store({ isLoading: false, motd: '', - ifsummary: false, synchwebVersion: '', help: false, // Global help flag used to denote if we should display inline help on pages skipHomePage: config.skipHome || false, @@ -68,7 +67,6 @@ const store = new Vuex.Store({ state.motd = options.get('motd') || state.motd - state.ifsummary = options.get('ifsummary') || state.ifsummary state.synchwebVersion = options.get('synchweb_version') || state.synchwebVersion app.options = options diff --git a/client/src/js/modules/summary/collections/summaryresults.js b/client/src/js/modules/summary/collections/summaryresults.js deleted file mode 100644 index 95c6a87f6..000000000 --- a/client/src/js/modules/summary/collections/summaryresults.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['backbone.paginator', 'modules/summary/models/summaryresult'], function(PageableCollection, SummaryResult) { - - return PageableCollection.extend({ - model: SummaryResult, - mode: 'server', - // url: '/summary/example', - url: '/summary/results', - - - state: { - pageSize: 15, - }, - - parseState: function(r, q, state, options) { - return { totalRecords: r.total } - }, - - parseRecords: function(r, options) { - return r.data - }, - - }) -}) \ No newline at end of file diff --git a/client/src/js/modules/summary/models/summaryresult.js b/client/src/js/modules/summary/models/summaryresult.js deleted file mode 100644 index 1a7ac52d2..000000000 --- a/client/src/js/modules/summary/models/summaryresult.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['backbone'], function(Backbone) { - - return Backbone.Model.extend({ - idAttribute: 'proposalID', //change this - // urlRoot: '/summary/example', - urlRoot: '/summary/results', - - - - }) - - }) - \ No newline at end of file diff --git a/client/src/js/modules/summary/routes.js b/client/src/js/modules/summary/routes.js deleted file mode 100644 index 240c886a7..000000000 --- a/client/src/js/modules/summary/routes.js +++ /dev/null @@ -1,14 +0,0 @@ -const SummaryViewWrapper = () => import(/* webpackChunkName: "summary" */ 'modules/summary/views/summary.vue') - - -const routes = [ - // Root path has optional parameters so we need to deal with it first - // It doesn't play nicely with multiple child routes... - { - path: '/summary', - component: SummaryViewWrapper, - - } -] - -export default routes \ No newline at end of file diff --git a/client/src/js/modules/summary/styles/_summary.scss b/client/src/js/modules/summary/styles/_summary.scss deleted file mode 100644 index 884d4fca0..000000000 --- a/client/src/js/modules/summary/styles/_summary.scss +++ /dev/null @@ -1,248 +0,0 @@ - - - -.copied { - height: 125px; - width: 75px; - justify-content: center; - align-items: center; - display: flex; - position: fixed; - top: 20%; - left: 50%; -} - -.status { - height: 125px; - width: 75px; - justify-content: center; - align-items: center; - display: flex; - position: fixed; - top: 45%; - left: 50%; - color: rgb(111, 213, 111); -} - -.proposal-select { - color: black; - height: 10px; -} - - -.order-by { - cursor: pointer; - position: relative; - /* top: 60%; */ - content: ""; - width: 15px; - height: 20px; -} - - -.sidebar-button { - @apply tw-text-center tw-bg-content-active tw-border-content-active tw-text-xs tw-border-4 tw-text-black tw-py-1 tw-px-1 tw-rounded -} -.sidebar-button:hover { - @apply tw-border-teal-700 tw-bg-teal-700 -} - -.clear-button { - @apply tw-flex tw-text-black tw-text-center tw-text-xs tw-py-2 tw-px-1 tw-ml-2 -} - -.clear-button:focus { - @apply tw-text-content-active tw-text-content-active -} - -.filter-grid { - @apply tw-grid tw-grid-rows-1 tw-grid-cols-4 tw-grid-flow-col -} - -.filter-options-grid { - @apply tw-grid tw-grid-rows-6 tw-grid-cols-3 tw-grid-flow-col tw-mb-2 -} - -.format-options-grid { - @apply tw-grid tw-grid-rows-6 tw-grid-cols-1 tw-grid-flow-col tw-mb-2 - -} - -.select-column-button { - @apply tw-h-8 tw-rounded tw-text-xs tw-px-4 tw-text-center tw-inline-flex tw-items-center - tw-bg-content-sub-header-background tw-border-content-sub-header-background tw-border-4 - tw-text-black tw-py-1 tw-px-5 -} - -.select-columns-dropdown { - @apply tw-absolute tw-bg-white tw-rounded tw-shadow - tw-transition tw-ease-out tw-duration-100 -} - -.select-columns-dropdown-show{ - @apply tw-transform tw-opacity-100 tw-scale-100 tw-z-50 -} - -.select-columns-dropdown-hide { - z-index: -1; - @apply tw-transform tw-opacity-0 tw-scale-95 -} - -.select-columns-checkbox { - @apply tw-w-4 tw-h-4 tw-text-blue-600 tw-bg-gray-100 tw-rounded tw-border-gray-300 -} - -.download-file { - @apply tw-mt-10 tw-items-center tw-block tw-pt-1 tw-pl-5 tw-pr-5 tw-h-6 tw-ml-2 tw-mr-2 - tw-bg-content-sub-header-background tw-shadow tw-text-xs tw-rounded tw-shadow -} - -.simple-search { - @apply tw-pl-6 tw-px-4 tw-border -} - -.simple-search:focus { - @apply tw-outline-none tw-shadow-outline -} - -/* Tooltip container */ -.tooltip { - /* position: relative; - display: inline-block; */ - color: rgb(104, 104, 104); /* If you want dots under the hoverable text */ -} - -.add-white { - color: white; -} - -.add-gray { - color: rgb(104, 104, 104); -} - -.tooltip-position-relative { - position: relative; - display: inline-block; -} - -.tooltip-position-absolute { - position: absolute; -} - - -/* Tooltip text */ -.tooltip .tooltiptext { - font-family: Arial, Helvetica, sans-serif; - visibility: hidden; - opacity: 0.9; - width: 120px; - background-color: rgb(25, 24, 24); - color: #fff; - text-align: center; - padding: 5px 0; - border-radius: 6px; - - /* Position the tooltip text - see examples below! */ - position: absolute; - z-index: 1; -} - -/* Show the tooltip text when you mouse over the tooltip container */ -.tooltip:hover .tooltiptext { - visibility: visible; -} - -.description-options { - display:none; - position:absolute; - border:1px solid #828282; - font-family: Arial, Helvetica, sans-serif; - overflow-x:visible; - overflow-y:visible; - -} - -.tooltip:hover .description-options { - display:block; - min-width:100px; - min-height:50px; - background-color: white; - left:40%; - top: 50% -} - -.dc-nav { - position: absolute; - display: flex; -} - -.tiptext-preview { - position: absolute; - font-size:small; - cursor:pointer; -} - -.description { - display:none; - position:absolute; - left: 50%; - border:1px solid #000; - width:400px; - height:400px; -} - -.tiptext-preview:hover .description { - display:block; -} - -.param-options-wrapper { - display:flex; - margin-left: 65%; - margin-top: 5px; -} - - -.param-options-tooltip { - cursor:default; - font-size:12px; - font-weight: bold; - margin-top: 2px; - color: blue; - - &:hover .param-preview { - opacity:1; - display: inline; - transform: translateX(-50%) translateY(0) scale(1); - } - - &:hover { - box-shadow: 0 1px 5px rgba(0,0,0,.1); - border-color: #333; - } -} - -.param-preview { - display: none; - border-radius: 10px; - transition:.2s ease-in-out opacity, .2s ease-in-out transform; - opacity:0; - z-index: 1; - position:absolute; - box-shadow:0 1px 5px rgba(0,0,0,.5); - width:230px; - height:fit-content; - border:4px solid #fff; - background-color: #fff; - color: black; - font-weight: normal; - overflow-x:hidden; - overflow-y:auto; - transform-origin:center bottom; - transform: translateX(-50%) translateY(10px) scale(.9); - -// div { -// transform:scale(.2); -// transform-origin:0 0; -// } - -} \ No newline at end of file diff --git a/client/src/js/modules/summary/utils/utils.js b/client/src/js/modules/summary/utils/utils.js deleted file mode 100644 index cf7a39c34..000000000 --- a/client/src/js/modules/summary/utils/utils.js +++ /dev/null @@ -1,28 +0,0 @@ - - -export function convertToCSV(data) { - - const result = [ - // headers - Object.keys(data['0']), - // values - ...Object.values(data).map(item => Object.values(item)) - ] - .reduce((string, item) => { - string += item.join(',') + '\n'; - return string; - }, ''); - - return result; -} - -export function exportCSV(csv) { - - const anchor = document.createElement('a'); - anchor.href = 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv); - anchor.target = '_blank'; - anchor.download = 'summary_export.csv'; - anchor.click(); - -} - diff --git a/client/src/js/modules/summary/views/summary.vue b/client/src/js/modules/summary/views/summary.vue deleted file mode 100644 index e57f83fed..000000000 --- a/client/src/js/modules/summary/views/summary.vue +++ /dev/null @@ -1,1485 +0,0 @@ - - - - - - - - -