Users
This section describes the configurables that can be set for users.
If you make a configuration change, Swarm will not use it until the configuration cache has been reloaded, this forces Swarm to use the new configuration. You must be an admin or super user to reload the Swarm config cache. Navigate to the User id dropdown menu, select System Information, click the Cache Info tab, and click the Reload Configuration button.
Dashboard refresh interval
By default, when your dashboard is open, Swarm checks for new content every five minutes. If Swarm finds new content for a user's dashboard, the Refresh button is displayed on their dashboard. For more information about using the Refresh button, see Refresh button.
Configure the dashboard refresh interval in milliseconds with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'users' => array(
'dashboard_refresh_interval' => 300000, // Default 300000 milliseconds
),
),
Default value is 300000 milliseconds (300 seconds, 5 minutes)
Display full names
For Swarm 2022.1 and later, the display_fullname value defaults to true. For earlier Swarm releases, the default was false. Upgrading your Swarm version to 2022.1 and later will not change your display_fullname setting.
By default, Swarm displays full user names. Set the display_fullname configurable to false to display userids on the:
- Project Settings page
- Group Settings page
- Activity streams
- Commits page
- Edit reviewers dialog
To display userids in Swarm, set the following configuration block in the SWARM_ROOT/data/config.php
file to false:
<?php
// this block should be a peer of 'p4'
'users' => array(
'display_fullname' => false,
),
),
Default value is true, full user names are displayed.
Review preferences
The review preferences configure the default way that diffs are initially displayed to users when they view them in changelists and code reviews. The review preference settings are used for a user until they change their user preferences, see user profile Settings.
Configure the default user diff view settings with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'users' => array(
'settings' => array(
'review_preferences' => array(
'show_comments_in_files' => true,
'view_diffs_side_by_side' => true,
'show_space_and_new_line_characters' => false,
'ignore_whitespace' => false,
),
),
),
show_comments_in_files:
- true: display comments in files and in the Comments tab. This is the default value.
- false: display comments only in the Comments tab.
view_diffs_side_by_side:
- true: display diffs in files side by side in two panes. This is the default value.
- false: display diffs in files inline in a single pane.
show_space_and_new_line_characters:
- true: display whitespace characters as dots, tabs as arrows that point to a bar, and line endings as arrows that point down.
- false: whitespace, tabs and line endings are not displayed as special characters. This is the default value.
ignore_whitespace:
- false: changes made to whitespace are highlighted in file diffs. This makes it easier to identify changes in file types where whitespace is important. This is the default value.
- true: changes made to whitespace are not highlighted in file diffs. This makes it easier to see the important changes in file types where whitespace changes are not important.
ignore_whitespace
replaces ignore_whitespace_default
that was used in Swarm version 2017.4 and earlier. By default ignore_whitespace
is set to false, this is the same original default value set for ignore_whitespace_default
.
Time preferences
The time preferences configure the default way that time is initially displayed to users. The time preference settings are used for a user until they change their user preferences, see user profile Settings.
Configure the default user time settings with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'users' => array(
'settings' => array(
'time_preferences' => array(
'display' => 'Timeago', // Default to 'Timeago' but can be set to 'Timestamp'
),
),
),
display:
- 'Timeago': time is displayed as how long ago the event happened. This is the default value.
- 'Timestamp': time is displayed as the date and time the event happened using the local machine browser time.
If timestamp is selected, the date format used by Swarm matches the date format configuration of the local machine browser.