Skip to content

Commit 5922517

Browse files
authored
Remove the charts plugin (#1273)
* Remove the charts plugin * Fix eslint errors
1 parent 1516dec commit 5922517

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"node_modules/@mongodb-js/compass-auth-kerberos",
4040
"node_modules/@mongodb-js/compass-auth-ldap",
4141
"node_modules/@mongodb-js/compass-auth-x509",
42-
"node_modules/@mongodb-js/compass-charts",
4342
"node_modules/@mongodb-js/compass-crud",
4443
"node_modules/@mongodb-js/compass-connect",
4544
"node_modules/@mongodb-js/compass-document-validation",
@@ -58,7 +57,6 @@
5857
"productName": "MongoDB Compass Community",
5958
"plugins-directory": ".mongodb/compass-community/plugins",
6059
"plugins": [
61-
"node_modules/@mongodb-js/compass-charts",
6260
"node_modules/@mongodb-js/compass-connect",
6361
"node_modules/@mongodb-js/compass-crud",
6462
"node_modules/@mongodb-js/compass-deployment-awareness",
@@ -141,7 +139,6 @@
141139
"@mongodb-js/compass-auth-kerberos": "^0.0.2",
142140
"@mongodb-js/compass-auth-ldap": "^0.0.2",
143141
"@mongodb-js/compass-auth-x509": "^0.0.3",
144-
"@mongodb-js/compass-charts": "^0.5.0",
145142
"@mongodb-js/compass-connect": "^0.0.7",
146143
"@mongodb-js/compass-crud": "^0.7.1",
147144
"@mongodb-js/compass-deployment-awareness": "^5.0.0",

src/app/models/preferences.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ const storageMixin = require('storage-mixin');
33
const _ = require('lodash');
44
const format = require('util').format;
55
const electronApp = require('electron').remote.app;
6-
const semver = require('semver');
7-
const pkg = require('../../../package.json');
86

97
const debug = require('debug')('mongodb-compass:models:preferences');
108

@@ -240,13 +238,6 @@ const preferencesProps = {
240238
}
241239
};
242240

243-
const prerelease = semver.prerelease(pkg.version);
244-
if (!prerelease || prerelease[0] !== 'dev') {
245-
// COMPASS-1340: Disable chartView for all builds except development,
246-
// until it can be moved into a new product coupled to the Charts Server.
247-
delete preferencesProps.chartView;
248-
}
249-
250241
const Preferences = Model.extend(storageMixin, {
251242
props: preferencesProps,
252243
extraProperties: 'ignore',
@@ -295,10 +286,6 @@ const Preferences = Model.extend(storageMixin, {
295286
var res = _.get(this, feature, null);
296287
// don't allow asking for unknown features to prevent bugs
297288
if (res === null) {
298-
if (feature === 'chartView') {
299-
// COMPASS-1340 disable chartView error until moved to its own product...
300-
return false;
301-
}
302289
throw new Error(format('Feature %s unknown.', feature));
303290
}
304291
return res;

src/internal-plugins/collection/lib/components/index.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ class Collection extends React.Component {
7777

7878
roleFiltered(role) {
7979
const serverVersion = app.instance.build.version;
80-
return (!app.isFeatureEnabled('chartView') && role.name === 'CHARTS') ||
81-
(role.minimumServerVersion && !semver.gte(serverVersion, role.minimumServerVersion));
80+
return (role.minimumServerVersion && !semver.gte(serverVersion, role.minimumServerVersion));
8281
}
8382

8483
renderReadonly() {

0 commit comments

Comments
 (0)