
listenAddressSingleHTTPFrontend: 0.0.0.0:1337
logLevel: "INFO"
showNavigation: false
pageTitle: МИС "Медицина"
showFooter: false

actionGroups:
  - title: МИС
    icon: 🏥
    actions:
      - mis-install
      - mis-restart
      - mis-update

  - title: Обслуживание
    icon: 🛠️
    actions:
      - ping-sync
      - ping-docker
      - check-disk-space

actions:
  - id: mis-install
    title: Установить
    icon: box
    popupOnStart: execution-dialog-stdout-only
    shell: /config/medicine-install.sh "{{ organization_name }}" "{{ organization_id }}" "{{ http_port }}" "{{ https_port }}"
    timeout: 600
    arguments:
      - name: organization_name
        title: "Название организации"
        default: "DEMO"
        type: unicode_identifier
        required: true

      - name: organization_id
        title: "Идентификатор организации"
        default: "1234"
        type: ascii_sentence

      - name: http_port
        title: "HTTP порт"
        default: "80"
        type: int

      - name: https_port
        title: "HTTPS порт"
        default: "443"
        type: int

  - id: medicine-change-env
    title: Изменить настройки
    icon: ⚙️
    popupOnStart: execution-dialog-stdout-only
    shell: /config/medicine-change-env.sh "{{ http_port }}" "{{ https_port }}"
    timeout: 600
    arguments:
      - name: http_port
        title: "HTTP порт"
        default: "80"
        type: int

      - name: https_port
        title: "HTTPS порт"
        default: "443"
        type: int

  - id: mis-restart
    title: Перезапустить
    icon: 🔄
    timeout: 60
    shell: /config/medicine-restart.sh
    popupOnStart: execution-dialog-stdout-only

  - id: mis-update
    title: Обновить
    icon: ⬆️
    popupOnStart: execution-dialog-stdout-only
    timeout: 60
    shell: /config/medicine-update.sh

  - id: ping-sync
    title: Ping sync.med-logic.ru
    shell: ping sync.med-logic.ru -c 2
    icon: ping
    popupOnStart: execution-dialog-stdout-only

  - id: ping-docker
    title: Ping docker.med-logic.ru
    shell: ping docker.med-logic.ru -c 2
    icon: ping
    popupOnStart: execution-dialog-stdout-only

  - id: check-disk-space
    title: Check disk space
    icon: disk
    shell: df -h /media
    popupOnStart: execution-dialog-stdout-only

dashboards:
  - title: Главная
    contents:
      - title: МИС
        type: fieldset
        contents:
          - title: Установить
          - title: Перезапустить
          - title: Обновить
          - title: Изменить настройки

      - title: "Системное"
        type: fieldset
        contents:
          - title: Ping sync.med-logic.ru
          - title: Ping docker.med-logic.ru
          - title: Check disk space
