##// END OF EJS Templates
frontend: move link definitions to javascript layer
frontend: move link definitions to javascript layer

File last commit:

r91:b463cc34
r91:b463cc34
Show More
appenlight-header.html
101 lines | 7.1 KiB | text/html | HtmlLexer
<!-- Fixed navbar -->
<div id="top-navbar" class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="pattern">
<div class="container">
<div class="navbar-header pull-left">
<a data-ui-sref="front_dashboard" class="navbar-brand">
<div id="logo-normal" class="hidden-sm hidden-xs"></div>
<div id="logo-icon" class="visible-sm visible-xs"></div>
</a>
</div>
<div class="container-fluid">
<div>
<ul class="nav navbar-nav navbar-right" ng-if="$ctrl.stateHolder.AeUser.id !== null">
<li id="user-notifications" class="dropdown ng-cloak" data-uib-dropdown>
<a class="dropdown-toggle" data-uib-dropdown-toggle>
<span class="badge">{{$ctrl.assignedReports.length}}</span>
<span class="fa fa-envelope-o"></span>
</a>
<ul class="dropdown-menu">
<li role="presentation" class="dropdown-header">Assigned reports</li>
<li data-ng-repeat="report in $ctrl.assignedReports" role="presentation">
<a href="{{report.front_url}}" role="menuitem" tabindex="-1">
<small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small>
</a>
</li>
<li data-ng-if="$ctrl.assignedReports.length == 0"><a><small>No reports</small></a></li>
</ul>
</li>
<li id="alert-notifications" class="dropdown ng-cloak" data-uib-dropdown auto-close="outsideClick">
<a class="dropdown-toggle" data-uib-dropdown-toggle>
<span class="badge {{ activeEvents ? 'danger' : '' }}">{{$ctrl.activeEvents}}</span>
<span class="fa fa-bell-o"></span></a>
<ul class="dropdown-menu">
<li role="presentation" class="dropdown-header">
<a data-ui-sref="events" class="btn btn-xs btn-default">Show me more</a></li>
<li role="presentation" class="dropdown-header">Latest events</li>
<li data-ng-repeat="event in $ctrl.latestEvents" role="presentation">
<a data-ng-click="$ctrl.clickedEvent(event)"><small class="resource-name">For {{ event.resource_name }}</small><br/>
<small>{{ event.text |truncate:65}}</small><br/>
<small class="date" data-uib-tooltip="{{event.start_date}}">created: <iso-to-relative-time time="{{event.start_date}}"/></small>
<small class="date" data-ng-show="event.end_date" data-uib-tooltip="{{event.end_date}}">closed: <iso-to-relative-time time="{{event.end_date}}"/></small>
</a>
</li>
<li data-ng-if="$ctrl.latestEvents.length == 0"><a><small>No events</small></a></li>
</ul>
</li>
<li id="dashboards" class="dropdown" data-uib-dropdown>
<a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Dashboards">
<span class="fa fa-bar-chart-o "></span></a>
<ul class="dropdown-menu">
<li role="presentation"><a data-ui-sref="front_dashboard">Main dashboard</a></li>
<li role="presentation" ng-repeat="item in $ctrl.AeConfig.topNav.menuDashboardsItems">
<a data-ui-sref="{{ item.sref }}">{{ item.label }}</a>
</li>
</ul>
</li>
<li class="dropdown" data-uib-dropdown>
<a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Reports">
<span class="fa fa-exclamation-triangle"></span></a>
<ul class="dropdown-menu">
<li role="presentation">
<a data-ui-sref="report.list({resource:$ctrl.stateHolder.resource})">Error Reports</a>
</li>
<li role="presentation">
<a data-ui-sref="report.list_slow({resource:$ctrl.stateHolder.resource})">Slowness Reports</a>
</li>
</ul>
</li>
<li>
<a data-ui-sref="logs({resource:$ctrl.stateHolder.resource})" data-uib-tooltip="Logs" tooltip-placement="bottom"><span class="fa fa-list-alt "></span></a></li>
<li>
<a data-ui-sref="user" data-uib-tooltip="Settings" tooltip-placement="bottom"><span class="fa fa-cog "></span></a>
</li>
<li class="dropdown" data-uib-dropdown data-ng-if="$ctrl.AeConfig.topNav.menuAdminItems.length">
<a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Admin Settings">
<span class="fa fa-wrench"></span></a>
<ul class="dropdown-menu">
<li role="presentation" ng-repeat="item in $ctrl.AeConfig.topNav.menuAdminItems">
<a data-ui-sref="{{ item.sref }}">{{ item.label }}</a>
</li>
</ul>
</li>
<li><a href="{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}" target="_self"
data-uib-tooltip="Sign out" tooltip-placement="bottom">
<span class="fa fa-power-off "></span></a></li>
</ul>
<ul class="nav navbar-nav pull-right" ng-if="$ctrl.stateHolder.AeUser.id === null">
<li><a href="{{ $ctrl.AeConfig.urls.otherRoutes.register }}" target="_self" class="btn btn-orange">Sign In</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</div>
</div>
</div>