269 lines
15 KiB
Plaintext
269 lines
15 KiB
Plaintext
# --
|
|
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
|
# --
|
|
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
|
# the enclosed file COPYING for license information (GPL). If you
|
|
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
|
# --
|
|
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
|
|
<h1 class="InvisibleText">[% Translate( "GenericInterface Web Service Management" ) | html %]</h1>
|
|
|
|
[% USE WebserviceLink = String("AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=") %]
|
|
|
|
[% BreadcrumbPath = [
|
|
{
|
|
Name => Translate( 'Web Service Management' ),
|
|
Link => BreadcrumbLink,
|
|
},
|
|
{
|
|
Name => Data.WebserviceName,
|
|
Link => WebserviceLink.append( Data.WebserviceID ),
|
|
},
|
|
]
|
|
%]
|
|
|
|
[% SWITCH Data.Action %]
|
|
[% CASE 'Add' %]
|
|
[% USE AddTitle = String(Translate("Add ErrorHandling")) %]
|
|
[% BreadcrumbPath.push({ Name => AddTitle.append( ': ', Data.ErrorHandlingType ), }) %]
|
|
[% CASE 'Change' %]
|
|
[% USE EditTitle = String(Translate("Edit ErrorHandling")) %]
|
|
[% BreadcrumbPath.push({ Name => EditTitle.append( ': ', Data.ErrorHandlingType ), }) %]
|
|
[% END %]
|
|
|
|
[% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]
|
|
|
|
<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>
|
|
[% IF Data.Action == 'Change' %]
|
|
<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 error handling module?") | html %]
|
|
</p>
|
|
<p class="Center Warning">
|
|
[% Translate("All configuration data will be lost.") | html %]
|
|
</p>
|
|
<div class="SpacingTop"></div>
|
|
</div>
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ContentColumn">
|
|
|
|
<form action="[% Env("CGIHandle") %]" class="Validate" method="post">
|
|
<input type="hidden" name="Action" value="AdminGenericInterfaceErrorHandlingDefault" />
|
|
<input type="hidden" name="Subaction" value="[% Data.Action | html %]Action" />
|
|
<input type="hidden" id="WebserviceID" name="WebserviceID" value="[% Data.WebserviceID | html %]" />
|
|
<input type="hidden" name="CommunicationType" value="[% Data.CommunicationType | html %]" />
|
|
<input type="hidden" name="ErrorHandlingType" value="[% Data.ErrorHandlingType | html %]" />
|
|
[% IF Data.Action == 'Change' %]
|
|
<input type="hidden" name="ContinueAfterSave" id="ContinueAfterSave" value=""/>
|
|
[% END %]
|
|
|
|
<!-- General options -->
|
|
<div class="WidgetSimple Expanded">
|
|
<div class="Header">
|
|
<div class="WidgetAction Toggle">
|
|
<a href="#" title="[% Translate("Show or hide the content") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
|
|
</div>
|
|
<h2>[% Translate("General options") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
|
|
<fieldset class="TableLike">
|
|
<label for="ErrorHandling" class="Mandatory">
|
|
<span class="Marker">*</span>
|
|
[% Translate("Name") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
<input type="text" class="W50pc Validate_Required [% Data.ErrorHandlingServerError | html %]" maxlength="200" id="ErrorHandling" name="ErrorHandling" value="[% Data.ErrorHandling | html %]" />
|
|
<input type="hidden" name="OldErrorHandling" value="[% Data.OldErrorHandling | html %]" />
|
|
<p class="FieldExplanation">
|
|
[% Translate("The name can be used to distinguish different error handling configurations.") | html %]
|
|
</p>
|
|
<div id="ErrorHandlingError" class="TooltipErrorMessage">
|
|
[% Translate("Please provide a unique name for this web service.") | html %]
|
|
</div>
|
|
<div id="ErrorHandlingServerError" 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" maxlength="200" id="Description" name="Description" value="[% Data.Description | html %]" />
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="ErrorHandlingTypeDisplay">[% Translate("Error handling module backend") | html %]:</label>
|
|
<div class="Field">
|
|
<input type="text" readonly="readonly" class="W50pc" id="ErrorHandlingTypeDisplay" value="[% Data.ErrorHandlingType | html %]" />
|
|
<p class="FieldExplanation">
|
|
[% Translate("This OTRS error handling backend module will be called internally to process the error handling mechanism.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Processing options -->
|
|
<div class="WidgetSimple Expanded">
|
|
<div class="Header">
|
|
<div class="WidgetAction Toggle">
|
|
<a href="#" title="[% Translate("Show or hide the content") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
|
|
</div>
|
|
<h2>[% Translate("Processing options") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
|
|
<fieldset class="TableLike">
|
|
|
|
<div class="Field">
|
|
[% Translate("Configure filters to control error handling module execution.") | html %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Only requests matching all configured filters (if any) will trigger module execution.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
[% RenderBlockStart("OperationFilter") %]
|
|
<label for="OperationFilter">
|
|
[% Translate("Operation filter") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
[% Data.OperationFilterStrg %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Only execute error handling module for selected operations.") | html %]<br/>
|
|
[% Translate("Note: Operation is undetermined for errors occuring while receiving incoming request data. Filters involving this error stage should not use operation filter.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("OperationFilter") %]
|
|
[% RenderBlockStart("InvokerFilter") %]
|
|
<label for="InvokerFilter">
|
|
[% Translate("Invoker filter") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
[% Data.InvokerFilterStrg %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Only execute error handling module for selected invokers.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("InvokerFilter") %]
|
|
|
|
<label for="ErrorMessageContentFilter">
|
|
[% Translate("Error message content filter") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
<input type="text" class="W50pc [% Data.ErrorMessageContentFilterServerError | html %]" maxlength="200" id="ErrorMessageContentFilter" name="ErrorMessageContentFilter" value="[% Data.ErrorMessageContentFilter | html %]" />
|
|
<input type="hidden" id="ErrorMessageContentFilter" name="ErrorMessageContentFilter" value="[% Data.ErrorMessageContentFilter | html %]" />
|
|
<p class="FieldExplanation">
|
|
[% Translate("Enter a regular expression to restrict which error messages should cause error handling module execution.") | html %]<br/>
|
|
[% Translate("Error message subject and data (as seen in the debugger error entry) will considered for a match.") | html %]<br/>
|
|
[% Translate("Example: Enter '^.*401 Unauthorized.*\$' to handle only authentication related errors.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="ErrorStageFilter">
|
|
[% Translate("Error stage filter") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
[% Data.ErrorStageFilterStrg %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Only execute error handling module on errors that occur during specific processing stages.") | html %]<br/>
|
|
[% Translate("Example: Handle only errors where mapping for outgoing data could not be applied.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="ErrorCode">
|
|
[% Translate("Error code") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
<input type="text" class="W50pc" maxlength="200" id="ErrorCode" name="ErrorCode" value="[% Data.ErrorCode | html %]" />
|
|
<p class="FieldExplanation">
|
|
[% Translate("An error identifier for this error handling module.") | html %]<br/>
|
|
[% Translate("This identifier will be available in XSLT-Mapping and shown in debugger output.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="ErrorMessage">
|
|
[% Translate("Error message") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
<input type="text" class="W50pc" maxlength="200" id="ErrorMessage" name="ErrorMessage" value="[% Data.ErrorMessage | html %]" />
|
|
<p class="FieldExplanation">
|
|
[% Translate("An error explanation for this error handling module.") | html %]<br/>
|
|
[% Translate("This message will be available in XSLT-Mapping and shown in debugger output.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="StopAfterMatch">
|
|
[% Translate("Stop after match") | html %]:
|
|
</label>
|
|
<div class="Field">
|
|
[% Data.StopAfterMatchStrg %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Define if processing should be stopped after module was executed, skipping all remaining modules or only those of the same backend.") | html %]<br/>
|
|
[% Translate("Default behavior is to resume, processing the next module.") | html %]
|
|
</p>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Submit options -->
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
<h2>[% Translate("Submit") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
|
|
<fieldset class="TableLike">
|
|
|
|
<div class="Field SpacingTop">
|
|
[% IF Data.Action == 'Change' %]
|
|
<button class="CallForAction Primary" id="SubmitAndContinue" type="button" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
|
|
[% Translate("or") | html %]
|
|
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save and finish") | html %]</span></button>
|
|
[% ELSE %]
|
|
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
|
|
[% END %]
|
|
[% Translate("or") | html %]
|
|
<a href="[% Env("Baselink") %]Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=[% Data.WebserviceID | uri %]"><span>[% Translate("Cancel") | html %]</span></a>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
</div>
|