304 lines
18 KiB
HTML
304 lines
18 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>R11 MockedServices</title>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="../assets/css/tools/mock/fontello.css" type="text/css">
|
|
<link rel="stylesheet" href="../assets/css/tools/mock/main.css" type="text/css">
|
|
<link rel="stylesheet" href="../assets/css/tools/mock/common.css" type="text/css">
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="tool extended">
|
|
<div class="tool-context">
|
|
<div>
|
|
<h1>MockedServices</h1>
|
|
</div>
|
|
<div>
|
|
<label for="uuid-input" class="block-display">UUID</label>
|
|
<div id="uuid-edit">
|
|
<div id="uuid-edit-field" class="bordered-field disabled">
|
|
<input id="uuid-input" disabled onfocusout="changeUUID(this);" value="UUID" />
|
|
<button onclick="copyUUIDToClipboard();" class="uuid-inputField-icon modification-button flex-item btn-copy action-button">
|
|
<span class="material-icons uuid-inputField-icon-span ">content_copy</span>
|
|
</button>
|
|
</div>
|
|
<div id="editableBlock">
|
|
<input type="checkbox" onchange="changeEditionOfUUID(this)" name="editable" id="editable" value="false"/>
|
|
<label for="editable">Editable</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="hiddable" id="uuid-validation-strategy">
|
|
<label><b>UUID generation strategy:</b></label>
|
|
|
|
<input type="radio" checked name="uuid-validation-type" value="new" id="generateNew"/>
|
|
<label for="generateNew">Generate new UUID</label>
|
|
|
|
<input type="radio" name="uuid-validation-type" value="restore" id="restore"/>
|
|
<label for="restore">Restore previous UUID</label>
|
|
</div>
|
|
|
|
</div>
|
|
<div>
|
|
<!-- h2 -->
|
|
<div id="basicItemData" class="hiddable active"><h2>Your Message</h2></div>
|
|
<div id="advancedItemData" class="hiddable"><h2>Messaged id: <span id="mockedMessageId">1</span></h2></div>
|
|
|
|
<!-- link -->
|
|
<div>
|
|
<label for="messageLink" class="block-display">Link</label>
|
|
<div id="messageLink" class="bordered-field max-width with-padding disabled-background"><a class="hyperlink" href="www.google.com" target="_blank">www.google.com</a></div>
|
|
<!-- <input id="messageLink" disabled class="bordered-field max-width with-padding" value="http://yourlink.com/r/api/mock/blablabla"> -->
|
|
</div>
|
|
<div class="display-space-between max-width">
|
|
<!-- status and type -->
|
|
<div class="medium-input block-display small-vertical-margin">
|
|
<!-- status -->
|
|
<div class="max-width small-vertical-margin">
|
|
<label for="httpStatus">Http Status</label>
|
|
<input id="httpStatus" type="number" class="bordered-field max-width data-field" value="200" list="httpStatusSuggestion"/>
|
|
<datalist id="httpStatusSuggestion">
|
|
<option value="200">
|
|
<option value="300">
|
|
<option value="400">
|
|
<option value="403">
|
|
<option value="404">
|
|
<option value="500">
|
|
</datalist>
|
|
|
|
</div>
|
|
<!-- content type -->
|
|
<div class="max-width small-vertical-margin">
|
|
<label for="typeSelector">Content Type</label>
|
|
<input id="typeSelector" class="bordered-field max-width data-field" type="text" value="application/xml" list="contentTypes">
|
|
<datalist id="contentTypes">
|
|
<option value="application/xml">
|
|
<option value="application/json">
|
|
<option value="text/xml">
|
|
</datalist>
|
|
</div>
|
|
</div>
|
|
<div id="btnSave" class="small-margins half-width with-padding action-button" style="background-color: white; border: 0px;">
|
|
<button id="btn-save" class="small-margins half-width with-padding action-button" style="width: 100%; height: 100%;">Save</button>
|
|
</div>
|
|
</div>
|
|
<!-- body -->
|
|
<div class="small-vertical-margin">
|
|
<label for="bodyEditor">Body</label>
|
|
<textarea id="bodyEditor" class="data-field bordered-field max-width with-padding height-300 vertically-resizeable"></textarea>
|
|
</div>
|
|
<!-- show/hide -->
|
|
<button id="optional" class="clickable-text highlight switch"><span class="toggleIndicator"></span> show/hide advanced settings</button>
|
|
<!-- advanced -->
|
|
<div id="advanced" class="max-width with-padding hiddable">
|
|
<!-- tab menu -->
|
|
<div class="tabmenu medium-vertical-margin">
|
|
<button id="headersTab" class="tabitem active clickable-text big-font">Headers</button>
|
|
<button id="historyTab" class="tabitem clickable-text big-font">History</button>
|
|
</div>
|
|
<!-- container -->
|
|
<div class="medium-vertical-margin">
|
|
<!-- headers -->
|
|
<div id="headers" class="medium-vertical-margin tabcontent active">
|
|
<table class="table-map">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Value</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="headerMapTable">
|
|
<tr>
|
|
<td><input class="key" value="basic value"></td>
|
|
<td><input value="basic value"></td>
|
|
<td><button class="modification-button btn-hashmap"><i class="icon-cancel"></i></button></td>
|
|
</tr>
|
|
</tbody>
|
|
<tr>
|
|
<td><input id="headerKeyInput" placeholder="name"></td>
|
|
<td><input id="headerValueInput" placeholder="value"></td>
|
|
<td><button id="btn-newRow" class="modification-button btn-add"><i class="icon-plus"></i></button></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<!-- history -->
|
|
<div id="history" class="medium-vertical-margin tabcontent">
|
|
<div class="block-display max-width">
|
|
<button id="btn-history-filter" class="clickable-text highlight switch"><span class="toggleIndicator"></span> filter</button>
|
|
<div id ="history-filter" class="display-space-between max-width small-vertical-margin hiddable">
|
|
<div class="three-fourth-width display-space-evenly">
|
|
<div class="block-display half-width with-padding">
|
|
<label for="historyFrom" class="block-label">From</label>
|
|
<input id="historyFrom" type="date" class="bordered-field max-width with-padding">
|
|
<input id="historyTimeFrom" type="time" class="small-vertical-margin bordered-field max-width with-padding">
|
|
</div>
|
|
<div class="block-display half-width with-padding">
|
|
<label for="historyTo" class="block-label">To</label>
|
|
<input id="historyTo" type="date" class="bordered-field max-width with-padding">
|
|
<input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding">
|
|
</div>
|
|
</div>
|
|
<button id="btn-searchHistory" class="quater-width action-button active small-margins">Search</button>
|
|
</div>
|
|
|
|
<div class="max-width centered-content large-vertical-margin overflowedTableContent">
|
|
<table id="historyTable" class="table-default">
|
|
<thead>
|
|
<tr class="bottom-border">
|
|
<th>Timestamp</th>
|
|
<th>Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="selectMenuContent" class="tool-extention">
|
|
<!-- header -->
|
|
<div>
|
|
<h2>Message List</h2>
|
|
</div>
|
|
<!-- tile list -->
|
|
<div id="listItems">
|
|
</div>
|
|
<div id="new-tile" class="max-width centered-content small-vertical-margin">
|
|
<button id="btn-newtile" class="modification-button btn-addtile"><i class="icon-plus"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tooltip-window lite">
|
|
<div>
|
|
<h2>What's this?</h2>
|
|
<p>MockedServices is a tool that allows developer to create, in easy and simple way, http server mocked endpoints for integration tests.</p>
|
|
<h2>Help</h2>
|
|
<p>When cursor hovers over an item. It's description is displayed below.</p>
|
|
<div class="large-vertical-margin">
|
|
<div id="messageLinkTip" class="tip">
|
|
<h3>Link</h3>
|
|
<p>Link is an url representing an endpoint at which you can receive your mocked response by simply sending get request.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="btnSaveTip" class="tip">
|
|
<h3>Save button!</h3>
|
|
<p>To save message, the message must be changed!</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="btn-newTileTip" class="tip">
|
|
<h3>Add new message</h3>
|
|
<p>This button adds new message.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="UUIDFieldTip" class="tip">
|
|
<h3>UUID</h3>
|
|
<p>UUID is an Unique ID that represents you in API. By UUID your messages is saved in database. You can change it to access your previous configuration of mocked messages</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="UUIDValidationStrategyTip" class="tip">
|
|
<h3>UUID Checking Strategy</h3>
|
|
<p>When you provide invalid UUID you can choose what do with it. You can generate new UUID or restore previous.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="UUIDEditionTip" class="tip">
|
|
<h3>UUID Edition</h3>
|
|
<p>Unlocks you ability to edit UUID</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="large-vertical-margin">
|
|
<div id="messagesTip" class="tip">
|
|
<h3>Message</h3>
|
|
<p>This is saved messages, with unique id.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="httpStatusTip" class="tip">
|
|
<h3>Http Status</h3>
|
|
<p>Value of the field is corresponding to status value that server will return.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="typeSelectorTip" class="tip">
|
|
<h3>Content Type</h3>
|
|
<p>Value of the field describes content of body payload contained in the response. For example if content is in xml format the value should be "application/xml" or "text/xml"</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="bodyEditorTip" class="tip">
|
|
<h3>Body</h3>
|
|
<p>Value of the field describes content of response body. It's basicly the message we want server to return. If it's simple response like 200 OK or 404 not found then field might be left empty.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="headersTabTip" class="tip">
|
|
<h3>Headers</h3>
|
|
<p>Content of this tab allows to set and modify headers that will be included in the response.</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="historyTabTip" class="tip">
|
|
<h3>History</h3>
|
|
<p>Content of this tab displays the history of requests or responses received/sent to the endpoint</p>
|
|
</div>
|
|
</div>
|
|
<div class="large-vertical-margin">
|
|
<div id="newHeaderTip" class="tip">
|
|
<h3>New header</h3>
|
|
<p>Insert value in the field and press the plus icon to add a new header to the message.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="overlay"></div>
|
|
<div id="modal-uuidChanged" class="modal">
|
|
<div class="header">
|
|
<div>Change UUID info<i class="r-exclamation"></i></div>
|
|
<button onclick="window.location.reload();">×</button>
|
|
</div>
|
|
<div id="changeUUIDSuccess" class="body hiddable uuid-modal-body">Your message UUID has been changed successfully.</div>
|
|
<div id="newUUID" class="body hiddable uuid-modal-body">You provided wrong UUID! <br> New UUID has been generated!</div>
|
|
<div id="restoredUUID" class="body hiddable uuid-modal-body">You provided wrong UUID! <br> Old UUID has been restored!</div>
|
|
<div id="noChgUUID" class="body hiddable uuid-modal-body">You doesn't provide any change to UUID!</div>
|
|
</div>
|
|
<div id="modal-confirm" class="modal">
|
|
<div class="header">
|
|
<div>Message saved<i class="r-exclamation"></i></div>
|
|
<button>×</button>
|
|
</div>
|
|
<div class="body">Your message has been successfully saved.<br>You might view it under the link.</div>
|
|
</div>
|
|
<div id="modal-query" class="modal">
|
|
<div class="header">
|
|
<div>Unsaved data<i class="r-exclamation"></i></div>
|
|
<button>×</button>
|
|
</div>
|
|
<div class="body">You haven't saved your message!<br> Do you want to save it?</div>
|
|
<div class="function">
|
|
|
|
<button type = "button" onclick = "updateData()" value = "Display">Save</button>
|
|
|
|
<button>No</button>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" src="../assets/scripts/tools/mock/modal.js"></script>
|
|
<script type="text/javascript" src="../assets/scripts/tools/mock//uianimation.js"></script>
|
|
<script type="text/javascript" src="../assets/scripts/tools/mock/datatransfer.js"></script>
|
|
<script type="text/javascript" src="../assets/scripts/tools/mock/historyloader.js"></script>
|
|
<script type="text/javascript" src="../assets/scripts/tools/mock/fiddle.js"></script>
|
|
</body>
|
|
</html>
|