<commit_before><modal title="Modify Printer Details" visible="printerModal.show">
	<uib-alert ng-repeat="alert in printerModal.alerts" type="{{alert.type}}" close="printerModal.closeAlertIdx($index)"> {{alert.msg}}</uib-alert>
	<form name="printerForm" role="form" ng-submit="updatePrinter(printerProfile)" ng-init="printerProfile = {}" novalidate>
        <div class="form-group" show-errors>
            <label for="friendly_id">Name</label>
            <input autocomplete="off" name="friendly_id" ng-model="printerProfile.friendly_id" type="text" class="form-control" placeholder="{{printer.friendly_id}}" ng-minlength="4" />
            <span ng-show="printerForm.friendly_id.$error.minlength" class="help-block">Name is too short. Must be at least 4 characters.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="manufacturer">Manufacturer</label>
            <input autocomplete="off" name="manufacturer" ng-model="printerProfile.manufacturer" type="text" class="form-control" placeholder="{{printer.manufacturer}}" ng-minlength="1" />
            <span ng-show="printerForm.manufacturer.$error.minlength" class="help-block">Must be at least 1 character long.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="model">Model</label>
            <input autocomplete="off" name="model" ng-model="printerProfile.model" type="text" class="form-control" placeholder="{{printer.model}}" ng-minlength="1" />
            <span ng-show="printerForm.model.$error.minlength" class="help-block">Must be at least 1 character long.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="description">Description</label>
            <input autocomplete="off" name="description" ng-model="printerProfile.description" type="text" class="form-control" placeholder="{{printer.description}}" ng-minlength="1" ng-maxlength="256" />
            <span ng-show="printerForm.description.$error.minlength" class="help-block">Must be at least 1 character long.</span>
            <span ng-show="printerForm.description.$error.maxlength" class="help-block">Must not be longer than 256 characters.</span>
        </div>
    	<button type="submit" class="btn btn-success"><i class="fa fa-save"></i> Save Changes</button>
    	<button type="button" ng-click="printerModal.show = !printerModal.show" class="btn btn-warning"><i class="fa fa-times"></i> Close</button>
    </form>
</modal>

<modal title="Cancel Current Job" visible="cancelJobModal.show">
	<p class="alert alert-warning">
		<i class="fa fa-exclamation-triangle"></i> Are you sure that you want to cancel the current print job? This action is <strong>not reversible</strong>.
	</p>
	<button type="button" class="btn btn-danger" ng-click="command.name = 'cancel'; cancelJobModal.show = !cancelJobModal.show"><i class="fa fa-check-circle"></i> Yes, Cancel Job Now</button>
	<button type="button" class="btn btn-warning" ng-click="cancelJobModal.show = !cancelJobModal.show"><i class="fa fa-times"></i> Nevermind</button>
</modal>

<div id="printer" class="resource-page">
    <div class="row">
        <div class="col-lg-12">
        	<div class="page-header row">
        		<div class="col-lg-9">
	            <h1>
		          <a 
		          	ng-if="printer.status === 'ready' || printer.status === 'printing' || printer.status === 'completed'" 
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-success">
		          			<i class="fa fa-check-circle"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>

		          <a 
		          	ng-if="printer.status === 'errored' || printer.status === 'offline'" 
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-danger">
		          			<i class="fa fa-times-circle"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>

		          <a 
		          	ng-if="printer.status === 'paused' || printer.status === 'cancelled'"
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-default">
		          			<i class="fa fa-pause"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>
	            </h1>
	            
	            <p>
		            <a style="text-decoration:none;" href="javascript:void;"><span class="label label-default" tooltip-close-delay="200"
		          	uib-tooltip="This printer was manufactured by {{::printer.manufacturer}}.">
		            	<i class="fa fa-tag"></i> {{printer.manufacturer}}
		            </span></a>
					&nbsp;
		            <a style="text-decoration:none;" href="javascript:void;"><span class="label label-success" tooltip-close-delay="200"
		          	uib-tooltip="The model of this printer is {{::printer.model}}.">
		            	<i class="fa fa-tag"></i> {{printer.model}}
		            </span></a>
	            </p>

	            <p class="desc">{{printer.description}}</p>
	            </div>

	            <div class="col-lg-3">
	            	<p class="text-right" style="padding-top:45px;">
	            		<button class="btn btn-info" href="javascript:void" ng-click="printerModal.show = !printerModal.show">Modify Details <i class="fa fa-pencil-square"></i></button>
	            	</p>
	            </div>
            </div>
        </div>
    </div>
    <!--Current Print Job Panel-->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading"><i class="fa fa-cog fa-spin"></i> Current Job</div>
                <div class="panel-body">
				<!--No current job Alert-->
                <p ng-if="!currentJob.id" class="alert alert-warning no-margin"><i class="fa fa-exclamation-triangle"></i> There are currently no jobs printing.</p>

                <!--Current Job-->
               	<div ng-if="currentJob.id">
                	<!--Alert-->
                	<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlertIdx($index)"> {{alert.msg}}</uib-alert>
