diff --git a/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc b/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc index e98661a3e..d593e8a84 100644 --- a/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc +++ b/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc @@ -57,3 +57,14 @@ ____ Alternatively, environment variables from docker compose or a kubernetes deployment can be used. ____ + +== Deep Linking +To dynamically view a deployed NeoDash dashboard, you can deep-link into a deployed dashboard. + the following deeplinking options are available via URL parameters: +- Appending `?page=1` to the URL will open up a dashboard at a given page. (Starting at zero). +- Appending `?neodash_person_name=Tom` to the URL will set a dashboard parameter as a default for the entire dashboard. + +Multiple parameters can be used in a deep-link by concatinating them: +.... +https://myneodashdeployment.com/?page=1&neodash_person_name=Tom&neodash_movie_name=The%20Matrix +.... diff --git a/docs/modules/ROOT/pages/user-guide/reports/bar-chart.adoc b/docs/modules/ROOT/pages/user-guide/reports/bar-chart.adoc index 8c4694a06..68783a9f2 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/bar-chart.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/bar-chart.adoc @@ -91,6 +91,7 @@ label on top of the visualization (if enabled). |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/choropleth.adoc b/docs/modules/ROOT/pages/user-guide/reports/choropleth.adoc index 32e2db2cd..3327f68b7 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/choropleth.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/choropleth.adoc @@ -57,4 +57,5 @@ the visualization on the y axis |Auto-run query |on/off |on |When activated, automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/circle-packing.adoc b/docs/modules/ROOT/pages/user-guide/reports/circle-packing.adoc index e55ce7500..19fb4b443 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/circle-packing.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/circle-packing.adoc @@ -50,4 +50,5 @@ of the visualization. |Auto-run query |on/off |on |When activated, automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/graph.adoc b/docs/modules/ROOT/pages/user-guide/reports/graph.adoc index 3a1f49aef..c3e449523 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/graph.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/graph.adoc @@ -123,6 +123,7 @@ that the graph can be explored further. Dynamic Dashboard Parameters |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/iframe.adoc b/docs/modules/ROOT/pages/user-guide/reports/iframe.adoc index 2c37b5c18..44e822e08 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/iframe.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/iframe.adoc @@ -35,4 +35,5 @@ iFrame URL. |Append global parameters to iFrame URL |on/off |off |If enabled, appends the full list of global parameters as URL parameters to the specified URL. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc b/docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc index b26a1a6ea..1e7c64c4e 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc @@ -87,6 +87,10 @@ format should look like this: smoothened. One of linear (no smoothing), basis (interpolating), cardinal (through each point) and step (step-based interpolation). +|X-axis Tick Rotation (Degrees) |number |0 | The angle at which the tick labels on the x-axis are rotated. + +|Y-axis Tick Rotation (Degrees) |number |0 | The angle at which the tick labels on the y-axis are rotated. + |Show Grid |on/off |on |If enabled, shows a grid in the line chart that intersects at the axis ticks. @@ -116,6 +120,7 @@ selector (footer of the visualization). |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/map.adoc b/docs/modules/ROOT/pages/user-guide/reports/map.adoc index 19a729e11..5dee80ec1 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/map.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/map.adoc @@ -117,6 +117,7 @@ selector (footer of the visualization). |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/markdown.adoc b/docs/modules/ROOT/pages/user-guide/reports/markdown.adoc index 5f33137df..e9ea05ea0 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/markdown.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/markdown.adoc @@ -29,4 +29,5 @@ image::markdown.png[Basic Markdown] |Replace global parameters in Markdown |on/off |on |If enabled, replaces all instances of query parameters (e.g. $neodash_person_name) inside the markdown source. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/parameter-select.adoc b/docs/modules/ROOT/pages/user-guide/reports/parameter-select.adoc index 236667e2a..9bc2e441d 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/parameter-select.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/parameter-select.adoc @@ -51,4 +51,5 @@ for large datasets where the autocomplete field is too slow to render. |Helper Text (Override) |Text |(none) |Text to show above the user input field. This will override the autogenerated text from the node/relationship property pair. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/pie-chart.adoc b/docs/modules/ROOT/pages/user-guide/reports/pie-chart.adoc index 50df8353d..d4321aa5c 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/pie-chart.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/pie-chart.adoc @@ -88,6 +88,7 @@ of the visualization. |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/raw-json.adoc b/docs/modules/ROOT/pages/user-guide/reports/raw-json.adoc index 691eaa6be..cf523529e 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/raw-json.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/raw-json.adoc @@ -23,4 +23,5 @@ image::json.png[Basic Value] |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/sankey.adoc b/docs/modules/ROOT/pages/user-guide/reports/sankey.adoc index fb68681cd..1b1dad010 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/sankey.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/sankey.adoc @@ -62,6 +62,7 @@ of the visualization. |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/single-value.adoc b/docs/modules/ROOT/pages/user-guide/reports/single-value.adoc index 0a7d96aca..593f92a11 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/single-value.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/single-value.adoc @@ -46,6 +46,7 @@ image::value2.png[Styled Value] |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/sunburst.adoc b/docs/modules/ROOT/pages/user-guide/reports/sunburst.adoc index 1ad58204e..c442baf21 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/sunburst.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/sunburst.adoc @@ -58,4 +58,5 @@ in the visualization. |Auto-run query |on/off |on |When activated, automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/docs/modules/ROOT/pages/user-guide/reports/table.adoc b/docs/modules/ROOT/pages/user-guide/reports/table.adoc index 4857d1998..435b2904d 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/table.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/table.adoc @@ -11,6 +11,8 @@ The table report supports the following additional features: - Sorting/filtering by clicking on the table headers. - Downloading your data as a CSV file. +Double-clicking on a table cell will copy that cell's value to the user's clipboard. + == Examples === Basic Table @@ -52,6 +54,7 @@ the complete set of table results (all pages) as a CSV file. |Auto-run query |on/off |on |when activated automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== == Rule-Based Styling diff --git a/docs/modules/ROOT/pages/user-guide/reports/treemap.adoc b/docs/modules/ROOT/pages/user-guide/reports/treemap.adoc index daf44993a..9878707d0 100644 --- a/docs/modules/ROOT/pages/user-guide/reports/treemap.adoc +++ b/docs/modules/ROOT/pages/user-guide/reports/treemap.adoc @@ -50,4 +50,5 @@ of the visualization. |Auto-run query |on/off |on |When activated, automatically runs the query when the report is displayed. When set to `off', the query is displayed and will need to be executed manually. +|Report Description |markdown text | | When specified, adds another button the report header that opens a pop-up. This pop-up contains the rendered markdown from this setting. |=== diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index faa2bb6ba..4959884ab 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -5,7 +5,7 @@ import { NEODASH_VERSION } from "../dashboard/DashboardReducer"; import { loadDashboardFromNeo4jByNameThunk, loadDashboardFromNeo4jByUUIDThunk, loadDashboardThunk, upgradeDashboardVersion } from "../dashboard/DashboardThunks"; import { createNotificationThunk } from "../page/PageThunks"; import { QueryStatus, runCypherQuery } from "../report/ReportQueryRunner"; -import { updateGlobalParametersThunk, updateGlobalParameterThunk } from "../settings/SettingsThunks"; +import { setPageNumberThunk, updateGlobalParametersThunk, updateGlobalParameterThunk } from "../settings/SettingsThunks"; import { setConnected, setConnectionModalOpen, setConnectionProperties, setDesktopConnectionProperties, resetShareDetails, setShareDetailsFromUrl, setWelcomeScreenOpen, setDashboardToLoadAfterConnecting, @@ -259,6 +259,12 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState: } }); + const page = urlParams.get('page'); + if(page !== "" && page !== null){ + if(!isNaN(page)){ + dispatch(setPageNumberThunk(parseInt(page))); + } + } const clearNotificationAfterLoad = true; dispatch(setSSOEnabled(config['ssoEnabled'], config["ssoDiscoveryUrl"])); const state = getState(); diff --git a/src/card/view/CardView.tsx b/src/card/view/CardView.tsx index 7711a484a..0b2cdc7ae 100644 --- a/src/card/view/CardView.tsx +++ b/src/card/view/CardView.tsx @@ -26,6 +26,7 @@ const NeoCardView = ({ title, database, query, globalParameters, const reportHeader = { const [text, setText] = React.useState(title); + const [descriptionModalOpen, setDescriptionModalOpen] = React.useState(false); // Ensure that we only trigger a text update event after the user has stopped typing. const debouncedTitleUpdate = useCallback( @@ -32,7 +36,7 @@ const NeoCardViewHeader = ({ title, editable, onTitleUpdate, fullscreenEnabled, }, [title]) const cardTitle = <> - +
{editable ?
@@ -59,6 +63,8 @@ const NeoCardViewHeader = ({ title, editable, onTitleUpdate, fullscreenEnabled,
+ const descriptionEnabled = description && description.length > 0; + const settingsButton = @@ -85,13 +91,37 @@ const NeoCardViewHeader = ({ title, editable, onTitleUpdate, fullscreenEnabled, - return - {(downloadImageEnabled) ? downloadImageButton : <>} - {fullscreenEnabled ? (expanded ? unMaximizeButton : maximizeButton) : <>} - {editable ? settingsButton : <>} - } - title={cardTitle} /> + const descriptionButton = + setDescriptionModalOpen(true)} aria-label="details"> + + + + + return <> + setDescriptionModalOpen(false)} aria-labelledby="form-dialog-title"> + + {title} + setDescriptionModalOpen(false)} style={{ padding: "3px", float: "right" }}> + + + + + + +
+ +
+
+
+ + {(downloadImageEnabled) ? downloadImageButton : <>} + {fullscreenEnabled ? (expanded ? unMaximizeButton : maximizeButton) : <>} + {descriptionEnabled ? descriptionButton : <>} + {editable ? settingsButton : <>} + } + title={cardTitle} /> + } export default NeoCardViewHeader; diff --git a/src/chart/TableChart.tsx b/src/chart/TableChart.tsx index 9e7aaea6e..839f024f6 100644 --- a/src/chart/TableChart.tsx +++ b/src/chart/TableChart.tsx @@ -7,6 +7,10 @@ import GetAppIcon from '@material-ui/icons/GetApp'; import { IconButton, Tooltip } from '@material-ui/core'; import { downloadCSV } from './util/ChartUtils'; import SaveAltIcon from '@material-ui/icons/SaveAlt'; +import Button from '@material-ui/core/Button'; +import Snackbar from '@material-ui/core/Snackbar'; +import CloseIcon from '@material-ui/icons/Close'; + const TABLE_HEADER_HEIGHT = 32; const TABLE_FOOTER_HEIGHT = 52; @@ -28,6 +32,7 @@ const NeoTableChart = (props: ChartProps) => { const transposed = props.settings && props.settings.transposed ? props.settings.transposed : false; const allowDownload = props.settings && props.settings.allowDownload !== undefined ? props.settings.allowDownload : false; const styleRules = props.settings && props.settings.styleRules ? props.settings.styleRules : []; + const [notificationOpen, setNotificationOpen] = React.useState(false); const useStyles = generateClassDefinitionsBasedOnRules(styleRules); const classes = useStyles(); @@ -76,10 +81,29 @@ const NeoTableChart = (props: ChartProps) => { return (
- {(allowDownload && rows && rows.length > 0) ? + setNotificationOpen(false)} + message="Value copied to clipboard." + action={ + + setNotificationOpen(false)}> + + + + } + /> + + + {(allowDownload && rows && rows.length > 0) ? { - downloadCSV(rows); - }} aria-label="download csv" style={{ bottom: "9px", left: "3px", position: "absolute"}}> + downloadCSV(rows); + }} aria-label="download csv" style={{ bottom: "9px", left: "3px", position: "absolute" }}> @@ -88,7 +112,11 @@ const NeoTableChart = (props: ChartProps) => { headerHeight={32} rows={rows} columns={columns} - pageSize={Math.floor((props.dimensions.height-TABLE_HEADER_HEIGHT-TABLE_FOOTER_HEIGHT) / TABLE_ROW_HEIGHT)-1} + onCellDoubleClick={(e) => { + setNotificationOpen(true); + navigator.clipboard.writeText(e.value); + }} + pageSize={Math.floor((props.dimensions.height - TABLE_HEADER_HEIGHT - TABLE_FOOTER_HEIGHT) / TABLE_ROW_HEIGHT) - 1} disableSelectionOnClick components={{ ColumnSortedDescendingIcon: () => <>, diff --git a/src/chart/visualizations/LineVisualization.tsx b/src/chart/visualizations/LineVisualization.tsx index 67c54ee7c..911ac35ce 100644 --- a/src/chart/visualizations/LineVisualization.tsx +++ b/src/chart/visualizations/LineVisualization.tsx @@ -44,6 +44,9 @@ export default function (props: ExtendedChartReportProps) { const xTickTimeValues = (settings["xTickTimeValues"] != undefined) ? settings["xTickTimeValues"] : "every 1 years"; const xAxisTimeFormat = (settings["xAxisTimeFormat"] != undefined) ? settings["xAxisTimeFormat"] : "%Y-%m-%dT%H:%M:%SZ"; const xAxisFormat = (settings["xAxisFormat"] != undefined) ? settings["xAxisFormat"] : undefined; + + const xTickRotationAngle = (settings["xTickRotationAngle"] != undefined) ? settings["xTickRotationAngle"] : 0; + const yTickRotationAngle = (settings["yTickRotationAngle"] != undefined) ? settings["yTickRotationAngle"] : 0; const styleRules = settings && settings.styleRules ? settings.styleRules : []; // Compute line color based on rules - overrides default color scheme completely. @@ -125,7 +128,7 @@ export default function (props: ExtendedChartReportProps) { tickValues: xTickTimeValues, tickSize: 5, tickPadding: 5, - tickRotation: 0, + tickRotation: xTickRotationAngle, format: xAxisTimeFormat, legend: "Time", legendOffset: 36, @@ -135,14 +138,14 @@ export default function (props: ExtendedChartReportProps) { tickSize: 6, tickValues: xTickValues, format: xAxisFormat, - tickPadding: 12, - tickRotation: 0, + tickRotation: xTickRotationAngle, + tickPadding: 12 } } axisLeft={{ tickSize: 6, tickPadding: 12, - tickRotation: 0, + tickRotation: yTickRotationAngle, }} pointSize={pointSize} lineWidth={lineWidth} diff --git a/src/component/field/Field.tsx b/src/component/field/Field.tsx index 9e1ac1ce4..b8ffef640 100644 --- a/src/component/field/Field.tsx +++ b/src/component/field/Field.tsx @@ -16,6 +16,7 @@ const NeoField = ({ label, variant= undefined, helperText = undefined, defaultValue = undefined, + multiline = false, placeholder = "" }) => { return ( {onClick(e.target.textContent)}} onChange={(event) => { if (!numeric) { diff --git a/src/component/field/Setting.tsx b/src/component/field/Setting.tsx index 1d64eb9ca..30d70a6fa 100644 --- a/src/component/field/Setting.tsx +++ b/src/component/field/Setting.tsx @@ -10,13 +10,13 @@ const generateListItem = (label, option) => { return (option ? 'on' : 'off') } else { if (label == "Color Scheme" || label == "Node Color Scheme") { - const colorsFull = categoricalColorSchemes[option]; - const colors = Array.isArray(colorsFull) ? (Array.isArray(colorsFull.slice(-1)[0]) ? colorsFull.slice(-1)[0] : colorsFull) : colorsFull; + const colorsFull = categoricalColorSchemes[option]; + const colors = Array.isArray(colorsFull) ? (Array.isArray(colorsFull.slice(-1)[0]) ? colorsFull.slice(-1)[0] : colorsFull) : colorsFull; return (
{Array.isArray(colors) ? colors.map(element => { return - }) : ""+option - }
) + }) : "" + option + }
) } else { return "" + option @@ -29,7 +29,7 @@ const generateListItem = (label, option) => { * A setting is a generic React component that is rendered dynamically based on the 'type'. */ const NeoSetting = ({ name, value, choices, type, label, defaultValue, disabled = undefined, - helperText = undefined, inverted = false, onChange, onClick=(val)=>{}, + helperText = undefined, inverted = false, onChange, onClick = (val) => { }, style = { width: "100%", marginBottom: "10px", marginRight: "10px", marginLeft: "10px" } }) => { switch (type) { case SELECTION_TYPES.NUMBER: @@ -60,6 +60,21 @@ const NeoSetting = ({ name, value, choices, type, label, defaultValue, disabled onClick={(val) => onClick(val)} onChange={(val) => onChange(val)} /> ; + case SELECTION_TYPES.MULTILINE_TEXT: + return
+ onClick(val)} + onChange={(val) => onChange(val)} /> +
; case SELECTION_TYPES.DICTIONARY: return
onClick(val)} - onChange={(val) => onChange(val)} + onChange={(val) => onChange(val)} style={style}>
} diff --git a/src/config/ReportConfig.tsx b/src/config/ReportConfig.tsx index f5e06567a..856428f72 100644 --- a/src/config/ReportConfig.tsx +++ b/src/config/ReportConfig.tsx @@ -23,6 +23,7 @@ export enum SELECTION_TYPES { NUMBER_OR_DATETIME, LIST, TEXT, + MULTILINE_TEXT, DICTIONARY, COLOR, NODE_PROPERTIES @@ -68,6 +69,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -192,16 +198,21 @@ export const REPORT_TYPES = { values: [true, false], default: false }, + "iconStyle": { + label: "Node Background Image by label, formatted as {label: url}", + type: SELECTION_TYPES.TEXT, + default: "" + }, "autorun": { label: "Auto-run query", type: SELECTION_TYPES.LIST, values: [true, false], default: true }, - "iconStyle": { - label: "Icon Style on format { label : url}", - type: SELECTION_TYPES.TEXT, - default: "" + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -321,6 +332,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -448,6 +464,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -530,6 +551,16 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.TEXT, default: "every 1 year" }, + "xTickRotationAngle": { + label: "X-axis Tick Rotation (Degrees)", + type: SELECTION_TYPES.NUMBER, + default: 0 + }, + "yTickRotationAngle": { + label: "Y-axis Tick Rotation (Degrees)", + type: SELECTION_TYPES.NUMBER, + default: 0 + }, "curve": { label: "Line Smoothing", type: SELECTION_TYPES.LIST, @@ -588,6 +619,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -669,6 +705,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -710,6 +751,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -794,6 +840,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -868,6 +919,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -936,6 +992,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -1035,6 +1096,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -1130,8 +1196,12 @@ export const REPORT_TYPES = { label: "Tooltip Property", type: SELECTION_TYPES.TEXT, default: "properties.name" + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } - } }, "json": { @@ -1146,6 +1216,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: true + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -1208,6 +1283,11 @@ export const REPORT_TYPES = { label: "Timeout for value updates (ms)", type: SELECTION_TYPES.NUMBER, default: 1000 + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -1231,6 +1311,11 @@ export const REPORT_TYPES = { type: SELECTION_TYPES.LIST, values: [true, false], default: false + }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." } } }, @@ -1249,6 +1334,11 @@ export const REPORT_TYPES = { values: [true, false], default: false }, + "description": { + label: "Report Description", + type: SELECTION_TYPES.MULTILINE_TEXT, + default: "Enter markdown here..." + } } } } diff --git a/src/settings/SettingsThunks.ts b/src/settings/SettingsThunks.ts index 54098d9a3..f9027581a 100644 --- a/src/settings/SettingsThunks.ts +++ b/src/settings/SettingsThunks.ts @@ -9,9 +9,13 @@ const update = (state, mutations) => export const setPageNumberThunk = (number) => (dispatch: any, getState: any) => { try { + const pages = getState().dashboard.pages; + // Make sure the page number is within bounds. + number = Math.max(0, Math.min(pages.length - 1, number)); dispatch(updateDashboardSetting("pagenumber", number)) // Make sure that we don't have weird transitions with the settings popups. - const page = getState().dashboard.pages[number]; + + const page = pages[number]; page.reports.map((report, i) => { dispatch(hardResetCardSettings(number, i)) });