mirror of https://gitee.com/bigwinds/arangodb
Logs should checkUser, logout shouldn't have an href.
This commit is contained in:
parent
94ea5123eb
commit
f8afe04922
|
@ -39,35 +39,6 @@
|
|||
this.naviView.selectMenuItem('demo-menu');
|
||||
},
|
||||
|
||||
logs: function () {
|
||||
if (!this.logsView) {
|
||||
var newLogsAllCollection = new window.ArangoLogs(
|
||||
{upto: true, loglevel: 4}
|
||||
),
|
||||
newLogsDebugCollection = new window.ArangoLogs(
|
||||
{loglevel: 4}
|
||||
),
|
||||
newLogsInfoCollection = new window.ArangoLogs(
|
||||
{loglevel: 3}
|
||||
),
|
||||
newLogsWarningCollection = new window.ArangoLogs(
|
||||
{loglevel: 2}
|
||||
),
|
||||
newLogsErrorCollection = new window.ArangoLogs(
|
||||
{loglevel: 1}
|
||||
);
|
||||
this.logsView = new window.LogsView({
|
||||
logall: newLogsAllCollection,
|
||||
logdebug: newLogsDebugCollection,
|
||||
loginfo: newLogsInfoCollection,
|
||||
logwarning: newLogsWarningCollection,
|
||||
logerror: newLogsErrorCollection
|
||||
});
|
||||
}
|
||||
this.logsView.render();
|
||||
this.naviView.selectMenuItem('tools-menu');
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
// This should be the only global object
|
||||
window.modalView = new window.ModalView();
|
||||
|
@ -123,6 +94,36 @@
|
|||
return true;
|
||||
},
|
||||
|
||||
logs: function () {
|
||||
if (!this.checkUser()) return;
|
||||
if (!this.logsView) {
|
||||
var newLogsAllCollection = new window.ArangoLogs(
|
||||
{upto: true, loglevel: 4}
|
||||
),
|
||||
newLogsDebugCollection = new window.ArangoLogs(
|
||||
{loglevel: 4}
|
||||
),
|
||||
newLogsInfoCollection = new window.ArangoLogs(
|
||||
{loglevel: 3}
|
||||
),
|
||||
newLogsWarningCollection = new window.ArangoLogs(
|
||||
{loglevel: 2}
|
||||
),
|
||||
newLogsErrorCollection = new window.ArangoLogs(
|
||||
{loglevel: 1}
|
||||
);
|
||||
this.logsView = new window.LogsView({
|
||||
logall: newLogsAllCollection,
|
||||
logdebug: newLogsDebugCollection,
|
||||
loginfo: newLogsInfoCollection,
|
||||
logwarning: newLogsWarningCollection,
|
||||
logerror: newLogsErrorCollection
|
||||
});
|
||||
}
|
||||
this.logsView.render();
|
||||
this.naviView.selectMenuItem('tools-menu');
|
||||
},
|
||||
|
||||
applicationDetail: function (mount) {
|
||||
if (!this.checkUser()) return;
|
||||
this.naviView.selectMenuItem('applications-menu');
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<a id="userProfile" class="tab" href="#user">User profile</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a id="userLogout" class="tab" href="#user">Logout</a>
|
||||
<a id="userLogout" class="tab">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue