<commit_before>= render '/scenarios/show/modals'

%div.panel.panel-default
  %div.panel-heading.nav.nav-pills
    %li
      %h4
        %b
          %span#scenario-name= @scenario.name
          \:
    %li
      &nbsp;
    %li{ id: 'boot-button-li', class: @scenario.bootable? ? "" : "disabled" }
      = link_to 'Boot', boot_scenario_path(@scenario), method: :post, remote:true, id: 'boot-button', class: 'btn btn-default'
    %li{ id: 'unboot-button-li', class: @scenario.unbootable? ? "" : "disabled" }
      = link_to 'Unboot', unboot_scenario_path(@scenario), method: :post, remote:true, id: 'unboot-button', class: 'btn btn-default'
    %li{ id: 'pause-button-li', class: @scenario.booted? ? "" : "disabled" }
      = link_to 'Pause', pause_scenario_path(@scenario), method: :post, remote:true, id: 'pause-button', class: 'btn btn-default'
    %li{ id: 'start-button-li', class: @scenario.paused? ? "" : "disabled" }
      = link_to 'Start', start_scenario_path(@scenario), method: :post, remote:true, id: 'start-button', class: 'btn btn-default'
    %li
      = link_to 'Clone', "#modal-scenario-clone", :data => {:toggle=>"modal"}, :onclick => "$('#modal-scenario-clone').find('#name-div').removeClass('has-error'); $('#modal-scenario-clone').find('#name').val(''); $('#modal-scenario-clone').find('#name-help').html('');", class: 'btn btn-default'
    %li{ id: 'destroy-button-li', class: @scenario.stopped? ? "" : "disabled" }
      = link_to 'Destroy', destroyme_scenario_path(@scenario), method: :post, remote: true, id: 'destroy-button', class: 'btn btn-default'
    - if @scenario.modifiable?
      %li{ id: "save-button-li", class: @scenario.modified? ? "" : "disabled" }
        = link_to 'Save', save_scenario_path(@scenario), method: :post, remote: true, id: 'save-button', class: 'btn btn-default', href: @scenario.modified? ? "/scenarios/#{@scenario.id}/save" : "javascript: void(0)"
      %li{ id: 'save-as-button-li', class: @scenario.stopped? ? "" : "disabled" }
        = link_to 'Save As', "#modal-scenario-save-as", :data => {:toggle=>"modal"}, id: 'save-as-button', onclick: "$('#modal-scenario-save-as').find('#name').val(''); $('#modal-scenario-save-as').find('#name-div').removeClass('has-error'); $('#modal-scenario-save-as').find('#name-help').html(''); $('#modal-scenario-save-as').find('#help-div').removeClass('has-error'); $('#modal-scenario-save-as').find('#help-help').html('');", class: 'btn btn-default'
    %li
      = link_to 'Show Log', log_get_scenario_path(@scenario, kind: 'scenario'), method: :post, remote: true, class: 'btn btn-default'

  %div.indent.panel-body
    // Instructions
    %label Instructor Instructions:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-instructions'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-instructions', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-instructions'}
            %li{ id: 'instructions-modify-button-li' }
              = link_to 'Modify', instructions_get_scenario_path(@scenario), method: :post, remote: true
    %div.indent#instructor-instructions
      = @scenario.instructions
    %p

    %label Student Instructions:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-instructions-student'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-instructions-student', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-instructions-student'}
            %li{ id: 'instructions-student-modify-button-li' }
              = link_to 'Modify', instructions_student_get_scenario_path(@scenario), method: :post, remote: true
    %div.indent#instructor-instructions-student
      = @scenario.instructions_student
    %p
    

    // Scenario
    %label Scenario:

    %div.indent
      Status:
      %span#scenario-status= @scenario.status
      %div{ id: "scenario-status-dot", class: "inline-block #{@scenario.status} #{(@scenario.booting? or @scenario.unbooting?) ? 'hidden' : ''}" }
        &#9679;
      %div{ id: "scenario-spinner", class: "inline-block #{(@scenario.booting? or @scenario.unbooting?) ? 'spin' : ''}" }

      %br
      Created at:
      = @scenario.created_at
      %br

      // Clouds
      %label Clouds:
      %div.inline-block
        - if @scenario.modifiable?
          %div.dropdown
            %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-clouds', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
              %span.caret
            %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-clouds'}
              %li
                = link_to 'Add Cloud', "#modal-cloud-add", :data => {:toggle=>"modal"}, onclick: "$('#modal-cloud-add').find('#name').val(''); $('#modal-cloud-add').find('#name-div').removeClass('has-error'); $('#modal-cloud-add').find('#name-help').html(''); $('#modal-cloud-add').find('#cidr_block').val(''); $('#modal-cloud-add').find('#cidr-div').removeClass('has-error'); $('#modal-cloud-add').find('#cidr-help').html('');"
      %ul#clouds
        - @scenario.clouds.each do |cloud|
          = render '/scenarios/show/cloud', cloud: cloud

    // Groups
    %label Groups:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-roles'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-roles', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-roles'}
            %li{ id: 'group-add-button-li' }
              = link_to 'Add Group', "#modal-group-add", :data => {:toggle=>"modal"}, onclick: "$('#modal-group-add').find('#name').val(''); $('#modal-group-add').find('#name-div').removeClass('has-error'); $('#modal-group-add').find('#name-help').html('');", id: 'group-add-button'
    %ul#groups
      - @scenario.groups.each do |group|
        = render '/scenarios/show/group', group: group

    %p
    %label Roles:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-roles'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-roles', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            / %span.glyphicon.glyphicon-pencil{"aria-hidden" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-roles'}
            %li{ id: 'role-add-button-li' }<commit_msg>Changed the name of Groups to Teams<commit_after>= render '/scenarios/show/modals'

%div.panel.panel-default
  %div.panel-heading.nav.nav-pills
    %li
      %h4
        %b
          %span#scenario-name= @scenario.name
          \:
    %li
      &nbsp;
    %li{ id: 'boot-button-li', class: @scenario.bootable? ? "" : "disabled" }
      = link_to 'Boot', boot_scenario_path(@scenario), method: :post, remote:true, id: 'boot-button', class: 'btn btn-default'
    %li{ id: 'unboot-button-li', class: @scenario.unbootable? ? "" : "disabled" }
      = link_to 'Unboot', unboot_scenario_path(@scenario), method: :post, remote:true, id: 'unboot-button', class: 'btn btn-default'
    %li{ id: 'pause-button-li', class: @scenario.booted? ? "" : "disabled" }
      = link_to 'Pause', pause_scenario_path(@scenario), method: :post, remote:true, id: 'pause-button', class: 'btn btn-default'
    %li{ id: 'start-button-li', class: @scenario.paused? ? "" : "disabled" }
      = link_to 'Start', start_scenario_path(@scenario), method: :post, remote:true, id: 'start-button', class: 'btn btn-default'
    %li
      = link_to 'Clone', "#modal-scenario-clone", :data => {:toggle=>"modal"}, :onclick => "$('#modal-scenario-clone').find('#name-div').removeClass('has-error'); $('#modal-scenario-clone').find('#name').val(''); $('#modal-scenario-clone').find('#name-help').html('');", class: 'btn btn-default'
    %li{ id: 'destroy-button-li', class: @scenario.stopped? ? "" : "disabled" }
      = link_to 'Destroy', destroyme_scenario_path(@scenario), method: :post, remote: true, id: 'destroy-button', class: 'btn btn-default'
    - if @scenario.modifiable?
      %li{ id: "save-button-li", class: @scenario.modified? ? "" : "disabled" }
        = link_to 'Save', save_scenario_path(@scenario), method: :post, remote: true, id: 'save-button', class: 'btn btn-default', href: @scenario.modified? ? "/scenarios/#{@scenario.id}/save" : "javascript: void(0)"
      %li{ id: 'save-as-button-li', class: @scenario.stopped? ? "" : "disabled" }
        = link_to 'Save As', "#modal-scenario-save-as", :data => {:toggle=>"modal"}, id: 'save-as-button', onclick: "$('#modal-scenario-save-as').find('#name').val(''); $('#modal-scenario-save-as').find('#name-div').removeClass('has-error'); $('#modal-scenario-save-as').find('#name-help').html(''); $('#modal-scenario-save-as').find('#help-div').removeClass('has-error'); $('#modal-scenario-save-as').find('#help-help').html('');", class: 'btn btn-default'
    %li
      = link_to 'Show Log', log_get_scenario_path(@scenario, kind: 'scenario'), method: :post, remote: true, class: 'btn btn-default'

  %div.indent.panel-body
    // Instructions
    %label Instructor Instructions:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-instructions'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-instructions', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-instructions'}
            %li{ id: 'instructions-modify-button-li' }
              = link_to 'Modify', instructions_get_scenario_path(@scenario), method: :post, remote: true
    %div.indent#instructor-instructions
      = @scenario.instructions
    %p

    %label Student Instructions:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-instructions-student'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-instructions-student', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-instructions-student'}
            %li{ id: 'instructions-student-modify-button-li' }
              = link_to 'Modify', instructions_student_get_scenario_path(@scenario), method: :post, remote: true
    %div.indent#instructor-instructions-student
      = @scenario.instructions_student
    %p
    

    // Scenario
    %label Scenario:

    %div.indent
      Status:
      %span#scenario-status= @scenario.status
      %div{ id: "scenario-status-dot", class: "inline-block #{@scenario.status} #{(@scenario.booting? or @scenario.unbooting?) ? 'hidden' : ''}" }
        &#9679;
      %div{ id: "scenario-spinner", class: "inline-block #{(@scenario.booting? or @scenario.unbooting?) ? 'spin' : ''}" }

      %br
      Created at:
      = @scenario.created_at
      %br

      // Clouds
      %label Clouds:
      %div.inline-block
        - if @scenario.modifiable?
          %div.dropdown
            %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-clouds', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
              %span.caret
            %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-clouds'}
              %li
                = link_to 'Add Cloud', "#modal-cloud-add", :data => {:toggle=>"modal"}, onclick: "$('#modal-cloud-add').find('#name').val(''); $('#modal-cloud-add').find('#name-div').removeClass('has-error'); $('#modal-cloud-add').find('#name-help').html(''); $('#modal-cloud-add').find('#cidr_block').val(''); $('#modal-cloud-add').find('#cidr-div').removeClass('has-error'); $('#modal-cloud-add').find('#cidr-help').html('');"
      %ul#clouds
        - @scenario.clouds.each do |cloud|
          = render '/scenarios/show/cloud', cloud: cloud

    // Teams, previously called Groups
    %label Teams:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-roles'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-roles', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-roles'}
            %li{ id: 'group-add-button-li' }
              = link_to 'Add Group', "#modal-group-add", :data => {:toggle=>"modal"}, onclick: "$('#modal-group-add').find('#name').val(''); $('#modal-group-add').find('#name-div').removeClass('has-error'); $('#modal-group-add').find('#name-help').html('');", id: 'group-add-button'
    %ul#groups
      - @scenario.groups.each do |group|
        = render '/scenarios/show/group', group: group

    %p
    %label Roles:
    - if @scenario.modifiable?
      %div.inline-block
        %div.dropdown{id:'dropdown-roles'}
          %button.btn.btn-default.dropdown-toggle{type:'button', id:'dropdown-button-roles', "data-toggle" => 'dropdown', "aria-expanded" => "true"}
            / %span.glyphicon.glyphicon-pencil{"aria-hidden" => "true"}
            %span.caret
          %ul.dropdown-menu{role: 'menu', "aria-labelledby" => 'dropdown-button-roles'}
            %li{ id: 'role-add-button-li' }
{'fraction_non_alphanumeric': 0.20659875996457042, 'fraction_numerical': 0.0008857395925597874, 'mean_word_length': 3.3961713173264116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1191881', 'n_tokens_mistral': 4492, 'n_tokens_neox': 4462, 'n_words': 755}