Skip to content

Commit 770b41f

Browse files
(DOCSP-5705): Refactor Import / Export page to use step files (in progress) (#144)
* DOCS-5705: Refactor Import / Export page to use step files (in progress) * DOCSP-5705: Refactor Import / Export page to use step files * (DOCSP-5705): Refactor Import / Export page to use step files * (DOCSP-5705): Refactor Import / Export page to use step
1 parent 4bc5543 commit 770b41f

File tree

3 files changed

+137
-80
lines changed

3 files changed

+137
-80
lines changed

source/import-export.txt

Lines changed: 2 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -90,38 +90,7 @@ Procedure
9090

9191
To import your formatted data into a collection:
9292

93-
1. Navigate to the :doc:`collection </collections>` you wish to
94-
import data into. You can either select the collection from the
95-
:doc:`Collections </collections>` tab or click the collection in the
96-
left-hand pane.
97-
98-
#. Click :guilabel:`Collection` in the top-level menu and select
99-
:guilabel:`Import Data`:
100-
101-
.. raw:: html
102-
103-
<br>
104-
105-
.. figure:: /images/compass/import-data-option-select.png
106-
:alt: Import data select menu
107-
108-
.. raw:: html
109-
110-
<br>
111-
112-
|compass| displays the following dialog:
113-
114-
.. raw:: html
115-
116-
<br>
117-
118-
.. figure:: /images/compass/import-data-dialog.png
119-
:alt: Import data dialog
120-
121-
#. Choose the appropriate file type and the location of the source data
122-
file.
123-
124-
#. Click :guilabel:`Import`.
93+
.. include:: /includes/steps/import.rst
12594

12695
A progress bar displays the status of the import. If an error occurs
12796
during import, the progress bar turns red and an error message
@@ -152,54 +121,7 @@ Procedure
152121

153122
To export collection data to a file:
154123

155-
1. Navigate to the :doc:`collection </collections>` you wish to
156-
export data from. You can either select the collection from the
157-
:doc:`Databases </databases>` tab or click the collection in the
158-
left-hand pane.
159-
160-
#. Click :guilabel:`Collection` in the top-level menu and select
161-
:guilabel:`Export Collection`:
162-
163-
.. raw:: html
164-
165-
<br>
166-
167-
.. figure:: /images/compass/export-data-option-select.png
168-
:alt: Export data select menu
169-
170-
.. raw:: html
171-
172-
<br>
173-
174-
|compass-short| displays the following dialog:
175-
176-
.. raw:: html
177-
178-
<br>
179-
180-
.. figure:: /images/compass/export-data-dialog.png
181-
:alt: Export data dialog
182-
183-
The top section of the export dialog displays the query
184-
entered in the query bar prior to export, if applicable. You
185-
can use this query to filter which collection documents are
186-
exported. If no query was specified, this section displays
187-
``undefined``.
188-
189-
#. Use the :guilabel:`Export Full Collection` toggle to indicate
190-
whether to export only the documents matched by the query or the
191-
full collection.
192-
193-
.. note::
194-
195-
Having an ``undefined`` query filter and toggling the
196-
option to export the full collection both result in
197-
|compass-short| exporting the full collection.
198-
199-
#. Choose the appropriate file type and the location of the export
200-
file.
201-
202-
#. Click :guilabel:`Export`.
124+
.. include:: /includes/steps/export.rst
203125

204126
A progress bar displays the status of the export. If an error occurs
205127
during export, the progress bar turns red and an error message

source/includes/steps-export.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
title: Navigate to the :doc:`collection </collections>` you wish to export data into.
2+
level: 4
3+
ref: select-collection
4+
content: |
5+
You can either select the collection from the
6+
:doc:`Collections </collections>` tab or click the collection in the
7+
left-hand pane.
8+
9+
---
10+
title: Click :guilabel:`Collection` in the top-level menu and select :guilabel:`Export Collection`
11+
level: 4
12+
ref: export-collection
13+
content: |
14+
15+
.. raw:: html
16+
17+
<br>
18+
19+
.. figure:: /images/compass/export-data-option-select.png
20+
:alt: Export data select menu
21+
22+
.. raw:: html
23+
24+
<br>
25+
26+
|compass-short| displays the following dialog:
27+
28+
.. raw:: html
29+
30+
<br>
31+
32+
.. figure:: /images/compass/export-data-dialog.png
33+
:alt: Export data dialog
34+
35+
The top section of the export dialog displays the query
36+
entered in the query bar prior to export, if applicable. Use this query to filter which
37+
collection documents are exported. If no query was specified, this section displays
38+
``undefined``.
39+
40+
---
41+
title: Use the :guilabel:`Export Full Collection` toggle to indicate
42+
whether to export only the documents matched by the query or the
43+
full collection.
44+
level: 4
45+
ref: export-full-collection
46+
content: |
47+
.. note::
48+
|compass-short| exports the full collection both when the query filter is ``undefined``
49+
and when you enable the :guilabel:`Export Full Collection` option.
50+
51+
---
52+
title: Choose the appropriate file type.
53+
level: 4
54+
ref: click-file-type
55+
content: |
56+
Under :guilabel:`Select Output File Type`, select either JSON or CSV.
57+
58+
---
59+
60+
title: Select the location of the export file under :guilabel:`Select File`.
61+
level: 4
62+
ref: click-file-location
63+
content: |
64+
.. raw:: html
65+
66+
<br>
67+
68+
---
69+
70+
title: Click :guilabel:`Export`.
71+
level: 4
72+
ref: click-export
73+
content: ""
74+
...
75+
76+

source/includes/steps-import.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
title: Navigate to the :doc:`collection </collections>` you wish to import data into.
2+
level: 4
3+
ref: select-collection
4+
content: |
5+
You can either select the collection from the
6+
:doc:`Collections </collections>` tab or click the collection in the
7+
left-hand pane.
8+
9+
---
10+
title: Click :guilabel:`Collection` in the top-level menu and select :guilabel:`Import Data`
11+
level: 4
12+
ref: import-data
13+
content: |
14+
.. raw:: html
15+
16+
<br>
17+
18+
.. figure:: /images/compass/import-data-option-select.png
19+
:alt: Import data select menu
20+
21+
.. raw:: html
22+
23+
<br>
24+
25+
|compass| displays the following dialog:
26+
27+
.. raw:: html
28+
29+
<br>
30+
31+
.. figure:: /images/compass/import-data-dialog.png
32+
:alt: Import data dialog
33+
34+
---
35+
title: Choose the appropriate file type of the source data file.
36+
level: 4
37+
ref: choose-file-type
38+
content: |
39+
Under :guilabel:`Select Input File Type`, select either JSON or CSV.
40+
41+
---
42+
43+
title: Select the location of the source data file under :guilabel:`Select File`.
44+
level: 4
45+
ref: click-file-location
46+
content: |
47+
.. raw:: html
48+
49+
<br>
50+
---
51+
52+
title: Click :guilabel:`Import`.
53+
level: 4
54+
ref: click-import
55+
content: ""
56+
...
57+
58+
59+

0 commit comments

Comments
 (0)