<commit_before>{% extends "base/base.html" %}
{% load crispy_forms_tags %}
{% load staticfiles %}

{% block css %}
<link rel="stylesheet" href="{% static "css/material-table.css"%}">
<style>
.btn-sm {
  margin-top:20px !important;
}
</style>
{% endblock %}

{% block content %}
<div id="fh5co-portfolio">
<!-- Error messages for builds will be added here-->
{% include 'messages/message.html' %}

<div class="row">

    <!-- Container collection meta -->
    <div class="col-md-12">
        <div style="padding-top:20px">
            <div class="header">
                <h2 class="title" style="margin-bottom:0px">Usage: <a href="{% url 'collection_details' collection.id %}">
                      {{ collection.name }}</a>
                </h2><hr>
                <p> The following shows example usage for the container {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}
                <hr>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-12">

        <!-- Pull Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Pull</strong> the container to your machine (and optionally name custom, or by hash/commit:</p>
                <p class="well" id="pull_well">
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }} --name customname.img<br>
                     singularity pull shub://{{ DOMAIN_NAKED }}/{{ collection.name }}:{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     singularity pull --name customname.img shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="pull" class="btn copyme" data-clipboard-target="#pull"><i class="fa fa-copy"></i></button>
		<div style="width:58px" class="alert alert-info hidden" id="pullb-alert" role="alert">
		</div>
            </div>
        </div>

        <!-- Sregistry Examples-->
        <div class="row">
            <div class="col-md-10">
                <p><strong><a href="https://singularityhub.github.io/sregistry-cli/client-registry" target="_blank">Singularity Global Client</a> Examples</strong></p>
                <p class="well" id="sreg_well">
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     sregistry search {{ collection.name }}/{{ collection.containers.first.name }}<br>
                     sregistry record {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="sreg" class="btn copyme" data-clipboard-target="#sreg"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="sregb-alert" role="alert">
                </div>
            </div>
        </div>

        <!-- Shell Example-->
        <div class="row">
            <div class="col-md-10"> 
                <p><strong>Shell</strong> into the container:</p>
                <p class="well" id="shell_well">
                    singularity shell shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="shell" class="btn copyme" data-clipboard-target="#shell"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="shellb-alert" role="alert">
                </div>
            </div>
        </div>

        <!-- Run Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Run</strong> the container:</p>
                <p id="run_well" class="well"><br>
                    singularity run shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}</p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="run" class="btn copyme" data-clipboard-target="#run"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="runb-alert" role="alert">
		</div>
            </div>
        </div>

        <!-- Build Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Build</strong> using as a base:</p>
                <p id="build_well" class="well">
                    sudo singularity build {{ collection.name }}.simg shub://{{ collection.containers.first.name }}:{{collection.containers.first.tag }}</p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="run" class="btn copyme" data-clipboard-target="#run"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="buildb-alert" role="alert">
		</div>
            </div>
        </div>


    </div>
</div>
{% include "messages/notification.html" %}
{% endblock %}

{% block scripts %}
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<script src="{% static "js/materialize.min.js"%}"></script>
<script>
$('.copyme').click(function(){
    var copy_id = $(this).attr('id')
    var content = $("#" + copy_id + "_well")
    var range = document.createRange();  
    range.selectNode(content[0])  
    window.getSelection().addRange(range)

  try {  
        // Now that we've selected the anchor text, execute the copy command  
        var successful = document.execCommand('copy');  
        var msg = successful ? 'successful' : 'unsuccessful';  
        toast_message('Copy ' + msg)
      }  catch(err) {  
        toast_message('Oops, unable to copy');  
      }  

    // removeRange(range) when it is supported  
    window.getSelection().removeAllRanges();  

});
</script>
{% endblock %}
<commit_msg>fixing bug with usage message<commit_after>{% extends "base/base.html" %}
{% load crispy_forms_tags %}
{% load staticfiles %}

{% block css %}
<link rel="stylesheet" href="{% static "css/material-table.css"%}">
<style>
.btn-sm {
  margin-top:20px !important;
}
</style>
{% endblock %}

