Skip to content

Using the Django Admin Dashboard

Once HydroServer is running and accessible, instance administrators can use the Django admin dashboard to manage deployment-wide settings, default metadata, controlled vocabularies, authentication providers, and selected maintenance actions.

Access the Admin Dashboard

Log in to the administrator dashboard at:

https://<your-hydroserver-domain>/admin

Only users with Staff status can access the dashboard. Users with Superuser status can manage all admin models and run privileged admin actions. To create an administrator account programmatically, run the following command and follow the prompts to set an email and password:

bash
python manage.py createsuperuser

Admin users can also upgrade other user accounts to administrators through the admin dashboard by clicking on Identity and Access Management > Users, selecting a user, then toggling both Superuser Status and Staff Status to true.

User Accounts and Access

HydroServer can be configured to limit access to certain features for new users by default via the ACCOUNT_OWNERSHIP_ENABLED setting. If this setting is not enabled, new users are assigned limited accounts. Limited accounts cannot create or own workspaces, but they can be added as collaborators to existing workspaces.

Administrators can manually upgrade a limited account to a standard account by clicking on Identity and Access Management > Users, selecting a user, and toggling Is Ownership Allowed to true.

The Identity and Access Management section also exposes the following admin models:

ModelPurpose
UsersManage user profile fields, account status, staff/superuser access, and ownership permission.
OrganizationsManage organizations that can be associated with users and workspaces.
WorkspacesReview or edit workspace ownership, privacy, and workspace metadata.
RolesConfigure reusable permission bundles for collaborators and API keys.
PermissionsReview the resource-level permissions that belong to roles.
CollaboratorsReview or edit user access to workspaces.
API KeysReview API key metadata, deactivate keys, or regenerate a selected key.

To regenerate an API key, open Identity and Access Management > API Keys, select exactly one API key, choose Regenerate selected API key from the action menu, and click Go. The new key is shown once after the action completes.

HydroServer Configuration

To update the HydroServer domain used in emails and notifications, go to Sites > example.com and change the domain to match your HydroServer domain.

The following website settings can be configured under Website Configuration:

ModelPurpose
Instance ConfigurationConfigure instance-wide website content and legal links.
Analytics ConfigurationEnable or disable Microsoft Clarity analytics.
Map ConfigurationConfigure the default map view, default map layers, and map service providers.
Map LayersCreate the map layers available to users in HydroServer map controls.
Contact InformationAdd contact cards shown on the About page.
Site Type IconsCustomize which icons are used for different monitoring site types.

Instance Configuration

Use Website Configuration > Instance Configuration to manage general website settings:

FieldPurpose
Show about informationShows or hides the About page information block.
About page titleSets the heading for the About page information block.
About page textSets the body content for the About page information block.
Terms of use linkSets the Terms of Use link exposed by the web application.
Privacy policy linkSets the Privacy Policy link exposed by the web application.
CopyrightSets the copyright notice shown by the web application.

Analytics Configuration

Use Website Configuration > Analytics Configuration to optionally enable Microsoft Clarity analytics:

FieldPurpose
Enable clarity analyticsTurns Microsoft Clarity tracking on or off.
Clarity project idStores the project ID from the Microsoft Clarity project settings.

Map Configuration

Use Website Configuration > Map Configuration to control the initial map state and map service providers:

FieldPurpose
Default latitudeSets the latitude used when a map first loads without a more specific site extent.
Default longitudeSets the longitude used when a map first loads without a more specific site extent.
Default zoom levelSets the initial map zoom level.
Default base layerSelects the default basemap from the configured Map Layers.
Default satellite layerSelects the default satellite imagery layer from the configured Map Layers.
Elevation serviceSelects the elevation lookup provider. Available options are Open Elevation and Google.
Geo serviceSelects the geocoding/search provider. Available options are Nominatim and Google.

If a Google-backed service is selected, make sure the deployment has the required Google service credentials or API key configuration before relying on that option in production.

Map Layers

Use Website Configuration > Map Layers to add basemap and overlay options:

FieldPurpose
NameSets the display name shown to users.
TypeClassifies the layer as a Basemap or Overlay.
PriorityControls layer ordering when multiple layers are available.
SourceStores the map tile or layer source URL used by the frontend map.
AttributionSets the attribution text required by the layer provider.

After creating a basemap or satellite layer, return to Map Configuration to select it as a default layer.

Contact Information

Use Website Configuration > Contact Information to add organization contact options to the About page:

FieldPurpose
TitleSets the contact option title.
TextAdds supporting details for the contact option.
ActionSets the call-to-action text shown for the contact option.
IconStores the icon identifier used by the web application.
LinkSets the URL or address opened by the contact action.

Contact information is only visible when About page information is enabled in Instance Configuration.

