123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <%= link_to "Huginn", root_path, :class => 'navbar-brand' %>
- </div>
- <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
-
- <% if user_signed_in? %>
- <ul class='nav navbar-nav'>
- <%= nav_link "Agents", agents_path do %>
- <ul class='dropdown-menu' role='menu'>
- <%= nav_link "New Agent", new_agent_path, glyphicon: "plus" %>
- <%= nav_link "Run event propagation", propagate_agents_path, method: 'post', glyphicon: "refresh" %>
- <%= nav_link "View Diagram", diagram_path, glyphicon: 'random' %>
- </ul>
- <% end %>
- <%= nav_link "Scenarios", scenarios_path %>
- <%= nav_link "Events", events_path %>
- <%= nav_link "Credentials", user_credentials_path %>
- <%= nav_link "Services", services_path %>
- </ul>
- <% end %>
-
- <ul class="nav navbar-nav navbar-right">
- <% if user_signed_in? %>
- <form class="navbar-form navbar-left visible-lg" role="search">
- <div class="form-group">
- <input type="text" class="form-control" id='agent-navigate' autocomplete="off" placeholder="Search">
- <%= image_tag "spinner-arrows.gif", :class => "spinner" %>
- </div>
- </form>
-
- <li class='job-indicator' role='pending'>
- <%= link_to current_user.admin? ? jobs_path : '#', class: 'visible-lg' do %>
- <span class="badge"><span class="glyphicon glyphicon-refresh icon-white"></span> <span class='number'>0</span></span>
- <% end %>
- </li>
- <li class='job-indicator' role='awaiting_retry'>
- <%= link_to current_user.admin? ? jobs_path : '#', class: 'visible-lg' do %>
- <span class="badge"><span class="glyphicon glyphicon-question-sign icon-yellow"></span> <span class='number'>0</span></span>
- <% end %>
- </li>
- <li class='job-indicator' role='recent_failures'>
- <%= link_to current_user.admin? ? jobs_path : '#', class: 'hidden-sm hidden-xs' do %>
- <span class="badge"><span class="glyphicon glyphicon-exclamation-sign icon-white"></span> <span class='number'>0</span></span>
- <% end %>
- </li>
- <li id='event-indicator'>
- <a href="#" class='hidden-sm hidden-xs'>
- <span class="badge"><span class="glyphicon glyphicon-random icon-white"></span> <span class='number'>0</span> new events</span>
- </a>
- </li>
- <% end %>
-
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- Account
- <b class="caret"></b>
- </a>
- <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
- <li>
- <% if user_signed_in? %>
- <%= link_to 'Account', edit_user_registration_path, :tabindex => "-1" %>
- <% else %>
- <%= link_to 'Sign up', new_user_registration_path, :tabindex => "-1" %>
- <% end %>
- </li>
- <% if user_signed_in? && current_user.admin %>
- <li>
- <%= link_to 'Job Management', jobs_path, :tabindex => '-1' %>
- </li>
- <% end %>
- <li>
- <%= link_to 'About', 'https://github.com/cantino/huginn', :tabindex => "-1" %>
- </li>
- <li>
- <% if user_signed_in? %>
- <%= link_to 'Logout', destroy_user_session_path, :method => :delete, :tabindex => "-1" %>
- <% else %>
- <%= link_to 'Login', new_user_session_path, :tabindex => "-1" %>
- <% end %>
- </li>
- </ul>
- </li>
- </ul>
- </div>
|