Configure edition fields of UUID
This commit is contained in:
@@ -17,7 +17,7 @@ public interface MockedResponseRepository extends CrudRepository<MockedMessage,
|
||||
/**
|
||||
* Finds all messages by their uuid
|
||||
* @param clientUUID the key-uuid of given set of messages
|
||||
* @return list of {@link com.r11.tools.model.MockedMessage}
|
||||
* @return Optional of list of {@link com.r11.tools.model.MockedMessage}
|
||||
*/
|
||||
List<MockedMessage> findAllByClientUUID(UUID clientUUID);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#uuid-flex-container .uuid-inputField-icon:hover{
|
||||
color: #2A93B0;
|
||||
}
|
||||
|
||||
.uuid-inputField-icon-span {
|
||||
font-size: x-large;
|
||||
}
|
||||
@@ -20,13 +20,13 @@
|
||||
<div>
|
||||
<label for="uuid-input" class="block-display">UUID</label>
|
||||
<div id="uuid-flex-container">
|
||||
<input id="uuid-input" disabled class="bordered-field flex-item with-padding diabled-background" value="UUID" style="margin-bottom:2%; width: 60%;"/>
|
||||
<button class="uuid-inputField-icon modification-button flex-item btn-copy action-button">
|
||||
<input id="uuid-input" disabled onfocusout="changeUUID(this);" class="bordered-field flex-item with-padding diabled-background" value="UUID" style="margin-bottom:2%; width: 60%;"/>
|
||||
<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>
|
||||
<label for="editable">Editable</label>
|
||||
<input type="checkbox" name="editable" id="editable" value="false"/>
|
||||
<label for="editable">Editable</label>
|
||||
<input type="checkbox" onchange="changeEditionOfUUID(this)" name="editable" id="editable" value="false"/>
|
||||
</div>
|
||||
<div>
|
||||
<!-- h2 -->
|
||||
|
||||
@@ -233,6 +233,27 @@ function fillStaticFields(uuid, id, mediaType, body, httpStatus){
|
||||
|
||||
}
|
||||
|
||||
function changeEditionOfUUID(element){
|
||||
|
||||
var inputFieldId= "#uuid-input"
|
||||
if(element.checked){
|
||||
$(inputFieldId).removeAttr('disabled');
|
||||
} else{
|
||||
$(inputFieldId).attr('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
function copyUUIDToClipboard(){
|
||||
navigator.clipboard.writeText( document.getElementById('uuid-input').value );
|
||||
}
|
||||
|
||||
function changeUUID(element){
|
||||
clientUUID = element.value ;
|
||||
checkUuid();
|
||||
setCookie();
|
||||
}
|
||||
|
||||
|
||||
function createLink(uuid, id){
|
||||
var link = host + '/api/mock/r/'+uuid+'/'+id;
|
||||
return link;
|
||||
|
||||
Reference in New Issue
Block a user