
remove node modules make new data file for web ui initial commit of dashboard switch back to non SSL request move port splitting to common place; add to node resource location Signed-off-by: Patrick Reilly <patrick@kismatic.io> various path fixes make svg path relative work around missing mime type Signed-off-by: Patrick Reilly <patrick@kismatic.io> fix paths fix karma path remove bad protractor test
26 lines
691 B
JavaScript
26 lines
691 B
JavaScript
app.service('SidebarService', [
|
|
'$rootScope',
|
|
function($rootScope) {
|
|
var service = this;
|
|
service.sidebarItems = [];
|
|
|
|
service.clearSidebarItems = function() { service.sidebarItems = []; };
|
|
|
|
service.renderSidebar = function() {
|
|
var _entries = '';
|
|
service.sidebarItems.forEach(function(entry) { _entries += entry.Html; });
|
|
|
|
if (_entries) {
|
|
$rootScope.sidenavLeft = '<div layout="column">' + _entries + '</div>';
|
|
}
|
|
};
|
|
|
|
service.addSidebarItem = function(item) {
|
|
|
|
service.sidebarItems.push(item);
|
|
|
|
service.sidebarItems.sort(function(a, b) { return (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0); });
|
|
};
|
|
}
|
|
]);
|