1
0
Fork 0

Logs should checkUser, logout shouldn't have an href.

This commit is contained in:
Alan Plum 2015-03-10 17:15:22 +01:00
parent 94ea5123eb
commit f8afe04922
2 changed files with 31 additions and 30 deletions

View File

@ -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');

View File

@ -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>