Users

This section describes the configurables that can be set for users.

Tip

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

By default, Swarm displays userids. Set the display_fullname configurable to true to display full user names on the:

To display full user names in Swarm, set the following configuration block in the SWARM_ROOT/data/config.php file to true:

<?php
// this block should be a peer of 'p4'
'users' => array(
'display_fullname' => true,
),
),

Default value is false, userids 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.
  • Note

    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.
  • Tip

    If timestamp is selected, the date format used by Swarm matches the date format configuration of the local machine browser.