16.23.1 • Published 2 months ago

@mongodb-js/compass-serverstats v16.23.1

Weekly downloads
226
License
SSPL
Repository
github
Last release
2 months ago

compass-serverstats

Compass Real Time Server Stats Component.

Installation

In the package.json:

  "dependencies": {
    "compass-serverstats": "10gen/compass-serverstats",
  }

Usage

const d3 = require('d3');
const realTimeLineChart = require('compass-serverstats').d3.realTimeLineChart;

const el = document.getElementById('myChart');
const data = {
  "dataSets" : [
    {
      "line" : "virtual",
      "count" : [
        2.48,
        2.48,
        2.49
      ],
      "active" : true
    },
    {
      "line" : "resident",
      "count" : [
        0.02,
        0.02,
        0.02
      ],
      "active":true
    },
    {
      "line" : "mapped",
      "count" : [
        0,
        0,
        0
      ],
      "active":true
    }
  ],
  "localTime" : [
    "2016-10-30T07:12:05.077Z",
    "2016-10-30T07:12:06.069Z",
    "2016-10-30T07:12:07.153Z"
  ],
  "skip" : [
    false,
    false,
    false
  ],
  "yDomain" : [
    0,
    2.49
  ],
  "xLength" : 60,
  "labels" : {
    "title" : "memory",
    "keys" : [
      "vsize",
      "resident",
      "mapped"
    ],
    "yAxis" : "GB"
  },
  "keyLength" : 6,
  "paused" : false
};

d3.select(el).datum(data).call(realTimeLineChart());

Features

Electron

Validate and test your component in an Electron window, styles included. The source automatically compiles and the window content reloads when any file under ./src changes.

To start Electron and render your component, type npm start.

Enzyme

The test environment is configured to test components with Enzyme (including full mount mode through jsdom) and enzyme-chai. See the test folder for examples. Run npm test to execute the test suite.

Developing

Almost all of your development will happen in the ./src directory. Add new components to ./src/components, actions to ./src/actions/index.js and if you need additional stores, add them to ./src/stores.

Directory Structure

For completeness, below is a list of directories present in this module:

  • electron code to start electron, open a browser window and load the source. You don't usually need to touch this, unless you want to render something other than the main component in Electron.
  • lib compiled version of your components (plain javascript instead of jsx) and styles (css instead of less). Never change anything here as this entire folder gets automatically created and overwritten.
  • src components, actions and stores source code, as well as style files. This is the place to implement your own components. npm run compile will use ./src as input and create ./lib.
  • test implement your tests here, and name the files *.test.js.
16.23.1

3 months ago

16.22.4

4 months ago

16.22.3

4 months ago

16.22.1

5 months ago

16.22.0

5 months ago

16.21.0

5 months ago

16.20.5

5 months ago

16.20.4

6 months ago

16.20.3

6 months ago

16.20.2

6 months ago

16.20.1

6 months ago

16.20.0

6 months ago

16.15.0

8 months ago

16.15.1

8 months ago

16.14.0

8 months ago

16.13.0

8 months ago

16.12.0

9 months ago

16.11.0

10 months ago

16.11.1

10 months ago

16.19.0

7 months ago

16.19.1

7 months ago

16.18.0

7 months ago

16.17.0

7 months ago

16.16.0

7 months ago

16.9.0

12 months ago

16.10.0

12 months ago

16.7.0

1 year ago

16.8.0

1 year ago

16.5.1

1 year ago

16.5.0

1 year ago

16.6.0

1 year ago

16.4.0

1 year ago

16.3.0

2 years ago

16.2.0

2 years ago

16.1.1

2 years ago

15.25.0

2 years ago

15.26.0

2 years ago

15.26.1

2 years ago

15.24.0

2 years ago

16.0.0

2 years ago

15.23.0

2 years ago

15.21.0

2 years ago

15.22.0

2 years ago

15.20.0

2 years ago

15.19.0

2 years ago

15.17.0

2 years ago

15.17.1

2 years ago

15.18.1

2 years ago

15.18.2

2 years ago

15.18.0

2 years ago

15.15.0

3 years ago

15.16.0

2 years ago

15.14.0

3 years ago

15.13.0

3 years ago

15.11.0

3 years ago

15.12.0

3 years ago

15.10.0

3 years ago

15.9.0

3 years ago

15.8.0

3 years ago

15.7.4

3 years ago

15.7.3

3 years ago

15.7.2

3 years ago

15.7.0

3 years ago

15.7.1

3 years ago

15.6.0

3 years ago

15.5.0

3 years ago

15.3.0

3 years ago

15.4.0

3 years ago

15.2.2

3 years ago

15.2.0

3 years ago

15.2.1

3 years ago

15.1.0

3 years ago

15.0.1

3 years ago

14.1.1

3 years ago

14.1.0

3 years ago

14.0.1

4 years ago

14.0.0

4 years ago

13.0.0

5 years ago

12.5.3

5 years ago

12.5.1

5 years ago

12.5.0

5 years ago

12.4.1

5 years ago

12.4.0

5 years ago

12.3.3

5 years ago

12.3.2

5 years ago

12.3.1

5 years ago

12.3.0

6 years ago

12.2.0

6 years ago

12.1.0

6 years ago

11.1.1

6 years ago

12.0.3

6 years ago

12.0.2

6 years ago

12.0.1

6 years ago

12.0.0

6 years ago

11.1.0

6 years ago

11.0.0

6 years ago

10.1.0

6 years ago

10.0.1

7 years ago

10.0.0

7 years ago

9.1.1

7 years ago

9.1.0

7 years ago

9.0.2

7 years ago

9.0.1

7 years ago

9.0.0

7 years ago

9.0.0-beta.0

7 years ago

8.0.0

7 years ago

7.0.0

7 years ago

6.0.0

7 years ago

5.0.1

7 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

7 years ago

2.0.0

7 years ago