Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

COMPASS-3948: refresh data on import error and on complete #10

Merged
merged 1 commit into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/modules/compass/app-registry.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ describe('app-registry [module]', () => {

describe('#appRegistryEmit', () => {
it('returns the action', () => {
expect(actions.appRegistryEmit('refresh-documents', spy)).to.deep.equal({
expect(actions.appRegistryEmit('refresh-data', spy)).to.deep.equal({
type: actions.EMIT,
name: 'refresh-documents',
name: 'refresh-data',
args: [ spy ]
});
});
Expand Down
5 changes: 5 additions & 0 deletions src/modules/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ export const startImport = () => {
progress,
dest,
function(err, res) {
/**
* refresh data (docs, aggregations) regardless of whether we have a
* partial import or full import
*/
dispatch(appRegistryEmit('refresh-data'));
/**
* TODO: lucas: Decorate with a codeframe if not already
* json parsing errors already are.
Expand Down
2 changes: 2 additions & 0 deletions src/utils/formatters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable no-var */
/* eslint-disable callback-return */
/* eslint-disable complexity */

import csv from 'fast-csv';
import { EJSON } from 'bson';
import { Transform } from 'stream';
Expand Down
3 changes: 2 additions & 1 deletion src/utils/styler.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable space-infix-ops */

/**
* Create a helper function for accessing a component's class name.
Expand Down Expand Up @@ -33,4 +34,4 @@ export default function styler(styles, prefix) {
}
return def;
};
}
}