mirror of https://github.com/apache/superset.git
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('#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 */
|
||||
import { isString, keyBy } from 'lodash';
|
||||
import shortid from 'shortid';
|
||||
import {
|
||||
Behavior,
|
||||
CategoricalColorNamespace,
|
||||
|
@ -376,8 +375,6 @@ export const hydrateDashboard = (dashboardData, chartData, datasourcesData) => (
|
|||
lastModifiedTime: dashboardData.changed_on,
|
||||
},
|
||||
dashboardLayout,
|
||||
messageToasts: [],
|
||||
impressionId: shortid.generate(),
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -29,6 +29,8 @@ import nativeFilters from 'src/dashboard/reducers/nativeFilters';
|
|||
import datasources from 'src/dashboard/reducers/datasources';
|
||||
import sliceEntities from 'src/dashboard/reducers/sliceEntities';
|
||||
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".
|
||||
// This may change later, as the client application takes on more responsibilities.
|
||||
|
@ -57,12 +59,12 @@ export const rootReducer = combineReducers({
|
|||
messageToasts: messageToastReducer,
|
||||
common: noopReducer(bootstrap.common || {}),
|
||||
user: noopReducer(bootstrap.user || {}),
|
||||
impressionId: noopReducer(''),
|
||||
impressionId: noopReducer(shortid.generate()),
|
||||
...dashboardReducers,
|
||||
});
|
||||
|
||||
export const store = createStore(
|
||||
rootReducer,
|
||||
{},
|
||||
compose(applyMiddleware(thunk), initEnhancer(false)),
|
||||
compose(applyMiddleware(thunk, logger), initEnhancer(false)),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue