1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
|
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst AdminGenericInterfaceInvokerDefault">
[% RenderBlockStart("TitleAdd") %]
<h1>[% Translate("Add new Invoker to Web Service %s", Data.WebserviceName) | html %]</h1>
[% RenderBlockEnd("TitleAdd") %]
[% RenderBlockStart("TitleChange") %]
<h1>[% Translate("Change Invoker %s of Web Service %s", Data.Invoker, Data.WebserviceName) | html %]</h1>
[% RenderBlockEnd("TitleChange") %]
<!-- breadcrumb -->
<ul class="BreadCrumb">
<li>[% Translate("You are here") | html %]:</li>
<li>
<a href="[% Env("Baselink") %]Action=AdminGenericInterfaceWebservice">[% Translate("Web Services") | html %]</a>
</li>
<li>
<a href="[% Env("Baselink") %]Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=[% Data.WebserviceID | uri %]">[% Data.WebserviceName | html %]</a>
</li>
<li>
[% RenderBlockStart("NavigationAdd") %]
[% Translate("Add new invoker") | html %]
[% RenderBlockEnd("NavigationAdd") %]
[% RenderBlockStart("NavigationChange") %]
[% Translate("Change invoker %s", Data.Invoker) | html %]
[% RenderBlockEnd("NavigationChange") %]
</li>
</ul>
<div class="SidebarColumn">
<div class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Actions") | html %]</h2>
</div>
<div class="Content">
<ul class="ActionList">
<li>
<a href="[% Env("Baselink") %]Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=[% Data.WebserviceID | uri %]" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i> [% Translate("Go back to web service") | html %]</span></a>
</li>
[% RenderBlockStart("ActionListDelete") %]
<li>
<button class="CallForAction Fullsize Center" type="button" id="DeleteButton"><span> <i class="fa fa-trash-o"></i> [% Translate("Delete") | html %]</span></button>
<div class="Hidden" id="DeleteDialogContainer">
<span class="WarningDialog "> </span>
<p id="DeleteDialog" class="Center Warning">
[% Translate("Do you really want to delete this invoker?") | html %]
</p>
<p class="Center Warning">
[% Translate("All configuration data will be lost.") | html %]
</p>
<div class="SpacingTop"></div>
</div>
</li>
[% RenderBlockEnd("ActionListDelete") %]
</ul>
</div>
</div>
</div>
<div class="ContentColumn">
<div class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Invoker Details") | html %]</h2>
</div>
<div class="Content">
<form action="[% Env("CGIHandle") %]" class="Validate" method="post">
<input type="hidden" name="Action" value="AdminGenericInterfaceInvokerDefault" />
<input type="hidden" name="Subaction" value="[% Data.Mode | html %]Action" />
<input type="hidden" name="WebserviceID" value="[% Data.WebserviceID | html %]" id="WebserviceID" />
<input type="hidden" name="InvokerType" value="[% Data.InvokerType | html %]" />
<fieldset class="TableLike">
<label for="Invoker" class="Mandatory">
<span class="Marker">*</span>
[% Translate("Name") | html %]:
</label>
<div class="Field">
<input type="text" class="W50pc RegisterChange Validate_Required [% Data.InvokerServerError | html %]" maxlength="200" id="Invoker" name="Invoker" value="[% Data.Invoker | html %]" />
<input type="hidden" id="OldInvoker" name="OldInvoker" value="[% Data.Invoker | html %]" />
<p class="FieldExplanation">
[% Translate("The name is typically used to call up an operation of a remote web service.") | html %]
</p>
<div id="InvokerError" class="TooltipErrorMessage">
[% Translate("This field is required.") | html %] [% Translate("Please provide a unique name for this web service invoker.") | html %]
</div>
<div id="InvokerServerError" class="TooltipErrorMessage">
[% Translate("The name you entered already exists.") | html %]
</div>
</div>
<div class="Clear"></div>
<label for="Description">
[% Translate("Description") | html %]:
</label>
<div class="Field">
<input type="text" class="W50pc RegisterChange" maxlength="200" id="Description" name="Description" value="[% Data.Description | html %]" />
</div>
<div class="Clear"></div>
<label for="InvokerTypeDisplay">[% Translate("Invoker backend") | html %]:</label>
<div class="Field">
<input type="text" readonly="readonly" class="W50pc" id="InvokerTypeDisplay" value="[% Data.InvokerType | html %]" />
<p class="FieldExplanation">
[% Translate("This OTRS invoker backend module will be called to prepare the data to be sent to the remote system, and to process its response data.") | html %]
</p>
</div>
<div class="Clear"></div>
<label for="MappingOutbound">[% Translate("Mapping for outgoing request data") | html %]:</label>
<div class="Field">
[% Data.MappingOutboundStrg %]
<input type="hidden" id="MappingOutboundConfigDialog" value="[% Data.MappingOutboundConfigDialog | html %]" />
[% RenderBlockStart("MappingOutboundConfigureButton") %]
<button type="button" class="HideOnChange" id="MappingOutboundConfigureButton" value="[% Translate("Configure") | html %]">[% Translate("Configure") | html %]</button>
[% RenderBlockEnd("MappingOutboundConfigureButton") %]
<p class="FieldExplanation">
[% Translate("The data from the invoker of OTRS will be processed by this mapping, to transform it to the kind of data the remote system expects.") | html %]
</p>
</div>
<div class="Clear"></div>
<label for="MappingInbound">[% Translate("Mapping for incoming response data") | html %]:</label>
<div class="Field">
[% Data.MappingInboundStrg %]
<input type="hidden" id="MappingInboundConfigDialog" value="[% Data.MappingInboundConfigDialog | html %]" />
[% RenderBlockStart("MappingInboundConfigureButton") %]
<button type="button" class="HideOnChange" id="MappingInboundConfigureButton" value="[% Translate("Configure") | html %]">[% Translate("Configure") | html %]</button>
[% RenderBlockEnd("MappingInboundConfigureButton") %]
<p class="FieldExplanation">
[% Translate("The response data will be processed by this mapping, to transform it to the kind of data the invoker of OTRS expects.") | html %]
</p>
</div>
<div class="Clear"></div>
<label for="EventsTable">[% Translate("Event Triggers") | html %]:</label>
<div class="Field W50pc">
<table class="DataTable W50pc" id="EventsTable" summary="List of all configured events">
<thead>
<tr>
<th>[% Translate("Event") | html %]</th>
<th>[% Translate("Asynchronous") | html %]</th>
<th>[% Translate("Delete") | html %]</th>
</tr>
</thead>
<tbody>
[% RenderBlockStart("NoDataFoundMsg") %]
<tr>
<td colspan="4">
[% Translate("No data found.") | html %]
</td>
</tr>
[% RenderBlockEnd("NoDataFoundMsg") %]
[% RenderBlockStart("EventRow") %]
<tr>
<td class="AsBlock">[% Data.Event | html %]</td>
<td>[% Data.Asynchronous | html %]</td>
<td class="Center">
<a id="DeleteEvent[% Data.Event | html %]" class="TrashCan DeleteEvent" href="#" title="[% Translate("Delete this event") | html %]">
[% Translate("Delete this event") | html %]
<i class="fa fa-trash-o"></i>
</a>
</td>
</tr>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Agent.Admin.GenericInterfaceInvoker.BindDeleteEventDialog({
ElementID: 'DeleteEvent[% Data.Event | html %]',
EventName: "[% Data.Event | html %]",
ElementSelector: '#DeleteEvent[% Data.Event | html %]'
});
//]]></script>
[% END %]
[% RenderBlockEnd("EventRow") %]
</tbody>
</table>
<p class="FieldExplanation">
[% Translate("This invoker will be triggered by the configured events.") | html %]
</p>
</div>
<div class="Hidden" id="DeleteEventDialogContainer">
<div id ="DeleteEventDialog" class="InnerContent GenericInterfaceDialog">
<span class="WarningDialog "> </span>
<p class="Center Warning">[% Translate("Do you really want to delete this event trigger?") | html %]</p>
<div class="SpacingTop"></div>
</div>
</div>
<div class="SpacingTop"></div>
<label class="HideOnChange" for="EventType">[% Translate("Add Event Trigger") | html %]:</label>
<div class="Field HideOnChange">
[% Data.EventTypeStrg %]
[% RenderBlockStart("EventAdd") %]
[% Data.EventStrg %]
[% RenderBlockEnd("EventAdd") %]
<input type="checkbox" id="Asynchronous" checked="checked" class="GenericInterfaceSpacing" name="Asynchronous"/><label for="Asynchronous">Asynchronous</label>
<button type="button" id="AddEvent" class="Add GenericInterfaceSpacing" name="AddEvent" value="Add Event">Add Event</button>
<p class="FieldExplanation">
[% Translate("To add a new event select the event object and event name and click on the \"+\" button") | html %].
</p>
<p class="FieldExplanation">
[% Translate("Asynchronous event triggers are handled by the OTRS Scheduler Daemon in background (recommended).") | html %]
<br/>
[% Translate("Synchronous event triggers would be processed directly during the web request.") | html %]
</p>
</div>
<div class="Clear"></div>
<div class="Field SpacingTop">
<button type="submit" class="Primary CallForAction" value="[% Translate("Save and continue") | html %]"><span>[% Translate("Save") | html %]</span></button>
[% RenderBlockStart("SaveAndFinishButton") %]
[% Translate("or") | html %]
<button type="submit" id="SaveAndFinishButton" class="CallForAction" value="[% Translate("Save and finish") | html %]"><span>[% Translate("Save and finish") | html %]</span></button>
<input type="hidden" name="ReturnToWebservice" id="ReturnToWebservice" value="" autocomplete="off" />
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#SaveAndFinishButton').bind('click', function(){
$('#ReturnToWebservice').val(1);
});
//]]></script>
[% END %]
[% RenderBlockEnd("SaveAndFinishButton") %]
[% Translate("or") | html %]
<a href="[% Env("Baselink") %]Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=[% Data.WebserviceID | uri %]">[% Translate("Cancel") | html %]</a>
</div>
<div class="Clear"></div>
</fieldset>
</form>
</div>
</div>
</div>
<div class="Clear"></div>
</div>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Agent.Admin.GenericInterfaceInvoker.Init({
WebserviceID: [% Data.WebserviceID | html %],
Invoker: "[% Data.Invoker | html %]",
Action: 'AdminGenericInterfaceInvokerDefault',
EventTypeSelected: $('#EventType').val(),
Localization: {
CommunicationErrorMsg: [% Translate("An error occurred during communication.") | JSON %],
DeleteInvokerMsg: [% Translate("Delete this Invoker") | JSON %],
DeleteEventMsg: [% Translate("Delete this Event Trigger") | JSON %],
DeleteMsg: [% Translate("Delete") | JSON %],
CancelMsg: [% Translate("Cancel") | JSON %]
}
});
$('.RegisterChange').bind('change.RegisterChange keyup.RegisterChange', function (Event) {
$('.HideOnChange').hide();
$('.ShowOnChange').show();
});
$('#DeleteButton').bind('click', Core.Agent.Admin.GenericInterfaceInvoker.ShowDeleteDialog);
$('#EventType').bind('change', function (){
Core.Agent.Admin.GenericInterfaceInvoker.ToogleEventSelect($(this).val());
});
$('#AddEvent').bind('click', function (){
Core.Agent.Admin.GenericInterfaceInvoker.AddEvent( $('#EventType').val() );
});
//]]></script>
[% END %]
|