- page_title << @server.name
= render 'sidebar', :active_server => @server
= render 'header', :active_nav => :overview

- if @messages.empty?
  .pageContent--compact
    .noData.noData--clean
      %h2.noData__title Your new mail server is ready to go.
      %p.noData__text
        Check out the information below to get started sending & receiving e-mail through your new mail server.
      %p.noData__button.buttonSet.buttonSet--center
        = link_to "Read about sending e-mail", [organization, @server, :help_outgoing], :class => "button"
        = link_to "Read about receiving e-mail", [organization, @server, :help_incoming], :class => "button"
- else
  .pageContent
    - if @server.suspended?
      .suspensionBox.u-margin
        %p
          This server has been suspended and is not permitted to send or receive e-mail.
          If you have any questions about this please contact our support team for assistance.
          Please be aware that suspended servers will be fully deleted from our system 30 days after
          suspension.
        - if @server.actual_suspension_reason
          %p.suspensionBox__reason
            <b>Reason:</b> #{@server.actual_suspension_reason}

    .mailGraph.u-margin{:data => {:data => @graph_data.to_json}}
      %ul.mailGraph__key
        %li.mailGraph__key--in Incoming Messages
        %li.mailGraph__key--out Outgoing Messages

      .mailGraph__graph
      %ul.mailGraph__labels
        - if @graph_type == :hourly
          %li #{@first_date.strftime("%A at %l%P")} &rarr;
          %li Today at #{Time.now.strftime("%l%P")}
        - else
          %li #{@first_date.to_date.to_s(:long)} &rarr;
          %li Today

    .titleWithLinks.u-margin
      %h2.titleWithLinks__title Recently processed e-mails
      %ul.titleWithLinks__links
        %li= link_to "View message queue", [:queue, organization, @server], :class => 'titleWithLinks__link'
        %li= link_to "View full e-mail history", [:outgoing, organization, @server, :messages], :class => 'titleWithLinks__link'
    = render 'messages/list', :messages => @messages

