# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# This file is used to configure the default appearance and features of the Texera.
# These defaults are loaded into the database at startup or when resetting settings, and can be
# overridden at runtime by administrators via the Admin Settings page.

config-service {
  # Setting to true resets all site settings in the database to the defaults defined in this file.
  always-reset-configurations-to-default-values = false
  always-reset-configurations-to-default-values = ${?CONFIG_SERVICE_ALWAYS_RESET_CONFIGURATIONS_TO_DEFAULT_VALUES}
}

gui {
  logo {
    logo = "assets/logos/logo.png"
    logo = ${?GUI_LOGO_LOGO}

    mini_logo = "assets/logos/full_logo_small.png"
    mini_logo = ${?GUI_LOGO_MINI_LOGO}

    favicon = "assets/logos/favicon-32x32.png"
    favicon = ${?GUI_LOGO_FAVICON}
  }

  tabs {
    # config for hub tabs
    hub_enabled = true
    hub_enabled = ${?GUI_TABS_HUB_ENABLED}

    home_enabled = true
    home_enabled = ${?GUI_TABS_HOME_ENABLED}

    workflow_enabled = true
    workflow_enabled = ${?GUI_TABS_WORKFLOW_ENABLED}

    dataset_enabled = true
    dataset_enabled = ${?GUI_TABS_DATASET_ENABLED}

    # config for your work tabs
    your_work_enabled = true
    your_work_enabled = ${?GUI_TABS_YOUR_WORK_ENABLED}

    projects_enabled = false
    projects_enabled = ${?GUI_TABS_PROJECTS_ENABLED}

    workflows_enabled = true
    workflows_enabled = ${?GUI_TABS_WORKFLOWS_ENABLED}

    datasets_enabled = true
    datasets_enabled = ${?GUI_TABS_DATASETS_ENABLED}

    quota_enabled = true
    quota_enabled = ${?GUI_TABS_QUOTA_ENABLED}

    forum_enabled = false
    forum_enabled = ${?GUI_TABS_FORUM_ENABLED}

    # config for about tab
    about_enabled = true
    about_enabled = ${?GUI_TABS_ABOUT_ENABLED}
  }
}

dataset {
  single_file_upload_max_size_mib = 20
  single_file_upload_max_size_mib = ${?DATASET_SINGLE_FILE_UPLOAD_MAX_SIZE_MIB}

  max_number_of_concurrent_uploading_file = 3
  max_number_of_concurrent_uploading_file = ${?MAX_NUMBER_OF_CONCURRENT_UPLOADING_FILE}

  # The maximum number of file chunks that can be held in the memory
  max_number_of_concurrent_uploading_file_chunks = 10
  max_number_of_concurrent_uploading_file_chunks = ${?DATASET_MAX_NUMBER_OF_CONCURRENT_UPLOADING_FILE_CHUNKS}

  # the size of each chunk during the multipart upload of file
  multipart_upload_chunk_size_mib = 50
  multipart_upload_chunk_size_mib = ${?DATASET_MULTIPART_UPLOAD_CHUNK_SIZE_MIB}
}
