Skip to content

Commit 56831e2

Browse files
DOCSP-1841 - Managing Data Sources docs
1 parent d022a99 commit 56831e2

File tree

7 files changed

+169
-1
lines changed

7 files changed

+169
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ build/*
77
*.pyo
88
*.bak
99
.DS_Store
10-
giza.log
10+
giza.log
11+
screenshots-temp/*

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,11 @@ publish: ## Builds this branch's publishable HTML and other artifacts under buil
3131
deploy-search-index: ## Update the search index for this branch
3232
@echo "Building search index"
3333
mut-index upload build/public -o ${PROJECT}-${GIT_BRANCH}.json -u ${PRODUCTION_URL}/${PROJECT} -g -s
34+
35+
screenshots:
36+
giza generate assets
37+
@echo "Running screenshot tool"
38+
-rm -r screenshots-temp/charts/
39+
mkdir -p screenshots-temp/charts/
40+
cd build/docs-tools/tools/screenshot-tool && npm install
41+
node build/docs-tools/tools/screenshot-tool/screenshots.js `pwd`/screenshot-scripts/data-sources.js

screenshot-scripts/data-sources.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'use strict';
2+
3+
const screenshotNames = ['data-sources-view.png'];
4+
const screenshotDir = './screenshots-temp';
5+
const origImageDir = './source/images/charts';
6+
7+
exports.run = async function (options) {
8+
const nightmare = options.nightmare;
9+
const originalPath = `${origImageDir}/${screenshotNames[0]}`;
10+
const screenshotPath = `${screenshotDir}/${screenshotNames[0]}`;
11+
12+
await nightmare.goto('http://charts.mongodb.parts')
13+
await nightmare.wait('a[href="/data-sources"]')
14+
await nightmare.click('a[href="/data-sources"]')
15+
await nightmare.wait('td.sortable-table-td')
16+
await nightmare.screenshot(screenshotPath)
17+
await nightmare.wait(500)
18+
await nightmare.end();
19+
20+
return [[originalPath, screenshotPath]];
21+
}
22+
23+
exports.nightmare_props = {
24+
show: true,
25+
typeInterval: 20,
26+
height: 1000,
27+
width: 1500,
28+
webPreferences: {
29+
zoomFactor: 1.4
30+
}
31+
}

source/data-sources.txt

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
:noprevnext:
2+
3+
============
4+
Data Sources
5+
============
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
Data Sources in |charts| reference a :ref:`collection <collections>`
16+
or :ref:`view <3.4-reference-views>` in your MongoDB
17+
deployment. When building a chart, you will need to specify the data
18+
source the chart uses.
19+
20+
To view, add, or remove data sources, click the :guilabel:`Data Sources`
21+
item on the top navigation bar.
22+
23+
Add a Data Source
24+
-----------------
25+
26+
1. Navigate to the :guilabel:`Data Sources` view by clicking on the
27+
:guilabel:`Data Sources` item on the top navigation bar.
28+
29+
#. Click the :guilabel:`New Data Source` button.
30+
31+
#. Enter the :manual:`Connection String URI </reference/connection-string>`
32+
of the MongoDB deployment you wish to connect to.
33+
34+
.. note::
35+
|charts| requires MongoDB deployments to be running version 3.4 or later.
36+
37+
If your MongoDB deployment is running with
38+
:manual:`authentication </tutorial/enable-authentication>`
39+
enabled, include a database user's credentials in the connection
40+
string URI. Anonymous, SCRAM, and LDAP authentication mechanisms
41+
are supported. The database user must have read permission on the
42+
collections selected in the following step.
43+
44+
#. Select the collections you wish to create data sources from.
45+
|charts-short| creates a separate data source for each selected
46+
collection.
47+
48+
#. Set the permissions for the data source, then click
49+
:guilabel:`Publish Data Source`.
50+
51+
Remove a Data Source
52+
--------------------
53+
54+
To remove a data source, click the red trash can icon on the right-hand
55+
side of the data source, then click :guilabel:`Delete Data Source` to
56+
confirm deletion.
57+
58+
.. important::
59+
60+
Any charts using the deleted data source will need to be
61+
reconfigured using a different data source or deleted.
62+
63+
Data Sources View
64+
-----------------
65+
66+
The :guilabel:`Data Sources` view displays existing data sources that
67+
the authenticated user has permission to view. The data sources are
68+
displayed in a tabular format with the following columns:
69+
70+
.. figure:: /images/charts/data-sources-view.png
71+
:alt: Diagram of the "Data Sources" view
72+
:figwidth: 750px
73+
74+
.. list-table::
75+
:header-rows: 1
76+
:widths: 38 72
77+
78+
* - Column
79+
- Description
80+
81+
* - :guilabel:`Deployment`
82+
- The MongoDB deployment containing the source database and
83+
collection. Identified by the hostname and port of the first host
84+
in the :manual:`Connection String URI </reference/connection-string>`.
85+
86+
* - :guilabel:`Database`
87+
- The database containing the source collection or view.
88+
89+
* - :guilabel:`Collection`
90+
- The collection or view from where |charts-short| retrieves data.
91+
92+
* - :guilabel:`Alias`
93+
- Optional. The display name of the data source used by the
94+
Chart Builder. Providing an :guilabel:`Alias` may result in a
95+
shorter and more identifiable name when selecting a data source
96+
in the chart builder.
97+
98+
You can modify the :guilabel:`Alias` at any time
99+
after creation by hovering over the row's :guilabel:`Alias`
100+
field, then clicking either :guilabel:`Add Alias`
101+
or the edit button (pencil icon).
102+
103+
* - :guilabel:`Last modified`
104+
- The number of days since the data source was last modified.
105+
106+
* - :guilabel:`Permissions`
107+
- Click the :guilabel:`Open Access` button to modify data source
108+
permissions.
109+
110+
.. note::
111+
You can sort data sources by any of the columns by clicking on the
112+
column header. You can also search across all columns using the
113+
search bar on the upper-right hand corner of the view.
172 KB
Loading

source/index.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ Charts
66

77
Welcome to the Charts documentation.
88

9+
Until the confusing drop down goes away, see
10+
`Vega-Lite Types <https://vega.github.io/vega-lite/docs/type.html>`_.
11+
912
.. class:: hidden
1013

1114
.. toctree::
1215
:titlesonly:
1316

1417
/installation
18+
/data-sources

source/installation.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
:noprevnext:
2+
3+
============
14
Installation
25
============
36

7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
415
Thank you for evaluating the beta release of |charts|! This
516
document describes what you need to do to get |charts-short| installed
617
within your environment. For the latest info on |charts-short|, please

0 commit comments

Comments
 (0)