mirror of
https://github.com/apache/superset.git
synced 2024-09-17 19:19:38 -04:00
fix: bring back dashboard perf logger (#14584)
* fix: bring back dashboard perf logger * add test
This commit is contained in:
parent
6d786d4d47
commit
ada380982b
@ -47,4 +47,9 @@ describe('Dashboard load', () => {
|
|||||||
cy.get('[data-test="discard-changes-button"]').should('be.visible');
|
cy.get('[data-test="discard-changes-button"]').should('be.visible');
|
||||||
cy.get('#app-menu').should('not.exist');
|
cy.get('#app-menu').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should send log data', () => {
|
||||||
|
cy.visit(WORLD_HEALTH_DASHBOARD);
|
||||||
|
cy.intercept('/superset/log/?explode=events&dashboard_id=*');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
import { isString, keyBy } from 'lodash';
|
import { isString, keyBy } from 'lodash';
|
||||||
import shortid from 'shortid';
|
|
||||||
import {
|
import {
|
||||||
Behavior,
|
Behavior,
|
||||||
CategoricalColorNamespace,
|
CategoricalColorNamespace,
|
||||||
@ -376,8 +375,6 @@ export const hydrateDashboard = (dashboardData, chartData, datasourcesData) => (
|
|||||||
lastModifiedTime: dashboardData.changed_on,
|
lastModifiedTime: dashboardData.changed_on,
|
||||||
},
|
},
|
||||||
dashboardLayout,
|
dashboardLayout,
|
||||||
messageToasts: [],
|
|
||||||
impressionId: shortid.generate(),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -29,6 +29,8 @@ import nativeFilters from 'src/dashboard/reducers/nativeFilters';
|
|||||||
import datasources from 'src/dashboard/reducers/datasources';
|
import datasources from 'src/dashboard/reducers/datasources';
|
||||||
import sliceEntities from 'src/dashboard/reducers/sliceEntities';
|
import sliceEntities from 'src/dashboard/reducers/sliceEntities';
|
||||||
import dashboardLayout from 'src/dashboard/reducers/undoableDashboardLayout';
|
import dashboardLayout from 'src/dashboard/reducers/undoableDashboardLayout';
|
||||||
|
import logger from 'src/middleware/loggerMiddleware';
|
||||||
|
import shortid from 'shortid';
|
||||||
|
|
||||||
// Some reducers don't do anything, and redux is just used to reference the initial "state".
|
// Some reducers don't do anything, and redux is just used to reference the initial "state".
|
||||||
// This may change later, as the client application takes on more responsibilities.
|
// This may change later, as the client application takes on more responsibilities.
|
||||||
@ -57,12 +59,12 @@ export const rootReducer = combineReducers({
|
|||||||
messageToasts: messageToastReducer,
|
messageToasts: messageToastReducer,
|
||||||
common: noopReducer(bootstrap.common || {}),
|
common: noopReducer(bootstrap.common || {}),
|
||||||
user: noopReducer(bootstrap.user || {}),
|
user: noopReducer(bootstrap.user || {}),
|
||||||
impressionId: noopReducer(''),
|
impressionId: noopReducer(shortid.generate()),
|
||||||
...dashboardReducers,
|
...dashboardReducers,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const store = createStore(
|
export const store = createStore(
|
||||||
rootReducer,
|
rootReducer,
|
||||||
{},
|
{},
|
||||||
compose(applyMiddleware(thunk), initEnhancer(false)),
|
compose(applyMiddleware(thunk, logger), initEnhancer(false)),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user