You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/settings/update/update.component.html

93 lines
5.4 KiB

<settings-menu></settings-menu>
<wiki></wiki>
<div *ngIf="form" class="small-middle-container">
<fieldset>
<legend>Update Settings</legend>
<div class="md-form-field" style="margin-top:1em">
<div *ngIf="updateAvailable"><button mat-raised-button (click)="update()" [disabled]="!enableUpdateButton" class="btn btn-success-outline">Update</button></div>
<div *ngIf="!updateAvailable"><button mat-raised-button (click)="checkForUpdate()" class="btn btn-primary-outline">Check For Update</button></div>
</div>
<div class="md-form-field" style="margin-top:1em"></div>
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<div class="md-form-field">
<mat-slide-toggle id="autoUpdateEnabled" formControlName="autoUpdateEnabled">
<mat-mat-label for="autoUpdateEnabled">Enable Automatic Update</mat-mat-label>
</mat-slide-toggle>
</div>
<!-- <div class="md-form-field">
<mat-slide-toggle id="testMode" formControlName="testMode">
<mat-label for="testMode">Test Mode</mat-label>
</div>
</div> -->
<div class="md-form-field" *ngIf="isWindows">
<mat-slide-toggle id="windowsService" formControlName="windowsService">
<mat-label for="windowsService">Running as a Windows Service</mat-label>
</mat-slide-toggle>
</div>
<div class="md-form-field" *ngIf="!form.value.windowsService">
<mat-slide-toggle id="useScript" formControlName="useScript">
<mat-label for="useScript">Use your own updater script</mat-label>
</mat-slide-toggle>
</div>
<div class="md-form-field" style="margin-top:1em"></div>
<div *ngIf="form.value.windowsService">
<div class="md-form-field textEntry">
<mat-form-field appearance="outline" floatLabel=always><mat-label for="windowsServiceName" class="control-mat-label">Windows Service Name</mat-label>
<input matInput id="windowsServiceName" name="windowsServiceName" formControlName="windowsServiceName">
</mat-form-field>
</div>
</div>
<div [hidden]="!useScript || form.value.windowsService">
<small>For information how to use this, please press the wiki button at the top of the page</small>
<div class="md-form-field textEntry">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label for="scriptLocation" class="control-mat-label">Script Path</mat-label>
<input matInput id="scriptLocation" name="scriptLocation" formControlName="scriptLocation">
</mat-form-field>
</div>
</div>
<div [hidden]="useScript || form.value.windowsService">
<small >By default the process name is Ombi, but this could be different for your system. We need to know the process name so we can kill that process to update the files.</small>
<div class="md-form-field textEntry">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label for="processName">Ombi Process Name</mat-label>
<input matInput id="processName" placeholder="Ombi" formControlName="processName">
</mat-form-field>
</div>
</div>
<div class="md-form-field" [hidden]="useScript" *ngIf="isWindows">
<small>If you are getting any permissions issues, you can specify a user for the update process to run under.</small>
<div class="md-form-field textEntry">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label for="username" class="control-mat-label">Username</mat-label>
<input matInput id="username" name="username" formControlName="username">
</mat-form-field>
</div>
<div class="md-form-field textEntry">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label for="password">Password</mat-label>
<input matInput type="password" id="password" formControlName="password">
</mat-form-field>
</div>
</div>
<div class="md-form-field" style="margin-top:1em;">
<div>
<button mat-raised-button type="submit" color="primary" [disabled]="form.invalid" class="mat-focus-indicator mat-stroked-button accent mat-accent mat-raised-button mat-button-base" ng-reflect-disabled="false"><span class="mat-button-wrapper">Submit</span><div matripple="" class="mat-ripple mat-button-ripple" ng-reflect-disabled="false" ng-reflect-centered="false" ng-reflect-trigger="[object HTMLButtonElement]"></div><div class="mat-button-focus-overlay"></div></button>
</div>
</div>
</form>
</fieldset>
</div>