mirror of https://github.com/rancher/api-ui.git
Option to disable logout button
This commit is contained in:
parent
fa2d3e4110
commit
8bb88cbf63
|
|
@ -12,8 +12,9 @@ function HTMLApi(opt, cb)
|
|||
this._docsJson = opt.docsJson;
|
||||
this._user = opt.user;
|
||||
this._curlUser = opt.curlUser || '${GDAPI_ACCESS_KEY}:${GDAPI_SECRET_KEY}';
|
||||
this._filterId = 0;
|
||||
this._logout = opt.logout !== false;
|
||||
|
||||
this._filterId = 0;
|
||||
this._reqModal = null;
|
||||
this._editSchema = null;
|
||||
this._editData = null;
|
||||
|
|
@ -315,6 +316,7 @@ HTMLApi.prototype.render = function(cb)
|
|||
data: this._data,
|
||||
docsPage: this._docsPage,
|
||||
user: this._user,
|
||||
logout: this._logout,
|
||||
error: this._error,
|
||||
explorer: Cookie.get('debug') || false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@ var explorer;
|
|||
data: window.data,
|
||||
schemasUrl: window.schemas,
|
||||
docsPage: window.docsPage || window.docs,
|
||||
docsJson: window.docJson || window.docsJson,
|
||||
docsJson: window.docsJson || window.docJson,
|
||||
user: window.user,
|
||||
curlUser: window.curlUser
|
||||
curlUser: window.curlUser,
|
||||
logout: window.logout
|
||||
}, apiReady);
|
||||
}
|
||||
catch (e)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
{{#if user}}
|
||||
<span class="user">{{user}}</span>
|
||||
{{/if}}
|
||||
<a href="#" onclick="htmlapi.logout(); return false">Log Out</a><br/>
|
||||
{{#if logout}}
|
||||
<a href="#" onclick="htmlapi.logout(); return false">Log Out</a><br/>
|
||||
{{/if}}
|
||||
|
||||
{{#if explorer}}
|
||||
<a href="#" onclick="Cookie.set('apiview','explorer'); explorer.show(); return false">Explorer View</a><br/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue