Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection of bug fixes for the 2.4.2 release #744

Merged
merged 23 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
31044c1
Fixed issue where table action rule creation modal displayed invalid …
nielsdejong Jan 3, 2024
b6b36f2
Add support for links in table actions, as well as improved rendering…
nielsdejong Jan 3, 2024
78a56fd
No longer rendering empty buttons for missing values in table actions
nielsdejong Jan 3, 2024
3b71740
Fix number formatting to always use en-US locale
nielsdejong Jan 4, 2024
3f173ce
Fixed issue where dashboard database was not set correctly for share …
nielsdejong Jan 4, 2024
013344c
Fixed dashboard title visibility in sidebar
nielsdejong Jan 4, 2024
468540c
Added missing setting to pie chart configuration
nielsdejong Jan 4, 2024
3e0e1ad
Clean up code, remove old console.log statements
nielsdejong Jan 5, 2024
86dca1b
Stability and UX for table checkbox actiosn
nielsdejong Jan 10, 2024
333f9e2
Handling shared dashboards in standalone mode
nielsdejong Jan 10, 2024
17c27f6
Fixed sharing logic in both standalone and editor modes
nielsdejong Jan 10, 2024
fdc3be2
Added hidden setting for hiding the plaintext password warning. Fixed…
nielsdejong Jan 11, 2024
2cf2ade
Merge branch 'develop' into feature/2.4.2-bug-fix-collection
nielsdejong Jan 11, 2024
3cd49c5
Style tweaks for reports without footers
nielsdejong Jan 11, 2024
a803f5f
Fixed styling defaults for bar chart
nielsdejong Jan 11, 2024
2797f57
Fixed fullscreen views
nielsdejong Jan 12, 2024
21efb64
Freetext parameter with manual save style fixes
nielsdejong Jan 12, 2024
f105717
clean up graph editing modal
nielsdejong Jan 12, 2024
7f90d56
Merge branch 'develop' into feature/2.4.2-bug-fix-collection
nielsdejong Jan 12, 2024
7fd6998
Correction to release notes
nielsdejong Jan 12, 2024
080fe49
Merge branch 'develop' into feature/2.4.2-bug-fix-collection
nielsdejong Jan 12, 2024
ec7835f
Robustness of actions rule create modal
nielsdejong Jan 12, 2024
910da66
Improved comments
nielsdejong Jan 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
}

.react-resizable-handle {
bottom: 1px !important;
bottom: 4px !important;
right: -2px !important;
opacity: 0.5;
color: rgb(222, 222, 222);
}
Expand Down Expand Up @@ -216,7 +217,7 @@
}

.card-view .MuiTablePagination-root {
margin-top: -40px;
margin-top: 0px;

}

Expand Down Expand Up @@ -253,3 +254,7 @@
display: none;
}
/* End Gantt chart workaround */

.markdown-widget a {
text-decoration: underline;
}
2 changes: 2 additions & 0 deletions src/application/ApplicationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export const setStandaloneEnabled = (
standaloneDashboardURL: string,
standaloneUsername: string,
standalonePassword: string,
standalonePasswordWarningHidden: boolean,
standaloneAllowLoad: boolean,
standaloneLoadFromOtherDatabases: boolean,
standaloneMultiDatabase: boolean,
Expand All @@ -167,6 +168,7 @@ export const setStandaloneEnabled = (
standaloneDashboardURL,
standaloneUsername,
standalonePassword,
standalonePasswordWarningHidden,
standaloneAllowLoad,
standaloneLoadFromOtherDatabases,
standaloneMultiDatabase,
Expand Down
2 changes: 2 additions & 0 deletions src/application/ApplicationReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,20 @@
state = update(state, { standalone: standalone });
return state;
}
case SET_LOGGING_MODE: {
const { loggingMode } = payload;
state = update(state, { loggingMode: loggingMode });
return state;

Check warning on line 154 in src/application/ApplicationReducer.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationReducer.ts#L151-L154

Added lines #L151 - L154 were not covered by tests
}
case SET_LOGGING_DATABASE: {
const { loggingDatabase } = payload;
state = update(state, { loggingDatabase: loggingDatabase });
return state;

Check warning on line 159 in src/application/ApplicationReducer.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationReducer.ts#L156-L159

Added lines #L156 - L159 were not covered by tests
}
case SET_LOG_ERROR_NOTIFICATION: {
const { logErrorNotification } = payload;
state = update(state, { logErrorNotification: logErrorNotification });
return state;

Check warning on line 164 in src/application/ApplicationReducer.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationReducer.ts#L161-L164

Added lines #L161 - L164 were not covered by tests
}
case SET_SSO_ENABLED: {
const { enabled, discoveryUrl } = payload;
Expand Down Expand Up @@ -195,6 +195,7 @@
standaloneDashboardURL,
standaloneUsername,
standalonePassword,
standalonePasswordWarningHidden,
standaloneAllowLoad,
standaloneLoadFromOtherDatabases,
standaloneMultiDatabase,
Expand All @@ -211,6 +212,7 @@
standaloneDashboardURL: standaloneDashboardURL,
standaloneUsername: standaloneUsername,
standalonePassword: standalonePassword,
standalonePasswordWarningHidden: standalonePasswordWarningHidden,
standaloneAllowLoad: standaloneAllowLoad,
standaloneLoadFromOtherDatabases: standaloneLoadFromOtherDatabases,
standaloneMultiDatabase: standaloneMultiDatabase,
Expand Down
1 change: 1 addition & 0 deletions src/application/ApplicationSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
};

export const applicationGetConnectionUser = (state: any) => {
return state.application.connection.username;

Check warning on line 41 in src/application/ApplicationSelectors.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationSelectors.ts#L41

Added line #L41 was not covered by tests
};

export const applicationGetShareDetails = (state: any) => {
Expand All @@ -50,7 +50,7 @@
};

export const applicationGetLoggingMode = (state: any) => {
return state.application.loggingMode;

Check warning on line 53 in src/application/ApplicationSelectors.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationSelectors.ts#L53

Added line #L53 was not covered by tests
};

export const applicationHasNeo4jDesktopConnection = (state: any) => {
Expand Down Expand Up @@ -94,6 +94,7 @@
standaloneDashboardURL: state.application.standaloneDashboardURL,
standaloneUsername: state.application.standaloneUsername,
standalonePassword: state.application.standalonePassword,
standalonePasswordWarningHidden: state.application.standalonePasswordWarningHidden,
standaloneAllowLoad: state.application.standaloneAllowLoad,
standaloneLoadFromOtherDatabases: state.application.standaloneLoadFromOtherDatabases,
standaloneMultiDatabase: state.application.standaloneMultiDatabase,
Expand Down
43 changes: 30 additions & 13 deletions src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
if (records && records[0] && records[0].error) {
dispatch(createNotificationThunk('Unable to establish connection', records[0].error));
if (loggingSettings.loggingMode > '0') {
dispatch(

Check warning on line 81 in src/application/ApplicationThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationThunks.ts#L81

Added line #L81 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -103,7 +103,7 @@
dispatch(updateSessionParameterThunk('session_database', database));
dispatch(updateSessionParameterThunk('session_username', username));
if (loggingSettings.loggingMode > '0') {
dispatch(

Check warning on line 106 in src/application/ApplicationThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationThunks.ts#L106

Added line #L106 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand Down Expand Up @@ -259,26 +259,42 @@
const skipConfirmation = urlParams.get('skipConfirmation') == 'Yes';

const dashboardDatabase = urlParams.get('dashboardDatabase');
dispatch(setStandaloneDashboardDatabase(dashboardDatabase));

Check warning on line 262 in src/application/ApplicationThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationThunks.ts#L262

Added line #L262 was not covered by tests
if (urlParams.get('credentials')) {
setWelcomeScreenOpen(false);

Check warning on line 264 in src/application/ApplicationThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationThunks.ts#L264

Added line #L264 was not covered by tests
const connection = decodeURIComponent(urlParams.get('credentials'));
const protocol = connection.split('://')[0];

Check warning on line 266 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const username = connection.split('://')[1].split(':')[0];

Check warning on line 267 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const password = connection.split('://')[1].split(':')[1].split('@')[0];

Check warning on line 268 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring

const database = connection.split('@')[1].split(':')[0];

Check warning on line 269 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const url = connection.split('@')[1].split(':')[1];

Check warning on line 270 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const port = connection.split('@')[1].split(':')[2];

Check warning on line 271 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
if (url == password) {
// Special case where a connect link is generated without a password.
// Here, the format is parsed incorrectly and we open the connection window instead.

dispatch(resetShareDetails());
dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], ''));
dispatch(setWelcomeScreenOpen(false));
dispatch(setConnectionModalOpen(true));
// window.history.pushState({}, document.title, "/");
return;
}
// if (url == password) {
// // Special case where a connect link is generated without a password.
// // Here, the format is parsed incorrectly and we open the connection window instead.
// dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], ''));
// dispatch(
// setShareDetailsFromUrl(
// type,
// id,
// standalone,
// protocol,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented code is needed?

// url,
// port,
// database,
// username.split('@')[0],
// '',
// dashboardDatabase,
// true
// )
// );
// setDashboardToLoadAfterConnecting(id);
// window.history.pushState({}, document.title, window.location.pathname);
// dispatch(setConnectionModalOpen(true));
// dispatch(setWelcomeScreenOpen(false));
// // window.history.pushState({}, document.title, "/");
// return;
// }

dispatch(setConnectionModalOpen(false));
dispatch(
Expand Down Expand Up @@ -448,6 +464,7 @@
config.standaloneDashboardURL,
config.standaloneUsername,
config.standalonePassword,
config.standalonePasswordWarningHidden,
config.standaloneAllowLoad,
config.standaloneLoadFromOtherDatabases,
config.standaloneMultiDatabase,
Expand Down Expand Up @@ -558,7 +575,7 @@
dispatch(initializeApplicationAsEditorThunk(config, paramsToSetAfterConnecting));
}
} catch (e) {
console.log(e);

Check warning on line 578 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Unexpected console statement
dispatch(setWelcomeScreenOpen(false));
dispatch(
createNotificationThunk(
Expand Down Expand Up @@ -605,7 +622,6 @@
(config, paramsToSetAfterConnecting) => (dispatch: any, getState: any) => {
const clearNotificationAfterLoad = true;
const state = getState();

// If we are running in standalone mode, auto-set the connection details that are configured.
dispatch(
setConnectionProperties(
Expand Down Expand Up @@ -648,4 +664,5 @@
} else {
dispatch(setConnectionModalOpen(true));
}
dispatch(handleSharedDashboardsThunk());

Check warning on line 667 in src/application/ApplicationThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/application/ApplicationThunks.ts#L667

Added line #L667 was not covered by tests
};
2 changes: 1 addition & 1 deletion src/card/settings/CardSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const NeoCardSettings = ({
expanded,
onToggleCardExpand,
}) => {
const reportHeight = heightPx - CARD_HEADER_HEIGHT + 24;
const reportHeight = heightPx - CARD_HEADER_HEIGHT + 19;

const cardSettingsHeader = (
<NeoCardSettingsHeader
Expand Down
14 changes: 7 additions & 7 deletions src/card/view/CardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const NeoCardView = ({
expanded,
onToggleCardExpand,
}) => {
const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 22;
const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 20;
const cardHeight = heightPx - CARD_FOOTER_HEIGHT + 23;
const ref = React.useRef();

Expand Down Expand Up @@ -137,10 +137,10 @@ const NeoCardView = ({

const localParameters = { ...getLocalParameters(query), ...getLocalParameters(settings.drilldownLink) };
const reportTypes = getReportTypes(extensions);
const withoutFooter =
reportTypes[type] && reportTypes[type].withoutFooter
? reportTypes[type].withoutFooter
: (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections);
const reportTypeHasNoFooter = reportTypes[type] && reportTypes[type].withoutFooter;
const withoutFooter = reportTypeHasNoFooter
? reportTypes[type].withoutFooter
: (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections);

const getGlobalParameter = (key: string): unknown => {
return globalParameters ? globalParameters[key] : undefined;
Expand Down Expand Up @@ -170,13 +170,13 @@ const NeoCardView = ({
paddingRight: '0px',
paddingTop: '0px',
width: '100%',
marginTop: '-3px',
marginTop: '-9px',
height: expanded
? withoutFooter
? '100%'
: `calc(100% - ${CARD_FOOTER_HEIGHT}px)`
: withoutFooter
? `${reportHeight + CARD_FOOTER_HEIGHT}px`
? `${reportHeight + CARD_FOOTER_HEIGHT - (reportTypeHasNoFooter ? 0 : 20)}px`
: `${reportHeight}px`,
overflow: 'auto',
};
Expand Down
5 changes: 4 additions & 1 deletion src/chart/ChartUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
let param = _.replace(`$`, '').trim();
let val = parameters?.[param] || null;
let type = getRecordType(val);
let valueRender = type === 'string' ? val : RenderSubValue(val);
let valueRender = type === 'string' || type == 'link' ? val : RenderSubValue(val);
return valueRender;
};

Expand Down Expand Up @@ -406,6 +406,9 @@
* @returns True if it's an object castable to date
*/
export function isCastableToNeo4jDate(value: object) {
if (value == null || value == undefined) {
return false;

Check warning on line 410 in src/chart/ChartUtils.ts

View check run for this annotation

Codecov / codecov/patch

src/chart/ChartUtils.ts#L410

Added line #L410 was not covered by tests
}
let keys = Object.keys(value);
return keys.length == 3 && keys.includes('day') && keys.includes('month') && keys.includes('year');
}
Expand Down
2 changes: 1 addition & 1 deletion src/chart/bar/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
const customDimensions = settings.customDimensions ? settings.customDimensions : false;
const legendWidth = settings.legendWidth ? settings.legendWidth : 128;
const marginTop = settings.marginTop ? settings.marginTop : 24;
const marginBottom = settings.marginBottom ? settings.marginBottom : 60;
const marginBottom = settings.marginBottom ? settings.marginBottom : 30;
const legend = settings.legend ? settings.legend : false;
const labelRotation = settings.labelRotation != undefined ? settings.labelRotation : 45;
const barWidth = settings.barWidth ? settings.barWidth : 10;
Expand All @@ -30,7 +30,7 @@
const expandHeightForLegend = settings.expandHeightForLegend ? settings.expandHeightForLegend : false;
const actionsRules =
extensionEnabled(props.extensions, 'actions') && props.settings && props.settings.actionsRules
? props.settings.actionsRules

Check warning on line 33 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L33

Added line #L33 was not covered by tests
: [];
const pageNames = getPageNumbersAndNamesList();

Expand Down Expand Up @@ -122,17 +122,17 @@
// Function to call from BarComponent. Conducts necessary logic for Report Action.
const handleBarClick = (e) => {
// Get the original record that was used to draw this bar (or a group in a bar).
const record = getOriginalRecordForNivoClickEvent(e, records, selection);

Check warning on line 125 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L125

Added line #L125 was not covered by tests

// If there's a record, check if there are any rules assigned to each of the fields (columns).
if (record) {
Object.keys(record).forEach((key) => {
let rules = getRule({ field: key, value: record[key] }, actionsRules, 'Click');

Check warning on line 130 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L129-L130

Added lines #L129 - L130 were not covered by tests
// If there is a rule assigned, run the rule with the specified field and value retrieved from the record.
rules?.forEach((rule) => {
const ruleField = rule.field;
const ruleValue = record[rule.value];
performActionOnElement(

Check warning on line 135 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L132-L135

Added lines #L132 - L135 were not covered by tests
{ field: ruleField, value: ruleValue },
actionsRules,
{ ...props, pageNames: pageNames },
Expand All @@ -149,7 +149,7 @@
if (legendPosition === 'Vertical') {
return legend ? legendWidth + marginRight : marginRight;
}
return marginRight;

Check warning on line 152 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L152

Added line #L152 was not covered by tests
}

// Original margin function, refactored
Expand Down Expand Up @@ -218,7 +218,7 @@
<g
transform={`translate(${bar.x},${bar.y})`}
// onClick event to trigger event to pass value with report action
onClick={(event) => onClick(bar.data, event)}

Check warning on line 221 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L221

Added line #L221 was not covered by tests
style={{ cursor: 'pointer' }}
>
{shade ? <rect x={-3} y={7} width={bar.width} height={bar.height} fill='rgba(0, 0, 0, .07)' /> : <></>}
Expand Down Expand Up @@ -291,7 +291,7 @@
}

if (legendPosition === 'Horizontal') {
return [

Check warning on line 294 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L294

Added line #L294 was not covered by tests
{
dataFrom: 'keys',
anchor: 'bottom',
Expand All @@ -317,7 +317,7 @@
];
}
// Vertical legend
return [

Check warning on line 320 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L320

Added line #L320 was not covered by tests
{
dataFrom: 'keys',
anchor: 'bottom-right',
Expand Down Expand Up @@ -353,11 +353,11 @@
}

if (legendPosition === 'Horizontal') {
const horizontalLegendWidth = legendWidth * data.length + 200;

Check warning on line 356 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L356

Added line #L356 was not covered by tests
return adaptableWidth > horizontalLegendWidth ? adaptableWidth : horizontalLegendWidth;
}

return barWidth * 5 * data.length + legendWidth;

Check warning on line 360 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L360

Added line #L360 was not covered by tests
}

// Container to make the chart scroll horizontally
Expand All @@ -369,7 +369,7 @@

// Container for scrolling container to scroll in
const barChartStyle: React.CSSProperties = customDimensions
? {

Check warning on line 372 in src/chart/bar/BarChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/bar/BarChart.tsx#L372

Added line #L372 was not covered by tests
width: '100%',
overflowX: 'auto',
overflowY: 'auto',
Expand Down
15 changes: 13 additions & 2 deletions src/chart/graph/component/GraphChartCanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import React from 'react';

const canvasStyle = { paddingLeft: '10px', position: 'relative', overflow: 'hidden', width: '100%', height: '100%' };
const canvasStyle = {
paddingLeft: '10px',
marginBottom: 5,
position: 'relative',
overflow: 'hidden',
width: '100%',
height: '100%',
};

/**
* Renders the canvas on which the graph visualization is projected.
*/
export const NeoGraphChartCanvas = ({ children }) => {
return <div style={canvasStyle}>{children}</div>;
return (
<div className='graph-chart-canvas' style={canvasStyle}>
{children}
</div>
);
};
5 changes: 4 additions & 1 deletion src/chart/markdown/MarkdownChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const NeoMarkdownChart = (props: ChartProps) => {
const modifiedMarkdown = replaceGlobalParameters ? replaceDashboardParameters(markdown, parameters) : markdown;
// TODO: we should check if the gfm plugin has an impact on the standard security provided by ReactMarkdown
return (
<div style={{ marginTop: '0px', marginLeft: '15px', marginRight: '15px', marginBottom: '0px' }}>
<div
className='markdown-widget'
style={{ marginTop: '0px', marginLeft: '15px', marginRight: '15px', marginBottom: '0px' }}
>
<base target='_blank' /> <ReactMarkdown remarkPLugins={[gfm]} children={modifiedMarkdown} />
</div>
);
Expand Down
14 changes: 10 additions & 4 deletions src/chart/table/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@

function renderAsButtonWrapper(renderer) {
return function renderAsButton(value) {
const outputValue = renderer(value, true);

Check warning on line 43 in src/chart/table/TableChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/table/TableChart.tsx#L43

Added line #L43 was not covered by tests
// If there's nothing to be rendered, there's no button needed.
if (outputValue == '') {
return <></>;

Check warning on line 46 in src/chart/table/TableChart.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/table/TableChart.tsx#L46

Added line #L46 was not covered by tests
}
return (
<Button
style={{ width: '100%', marginLeft: '5px', marginRight: '5px' }}
variant='contained'
color='primary'
>{`${renderer(value)}`}</Button>
>{`${outputValue}`}</Button>
);
};
}
Expand Down Expand Up @@ -107,8 +112,7 @@
return key != 'id' ? key : `${key} `;
};

const actionableFields = actionsRules.map((r) => r.field);

const actionableFields = actionsRules.filter((r) => r.condition !== 'rowCheck').map((r) => r.field);
const columns = transposed
? [records[0].keys[0]].concat(records.map((record) => record._fields[0]?.toString() || '')).map((key, i) => {
const uniqueKey = `${String(key)}_${i}`;
Expand All @@ -126,7 +130,9 @@
actionableFields.includes(key)
);
})
: records[0].keys.map((key, i) => {
: records[0] &&
records[0].keys &&
records[0].keys.map((key, i) => {
const value = records[0].get(key);
if (columnWidthsType == 'Relative (%)') {
return ApplyColumnType(
Expand Down
2 changes: 1 addition & 1 deletion src/config/ReportConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ const _REPORT_TYPES = {
marginBottom: {
label: 'Margin Bottom',
type: SELECTION_TYPES.NUMBER,
default: 45,
default: 30,
},
legendWidth: {
label: 'Legend Width',
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
);
setDriver(newDriver);
}

const content = (
<Neo4jProvider driver={driver}>
<NeoDashboardConnectionUpdateHandler
Expand Down Expand Up @@ -70,7 +69,7 @@
{!standaloneSettings.standalone || (standaloneSettings.standalone && standaloneSettings.standaloneAllowLoad) ? (
<NeoDashboardSidebar />
) : (
<></>

Check warning on line 72 in src/dashboard/Dashboard.tsx

View check run for this annotation

Codecov / codecov/patch

src/dashboard/Dashboard.tsx#L72

Added line #L72 was not covered by tests
)}
<div className='n-w-full n-h-full n-flex n-flex-col n-items-center n-justify-center n-rounded-md'>
<div className='n-w-full n-h-full n-overflow-y-scroll n-flex n-flex-row'>
Expand All @@ -81,7 +80,8 @@
{/* The main content of the page */}

<div>
{standaloneSettings.standalonePassword ? (
{standaloneSettings.standalonePassword &&
standaloneSettings.standalonePasswordWarningHidden !== true ? (

Check warning on line 84 in src/dashboard/Dashboard.tsx

View check run for this annotation

Codecov / codecov/patch

src/dashboard/Dashboard.tsx#L84

Added line #L84 was not covered by tests
<div style={{ textAlign: 'center', color: 'red', paddingTop: 60, marginBottom: -50 }}>
Warning: NeoDash is running with a plaintext password in config.json.
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/DashboardThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@
}

// Cast dashboard parameters from serialized format to correct types
Object.keys(dashboard.settings.parameters).forEach((key) => {
const value = dashboard.settings.parameters[key];

Check warning on line 107 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L106-L107

Added lines #L106 - L107 were not covered by tests

// Serialized Date to Neo4jDate
if (value && value.year && value.month && value.day) {
dashboard.settings.parameters[key] = new Neo4jDate(value.year, value.month, value.day);

Check warning on line 111 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L111

Added line #L111 was not covered by tests
}
});

Expand Down Expand Up @@ -144,29 +144,29 @@

export const saveDashboardToNeo4jThunk =
(driver, database, dashboard, date, user, onSuccess) => (dispatch: any, getState: any) => {
const state = getState();
const loggingSettings = applicationGetLoggingSettings(state);
const loguser = applicationGetConnectionUser(state);

Check warning on line 149 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L147-L149

Added lines #L147 - L149 were not covered by tests
const neodashMode = applicationIsStandalone(state) ? 'Standalone' : 'Editor';

try {
let { uuid } = dashboard;

Check warning on line 153 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L152-L153

Added lines #L152 - L153 were not covered by tests

// Dashboards pre-2.3.4 may not always have a UUID. If this is the case, generate one just before we save.
if (!dashboard.uuid) {
uuid = createUUID();
dashboard.uuid = uuid;
dispatch(setDashboardUuid(uuid));
createUUID();

Check warning on line 160 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L157-L160

Added lines #L157 - L160 were not covered by tests
}

const { title, version } = dashboard;

Check warning on line 163 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L163

Added line #L163 was not covered by tests

// Generate a cypher query to save the dashboard.
const query =
'MERGE (n:_Neodash_Dashboard {uuid: $uuid }) SET n.title = $title, n.version = $version, n.user = $user, n.content = $content, n.date = datetime($date) RETURN $uuid as uuid';

Check warning on line 167 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L167

Added line #L167 was not covered by tests

const parameters = {

Check warning on line 169 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L169

Added line #L169 was not covered by tests
uuid: uuid,
title: title,
version: version,
Expand All @@ -174,19 +174,19 @@
content: JSON.stringify(dashboard, null, 2),
date: date,
};
runCypherQuery(

Check warning on line 177 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L177

Added line #L177 was not covered by tests
driver,
database,
query,
parameters,
1,
() => {},
(records) => {

Check warning on line 184 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L183-L184

Added lines #L183 - L184 were not covered by tests
if (records && records[0] && records[0]._fields && records[0]._fields[0] && records[0]._fields[0] == uuid) {
dispatch(createNotificationThunk('🎉 Success!', 'Your current dashboard was saved to Neo4j.'));
onSuccess(uuid);

Check warning on line 187 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L186-L187

Added lines #L186 - L187 were not covered by tests
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 189 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L189

Added line #L189 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -202,15 +202,15 @@
)
);
}
} else {
dispatch(

Check warning on line 206 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L205-L206

Added lines #L205 - L206 were not covered by tests
createNotificationThunk(
'Unable to save dashboard',
`Do you have write access to the '${database}' database?`
)
);
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 213 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L213

Added line #L213 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -230,9 +230,9 @@
}
);
} catch (e) {
dispatch(createNotificationThunk('Unable to save dashboard to Neo4j', e));

Check warning on line 233 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L233

Added line #L233 was not covered by tests
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 235 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L235

Added line #L235 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand Down Expand Up @@ -285,9 +285,9 @@
};

export const loadDashboardFromNeo4jThunk = (driver, database, uuid, callback) => (dispatch: any, getState: any) => {
const state = getState();
const loggingSettings = applicationGetLoggingSettings(state);
const loguser = applicationGetConnectionUser(state);

Check warning on line 290 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L288-L290

Added lines #L288 - L290 were not covered by tests
const neodashMode = applicationIsStandalone(state) ? 'Standalone' : 'Editor';

try {
Expand Down Expand Up @@ -317,7 +317,7 @@
)
);
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 320 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L320

Added line #L320 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -336,8 +336,8 @@
} else {
callback(records[0]._fields[0]);
if (loggingSettings.loggingMode > '1') {
const dashboard = JSON.parse(records[0]._fields[0]);
dispatch(

Check warning on line 340 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L339-L340

Added lines #L339 - L340 were not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -359,7 +359,7 @@
} catch (e) {
dispatch(createNotificationThunk('Unable to load dashboard to Neo4j', e));
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 362 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L362

Added line #L362 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -377,22 +377,22 @@

export const loadDashboardFromNeo4jByNameThunk =
(driver, database, name, callback) => (dispatch: any, getState: any) => {
const loggingState = getState();
const loggingSettings = applicationGetLoggingSettings(loggingState);
const loguser = applicationGetConnectionUser(loggingState);

Check warning on line 382 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L380-L382

Added lines #L380 - L382 were not covered by tests
const neodashMode = applicationIsStandalone(loggingState) ? 'Standalone' : 'Editor';
try {

Check warning on line 384 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L384

Added line #L384 was not covered by tests
const query =
'MATCH (d:_Neodash_Dashboard) WHERE d.title = $name RETURN d.content as dashboard ORDER by d.date DESC LIMIT 1';
runCypherQuery(

Check warning on line 387 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L386-L387

Added lines #L386 - L387 were not covered by tests
driver,
database,
query,
{ name: name },
1,
(status) => {

Check warning on line 393 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L393

Added line #L393 was not covered by tests
if (status == QueryStatus.NO_DATA) {
dispatch(

Check warning on line 395 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L395

Added line #L395 was not covered by tests
createNotificationThunk(
'Unable to load dashboard.',
'A dashboard with the provided name could not be found.'
Expand All @@ -400,16 +400,16 @@
);
}
},
(records) => {

Check warning on line 403 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L403

Added line #L403 was not covered by tests
if (records.length == 0) {
dispatch(

Check warning on line 405 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L405

Added line #L405 was not covered by tests
createNotificationThunk(
'Unable to load dashboard.',
`Unable to load dashboard "${name}".`,
'A dashboard with the provided name could not be found.'
)
);
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 412 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L412

Added line #L412 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -425,13 +425,13 @@
)
);
}
return;

Check warning on line 428 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L428

Added line #L428 was not covered by tests
}

if (records[0].error) {
dispatch(createNotificationThunk('Unable to load dashboard.', records[0].error));
dispatch(createNotificationThunk(`Unable to load dashboard "${name}".`, records[0].error));

Check warning on line 432 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L432

Added line #L432 was not covered by tests
if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 434 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L434

Added line #L434 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -447,11 +447,11 @@
)
);
}
return;

Check warning on line 450 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L450

Added line #L450 was not covered by tests
}

if (loggingSettings.loggingMode > '1') {
dispatch(

Check warning on line 454 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L454

Added line #L454 was not covered by tests
createLogThunk(
driver,
loggingSettings.loggingDatabase,
Expand All @@ -467,27 +467,27 @@
)
);
}
callback(records[0]._fields[0]);

Check warning on line 470 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L470

Added line #L470 was not covered by tests
}
);
} catch (e) {
dispatch(createNotificationThunk('Unable to load dashboard from Neo4j', e));

Check warning on line 474 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L474

Added line #L474 was not covered by tests
}
};

export const loadDashboardListFromNeo4jThunk = (driver, database, callback) => (dispatch: any) => {
function setStatus(status) {

Check warning on line 479 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L479

Added line #L479 was not covered by tests
if (status == QueryStatus.NO_DATA) {
runCallback([]);

Check warning on line 481 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L481

Added line #L481 was not covered by tests
}
}
function runCallback(records) {

Check warning on line 484 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L484

Added line #L484 was not covered by tests
if (!records || !records[0] || !records[0]._fields) {
callback([]);
return;

Check warning on line 487 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L486-L487

Added lines #L486 - L487 were not covered by tests
}
const result = records.map((r, index) => {
return {

Check warning on line 490 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L489-L490

Added lines #L489 - L490 were not covered by tests
uuid: r._fields[0],
title: r._fields[1],
date: r._fields[2],
Expand All @@ -496,7 +496,7 @@
index: index,
};
});
callback(result);

Check warning on line 499 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L499

Added line #L499 was not covered by tests
}
try {
runCypherQuery(
Expand All @@ -505,8 +505,8 @@
'MATCH (n:_Neodash_Dashboard) RETURN n.uuid as uuid, n.title as title, toString(n.date) as date, n.user as author, n.version as version ORDER BY toLower(n.title) ASC',
{},
1000,
(status) => setStatus(status),
(records) => runCallback(records)

Check warning on line 509 in src/dashboard/DashboardThunks.ts

View check run for this annotation

Codecov / codecov/patch

src/dashboard/DashboardThunks.ts#L508-L509

Added lines #L508 - L509 were not covered by tests
);
} catch (e) {
dispatch(createNotificationThunk('Unable to load dashboard list from Neo4j', e));
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/sidebar/DashboardSidebarListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
size='medium'
color={selected == true ? (saved == true ? 'primary' : 'warning') : 'neutral'}
style={{
width: '300px',
width: '240px',
whiteSpace: 'nowrap',
overflowX: 'clip',
justifyContent: 'left',
Expand Down Expand Up @@ -58,7 +58,7 @@
/>
</Tooltip>
) : (
<Tooltip title='Settings' aria-label='settings' disableInteractive>

Check warning on line 61 in src/dashboard/sidebar/DashboardSidebarListItem.tsx

View check run for this annotation

Codecov / codecov/patch

src/dashboard/sidebar/DashboardSidebarListItem.tsx#L61

Added line #L61 was not covered by tests
<EllipsisVerticalIconOutline
color='rgb(var(--palette-warning-text))'
style={{ float: 'right', marginRight: '-6px' }}
Expand Down
3 changes: 1 addition & 2 deletions src/extensions/actions/ActionsRuleCreationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,29 +251,28 @@
}

// When we are accessing node properties (not page names), parse the node label + property pair to only show properties.
if (rule.customization !== 'set page') {
if (rule.customization !== 'set page' && (type == 'graph' || type == 'map')) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain with a comment the filtering

suggestions = suggestions.map((e) => e.split('.')[1] || e);
}

return suggestions;
};

const handleOnInputchange = (customization, index, value) => {
console.log(customization, index, value);
updateRuleField(index, 'value', value);

Check warning on line 262 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L261-L262

Added lines #L261 - L262 were not covered by tests
if (type == 'bar' && customization !== 'set page') {
// For bar charts, duplicate the value to rule.field
updateRuleField(index, 'field', value);

Check warning on line 265 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L265

Added line #L265 was not covered by tests
}
};

const handleOnChange = (customization, index, newValue) => {
updateRuleField(index, 'value', newValue);

Check warning on line 270 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L269-L270

Added lines #L269 - L270 were not covered by tests
};

const actionHelperClass = 'n-w-2/3 n-inline-flex';
const spanClass = 'n-align-middle ';
const textInputClass = 'font-bold n-ml-2 n-mt-[1px] n-float-right n-w-full';

Check warning on line 275 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L273-L275

Added lines #L273 - L275 were not covered by tests

// Sets parameter value
const getActionHelper = (rule, index, customization) => {
Expand Down Expand Up @@ -334,9 +333,9 @@
// Styling was then extracted into functions outside of the html components, hence the naming.
const td2Styling = (type) => ({ width: type === 'bar' ? '15%' : '30%' });
const td2DropdownClassname = (type) => `n-align-middle n-pr-1 ${type === 'bar' ? 'n-w-full' : 'n-w-2/5'}`;
const td2Autocomplete = (type, index, rule) =>

Check warning on line 336 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L336

Added line #L336 was not covered by tests
(type !== 'bar' ? (
<Autocomplete

Check warning on line 338 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L338

Added line #L338 was not covered by tests
className='n-align-middle n-inline-block n-w-/5'
disableClearable={true}
id='autocomplete-label-type'
Expand All @@ -349,14 +348,14 @@
style={{
minWidth: 125,
}}
onInputChange={(event, value) => {
updateRuleField(index, 'field', value);

Check warning on line 352 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L351-L352

Added lines #L351 - L352 were not covered by tests
}}
onChange={(event, newValue) => {
updateRuleField(index, 'field', newValue);

Check warning on line 355 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L354-L355

Added lines #L354 - L355 were not covered by tests
}}
renderInput={(params) => (
<TextField

Check warning on line 358 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L358

Added line #L358 was not covered by tests
{...params}
placeholder='Field name...'
style={{ padding: 0 }}
Expand All @@ -365,10 +364,10 @@
)}
/>
) : (
<></>

Check warning on line 367 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L367

Added line #L367 was not covered by tests
));
const td4Styling = (type) => ({ width: type === 'bar' ? '45%' : '40%' });
const td4DropdownClassname = 'n-align-middle, n-w-1/3';

Check warning on line 370 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L370

Added line #L370 was not covered by tests
const td6Styling = (type) => ({ width: type === 'bar' ? '30%' : '20%' });

return (
Expand Down Expand Up @@ -492,10 +491,10 @@
inputValue={rule.value || ''}
popupIcon={<></>}
style={{ minWidth: 250 }}
onInputChange={(e, value) => handleOnInputchange(rule.customization, index, value)}
onChange={(e, newValue) => handleOnChange(rule.customization, index, newValue)}

Check warning on line 495 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L494-L495

Added lines #L494 - L495 were not covered by tests
renderInput={(params) => (
<TextField {...params} placeholder='Value name...' InputLabelProps={{ shrink: true }} />

Check warning on line 497 in src/extensions/actions/ActionsRuleCreationModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/extensions/actions/ActionsRuleCreationModal.tsx#L497

Added line #L497 was not covered by tests
)}
/>
</div>
Expand Down
Loading
Loading