mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
parent
2e0beba738
commit
2b5e5282bd
5 changed files with 20 additions and 20 deletions
|
@ -1,13 +1,15 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Ombi.Helpers
|
||||
{
|
||||
public static class AssemblyHelper
|
||||
{
|
||||
public static string GetRuntimeVersion() =>
|
||||
Assembly.GetEntryAssembly()
|
||||
public static string GetRuntimeVersion()
|
||||
{
|
||||
var version = Assembly.GetEntryAssembly()
|
||||
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
|
||||
.InformationalVersion;
|
||||
return version.Equals("1.0.0") ? "3.0.0-DotNetCore" : version;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
import { Injectable } from "@angular/core";
|
||||
import { Http } from "@angular/http";
|
||||
import { AuthHttp } from "angular2-jwt";
|
||||
import { Observable } from "rxjs/Rx";
|
||||
|
||||
|
@ -7,11 +6,11 @@ import { ServiceAuthHelpers } from "./service.helpers";
|
|||
|
||||
@Injectable()
|
||||
export class UpdateService extends ServiceAuthHelpers {
|
||||
constructor(http: AuthHttp, private regularHttp: Http) {
|
||||
super(http, "/api/v1/Jobs/");
|
||||
constructor(http: AuthHttp) {
|
||||
super(http, "/api/v1/Job/");
|
||||
}
|
||||
public forceUpdate(): Observable<boolean> {
|
||||
return this.regularHttp.post(`${this.url}update/`, { headers: this.headers }).map(this.extractData);
|
||||
return this.http.post(`${this.url}update/`, { headers: this.headers }).map(this.extractData);
|
||||
}
|
||||
|
||||
public checkForNewUpdate(): Observable<boolean> {
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<i class="fa fa-tachometer" aria-hidden="true"></i> System <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Update']">Update (Not available)</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Update']">Update</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Logs']">Logs (Not available)</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/ScheduledJobs']">Scheduled Jobs (Not available)</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -3,7 +3,14 @@
|
|||
<div *ngIf="form">
|
||||
<fieldset>
|
||||
<legend>Update Settings</legend>
|
||||
|
||||
<div class="form-group" style="float: right">
|
||||
<div *ngIf="updateAvailable">
|
||||
<button (click)="update()" class="btn btn-success-outline">Update</button>
|
||||
</div>
|
||||
<div *ngIf="!updateAvailable">
|
||||
<button (click)="checkForUpdate()" class="btn btn-primary-outline">Check For Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)" style="padding-top:5%;">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
@ -13,16 +20,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="!updateAvailable">
|
||||
<div>
|
||||
<button (click)="checkForUpdate()" class="btn btn-primary-outline">Check For Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="updateAvailable">
|
||||
<div>
|
||||
<button (click)="update()" class="btn btn-success-outline">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile>bin\Release\netcoreapp2.0\Swagger.xml</DocumentationFile>
|
||||
<NoWarn>1701;1702;1705;1591;</NoWarn>
|
||||
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue