2016-07-01 08:25:32 +02:00
|
|
|
define(function(){
|
|
|
|
return function(el,store){
|
2016-07-01 16:01:28 +02:00
|
|
|
menu = document.createElement("header");
|
|
|
|
menu.classList.add("menu");
|
|
|
|
right = document.createElement("div");
|
|
|
|
right.classList.add("icons");
|
|
|
|
menu.appendChild(right);
|
|
|
|
el.appendChild(menu);
|
2016-07-01 08:25:32 +02:00
|
|
|
|
2016-07-02 02:11:17 +02:00
|
|
|
var buttonNodes = document.createElement("i");
|
|
|
|
buttonNodes.textContent = "";
|
|
|
|
buttonNodes.onclick = function () {
|
|
|
|
window.location.href = "#nodes";
|
2016-07-01 16:01:28 +02:00
|
|
|
};
|
2016-07-02 02:11:17 +02:00
|
|
|
right.appendChild(buttonNodes);
|
2016-07-01 08:25:32 +02:00
|
|
|
|
2016-07-01 16:01:28 +02:00
|
|
|
var buttonMap = document.createElement("i");
|
2016-07-02 02:11:17 +02:00
|
|
|
buttonMap.textContent = '\uf278';
|
2016-07-01 08:25:32 +02:00
|
|
|
buttonMap.onclick = function () {
|
2016-07-01 16:01:28 +02:00
|
|
|
window.location.href = "#map";
|
|
|
|
};
|
|
|
|
right.appendChild(buttonMap);
|
2016-07-01 08:25:32 +02:00
|
|
|
|
2016-07-02 02:11:17 +02:00
|
|
|
var buttonAliases = document.createElement("i");
|
|
|
|
buttonAliases.textContent = "\uf0ec";
|
|
|
|
buttonAliases.onclick = function () {
|
|
|
|
window.location.href = "#aliases";
|
|
|
|
};
|
|
|
|
right.appendChild(buttonAliases);
|
|
|
|
|
2016-07-01 16:01:28 +02:00
|
|
|
var buttonStatistic = document.createElement("i");
|
|
|
|
buttonStatistic.classList.add("mini");
|
2016-07-02 02:11:17 +02:00
|
|
|
buttonStatistic.textContent = "";
|
2016-07-01 08:25:32 +02:00
|
|
|
buttonStatistic.onclick = function () {
|
2016-07-01 16:01:28 +02:00
|
|
|
window.location.href = "#grafana";
|
|
|
|
};
|
|
|
|
right.appendChild(buttonStatistic);
|
2016-07-01 08:25:32 +02:00
|
|
|
|
2016-07-01 16:01:28 +02:00
|
|
|
var buttonMeshviewer = document.createElement("i");
|
|
|
|
buttonMeshviewer.classList.add("mini");
|
2016-07-02 02:11:17 +02:00
|
|
|
buttonMeshviewer.textContent = '\uf279';
|
2016-07-01 16:01:28 +02:00
|
|
|
buttonMeshviewer.onclick = function () {
|
|
|
|
window.location.href = "#meshviewer";
|
|
|
|
};
|
|
|
|
right.appendChild(buttonMeshviewer);
|
2016-07-01 08:25:32 +02:00
|
|
|
|
2016-07-01 16:01:28 +02:00
|
|
|
|
|
|
|
var buttonRefresh = document.createElement("i");
|
2016-07-02 02:11:17 +02:00
|
|
|
buttonRefresh.textContent = "";
|
2016-07-01 16:01:28 +02:00
|
|
|
var refreshtime = document.createElement("span");
|
|
|
|
store.setTimeSinceUpdate(refreshtime);
|
|
|
|
buttonRefresh.appendChild(refreshtime);
|
2016-07-01 08:25:32 +02:00
|
|
|
buttonRefresh.onclick = function () {
|
2016-07-01 16:01:28 +02:00
|
|
|
store.refresh();
|
|
|
|
};
|
|
|
|
right.appendChild(buttonRefresh);
|
|
|
|
};
|
|
|
|
});
|