Инструкция по работе с виджетом «Курс валют»/en: различия между версиями

Материал из SmartPlayer
Новая страница: «User Guide for the “Exchange Rates” Widget»
 
Нет описания правки
 
(не показаны 2 промежуточные версии 2 участников)
Строка 1: Строка 1:
<div lang="ru" dir="ltr" class="mw-content-ltr">
<languages/>
== '''Описание ситуации''' ==
== '''Situation Description''' ==
Команда SmartPlayer разработала виджет, который позволяет пользователям добавлять файл с ценами на SFTP-сервер и передавать определённые цены на выбранные устройства. Возможность выбора конкретных устройств для передачи цен появилась в рамках доработки виджета.
The SmartPlayer team has developed a widget that allows users to upload a file with currency rates to the SFTP server and send specific rates to selected devices.
=== '''Работоспособность виджета''' ===
The ability to choose particular devices for transmitting rates was added as part of the widget’s improvement.
Данный виджет работает:
=== '''Widget Functionality''' ===
* с версии серверного приложения: 2.151.1
This widget works:
== '''Серверная логика''' ==
* starting from the server application version: 2.151.1
На сервер SmartPlayer пользователь загружает файл с данными по ценам с помощью SFTP. Сервер получает, хранит и обрабатывает информацию из файла. Через равные промежутки времени происходит переотправка (обновление) данных. Сервер парсит данные в виджет, который выводит их на устройства. <br> <br>
== '''Server Logic''' ==
'''Примечание:''' доработанный виджет частично изменил свою реализацию. В файле который размещается на сервере появилось поле "department". В этом поле прописывается наименование департамента, которое впоследствии необходимо также указать в настройках устройства. Только устройства, у которых прописан департамент получают новые данные с ценами. Значение поля "department" в файле и на устройстве должны быть идентично, то есть иметь полное совпадение по написанию и регистру.
The user uploads a file with price data to the SmartPlayer server via SFTP.
=== '''Настройка поля «Департамент»''' ===
The server receives, stores, and processes the information from the file.
Пользователю необходимо перенести значение поля "department" на нужные устройства, которые впоследствии будут работать в трансляции с виджетом. Для этого необходимо перейти в раздел «Устройства», выбрать нужное устройство и дважды кликнуть по нему.
At regular intervals, data is resent (updated).
[[File:Нужное_устройство_в_лк.png|thumb|center| Пример отображения нужного устройства в разделе «Устройства» личного кабинета|800px]]
The server parses the data into the widget, which displays it on devices. <br><br>
После описанных выше действий откроется страница настройки устройства. Здесь необходимо найти поле «Код филиала» и точно ввести значение, которое указано в поле "department" файла для сервера и сохранить настройки.  
'''Note:''' The updated widget has partially changed its implementation.
[[File:Код_филиала.png|thumb|center| Пример отображения поля «Код филиала» в настройках устройства|800px]]
The file placed on the server now includes the field "department".
Если данное устройство будет привязано к трансляции с виджетом курса валют, то оно будет получать только определенные данные для этого департамента.
This field specifies the department name, which must also be entered in the device settings.
=== '''Выгрузка отчёта по валютам''' ===
Only devices that have the matching department name will receive the new pricing data.
Пользователь может выгрузить отчёт по валютам в личном кабинете SmartPlayer. Для этого у него должна быть одна из двух ролей:
The "department" field value in the file and on the device must be identical — exactly matching in spelling and case.
# Администратор.
=== '''Setting the “Department” Field''' ===
# Администратор (трансляция с отчётом валют).
The user must transfer the "department" field value to the necessary devices that will later participate in the broadcast using the widget. 
[[File:Роль пользователя для отчётов.png|thumb|center| Пример роли в личном кабинете|800px]]
To do this, go to the "Devices" section, select the required device, and double-click on it.
Сам отчёт можно выгрузить, перейдя в специальную категорию раздела «Отчёты» в категории «Отчёт по валютам».  
[[File:Нужное_устройство_в_лк.png|thumb|center| Example of the selected device in the “Devices” section of the personal account|800px]]
[[File:Отчет_по_валютам.png|thumb|center| Пример отображения раздела «Отчёты» и категории «Отчёт по валютам»|800px]]
After these steps, the device settings page will open.
С работой данного раздела можно ознакомиться по ссылке [https://wiki.smartplayer.org/index.php/%D0%9E%D1%82%D1%87%D1%91%D1%82%D1%8B_%D0%B2_%D0%BB%D0%B8%D1%87%D0%BD%D0%BE%D0%BC_%D0%BA%D0%B0%D0%B1%D0%B8%D0%BD%D0%B5%D1%82%D0%B5 здесь].
Find the “Branch Code” field and enter the value exactly as it appears in the “department” field of the server file, then save the settings.
== '''Добавление виджета в личный кабинет''' ==
[[File:Код_филиала.png|thumb|center| Example of the “Branch Code” field in device settings|800px]]
Чтобы добавить данный виджет в личный кабинет, пользователю необходимо запросить у специалиста команды технической поддержки архив с содержимым. Он будет предоставлен в формате .zip-архива.
If this device is linked to a broadcast using the Exchange Rates widget, it will receive only the relevant data for that department.
[[File:Виджет_курс_валют.png|thumb|center| Пример виджета в формате .zip-архива|800px]]
=== '''Currency Report Export''' ===
После этого пользователь должен авторизоваться в личном кабинете и перейти в раздел «Контент».
The user can export a currency report in the SmartPlayer personal account.
[[File:Раздел_контент_личного_кабиента.png|thumb|center| Пример отображения раздела «Контент» в личном кабинете |800px]]
To do this, one of the following two roles is required:
В разделе «Контент» необходимо перетянуть данный виджет из локального хранилища в личный кабинет. После того, как пользователь перенесет виджет в личный кабинет, он отобразится в списке с контентом.
# Administrator.
[[File:Виджет_в_лк.png|thumb|center| Пример отображения переноса виджета в личном кабинете SmartPlayer|800px]]
# Administrator (Currency Report Broadcast).
== '''Настройка виджета''' ==
[[File:Роль пользователя для отчётов.png|thumb|center| Example of a role in the personal account|800px]]
После переноса виджета для первичной настройки пользователю необходимо дважды кликнуть по иконке виджета. Данное действие перенесет его на главную страницу.
The report itself can be exported by navigating to the “Reports” section and selecting the “Currency Report” category.
[[File:Главная_страница_виджета_БКС.png|thumb|center| Пример отображения главной страницы виджета|800px]]
[[File:Отчет_по_валютам.png|thumb|center| Example of the “Reports” section and “Currency Report” category|800px]]
На главной странице виджета пользователю доступно две кнопки:
You can learn more about how this section works [https://wiki.smartplayer.org/index.php/%D0%9E%D1%82%D1%87%D1%91%D1%82%D1%8B_%D0%B2_%D0%BB%D0%B8%D1%87%D0%BD%D0%BE%D0%BC_%D0%BA%D0%B0%D0%B1%D0%B8%D0%BD%D0%B5%D1%82%D0%B5 here].
# Кнопка "API".
== '''Adding the Widget to the Personal Account''' ==
# Кнопка «Настройки»
To add this widget to the personal account, the user must request an archive from the technical support team.
[[File:Кнопка_api_и_настройки.png|thumb|center| Пример отображения иконки для перехода в настройки виджета|800px]]
It will be provided as a .zip file.
== '''Кнопка "API"''' ==
[[File:Виджет_курс_валют.png|thumb|center| Example of the widget provided as a .zip archive|800px]]
Кликнув на кнопку "API" пользователю откроется модальное окно с информацией о ресурсах, которые позволяют стабильно работать виджету. В разделе также есть общее описание о его необходимости и принципах работы.
After that, the user must log in to the personal account and go to the “Content” section.
[[File:Данные_в_модальном_окне.png|thumb|center| Пример отображения информации в модальном окне |800px]]
[[File:Раздел_контент_личного_кабиента.png|thumb|center| Example of the “Content” section in the personal account |800px]]
Основными параметрами для ресурсов являются:
In the “Content” section, drag the widget from local storage into the personal account.
* имя указано имя ресурса;
Once uploaded, the widget will appear in the content list.
* метод используемый тип метода (GET);
[[File:Виджет_в_лк.png|thumb|center| Example of the widget uploaded into the SmartPlayer personal account|800px]]
* требует авторизации информация об обязательности авторизации;
== '''Widget Configuration''' ==
* адрес сервера — URL-адрес сервера, с которого берутся данные;
After uploading the widget, to begin configuration, double-click on the widget icon.
* адрес API — отображается название JSON-файла с данными о ценах;
This action will open the main page.
* кнопка «Проверить соединение» при нажатии проводит проверку соединения и отображает вывод с указанием числового статуса.
[[File:Главная_страница_виджета_БКС.png|thumb|center| Example of the widget’s main page|800px]]
Закрыть данное окно можно по стандартной иконке в правом верхнем углу.
On the widget’s main page, two buttons are available:
== '''Кнопка «Настройки»''' ==
# “API” button.
После открытия страницы с настройками пользователю необходимо настроить следующие параметры виджета:
# “Settings” button. 
* фон виджета позволяет с помощью палитры настроить нужный фон для виджета;
[[File:Кнопка_api_и_настройки.png|thumb|center| Example of the icons for accessing widget settings|800px]]
* фоновое изображение выбрать изображение в качестве фона для виджета из личного кабинета SmartPlayer;
== '''"API" Button''' ==
* частота обновления данных от Центробанка указать значение (в секундах), чтобы получать актуальные данные о ценах;
When clicking the "API" button, a modal window opens showing information about the resources required for the widget to function properly.
* логотип выбрать изображение в качестве логотипа для виджета из личного кабинета SmartPlayer;
This section also contains a general description of the API’s purpose and operation principles.
* текст в правой части «подвала» виджета необходимо ввести текст сообщения;
[[File:Данные_в_модальном_окне.png|thumb|center| Example of information in the modal window |800px]]
* размер в правой части «подвала» виджета ввести значение или сместить ползунок для настройка шрифта текста;
The main parameters for the resources include:
* форматирование отображения цен выбрать из списка вариант форматирования;
* Name resource name.
* изображение плейсхолдера выбрать изображение в качестве плейсхолдера (заглушки) для виджета из личного кабинета SmartPlayer;
* Method the type of method used (GET).
* чекбокс «Отображать плейсхолдер» включает/выключает плесхолдер (заглушку) в настройках виджета. При активации всегда показывается изображение плесхолдера (заглушки);
* Requires authorization whether authorization is required.
* чекбокс «Отображать плейсхолдер при отсутствии соединения с удалённым сервером» включает/выключает работу плейсхолдера (заглушки) при отсутствии соединения с сервером.
* Server address the URL of the server providing data.
* время, через которое скрывать цены и отображать плейсхолдер указать время, через которое начинает работать плейсхолдер (заглушка). Время измеряется в секундах;
* API address displays the name of the JSON file containing pricing data.
* чекбокс «Анимация смены котировок» включает/выключает работу анимации при смене значений котировок;
* “Check connection” button tests the connection and displays a numerical status code.
* выбор языка позволяет выбрать один из доступных языков — русский, английский, испанский, португальский, казахский.
You can close this window by clicking the standard icon in the upper-right corner.
[[File:Настраиваемые_параметры_видежта.png|thumb|center| Пример отображения настраиваемых параметров виджета|800px]]
== '''"Settings" Button''' ==
== '''Завершение настройки виджета''' ==
On the settings page, the user must configure the following widget parameters:
После завершения работ по настройке виджета пользователь должен нажать на кнопку «Применить настройки» в правой нижней части экрана.
* Widget background allows you to set a background color using a palette.
[[File:Применение_настрок.png|thumb|center| Пример отображения кнопки «Применить настройки»|800px]]
* Background image select a background image from the SmartPlayer personal account.
Далее виджет растянется на весь экран, и пользователь должен нажать на кнопку «Сохранить», внизу по центру экрана.
* Data refresh rate from the Central Bank specify a value (in seconds) for data updates.
[[File:Сохран.png|thumb|center| Пример отображения кнопки «Сохранить»|800px]]
* Logo select an image from the personal account to use as the widget’s logo.
== '''Загрузка и скачивание настроек''' ==
* Text in the right part of the widget footer enter a message text.
В процессе взаимодействия с настройками виджета пользователь может загрузить или выгрузить настройки виджета. Каждое из указанных действий работает с помощью отдельных иконок в интерфейсе виджета. Иконки расположены в виджете снизу по центру.
* Font size in the right part of the widget footer input a value or move the slider to adjust text size.
[[File:Иконки_загрузки.png|thumb|center| Пример отображения иконок в настройках виджета |800px]]
* Price display formatting select a formatting option from the list.
== '''Добавление настроенного виджета в трансляцию''' ==
* Placeholder image select an image from the personal account to use as a placeholder.
Чтобы полностью ознакомиться с работой данной функциональности, пользователю необходимо запустить трансляцию с расписанием и добавить в качестве контента данный виджет. Чтобы ознакомиться с описанными ранее шагами по созданию трансляции и расписания рекомендуется просмотреть следующие статьи из Wiki SmartPlayer:
* “Display placeholder” checkbox enables/disables the placeholder. When active, the placeholder image is always shown.
* “Display placeholder when there is no connection to the remote server” checkbox enables/disables the placeholder when no server connection exists.
* Time after which to hide prices and show the placeholder set a time (in seconds) after which the placeholder will be displayed.
* “Quote change animation” checkbox enables/disables animation when exchange rates update.
* Language selection choose one of the available languages: Russian, English, Spanish, Portuguese, Kazakh.
[[File:Настраиваемые_параметры_видежта.png|thumb|center| Example of configurable widget parameters|800px]]
== '''Finalizing Widget Configuration''' ==
After completing configuration, the user must click the “Apply Settings” button in the bottom-right corner of the screen.
[[File:Применение_настрок.png|thumb|center| Example of the “Apply Settings” button|800px]]
Then, the widget will expand to full screen, and the user must click the “Save” button at the bottom center.
[[File:Сохран.png|thumb|center| Example of the “Save” button|800px]]
== '''Uploading and Downloading Settings''' ==
While interacting with the widget, the user can upload or download its configuration.
Each action is performed via separate icons in the widget interface, located at the bottom center.
[[File:Иконки_загрузки.png|thumb|center| Example of the icons in the widget settings interface |800px]]
== '''Adding the Configured Widget to a Broadcast''' ==
To fully understand how this functionality works, the user should launch a broadcast with a schedule and add this widget as content.
To review the previously described steps for creating a broadcast and schedule, it is recommended to check the following Wiki SmartPlayer articles:
* [[Раздел "Устройства"]]
* [[Раздел "Устройства"]]
* [[Раздел "Контент на устройства"]]
* [[Раздел "Контент на устройства"]]
* [[Раздел "Трансляции"]]
* [[Раздел "Трансляции"]]
* [[Раздел "Расписание"]]
* [[Раздел "Расписание"]]  
== '''Видеоинструкция''' ==
== '''Video Tutorial''' ==
[https://vk.com/video-227547238_456239078 Инструкция по работе с виджетом «Курс валют»]
[https://vk.com/video-227547238_456239100 User Guide for the “Exchange Rates” Widget]
== '''Дополнительная информация''' ==
== '''Additional Information''' ==
Если данная статья не помогает использовать функционал по назначению или после её прочтения остаются вопросы, их можно озвучить в разделе "Обсуждения" вверху страницы.
If this article does not help you use the functionality as intended or if questions remain after reading it, you can ask them in the "Discussions" section at the top of the page.
[[File:Обсуждение_виджета_курсы_валют.png|thumb|center| Пример отображения вкладки «Обсуждения» на wiki-странице |800px]]
[[File:Обсуждение_виджета_курсы_валют.png|thumb|center| Example of the “Discussions” tab on the wiki page |800px]]
Также дополнительную информацию можно узнать на странице [[Как взаимодействовать пользователю с разделом "Обсуждения"]]
Additional information can also be found on the page [[Как взаимодействовать пользователю с разделом "Обсуждения"]]
</div>

Текущая версия от 22:04, 11 ноября 2025

Situation Description

The SmartPlayer team has developed a widget that allows users to upload a file with currency rates to the SFTP server and send specific rates to selected devices. The ability to choose particular devices for transmitting rates was added as part of the widget’s improvement.

Widget Functionality

This widget works:

  • starting from the server application version: 2.151.1

Server Logic

The user uploads a file with price data to the SmartPlayer server via SFTP. The server receives, stores, and processes the information from the file. At regular intervals, data is resent (updated). The server parses the data into the widget, which displays it on devices.

Note: The updated widget has partially changed its implementation. The file placed on the server now includes the field "department". This field specifies the department name, which must also be entered in the device settings. Only devices that have the matching department name will receive the new pricing data. The "department" field value in the file and on the device must be identical — exactly matching in spelling and case.

Setting the “Department” Field

The user must transfer the "department" field value to the necessary devices that will later participate in the broadcast using the widget. To do this, go to the "Devices" section, select the required device, and double-click on it.

Example of the selected device in the “Devices” section of the personal account

After these steps, the device settings page will open. Find the “Branch Code” field and enter the value exactly as it appears in the “department” field of the server file, then save the settings.

Example of the “Branch Code” field in device settings

If this device is linked to a broadcast using the Exchange Rates widget, it will receive only the relevant data for that department.

Currency Report Export

The user can export a currency report in the SmartPlayer personal account. To do this, one of the following two roles is required:

  1. Administrator.
  2. Administrator (Currency Report Broadcast).
Файл:Роль пользователя для отчётов.png
Example of a role in the personal account

The report itself can be exported by navigating to the “Reports” section and selecting the “Currency Report” category.

Example of the “Reports” section and “Currency Report” category

You can learn more about how this section works here.

Adding the Widget to the Personal Account

To add this widget to the personal account, the user must request an archive from the technical support team. It will be provided as a .zip file.

Example of the widget provided as a .zip archive

After that, the user must log in to the personal account and go to the “Content” section.

Example of the “Content” section in the personal account

In the “Content” section, drag the widget from local storage into the personal account. Once uploaded, the widget will appear in the content list.

Example of the widget uploaded into the SmartPlayer personal account

Widget Configuration

After uploading the widget, to begin configuration, double-click on the widget icon. This action will open the main page.

Example of the widget’s main page

On the widget’s main page, two buttons are available:

  1. “API” button.
  2. “Settings” button.
Example of the icons for accessing widget settings

"API" Button

When clicking the "API" button, a modal window opens showing information about the resources required for the widget to function properly. This section also contains a general description of the API’s purpose and operation principles.

Example of information in the modal window

The main parameters for the resources include:

  • Name — resource name.
  • Method — the type of method used (GET).
  • Requires authorization — whether authorization is required.
  • Server address — the URL of the server providing data.
  • API address — displays the name of the JSON file containing pricing data.
  • “Check connection” button — tests the connection and displays a numerical status code.

You can close this window by clicking the standard icon in the upper-right corner.

"Settings" Button

On the settings page, the user must configure the following widget parameters:

  • Widget background — allows you to set a background color using a palette.
  • Background image — select a background image from the SmartPlayer personal account.
  • Data refresh rate from the Central Bank — specify a value (in seconds) for data updates.
  • Logo — select an image from the personal account to use as the widget’s logo.
  • Text in the right part of the widget footer — enter a message text.
  • Font size in the right part of the widget footer — input a value or move the slider to adjust text size.
  • Price display formatting — select a formatting option from the list.
  • Placeholder image — select an image from the personal account to use as a placeholder.
  • “Display placeholder” checkbox — enables/disables the placeholder. When active, the placeholder image is always shown.
  • “Display placeholder when there is no connection to the remote server” checkbox — enables/disables the placeholder when no server connection exists.
  • Time after which to hide prices and show the placeholder — set a time (in seconds) after which the placeholder will be displayed.
  • “Quote change animation” checkbox — enables/disables animation when exchange rates update.
  • Language selection — choose one of the available languages: Russian, English, Spanish, Portuguese, Kazakh.
Example of configurable widget parameters

Finalizing Widget Configuration

After completing configuration, the user must click the “Apply Settings” button in the bottom-right corner of the screen.

Example of the “Apply Settings” button

Then, the widget will expand to full screen, and the user must click the “Save” button at the bottom center.

Example of the “Save” button

Uploading and Downloading Settings

While interacting with the widget, the user can upload or download its configuration. Each action is performed via separate icons in the widget interface, located at the bottom center.

Example of the icons in the widget settings interface

Adding the Configured Widget to a Broadcast

To fully understand how this functionality works, the user should launch a broadcast with a schedule and add this widget as content. To review the previously described steps for creating a broadcast and schedule, it is recommended to check the following Wiki SmartPlayer articles:

Video Tutorial

User Guide for the “Exchange Rates” Widget

Additional Information

If this article does not help you use the functionality as intended or if questions remain after reading it, you can ask them in the "Discussions" section at the top of the page.

Example of the “Discussions” tab on the wiki page

Additional information can also be found on the page Как взаимодействовать пользователю с разделом "Обсуждения"