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

Материал из SmartPlayer
Новая страница: «User Guide for the “Exchange Rates” Widget»
 
Новая страница: «== '''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...»
Строка 1: Строка 1:
<div lang="ru" dir="ltr" class="mw-content-ltr">
== '''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.
Команда SmartPlayer разработала виджет, который позволяет пользователям добавлять файл с ценами на SFTP-сервер и передавать определённые цены на выбранные устройства. Возможность выбора конкретных устройств для передачи цен появилась в рамках доработки виджета.
The ability to choose particular devices for transmitting rates was added as part of the widget’s improvement.
=== '''Работоспособность виджета''' ===
=== '''Widget Functionality''' ===
Данный виджет работает:
This widget works:
* с версии серверного приложения: 2.151.1
* starting from the server application version: 2.151.1
== '''Серверная логика''' ==
== '''Server Logic''' ==
На сервер SmartPlayer пользователь загружает файл с данными по ценам с помощью SFTP. Сервер получает, хранит и обрабатывает информацию из файла. Через равные промежутки времени происходит переотправка (обновление) данных. Сервер парсит данные в виджет, который выводит их на устройства. <br> <br>
The user uploads a file with price data to the SmartPlayer server via SFTP.
'''Примечание:''' доработанный виджет частично изменил свою реализацию. В файле который размещается на сервере появилось поле "department". В этом поле прописывается наименование департамента, которое впоследствии необходимо также указать в настройках устройства. Только устройства, у которых прописан департамент получают новые данные с ценами. Значение поля "department" в файле и на устройстве должны быть идентично, то есть иметь полное совпадение по написанию и регистру.
The server receives, stores, and processes the information from the file.
=== '''Настройка поля «Департамент»''' ===
At regular intervals, data is resent (updated).
Пользователю необходимо перенести значение поля "department" на нужные устройства, которые впоследствии будут работать в трансляции с виджетом. Для этого необходимо перейти в раздел «Устройства», выбрать нужное устройство и дважды кликнуть по нему.
The server parses the data into the widget, which displays it on devices. <br><br>
[[File:Нужное_устройство_в_лк.png|thumb|center| Пример отображения нужного устройства в разделе «Устройства» личного кабинета|800px]]
'''Note:''' The updated widget has partially changed its implementation.
После описанных выше действий откроется страница настройки устройства. Здесь необходимо найти поле «Код филиала» и точно ввести значение, которое указано в поле "department" файла для сервера и сохранить настройки.  
The file placed on the server now includes the field "department".
[[File:Код_филиала.png|thumb|center| Пример отображения поля «Код филиала» в настройках устройства|800px]]
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.
Пользователь может выгрузить отчёт по валютам в личном кабинете SmartPlayer. Для этого у него должна быть одна из двух ролей:
=== '''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.
[[File:Роль пользователя для отчётов.png|thumb|center| Пример роли в личном кабинете|800px]]
[[File:Нужное_устройство_в_лк.png|thumb|center| Example of the selected device in the “Devices” section of the personal account|800px]]
Сам отчёт можно выгрузить, перейдя в специальную категорию раздела «Отчёты» в категории «Отчёт по валютам».  
After these steps, the device settings page will open.
[[File:Отчет_по_валютам.png|thumb|center| Пример отображения раздела «Отчёты» и категории «Отчёт по валютам»|800px]]
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.
С работой данного раздела можно ознакомиться по ссылке [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 здесь].
[[File:Код_филиала.png|thumb|center| Example of the “Branch Code” field in device settings|800px]]
== '''Добавление виджета в личный кабинет''' ==
If this device is linked to a broadcast using the Exchange Rates widget, it will receive only the relevant data for that department.
Чтобы добавить данный виджет в личный кабинет, пользователю необходимо запросить у специалиста команды технической поддержки архив с содержимым. Он будет предоставлен в формате .zip-архива.
=== '''Currency Report Export''' ===
[[File:Виджет_курс_валют.png|thumb|center| Пример виджета в формате .zip-архива|800px]]
The user can export a currency report in the SmartPlayer personal account.
После этого пользователь должен авторизоваться в личном кабинете и перейти в раздел «Контент».
To do this, one of the following two roles is required:
[[File:Раздел_контент_личного_кабиента.png|thumb|center| Пример отображения раздела «Контент» в личном кабинете |800px]]
# Administrator.
В разделе «Контент» необходимо перетянуть данный виджет из локального хранилища в личный кабинет. После того, как пользователь перенесет виджет в личный кабинет, он отобразится в списке с контентом.
# Administrator (Currency Report Broadcast).
[[File:Виджет_в_лк.png|thumb|center| Пример отображения переноса виджета в личном кабинете SmartPlayer|800px]]
[[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| Example of the “Reports” section and “Currency Report” category|800px]]
[[File:Главная_страница_виджета_БКС.png|thumb|center| Пример отображения главной страницы виджета|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].
На главной странице виджета пользователю доступно две кнопки:
== '''Adding the Widget to the Personal Account''' ==
# Кнопка "API".
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.
[[File:Кнопка_api_и_настройки.png|thumb|center| Пример отображения иконки для перехода в настройки виджета|800px]]
[[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.
Кликнув на кнопку "API" пользователю откроется модальное окно с информацией о ресурсах, которые позволяют стабильно работать виджету. В разделе также есть общее описание о его необходимости и принципах работы.
[[File:Раздел_контент_личного_кабиента.png|thumb|center| Example of the “Content” section in the personal account |800px]]
[[File:Данные_в_модальном_окне.png|thumb|center| Пример отображения информации в модальном окне |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.
* имя указано имя ресурса;
[[File:Виджет_в_лк.png|thumb|center| Example of the widget uploaded into the SmartPlayer personal account|800px]]
* метод используемый тип метода (GET);
== '''Widget Configuration''' ==
* требует авторизации информация об обязательности авторизации;
After uploading the widget, to begin configuration, double-click on the widget icon.
* адрес сервера — URL-адрес сервера, с которого берутся данные;
This action will open the main page.
* адрес API — отображается название JSON-файла с данными о ценах;
[[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]]
* фон виджета позволяет с помощью палитры настроить нужный фон для виджета;
== '''"API" Button''' ==
* фоновое изображение выбрать изображение в качестве фона для виджета из личного кабинета SmartPlayer;
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.
* логотип выбрать изображение в качестве логотипа для виджета из личного кабинета SmartPlayer;
[[File:Данные_в_модальном_окне.png|thumb|center| Example of information in the modal window |800px]]
* текст в правой части «подвала» виджета необходимо ввести текст сообщения;
The main parameters for the resources include:
* размер в правой части «подвала» виджета ввести значение или сместить ползунок для настройка шрифта текста;
* Name resource name.
* форматирование отображения цен выбрать из списка вариант форматирования;
* Method the type of method used (GET).
* изображение плейсхолдера выбрать изображение в качестве плейсхолдера (заглушки) для виджета из личного кабинета SmartPlayer;
* 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''' ==
[[File:Настраиваемые_параметры_видежта.png|thumb|center| Пример отображения настраиваемых параметров виджета|800px]]
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.
[[File:Применение_настрок.png|thumb|center| Пример отображения кнопки «Применить настройки»|800px]]
* 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.
[[File:Сохран.png|thumb|center| Пример отображения кнопки «Сохранить»|800px]]
* 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.
[[File:Иконки_загрузки.png|thumb|center| Пример отображения иконок в настройках виджета |800px]]
* 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.
Чтобы полностью ознакомиться с работой данной функциональности, пользователю необходимо запустить трансляцию с расписанием и добавить в качестве контента данный виджет. Чтобы ознакомиться с описанными ранее шагами по созданию трансляции и расписания рекомендуется просмотреть следующие статьи из Wiki SmartPlayer:
* “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_456239078 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>

Версия от 09:36, 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 Как взаимодействовать пользователю с разделом "Обсуждения"