changed vre name
This commit is contained in:
parent
2ac68f0690
commit
7252491fd5
|
@ -9,6 +9,15 @@ pageContext.setAttribute("userGroups", userGroups);
|
|||
|
||||
List<String> userContexts = (List<String>) request.getAttribute("userContexts");
|
||||
pageContext.setAttribute("userContexts", userContexts);
|
||||
|
||||
String sub = "-";
|
||||
|
||||
if (userContexts != null && userContexts.size()>0){
|
||||
sub = userContexts.get(0).substring(userContexts.get(0).lastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
pageContext.setAttribute("firstContextName", sub);
|
||||
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
var global_token_response = {};
|
||||
|
@ -99,9 +108,9 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
|
||||
console.log("resultObject", resultObject)
|
||||
|
||||
closeInfo('intro_info', false);
|
||||
openInfo('token_info', true);
|
||||
openInfo('refresh_token_info', true);
|
||||
//closeInfo('intro_info', false);
|
||||
// closeInfo('token_info', true);
|
||||
// closeInfo('refresh_token_info', true);
|
||||
}
|
||||
|
||||
function setError(error_comment) {
|
||||
|
@ -159,8 +168,8 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
function toggleInfo(destination_id, do_switch) {
|
||||
$("#" + destination_id).toggle(do_switch);
|
||||
do_switch = $("#" + destination_id).css('display') != 'none';
|
||||
$("#" + destination_id + "_icon").toggleClass("icon-chevron-up", !do_switch);
|
||||
$("#" + destination_id + "_icon").toggleClass("icon-chevron-down", do_switch);
|
||||
$("#" + destination_id + "_icon").toggleClass("icon-chevron-up", do_switch);
|
||||
$("#" + destination_id + "_icon").toggleClass("icon-chevron-down", !do_switch);
|
||||
}
|
||||
|
||||
function decodeFunction(text_id) {
|
||||
|
@ -266,7 +275,7 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
|
||||
<div>
|
||||
<c:if test="${userContexts.size() == 1}">
|
||||
<p>Current context: ${userContexts[0]}</p>
|
||||
<p>Current context: ${firstContextName}</p>
|
||||
<input type="hidden" name="contexts" id="myselect" value="${userContexts[0]}">
|
||||
</c:if>
|
||||
|
||||
|
@ -295,32 +304,7 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
</div>
|
||||
|
||||
<br>
|
||||
<div class="well well-small" id="intro_container">
|
||||
<div class="row" onclick="toggleInfo('intro_info')">
|
||||
<span><b>Instructions</b></span>
|
||||
<i id="intro_info_icon" class="icon-chevron-down pull-right"></i>
|
||||
</div>
|
||||
<div id="intro_info" class="well well-small bg_white">
|
||||
<p>Obtain your personal OAuth2 Access and Refresh Tokens, to be used for
|
||||
programmatic interaction with the D4Science Resources</p>
|
||||
<p> Do not use this token to authenticate services but only for personal
|
||||
access
|
||||
</p>
|
||||
<p>
|
||||
ref:
|
||||
<ul>
|
||||
<li><a href="https://dev.d4science.org/how-to-access-resources">D4Science:
|
||||
Accessing Resources - how to</a></li>
|
||||
<li><a
|
||||
href="https://www.oauth.com/oauth2-servers/making-authenticated-requests">OAuth2:
|
||||
Making Authenticated Requests</a></li>
|
||||
<li><a
|
||||
href="https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/">OAuth2:
|
||||
Refresh Tokens</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="response_group">
|
||||
|
||||
|
@ -340,7 +324,7 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
<div class="btn-group btn-group span2">
|
||||
<button id="buttonDecode" data-toggle="tooltip" class="btn btn-small"
|
||||
onclick="decodeFunction('tokenResult')" title="Decode" alt="Decode">
|
||||
<i class="icon-list"></i>
|
||||
<i class="icon-eye-open"></i>
|
||||
</button>
|
||||
<button id="buttonCopy" data-toggle="tooltip" class="btn btn-small"
|
||||
onclick="copyFromTextField('tokenResult')" title="Copy" alt="Copy">
|
||||
|
@ -391,10 +375,10 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
<div class="row">
|
||||
<span class="help-block span9" id='refreshTokenResultDetails'></span>
|
||||
<div class="btn-group btn-group span2">
|
||||
<button id="buttonDecode" data-toggle="tooltip" class="btn btn-small"
|
||||
<button id="buttonDecodeRefresh" data-toggle="tooltip" class="btn btn-small"
|
||||
onclick="decodeFunction('refreshTokenResult')" title="Decode"
|
||||
alt="Decode">
|
||||
<i class="icon-list"></i>
|
||||
<i class="icon-eye-open"></i>
|
||||
</button>
|
||||
<button id="buttonCopy" data-toggle="tooltip" class="btn btn-small"
|
||||
onclick="copyFromTextField('refreshTokenResult')" title="Copy"
|
||||
|
@ -468,6 +452,33 @@ pageContext.setAttribute("userContexts", userContexts);
|
|||
</div>
|
||||
|
||||
|
||||
<div class="well well-small" id="intro_container">
|
||||
<div class="row" onclick="toggleInfo('intro_info')">
|
||||
<span><b>Instructions</b></span>
|
||||
<i id="intro_info_icon" class="icon-chevron-down pull-right"></i>
|
||||
</div>
|
||||
<div id="intro_info" class="well well-small bg_white">
|
||||
<p>Obtain your personal OAuth2 Access and Refresh Tokens, to be used for
|
||||
programmatic interaction with the Resources</p>
|
||||
<p> Do not use this token to authenticate services but only for personal
|
||||
access
|
||||
</p>
|
||||
<p>
|
||||
ref:
|
||||
<ul>
|
||||
<li><a href="https://dev.d4science.org/how-to-access-resources">
|
||||
Accessing Resources - how to</a></li>
|
||||
<li><a
|
||||
href="https://www.oauth.com/oauth2-servers/making-authenticated-requests">OAuth2:
|
||||
Making Authenticated Requests</a></li>
|
||||
<li><a
|
||||
href="https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/">OAuth2:
|
||||
Refresh Tokens</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="error_msg" class="alert alert-error">
|
||||
Configuration error, no context available
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue