fluentd-ui/app/views/shared/vue/_navigation.html.haml
Kenji Okimoto f99f8ffdef
Use bootstrap-vue's dropdown component
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-10-09 16:24:37 +09:00

39 lines
1.6 KiB
Plaintext

%nav#mainNav.navbar.navbar-expand-lg.navbar-light.bg-light.fixed-top
= link_to fluentd_ui_logo, root_path, class: "navbar-brand fluentd-ui-logo"
%button{"type" => "button",
"class" => "navbar-toggler navbar-toggler-right",
"data-toggle" => "collapse",
"data-target" => "#navbarResponsive",
"aria-controls" => "navbarResponsive",
"aria-expanded" => "false",
"aria-label" => "Toggle navigation"}
%span.navbar-toggler-icon
#navbarResponsive.collapse.navbar-collapse
= render partial: "shared/vue/sidemenu"
%ul.navbar-nav.ml-auto
- if @fluentd
%li.nav-item.fluentd-note
= @fluentd.note
%li.nav-item.fluentd-status
%b-tooltip{"target" => "fluentd-status-message",
"placement" => "bottom",
"title" => "fluentd #{fluentd_status_message}"}
%a.nav-link#fluentd-status-message{"href" => daemon_path}
= fluentd_status_icon
%li.nav-item
%b-dropdown(no-caret){"variant" => "light"}
%template{"slot" => "button-content"}
= icon("fa-bell fa-fw")
%span.badge{"v-if" => "hasAlerts"}
{{ alertsCount }}
%b-dropdown-item{"v-if" => "!hasAlerts"}
.nothing.text.text-success
= icon("fa-check")
= t("terms.no-alert")
%b-dropdown-item{"v-for" => "alert in alerts"}
= icon("fa-cog fa-fw fa-la fa-spin")
{{ alert }}
%li.nav-item
= link_to(icon("fa-fw fa-sign-out") + t("terms.sign_out"), sessions_path, method: :delete, class: "nav-link")