-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4178 from beyondessential/release-2022-38
- Loading branch information
Showing
219 changed files
with
6,456 additions
and
1,658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Tupaia | ||
* Copyright (c) 2017 - 2022 Beyond Essential Systems Pty Ltd | ||
*/ | ||
|
||
import { Report } from './types'; | ||
|
||
// Used when combining the report and dashboardItem/mapOverlay | ||
export const extractDataFromReport = (report: Report) => { | ||
const { config } = report; | ||
if ('customReport' in config) { | ||
return { customReport: config.customReport }; | ||
} | ||
|
||
const { fetch, transform } = config; | ||
const { aggregations, ...restOfFetch } = fetch; | ||
return { fetch: restOfFetch, aggregate: aggregations, transform }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
packages/admin-panel/src/pages/resources/DataTablesPage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Tupaia | ||
* Copyright (c) 2017 - 2021 Beyond Essential Systems Pty Ltd | ||
*/ | ||
|
||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { ResourcePage } from './ResourcePage'; | ||
|
||
const DATA_TABLES_ENDPOINT = 'dataTables'; | ||
|
||
const FIELDS = [ | ||
{ | ||
Header: 'Code', | ||
source: 'code', | ||
type: 'tooltip', | ||
}, | ||
{ | ||
Header: 'Description', | ||
source: 'description', | ||
}, | ||
{ | ||
Header: 'Type', | ||
source: 'type', | ||
}, | ||
{ | ||
Header: 'Config', | ||
source: 'config', | ||
type: 'jsonTooltip', | ||
editConfig: { type: 'jsonEditor' }, | ||
}, | ||
{ | ||
Header: 'Permission groups', | ||
source: 'permission_groups', | ||
type: 'tooltip', | ||
editConfig: { | ||
type: 'jsonArray', | ||
}, | ||
}, | ||
]; | ||
|
||
const COLUMNS = [...FIELDS]; | ||
|
||
export const DataTablesPage = ({ getHeaderEl }) => ( | ||
<ResourcePage | ||
title="Data-Tables" | ||
endpoint={DATA_TABLES_ENDPOINT} | ||
columns={COLUMNS} | ||
getHeaderEl={getHeaderEl} | ||
/> | ||
); | ||
|
||
DataTablesPage.propTypes = { | ||
getHeaderEl: PropTypes.func.isRequired, | ||
}; |
Oops, something went wrong.