Site Type Icons

Use Website Configuration > Site Type Icons to customize monitoring site icons in the Data Management app. The available icon records are fixed, but administrators can edit the site type names and keywords associated with each icon.

Enter one site type name or keyword per line. Matching ignores case and punctuation, and longer matching keywords take precedence. For example, a site type of Stream Gage can map to the gauge icon while Stream maps to the water icon. Each keyword can be assigned to only one icon. Leave an icon's keyword list empty if it should not be used.

If no configured keyword matches a site's type, the Data Management app uses the default outlined map marker icon.

Data and Metadata Administration

The Measurement Data section exposes the core HydroServer data models. Most data entry should happen through the HydroServer web application, API, or client libraries, but the Django admin can be useful for reviewing records and performing administrator-only maintenance.

Additional vocabulary models also appear in this admin section and are documented under Controlled Vocabularies below.

ModelPurpose
ThingsManage monitoring sites and their workspace/privacy metadata.
LocationsReview or edit site location records.
SensorsManage reusable sensor metadata.
Observed PropertiesManage reusable observed property metadata.
UnitsManage reusable unit metadata.
Processing LevelsManage reusable processing level metadata.
DatastreamsReview datastream metadata and run selected maintenance actions.
Result QualifiersManage result qualifier codes.
File Attachment TypesManage file attachment type vocabulary values.
Thing File AttachmentsReview files attached to monitoring sites.
Datastream File AttachmentsReview files attached to datastreams.
Thing TagsReview key/value tags attached to monitoring sites.
Datastream TagsReview key/value tags attached to datastreams.

The Datastreams admin page includes two actions for selected datastreams:

  • Populate with test observations: Generates test observations for selected datastreams. This is intended for development and demonstration environments.
  • Delete datastream observations: Deletes observations for selected datastreams and resets the datastream phenomenon/result time ranges and value count.

Use these actions carefully. They change observation data directly and should not be used on production data unless that is the intended administrative operation.

Default Data

Several HydroServer models can be populated with bundled default data through the admin dashboard. Open one of the models below and click its Load Default ... button in the upper-right corner of the changelist page:

SectionModelDefault data
Identity and Access ManagementRolesDefault workspace roles and permissions. Load these before users add collaborators or API keys to workspaces.
Identity and Access ManagementUser TypesDefault user type vocabulary values.
Identity and Access ManagementOrganization TypesDefault organization type vocabulary values.
Measurement DataObserved PropertiesDefault observed property metadata.
Measurement DataProcessing LevelsDefault processing level metadata.
Measurement DataUnitsDefault unit metadata.
Measurement DataSite TypesDefault monitoring site type vocabulary values.
Measurement DataSampling Feature TypesDefault sampling feature type vocabulary values.
Measurement DataMethod TypesDefault method type vocabulary values.
Measurement DataSensor Encoding TypesDefault sensor encoding type vocabulary values.
Measurement DataVariable TypesDefault variable type vocabulary values.
Measurement DataUnit TypesDefault unit type vocabulary values.
Measurement DataDatastream AggregationsDefault aggregation statistic vocabulary values.
Measurement DataDatastream StatusesDefault datastream status vocabulary values.
Measurement DataSampled MediumsDefault sampled medium vocabulary values.
Measurement DataFile Attachment TypesDefault file attachment type vocabulary values.

The load action imports fixture data into the database. It does not replace the need to review locally customized metadata after upgrades.

Controlled Vocabularies

HydroServer forms use several administrator-managed vocabularies. Add or edit these records to control the choices users see in metadata forms:

SectionModels
Identity and Access ManagementUser Types, Organization Types, Roles
Measurement DataDatastream Aggregations, Datastream Statuses, File Attachment Types, Method Types, Sampled Mediums, Sampling Feature Types, Sensor Encoding Types, Site Types, Unit Types, Variable Types

Workspace-scoped metadata such as observed properties, units, processing levels, sensors, and result qualifiers can also be reviewed in the admin dashboard. When a record has no workspace, it is available as system-level metadata.

Third-Party Identity Providers

To enable authentication through third-party identity providers, do the following:

  • Navigate to Social Applications > Add Social Application.
  • Select a supported provider, such as Google or HydroShare.
  • Enter a unique ID, name, client ID/key, and secret key from the provider.
  • Optionally add JSON settings, for example:
    json
    {
      "allowSignUp": true,
      "allowConnection": true
    }
  • Use allowSignUp to control whether users can sign up with this provider.
  • Use allowConnection to control whether users can connect the provider to an existing HydroServer account.
  • When omitted, allowSignUp defaults to enabled, but allowConnection is enabled only when explicitly set to true.
  • Assign the default site that the provider can authenticate against.