{% block content %}
<div id="fh5co-portfolio">
<!-- Error messages for builds will be added here-->
{% include 'messages/message.html' %}

<div class="row">

    <!-- Container collection meta -->
    <div class="col-md-12">
        <div style="padding-top:20px">
            <div class="header">
                <h2 class="title" style="margin-bottom:0px">Usage: <a href="{% url 'collection_details' collection.id %}">
                      {{ collection.name }}</a>
                </h2><hr>
                <p> The following shows example usage for the container {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}
                <hr>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-12">

        <!-- Pull Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Pull</strong> the container to your machine (and optionally name custom, or by hash/commit:</p>
                <p class="well" id="pull_well">
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }} --name customname.img<br>
                     singularity pull shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     singularity pull --name customname.img shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="pull" class="btn copyme" data-clipboard-target="#pull"><i class="fa fa-copy"></i></button>
		<div style="width:58px" class="alert alert-info hidden" id="pullb-alert" role="alert">
		</div>
            </div>
        </div>

        <!-- Sregistry Examples-->
        <div class="row">
            <div class="col-md-10">
                <p><strong><a href="https://singularityhub.github.io/sregistry-cli/client-registry" target="_blank">Singularity Global Client</a> Examples</strong></p>
                <p class="well" id="sreg_well">
                     sregistry pull {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                     sregistry search {{ collection.name }}/{{ collection.containers.first.name }}<br>
                     sregistry record {{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}<br>
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="sreg" class="btn copyme" data-clipboard-target="#sreg"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="sregb-alert" role="alert">
                </div>
            </div>
        </div>

        <!-- Shell Example-->
        <div class="row">
            <div class="col-md-10"> 
                <p><strong>Shell</strong> into the container:</p>
                <p class="well" id="shell_well">
                    singularity shell shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}
                </p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="shell" class="btn copyme" data-clipboard-target="#shell"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="shellb-alert" role="alert">
                </div>
            </div>
        </div>

        <!-- Run Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Run</strong> the container:</p>
                <p id="run_well" class="well"><br>
                    singularity run shub://{{ DOMAIN_NAKED }}/{{ collection.name }}/{{ collection.containers.first.name }}:{{ collection.containers.first.tag }}</p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="run" class="btn copyme" data-clipboard-target="#run"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="runb-alert" role="alert">
		</div>
            </div>
        </div>

        <!-- Build Example-->
        <div class="row">
            <div class="col-md-10">
                <p><strong>Build</strong> using as a base:</p>
                <p id="build_well" class="well">
                    sudo singularity build {{ collection.name }}.simg shub://{{ collection.containers.first.name }}:{{collection.containers.first.tag }}</p>
            </div>
            <div class="col-md-2">
                <button style="margin-top:55px" id="run" class="btn copyme" data-clipboard-target="#run"><i class="fa fa-copy"></i></button>
                <div style="width:58px" class="alert alert-info hidden" id="buildb-alert" role="alert">
		</div>
            </div>
        </div>


    </div>
</div>
{% include "messages/notification.html" %}
{% endblock %}

{% block scripts %}
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<script src="{% static "js/materialize.min.js"%}"></script>
<script>
$('.copyme').click(function(){
    var copy_id = $(this).attr('id')
    var content = $("#" + copy_id + "_well")
    var range = document.createRange();  
    range.selectNode(content[0])  
    window.getSelection().addRange(range)

  try {  
        // Now that we've selected the anchor text, execute the copy command  
        var successful = document.execCommand('copy');  
        var msg = successful ? 'successful' : 'unsuccessful';  
        toast_message('Copy ' + msg)
      }  catch(err) {  
        toast_message('Oops, unable to copy');  
      }  

    // removeRange(range) when it is supported  
    window.getSelection().removeAllRanges();  

});
</script>
{% endblock %}

{'fraction_non_alphanumeric': 0.18191603875134554, 'fraction_numerical': 0.007842534214977702, 'mean_word_length': 2.2355721393034824, 'pattern_counts': {'":': 0, '<': 275, '<?xml version=': 0, '>': 275, 'https://': 4, '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': '979724', 'n_tokens_mistral': 3998, 'n_tokens_neox': 3797, 'n_words': 796}