<commit_before><!-- Add machine button -->
<div id="create-machine" class="ui-link ui-btn ui-btn-add ui-btn-d ui-shadow floating-collapsible"
     data-role="collapsible"
     data-collapsed="true">

    <h4><span class="title">Create Machine</span></h4>

    <div id="machine-create" data-role="content" >

        <!-- Select Name -->
        <div id="create-machine-name-wrapper" class="{{if Mist.machineAddController.newMachineName 'filled' 'empty'}} required">
            <label for="create-machine-name">Name</label>
            {{view Mist.TextField
                   id="create-machine-name"
                   value=Mist.machineAddController.newMachineName}}
        </div>

        <!-- Select Provider -->
        <div id="create-machine-provider" class="required {{if Mist.machineAddController.selectedImage 'preset' ''}} {{if Mist.machineAddController.newMachineProvider.provider 'filled' 'empty'}}">
            <label>Provider</label>
            <div data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="carat-d"
                data-expanded-icon="carat-u"
                class="mist-select">
                <h4>{{#if Mist.machineAddController.newMachineProvider.provider}}
                       <span class="provider-icon-small">
                            <span class="{{Mist.machineAddController.newMachineProvider.className}}"></span>
                        </span>
                    {{/if}}
                    {{Mist.machineAddController.newMachineProvider.title}}
                </h4>

                {{#unless Mist.machineAddController.selectedImage}}
                <ul data-role="listview" >
                    {{#each Mist.backendsController.model as |backend|}}
                        {{#if backend.canCreateMachine}}
                            <li data-icon="false">
                                <a {{action "selectProvider" backend target=view}} title="{{backend.title}}">
                                    <span class="provider-icon-small">
                                        <span class={{backend.className}}></span>
                                    </span>
                                    {{backend.title}}
                                </a>
                            </li>
                        {{/if}}
                    {{/each}}
                </ul>
                {{/unless}}
            </div>
        </div>

        <!-- Libvirt -->
        {{#if view.hasLibvirt}}

            <!-- Libvirt RAM -->
            <label for="create-machine-libvirt-ram">RAM</label>
            <div id="create-machine-libvirt-ram"
                data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="check"
                data-expanded-icon="arrow-u"
                data-theme="a"
                class="mist-select">
                <h4>{{Mist.machineAddController.newMachineLibvirtRAM}} MB</h4>
                <ul data-role="listview" data-theme="a">
                {{#each view.newMachineLibvirtRAMOptions as |ram|}}
                    <li data-icon="false">
                        <a {{action "selectRAM" ram target="view"}}>{{ram}} MB</a>
                    </li>
                {{/each}}
                </ul>
            </div>

            <!-- Libvirt CPU -->
            <label for="create-machine-libvirt-cpu">CPU</label>
            <div id="create-machine-libvirt-cpu"
                data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="check"
                data-expanded-icon="arrow-u"
                data-theme="a"
                class="mist-select">
                <h4>{{Mist.machineAddController.newMachineLibvirtCPU}}</h4>
                <ul data-role="listview" data-theme="a">
                {{#each view.newMachineLibvirtCPUOptions as |cpu|}}
                    <li data-icon="false">
                        <a {{action "selectCPU" cpu target="view"}}>{{cpu}}</a>
                    </li>
                {{/each}}
                </ul>
            </div>

            <label>Image</label>
            <div id="create-machine-image"
                 data-role="collapsible"
                 data-iconpos="right"
                 data-collapsed-icon="arrow-d"
                 data-expanded-icon="arrow-u"
                 data-theme="a"
                 class="mist-select">
                <h4>
                    {{#if Mist.machineAddController.newMachineImage.id}}
                        <span class="image-icon-small">
                            <span {{bind-attr class="Mist.machineAddController.newMachineImage.className"}}>
                            </span>
                        </span>
                    {{/if}}
                    {{Mist.machineAddController.newMachineImage.name}}
                </h4>
                <ul data-role="listview" data-theme="a">
                    {{#each Mist.machineAddController.newMachineProvider.images.model as |image|}}
                        {{#unless Mist.machineAddController.newMachineProvider.images.hasStarred}}
                            <li data-icon="false">
                                <span class="image-icon-small">
                                    <span class="{{image.className}}"></span>
                                </span>
                                <a {{action "selectImage" image target="view"}}>{{image.name}}</a>
                            </li>
                        {{else}} {{#if image.star}}
                            <li data-icon="false">
                                <a {{action "selectImage" image target="view"}}>
                                    <span class="image-icon-small">
                                        <span class="{{image.className}}"></span>
                                    </span>
                                    {{image.name}}
                                </a>
                            </li>
                        {{/if}} {{/unless}}
                    {{/each}}
                </ul>
            </div>

            <label for="create-machine-disk-path">Path to create VM's disk</label>
            {{view Mist.TextField
                   id="create-machine-disk-path"
                   data-theme="a"
                   value=Mist.machineAddController.newMachineLibvirtDiskPath}}

            <label for="create-machine-disk-size">Disk Size (GB)</label>
            {{view Mist.TextField
                   id="create-machine-disk-size"
                   data-theme="a"
                   value=Mist.machineAddController.newMachineLibvirtDiskSize}}

            <label for="create-machine-libvirt-advanced">Advanced Settings</label>
            <div id="create-machine-libvirt-advanced">
                <select class="toggle-field" data-theme="a" data-role="slider"
                {{action "switchLibvirtAdvanced" field on="change" target="view"}}>
                    <option value="0">No</option>
                    <option value="1">Yes</option>
                </select>
            </div>

            {{#if view.hasLibvirtAdvanced}}
            <div id="create-machine-libvirt-advanced-options">
                <label for="create-machine-disk-size">Specify an .iso image to create VM from</label>
                {{view Mist.TextField
                       id="create-machine-image-path"
                       data-theme="a"
                       value=Mist.machineAddController.newMachineLibvirtImagePath}}

                <label for="create-machine-existing-disk-path">Specify an existing disk image to create VM from</label>
                {{view Mist.TextField
                       id="create-machine-existing-disk-path"
                       data-theme="a"
                       value=Mist.machineAddController.newMachineLibvirtExistingDiskPath}}
            </div>
            {{/if}}
        {{else}}
        <!-- All Except Libvirt -->

            <!-- Select Image -->
            <div id="create-machine-image" class="required {{if Mist.machineAddController.selectedImage 'preset' ''}} {{if Mist.machineAddController.newMachineProvider.provider '' 'ui-state-disabled'}} {{if Mist.machineAddController.newMachineImage.id 'filled' 'empty'}}"><commit_msg>fix labels on create machine wizard<commit_after><!-- Add machine button -->
<div id="create-machine" class="ui-link ui-btn ui-btn-add ui-btn-d ui-shadow floating-collapsible"
     data-role="collapsible"
     data-collapsed="true">

    <h4><span class="title">Create Machine</span></h4>

    <div id="machine-create" data-role="content" >

        <!-- Select Name -->
        <div id="create-machine-name-wrapper" class="{{if Mist.machineAddController.newMachineName 'filled' 'empty'}} required">
            <label for="create-machine-name">Name</label>
            {{view Mist.TextField
                   id="create-machine-name"
                   value=Mist.machineAddController.newMachineName}}
        </div>

        <!-- Select Provider -->
        <div id="create-machine-provider" class="required {{if Mist.machineAddController.selectedImage 'preset' ''}} {{if Mist.machineAddController.newMachineProvider.provider 'filled' 'empty'}}">
            <label>Provider</label>
            <div data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="carat-d"
                data-expanded-icon="carat-u"
                class="mist-select">
                <h4>{{#if Mist.machineAddController.newMachineProvider.provider}}
                       <span class="provider-icon-small">
                            <span class="{{Mist.machineAddController.newMachineProvider.className}}"></span>
                        </span>
                    {{/if}}
                    {{Mist.machineAddController.newMachineProvider.title}}
                </h4>

                {{#unless Mist.machineAddController.selectedImage}}
                <ul data-role="listview" >
                    {{#each Mist.backendsController.model as |backend|}}
                        {{#if backend.canCreateMachine}}
                            <li data-icon="false">
                                <a {{action "selectProvider" backend target=view}} title="{{backend.title}}">
                                    <span class="provider-icon-small">
                                        <span class={{backend.className}}></span>
                                    </span>
                                    {{backend.title}}
                                </a>
                            </li>
                        {{/if}}
                    {{/each}}
                </ul>
                {{/unless}}
            </div>
        </div>

        <!-- Libvirt -->
        {{#if view.hasLibvirt}}

            <!-- Libvirt RAM -->
            <label for="create-machine-libvirt-ram">RAM</label>
            <div id="create-machine-libvirt-ram"
                data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="check"
                data-expanded-icon="arrow-u"
                data-theme="a"
                class="mist-select">
                <h4>{{Mist.machineAddController.newMachineLibvirtRAM}} MB</h4>
                <ul data-role="listview" data-theme="a">
                {{#each view.newMachineLibvirtRAMOptions as |ram|}}
                    <li data-icon="false">
                        <a {{action "selectRAM" ram target="view"}}>{{ram}} MB</a>
                    </li>
                {{/each}}
                </ul>
            </div>

            <!-- Libvirt CPU -->
            <label for="create-machine-libvirt-cpu">CPU</label>
            <div id="create-machine-libvirt-cpu"
                data-role="collapsible"
                data-iconpos="right"
                data-collapsed-icon="check"
                data-expanded-icon="arrow-u"
                data-theme="a"
                class="mist-select">
                <h4>{{Mist.machineAddController.newMachineLibvirtCPU}}</h4>
                <ul data-role="listview" data-theme="a">
                {{#each view.newMachineLibvirtCPUOptions as |cpu|}}
                    <li data-icon="false">
                        <a {{action "selectCPU" cpu target="view"}}>{{cpu}}</a>
                    </li>
                {{/each}}
                </ul>
            </div>

            <label>Image</label>
            <div id="create-machine-image"
                 data-role="collapsible"
                 data-iconpos="right"
                 data-collapsed-icon="arrow-d"
                 data-expanded-icon="arrow-u"
                 data-theme="a"
                 class="mist-select">
                <h4>
                    {{#if Mist.machineAddController.newMachineImage.id}}
                        <span class="image-icon-small">
                            <span {{bind-attr class="Mist.machineAddController.newMachineImage.className"}}>
                            </span>
                        </span>
                    {{/if}}
                    {{Mist.machineAddController.newMachineImage.name}}
                </h4>
                <ul data-role="listview" data-theme="a">
                    {{#each Mist.machineAddController.newMachineProvider.images.model as |image|}}
                        {{#unless Mist.machineAddController.newMachineProvider.images.hasStarred}}
                            <li data-icon="false">
                                <span class="image-icon-small">
                                    <span class="{{image.className}}"></span>
                                </span>
                                <a {{action "selectImage" image target="view"}}>{{image.name}}</a>
                            </li>
                        {{else}} {{#if image.star}}
                            <li data-icon="false">
                                <a {{action "selectImage" image target="view"}}>
                                    <span class="image-icon-small">
                                        <span class="{{image.className}}"></span>
                                    </span>
                                    {{image.name}}
                                </a>
                            </li>
                        {{/if}} {{/unless}}
                    {{/each}}
                </ul>
            </div>

            <label for="create-machine-disk-path">Path to create VM's disk</label>
            {{view Mist.TextField
                   id="create-machine-disk-path"
                   data-theme="a"
                   value=Mist.machineAddController.newMachineLibvirtDiskPath}}

            <label for="create-machine-disk-size">Disk Size (GB)</label>
            {{view Mist.TextField
                   id="create-machine-disk-size"
                   data-theme="a"
                   value=Mist.machineAddController.newMachineLibvirtDiskSize}}

            <label for="create-machine-libvirt-advanced">Advanced Settings</label>
            <div id="create-machine-libvirt-advanced">
                <select class="toggle-field" data-theme="a" data-role="slider"
                {{action "switchLibvirtAdvanced" field on="change" target="view"}}>
                    <option value="0">No</option>
                    <option value="1">Yes</option>
                </select>
            </div>

            {{#if view.hasLibvirtAdvanced}}
            <div id="create-machine-libvirt-advanced-options">
                <label for="create-machine-disk-size">.iso image path to create VM from</label>
                {{view Mist.TextField
                       id="create-machine-image-path"
                       data-theme="a"
                       value=Mist.machineAddController.newMachineLibvirtImagePath}}

                <label for="create-machine-existing-disk-path">Existing disk image to create VM from</label>
                {{view Mist.TextField
                       id="create-machine-existing-disk-path"
                       data-theme="a"
                       value=Mist.machineAddController.newMachineLibvirtExistingDiskPath}}
            </div>
            {{/if}}
        {{else}}
        <!-- All Except Libvirt -->

            <!-- Select Image -->
            <div id="create-machine-image" class="required {{if Mist.machineAddController.selectedImage 'preset' ''}} {{if Mist.machineAddController.newMachineProvider.provider '' 'ui-state-disabled'}} {{if Mist.machineAddController.newMachineImage.id 'filled' 'empty'}}">
{'fraction_non_alphanumeric': 0.13508782519466409, 'fraction_numerical': 0.0014486630047685157, 'mean_word_length': 1.3188243526941918, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 0, '>': 229, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6714771', 'n_tokens_mistral': 4254, 'n_tokens_neox': 3972, 'n_words': 651}