<commit_msg>Modify printer only for admins<commit_after><modal title="Modify Printer Details" visible="printerModal.show">
	<uib-alert ng-repeat="alert in printerModal.alerts" type="{{alert.type}}" close="printerModal.closeAlertIdx($index)"> {{alert.msg}}</uib-alert>
	<form name="printerForm" role="form" ng-submit="updatePrinter(printerProfile)" ng-init="printerProfile = {}" novalidate>
        <div class="form-group" show-errors>
            <label for="friendly_id">Name</label>
            <input autocomplete="off" name="friendly_id" ng-model="printerProfile.friendly_id" type="text" class="form-control" placeholder="{{printer.friendly_id}}" ng-minlength="4" />
            <span ng-show="printerForm.friendly_id.$error.minlength" class="help-block">Name is too short. Must be at least 4 characters.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="manufacturer">Manufacturer</label>
            <input autocomplete="off" name="manufacturer" ng-model="printerProfile.manufacturer" type="text" class="form-control" placeholder="{{printer.manufacturer}}" ng-minlength="1" />
            <span ng-show="printerForm.manufacturer.$error.minlength" class="help-block">Must be at least 1 character long.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="model">Model</label>
            <input autocomplete="off" name="model" ng-model="printerProfile.model" type="text" class="form-control" placeholder="{{printer.model}}" ng-minlength="1" />
            <span ng-show="printerForm.model.$error.minlength" class="help-block">Must be at least 1 character long.</span>
        </div>
        <div class="form-group" show-errors>
            <label for="description">Description</label>
            <input autocomplete="off" name="description" ng-model="printerProfile.description" type="text" class="form-control" placeholder="{{printer.description}}" ng-minlength="1" ng-maxlength="256" />
            <span ng-show="printerForm.description.$error.minlength" class="help-block">Must be at least 1 character long.</span>
            <span ng-show="printerForm.description.$error.maxlength" class="help-block">Must not be longer than 256 characters.</span>
        </div>
    	<button type="submit" class="btn btn-success"><i class="fa fa-save"></i> Save Changes</button>
    	<button type="button" ng-click="printerModal.show = !printerModal.show" class="btn btn-warning"><i class="fa fa-times"></i> Close</button>
    </form>
</modal>

<modal title="Cancel Current Job" visible="cancelJobModal.show">
	<p class="alert alert-warning">
		<i class="fa fa-exclamation-triangle"></i> Are you sure that you want to cancel the current print job? This action is <strong>not reversible</strong>.
	</p>
	<button type="button" class="btn btn-danger" ng-click="command.name = 'cancel'; cancelJobModal.show = !cancelJobModal.show"><i class="fa fa-check-circle"></i> Yes, Cancel Job Now</button>
	<button type="button" class="btn btn-warning" ng-click="cancelJobModal.show = !cancelJobModal.show"><i class="fa fa-times"></i> Nevermind</button>
</modal>

<div id="printer" class="resource-page">
    <div class="row">
        <div class="col-lg-12">
        	<div class="page-header row">
        		<div class="col-lg-9">
	            <h1>
		          <a 
		          	ng-if="printer.status === 'ready' || printer.status === 'printing' || printer.status === 'completed'" 
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-success">
		          			<i class="fa fa-check-circle"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>

		          <a 
		          	ng-if="printer.status === 'errored' || printer.status === 'offline'" 
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-danger">
		          			<i class="fa fa-times-circle"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>

		          <a 
		          	ng-if="printer.status === 'paused' || printer.status === 'cancelled'"
		          	href="javascript:void" tooltip-placement="bottom" 
		          	tooltip-close-delay="200"
		          	uib-tooltip="This printer is currently {{::printer.status | uppercase}}.">
		          		<span class="label label-default">
		          			<i class="fa fa-pause"></i>
		          			{{printer.friendly_id}}
		          		</span>
		          </a>
	            </h1>
	            
	            <p>
		            <a style="text-decoration:none;" href="javascript:void;"><span class="label label-default" tooltip-close-delay="200"
		          	uib-tooltip="This printer was manufactured by {{::printer.manufacturer}}.">
		            	<i class="fa fa-tag"></i> {{printer.manufacturer}}
		            </span></a>
					&nbsp;
		            <a style="text-decoration:none;" href="javascript:void;"><span class="label label-success" tooltip-close-delay="200"
		          	uib-tooltip="The model of this printer is {{::printer.model}}.">
		            	<i class="fa fa-tag"></i> {{printer.model}}
		            </span></a>
	            </p>

	            <p class="desc">{{printer.description}}</p>
	            </div>

	            <div class="col-lg-3">
	            	<p class="text-right" style="padding-top:45px;" ng-if="user.isAdmin()">
	            		<button class="btn btn-info" href="javascript:void" ng-click="printerModal.show = !printerModal.show">Modify Details <i class="fa fa-pencil-square"></i></button>
	            	</p>
	            </div>
            </div>
        </div>
    </div>
    <!--Current Print Job Panel-->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading"><i class="fa fa-cog fa-spin"></i> Current Job</div>
                <div class="panel-body">
				<!--No current job Alert-->
                <p ng-if="!currentJob.id" class="alert alert-warning no-margin"><i class="fa fa-exclamation-triangle"></i> There are currently no jobs printing.</p>

                <!--Current Job-->
               	<div ng-if="currentJob.id">
                	<!--Alert-->
                	<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlertIdx($index)"> {{alert.msg}}</uib-alert>

{'fraction_non_alphanumeric': 0.17156564118184586, 'fraction_numerical': 0.005939689308559245, 'mean_word_length': 2.598082191780822, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 267, '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': '1206909', 'n_tokens_mistral': 4190, 'n_tokens_neox': 3851, 'n_words': 785}