Создание хранилища конфигурации
This commit is contained in:
24
src/cf/CommonForms/ТелеграмВебХук.xml
Normal file
24
src/cf/CommonForms/ТелеграмВебХук.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.19">
|
||||
<CommonForm uuid="298dc1c3-f89d-4897-874e-bfd600985066">
|
||||
<Properties>
|
||||
<Name>ТелеграмВебХук</Name>
|
||||
<Synonym>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Телеграм веб хук</v8:content>
|
||||
</v8:item>
|
||||
</Synonym>
|
||||
<Comment/>
|
||||
<FormType>Managed</FormType>
|
||||
<IncludeHelpInContents>false</IncludeHelpInContents>
|
||||
<UsePurposes>
|
||||
<v8:Value xsi:type="app:ApplicationUsePurpose">PlatformApplication</v8:Value>
|
||||
<v8:Value xsi:type="app:ApplicationUsePurpose">MobilePlatformApplication</v8:Value>
|
||||
</UsePurposes>
|
||||
<UseStandardCommands>false</UseStandardCommands>
|
||||
<ExtendedPresentation/>
|
||||
<Explanation/>
|
||||
</Properties>
|
||||
</CommonForm>
|
||||
</MetaDataObject>
|
||||
27
src/cf/CommonForms/ТелеграмВебХук/Ext/Form.xml
Normal file
27
src/cf/CommonForms/ТелеграмВебХук/Ext/Form.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcssch="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.19">
|
||||
<WindowOpeningMode>LockOwnerWindow</WindowOpeningMode>
|
||||
<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
|
||||
<Events>
|
||||
<Event name="AfterWrite">ПослеЗаписи</Event>
|
||||
</Events>
|
||||
<ChildItems>
|
||||
<InputField name="ТелеграмВебХук" id="1">
|
||||
<DataPath>НаборКонстант.ТелеграмВебХук</DataPath>
|
||||
<EditMode>EnterOnInput</EditMode>
|
||||
<MultiLine>true</MultiLine>
|
||||
<ExtendedEditMultipleValues>true</ExtendedEditMultipleValues>
|
||||
<ContextMenu name="ТелеграмВебХукКонтекстноеМеню" id="2"/>
|
||||
<ExtendedTooltip name="ТелеграмВебХукРасширеннаяПодсказка" id="3"/>
|
||||
</InputField>
|
||||
</ChildItems>
|
||||
<Attributes>
|
||||
<Attribute name="НаборКонстант" id="1">
|
||||
<Type>
|
||||
<v8:Type>cfg:ConstantsSet</v8:Type>
|
||||
</Type>
|
||||
<MainAttribute>true</MainAttribute>
|
||||
<SavedData>true</SavedData>
|
||||
</Attribute>
|
||||
</Attributes>
|
||||
</Form>
|
||||
21
src/cf/CommonForms/ТелеграмВебХук/Ext/Form/Module.bsl
Normal file
21
src/cf/CommonForms/ТелеграмВебХук/Ext/Form/Module.bsl
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
&НаКлиенте
|
||||
Процедура ПослеЗаписи(ПараметрыЗаписи)
|
||||
|
||||
Сообщить(РезультатУстановкиВебХукаНаСервере());
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
&НаСервереБезКонтекста
|
||||
Функция РезультатУстановкиВебХукаНаСервере()
|
||||
|
||||
Ответ = ТелеграмМетодыВызовСервера.SetWebHook(Константы.ТелеграмВебХук.Получить());
|
||||
ОтветОбъект = HttpОбщегоНазначения.СтрокаJsonВОбъект(Ответ);
|
||||
|
||||
Если ОтветОбъект.Получить("description") <> Неопределено Тогда
|
||||
Возврат ОтветОбъект["description"];
|
||||
КонецЕсли;
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
КонецФункции
|
||||
Reference in New Issue
Block a user