-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdatabase-connection-settings.html
More file actions
152 lines (106 loc) · 5.3 KB
/
Copy pathdatabase-connection-settings.html
File metadata and controls
152 lines (106 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!-- This file is used to display the fields in the integration/destination
connection settings pages inside of Stitch. -->
{% include misc/data-files.html %}
<!-- Some integrations/destinations don't have a branded UI. Ex: Magento is MySQL, but doesn't
currently have its own UI. Capture the name that's in the UI and display it
in the instructions. -->
{% if page.setup-name %}
{% assign connection-name = page.setup-name %}
{% else %}
{% assign connection-name = page.display_name %}
{% endif %}
<!-- Assign values to the default fields -->
{% assign defaults = site.data.ui.common.database-connections %}
<!-- The fields that display in the Integration/Destination Settings page
are dependent on the type of integration/destination selected.
The fields for each integration/destination - including the field name as it displays
in the UI and instructions for what goes in each field - are in the data file
below. -->
<!-- FOR INTEGRATIONS -->
{% if page.permalink contains "integrations" %}
{% assign all-connection-settings = site.data.ui.database-integration-settings.[page.db-type].[page.name] %}
{% assign versioned-connection-settings = all-connection-settings | where_exp:"field","field.version contains page.this-version" %}
{% assign connection-settings = all-connection-settings | where:"version","all" | concat: versioned-connection-settings %}
{% assign ssl-fields = site.data.ui.database-integration-settings.[page.db-type].ssl %}
{% capture stitch-location-copy %}
{{ app.menu-paths.add-integration | flatify }}
{% endcapture %}
<!-- FOR DESTINATIONS -->
{% elsif page.permalink contains "destinations" %}
<!-- This doesn't actually append fields - it just assigns a variable so that data
from the common file can be used in other files. -->
{% assign common = site.data.ui.destination-settings.common %}
{% assign destination-name = page.name %}
<!-- Logic that checks for version info, and gets the correct data file
if there's more than one version -->
{% case include.use-version %}
{% when true %}
{% assign version = page.this-version | prepend: "v" %}
{% assign connection-settings = site.data.ui.destination-settings[page.type][destination-name][version] %}
{% else %}
{% assign connection-settings = site.data.ui.destination-settings[page.type][destination-name] %}
{% endcase %}
{% assign ssl-fields = site.data.ui.destination-settings[page.type]ssl %}
{% capture stitch-location-copy %}
Click the {{ app.menu-paths.destination-settings }}.
{% endcapture %}
{% endif %}
{% case include.type %}
{% when 'general' %}
<!-- GENERAL INSTRUCTIONS -->
1. If you aren't signed into your Stitch account, [sign in now]({{ site.sign-in }}){:target="_blank"}.
2. {{ stitch-location-copy }}
3. Locate and click the **{{ connection-name }}** icon.
4. Fill in the fields as follows:
{% for field in connection-settings %}
- **{{ field.name | flatify }}**: {{ field.copy | flatify }}
{% endfor %}
<!-- FOR SSH -->
{% when 'ssh' %}
{% if integration.singer == true %}
{% assign ssh-fields = defaults.ssh-singer %}
{% else %}
{% assign ssh-fields = defaults.ssh %}
{% endif %}
{% include note.html type="single-line" content="**Note**: Skip this step if you're not using SSH to connect to Stitch." %}
If you're using an SSH tunnel to connect your {{ page.display_name }} database to Stitch, you'll also need to define the SSH settings. Refer to the {{ ssh-guide | strip }} for assistance with completing these fields.
{% if page.singer == true %}
1. Click the **SSH Tunnel** checkbox.
{% else %}
1. Click the **Encryption Type** menu.
2. Select **SSH** to display the SSH fields.
{% endif %}
3. Fill in the fields as follows:
{% for field in ssh-fields %}
- **{{ field.name | flatify }}**: {{ field.copy | flatify }}
{% endfor %}
<!-- FOR SSL FIELDS -->
{% when 'ssl' %}
{% unless page.name == "heroku" %}
{% include note.html type="single-line" content="**Note**: Skip this step if you're not using SSL to connect to Stitch." %}
{% endunless %}
<!-- IF THE CONNECTION HAS SPECIFIC SSL FIELDS, SHOW THEM -->
{% if include.ssl-fields == true %}
1. Check the **{{ defaults.field-names.ssl }}** checkbox. {{ defaults.field-copy.ssl }}
2. Fill in the fields as follows:
{% for field in ssl-fields %}
- **{{ field.name | flatify }}**: {{ field.copy | flatify }}
{% endfor %}
{% else %}
<!-- FOR HEROKU ONLY -->
{% if page.permalink contains "heroku" %}
Because Heroku enforces SSL by default, you don't need to take any further action to encrypt your data. Skip to the next step.
{% else %}
<!-- OTHERWISE, ONLY SHOW THE COPY FOR THE SSL CHECKBOX -->
Click the **{{ defaults.field-names.ssl }}** checkbox if you're using an SSL connection. {{ defaults.field-copy.ssl }}
{% endif %}
{% endif %}
{% when 'finish-up' %}
{% if page.singer == true or page.permalink contains "destinations" %}
{% assign save-connection-button = app.buttons.check-and-save %}
{% else %}
{% assign save-connection-button = app.buttons.save-int-settings %}
{% endif %}
When finished, click {{ save-connection-button | flatify }}.
Stitch will perform a connection test to the {{ page.display_name }} database; if successful, a *Success!* message will display at the top of the screen. **Note**: This test may take a few minutes to complete.
{% endcase %}