##// END OF EJS Templates
docs: added infor about flash message suppressing.
marcink -
r988:f7d4acaa default
parent child Browse files
Show More
@@ -1,222 +1,240 b''
1 .. _admin-tricks:
1 .. _admin-tricks:
2
2
3 One-time Admin Tasks
3 One-time Admin Tasks
4 --------------------
4 --------------------
5
5
6 * :ref:`web-analytics`
6 * :ref:`web-analytics`
7 * :ref:`admin-tricks-license`
7 * :ref:`admin-tricks-license`
8 * :ref:`announcements`
8 * :ref:`announcements`
9 * :ref:`md-rst`
9 * :ref:`md-rst`
10 * :ref:`repo-stats`
10 * :ref:`repo-stats`
11 * :ref:`server-side-merge`
11 * :ref:`server-side-merge`
12 * :ref:`remap-rescan`
12 * :ref:`remap-rescan`
13 * :ref:`custom-hooks`
13 * :ref:`custom-hooks`
14 * :ref:`clear-repo-cache`
14 * :ref:`clear-repo-cache`
15 * :ref:`set-repo-pub`
15 * :ref:`set-repo-pub`
16 * :ref:`ping`
16 * :ref:`ping`
17
17
18 .. _web-analytics:
18 .. _web-analytics:
19
19
20 Adding Web Analytics
20 Adding Web Analytics
21 ^^^^^^^^^^^^^^^^^^^^
21 ^^^^^^^^^^^^^^^^^^^^
22
22
23 If you wish to add a Google Analytics, or any other kind of tracker to your
23 If you wish to add a Google Analytics, or any other kind of tracker to your
24 |RCE| instance you can add the necessary codes to the header or footer
24 |RCE| instance you can add the necessary codes to the header or footer
25 section of each instance using the following steps:
25 section of each instance using the following steps:
26
26
27 1. From the |RCE| interface, select
27 1. From the |RCE| interface, select
28 :menuselection:`Admin --> Settings --> Global`
28 :menuselection:`Admin --> Settings --> Global`
29 2. To add a tracking code to you instance, enter it in the header or footer
29 2. To add a tracking code to you instance, enter it in the header or footer
30 section and select **Save**
30 section and select **Save**
31
31
32 Use the example templates in the drop-down menu to set up your configuration.
32 Use the example templates in the drop-down menu to set up your configuration.
33
33
34 .. _admin-tricks-license:
34 .. _admin-tricks-license:
35
35
36 Licence Key Management
36 Licence Key Management
37 ^^^^^^^^^^^^^^^^^^^^^^
37 ^^^^^^^^^^^^^^^^^^^^^^
38
38
39 To manage your license key, go to
39 To manage your license key, go to
40 :menuselection:`Admin --> Settings --> License`.
40 :menuselection:`Admin --> Settings --> License`.
41 On this page you can see the license key details. If you need a new license,
41 On this page you can see the license key details. If you need a new license,
42 or have questions about your current one, contact support@rhodecode.com
42 or have questions about your current one, contact support@rhodecode.com
43
43
44 .. _announcements:
44 .. _announcements:
45
45
46 Server-wide Announcements
46 Server-wide Announcements
47 ^^^^^^^^^^^^^^^^^^^^^^^^^
47 ^^^^^^^^^^^^^^^^^^^^^^^^^
48
48
49 If you need to make a server-wide announcement to all users,
49 If you need to make a server-wide announcement to all users,
50 you can add a message to be displayed using the following steps:
50 you can add a message to be displayed using the following steps:
51
51
52 1. From the |RCE| interface, select
52 1. From the |RCE| interface, select
53 :menuselection:`Admin --> Settings --> Global`
53 :menuselection:`Admin --> Settings --> Global`
54 2. To add a message that will be displayed to all users,
54 2. To add a message that will be displayed to all users,
55 select :guilabel:`Server Announcement` from the drop-down menu and
55 select :guilabel:`Server Announcement` from the drop-down menu and
56 change the ``var message = "TYPE YOUR MESSAGE HERE";`` example line.
56 change the ``var message = "TYPE YOUR MESSAGE HERE";`` example line.
57 3. Select :guilabel:`Save`, and you will see the message once your page
57 3. Select :guilabel:`Save`, and you will see the message once your page
58 refreshes.
58 refreshes.
59
59
60 .. image:: ../images/server-wide-announcement.png
60 .. image:: ../images/server-wide-announcement.png
61 :alt: Server Wide Announcement
61 :alt: Server Wide Announcement
62
62
63 .. _md-rst:
63 .. _md-rst:
64
64
65
66 Suppress license warnings or errors
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
69 In case you're running on maximum allowed users, RhodeCode will display a
70 warning message on pages that you're close to the license limits.
71 It's often not desired to show that all the time. Here's how you can suppress
72 the license messages.
73
74 1. From the |RCE| interface, select
75 :menuselection:`Admin --> Settings --> Global`
76 2. Select :guilabel:`Flash message filtering` from the drop-down menu.
77 3. Select :guilabel:`Save`, and you will no longer see the license message
78 once your page refreshes.
79
80 .. _admin-tricks-suppress-license-messages:
81
82
65 Markdown or RST Rendering
83 Markdown or RST Rendering
66 ^^^^^^^^^^^^^^^^^^^^^^^^^
84 ^^^^^^^^^^^^^^^^^^^^^^^^^
67
85
68 |RCE| can use `Markdown`_ or `reStructured Text`_ in commit message,
86 |RCE| can use `Markdown`_ or `reStructured Text`_ in commit message,
69 code review messages, and inline comments. To set the default to either,
87 code review messages, and inline comments. To set the default to either,
70 select your preference from the drop-down menu on the
88 select your preference from the drop-down menu on the
71 :menuselection:`Admin --> Settings --> Visual` page and select
89 :menuselection:`Admin --> Settings --> Visual` page and select
72 :guilabel:`Save settings`.
90 :guilabel:`Save settings`.
73
91
74 .. _repo-stats:
92 .. _repo-stats:
75
93
76 Enabling Repository Statistics
94 Enabling Repository Statistics
77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
96
79 To enable |repo| statistics, use the following steps:
97 To enable |repo| statistics, use the following steps:
80
98
81 1. From the |RCE| interface, open
99 1. From the |RCE| interface, open
82 :menuselection:`Admin --> Repositories` and select
100 :menuselection:`Admin --> Repositories` and select
83 :guilabel:`Edit` beside the |repo| for which you wish to enable statistics.
101 :guilabel:`Edit` beside the |repo| for which you wish to enable statistics.
84 2. Check the :guilabel:`Enable statistics` box, and select :guilabel:`Save`
102 2. Check the :guilabel:`Enable statistics` box, and select :guilabel:`Save`
85
103
86 .. _server-side-merge:
104 .. _server-side-merge:
87
105
88 Enabling Server-side Merging
106 Enabling Server-side Merging
89 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90
108
91 To enable server-side merging, use the following steps:
109 To enable server-side merging, use the following steps:
92
110
93 1. From the |RCE| interface, open :menuselection:`Admin --> Settings --> VCS`
111 1. From the |RCE| interface, open :menuselection:`Admin --> Settings --> VCS`
94 2. Check the :guilabel:`Server-side merge` box, and select
112 2. Check the :guilabel:`Server-side merge` box, and select
95 :guilabel:`Save Settings`
113 :guilabel:`Save Settings`
96
114
97 If you encounter slow performance with server-side merging enabled, check the
115 If you encounter slow performance with server-side merging enabled, check the
98 speed at which your server is performing actions. When server-side merging is
116 speed at which your server is performing actions. When server-side merging is
99 enabled, the following actions occurs on the server.
117 enabled, the following actions occurs on the server.
100
118
101 * A |pr| is created in the database.
119 * A |pr| is created in the database.
102 * A shadow |repo| is created as a working environment for the |pr|.
120 * A shadow |repo| is created as a working environment for the |pr|.
103 * On display, |RCE| checks if the |pr| can be merged.
121 * On display, |RCE| checks if the |pr| can be merged.
104
122
105 To check how fast the shadow |repo| creation is occurring on your server, use
123 To check how fast the shadow |repo| creation is occurring on your server, use
106 the following steps:
124 the following steps:
107
125
108 1. Log into your server and create a directory in your |repos| folder.
126 1. Log into your server and create a directory in your |repos| folder.
109 2. Clone a |repo| that is showing slow performance and time the action.
127 2. Clone a |repo| that is showing slow performance and time the action.
110
128
111 .. code-block:: bash
129 .. code-block:: bash
112
130
113 # One option is to use the time command
131 # One option is to use the time command
114 $ time hg clone SOURCE_REPO TARGET
132 $ time hg clone SOURCE_REPO TARGET
115
133
116 .. _remap-rescan:
134 .. _remap-rescan:
117
135
118 Remap and Rescan Repositories
136 Remap and Rescan Repositories
119 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
138
121 You may want to Remap and rescan the |repos| that |RCE| is managing to ensure
139 You may want to Remap and rescan the |repos| that |RCE| is managing to ensure
122 the system is always up-to-date. This is useful after importing, deleting,
140 the system is always up-to-date. This is useful after importing, deleting,
123 or carrying out general cleaning up operations. To do this use the
141 or carrying out general cleaning up operations. To do this use the
124 following steps:
142 following steps:
125
143
126 1. From the |RCE|, open
144 1. From the |RCE|, open
127 :menuselection:`Admin --> Settings --> Remap and rescan`
145 :menuselection:`Admin --> Settings --> Remap and rescan`
128 2. Click :guilabel:`Rescan Repositories`
146 2. Click :guilabel:`Rescan Repositories`
129
147
130 Check the additional options if needed:
148 Check the additional options if needed:
131
149
132 * :guilabel:`Destroy old data`: Useful for purging deleted repository
150 * :guilabel:`Destroy old data`: Useful for purging deleted repository
133 information from the database.
151 information from the database.
134 * :guilabel:`Invalidate cache for all repositories`: Use this to completely
152 * :guilabel:`Invalidate cache for all repositories`: Use this to completely
135 remap all |repos|. Useful when importing or migrating |repos| to ensure all
153 remap all |repos|. Useful when importing or migrating |repos| to ensure all
136 new information is picked up.
154 new information is picked up.
137
155
138 .. _custom-hooks:
156 .. _custom-hooks:
139
157
140 Adding Custom Hooks
158 Adding Custom Hooks
141 ^^^^^^^^^^^^^^^^^^^
159 ^^^^^^^^^^^^^^^^^^^
142
160
143 To add custom hooks to your instance, use the following steps:
161 To add custom hooks to your instance, use the following steps:
144
162
145 1. Open :menuselection:`Admin --> Settings --> Hooks`
163 1. Open :menuselection:`Admin --> Settings --> Hooks`
146 2. Add your custom hook details, you can use a file path to specify custom
164 2. Add your custom hook details, you can use a file path to specify custom
147 hook scripts, for example: ``python:/path/to/custom_hook.py``
165 hook scripts, for example: ``python:/path/to/custom_hook.py``
148 3. Select :guilabel:`Save`
166 3. Select :guilabel:`Save`
149
167
150 Also, see the |RC| Extensions section of the :ref:`rc-tools` guide. |RC|
168 Also, see the |RC| Extensions section of the :ref:`rc-tools` guide. |RC|
151 Extensions can be used to add additional hooks to your instance and comes
169 Extensions can be used to add additional hooks to your instance and comes
152 with a number of pre-built plugins if you chose to install them.
170 with a number of pre-built plugins if you chose to install them.
153
171
154 .. _clear-repo-cache:
172 .. _clear-repo-cache:
155
173
156 Clearing |repo| cache
174 Clearing |repo| cache
157 ^^^^^^^^^^^^^^^^^^^^^
175 ^^^^^^^^^^^^^^^^^^^^^
158
176
159 If you need to clear the cache for a particular |repo|, use the following steps:
177 If you need to clear the cache for a particular |repo|, use the following steps:
160
178
161 1. Open :menuselection:`Admin --> Repositories` and select :guilabel:`Edit`
179 1. Open :menuselection:`Admin --> Repositories` and select :guilabel:`Edit`
162 beside the |repo| whose cache you wish to clear.
180 beside the |repo| whose cache you wish to clear.
163 2. On the |repo| settings page, go to the :guilabel:`Caches` tab and select
181 2. On the |repo| settings page, go to the :guilabel:`Caches` tab and select
164 :guilabel:`Invalidate repository cache`.
182 :guilabel:`Invalidate repository cache`.
165
183
166 .. _set-lang:
184 .. _set-lang:
167
185
168 Changing Default Language
186 Changing Default Language
169 ^^^^^^^^^^^^^^^^^^^^^^^^^
187 ^^^^^^^^^^^^^^^^^^^^^^^^^
170
188
171 To change the default language of a |RCE| instance, change the language code
189 To change the default language of a |RCE| instance, change the language code
172 in the :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. To
190 in the :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. To
173 do this, use the following steps.
191 do this, use the following steps.
174
192
175 1. Open the :file:`rhodecode.ini` file and set the required language code.
193 1. Open the :file:`rhodecode.ini` file and set the required language code.
176
194
177 .. code-block:: ini
195 .. code-block:: ini
178
196
179 ## Optional Languages
197 ## Optional Languages
180 ## en(default), de, fr, it, ja, pl, pt, ru, zh
198 ## en(default), de, fr, it, ja, pl, pt, ru, zh
181 lang = de
199 lang = de
182
200
183 2. Restart the |RCE| instance and check that the language has been updated.
201 2. Restart the |RCE| instance and check that the language has been updated.
184
202
185 .. code-block:: bash
203 .. code-block:: bash
186
204
187 $ rccontrol restart enterprise-2
205 $ rccontrol restart enterprise-2
188 Instance "enterprise-2" successfully stopped.
206 Instance "enterprise-2" successfully stopped.
189 Instance "enterprise-2" successfully started.
207 Instance "enterprise-2" successfully started.
190
208
191 .. image:: ../images/language.png
209 .. image:: ../images/language.png
192
210
193 .. _set-repo-pub:
211 .. _set-repo-pub:
194
212
195 Setting Repositories to Publish
213 Setting Repositories to Publish
196 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
214 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197
215
198 To automatically promote your local |repos| to public after pushing to |RCE|,
216 To automatically promote your local |repos| to public after pushing to |RCE|,
199 enable the :guilabel:`Set repositories as publishing` option on the
217 enable the :guilabel:`Set repositories as publishing` option on the
200 :menuselection:`Admin --> Settings --> VCS` page.
218 :menuselection:`Admin --> Settings --> VCS` page.
201
219
202 .. note::
220 .. note::
203
221
204 This option is enabled by default on most |RCE| versions, but if upgrading
222 This option is enabled by default on most |RCE| versions, but if upgrading
205 from a 1.7.x version it could be disabled on upgrade due to inheriting
223 from a 1.7.x version it could be disabled on upgrade due to inheriting
206 older default settings.
224 older default settings.
207
225
208 .. _ping:
226 .. _ping:
209
227
210 Pinging the |RCE| Server
228 Pinging the |RCE| Server
211 ^^^^^^^^^^^^^^^^^^^^^^^^
229 ^^^^^^^^^^^^^^^^^^^^^^^^
212
230
213 You can check the IP Address of your |RCE| instance using the
231 You can check the IP Address of your |RCE| instance using the
214 following URL: ``{instance-URL}/_admin/ping``.
232 following URL: ``{instance-URL}/_admin/ping``.
215
233
216 .. code-block:: bash
234 .. code-block:: bash
217
235
218 $ curl https://your.rhodecode.url/_admin/ping
236 $ curl https://your.rhodecode.url/_admin/ping
219 pong[rce-7880] => 203.0.113.23
237 pong[rce-7880] => 203.0.113.23
220
238
221 .. _Markdown: http://daringfireball.net/projects/markdown/
239 .. _Markdown: http://daringfireball.net/projects/markdown/
222 .. _reStructured Text: http://docutils.sourceforge.net/docs/index.html
240 .. _reStructured Text: http://docutils.sourceforge.net/docs/index.html
General Comments 0
You need to be logged in to leave comments. Login now