mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Fixed the custom image issue on the login page Fixed the bug when clicking on the tab on the requests page it would switch to the wrong one Swagger is now back @ /swagger
This commit is contained in:
parent
e1ceb4c66e
commit
ccb1bd30d0
8 changed files with 45 additions and 18 deletions
|
@ -133,7 +133,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
}
|
}
|
||||||
|
|
||||||
Ctx.WriteLine("Starting Download");
|
Ctx.WriteLine("Starting Download");
|
||||||
await DownloadAsync(download.Url, zipDir);
|
await DownloadAsync(download.Url, zipDir, c);
|
||||||
Ctx.WriteLine("Finished Download");
|
Ctx.WriteLine("Finished Download");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -195,10 +195,15 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task DownloadAsync(string requestUri, string filename)
|
public static async Task DownloadAsync(string requestUri, string filename, PerformContext ctx)
|
||||||
{
|
{
|
||||||
using (var client = new WebClient())
|
using (var client = new WebClient())
|
||||||
{
|
{
|
||||||
|
ctx.WriteProgressBar();
|
||||||
|
client.DownloadProgressChanged += (s, e) =>
|
||||||
|
{
|
||||||
|
ctx.WriteProgressBar(e.ProgressPercentage);
|
||||||
|
};
|
||||||
await client.DownloadFileTaskAsync(requestUri, filename);
|
await client.DownloadFileTaskAsync(requestUri, filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ include the remember me checkbox
|
||||||
<div class="card card-container">
|
<div class="card card-container">
|
||||||
<!-- <img class="profile-img-card" src="//lh3.googleusercontent.com/-6V8xOA6M7BA/AAAAAAAAAAI/AAAAAAAAAAA/rzlHcD0KYwo/photo.jpg?sz=120" alt="" /> -->
|
<!-- <img class="profile-img-card" src="//lh3.googleusercontent.com/-6V8xOA6M7BA/AAAAAAAAAAI/AAAAAAAAAAA/rzlHcD0KYwo/photo.jpg?sz=120" alt="" /> -->
|
||||||
<div *ngIf="!customizationSettings.logo"><img id="profile-img" class="profile-img-card" src="/images/ms-icon-150x150.png" /></div>
|
<div *ngIf="!customizationSettings.logo"><img id="profile-img" class="profile-img-card" src="/images/ms-icon-150x150.png" /></div>
|
||||||
<div *ngIf="customizationSettings.logo"><img id="profile-img" class="profile-img-custom" [src]="customizationSettings.logo" /></div>
|
<div *ngIf="customizationSettings.logo"><img id="profile-img" class="center" [src]="customizationSettings.logo" /></div>
|
||||||
<p id="profile-name" class="profile-name-card"></p>
|
<p id="profile-name" class="profile-name-card"></p>
|
||||||
|
|
||||||
<form class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
<form class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
||||||
|
|
|
@ -23,6 +23,11 @@ landingDiv {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.center {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
img.bg {
|
img.bg {
|
||||||
/* Set rules to fill background */
|
/* Set rules to fill background */
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
||||||
<li role="presentation" class="active">
|
<li role="presentation" class="active">
|
||||||
<a id="movieTabButton" aria-controls="home" role="tab" data-toggle="tab" (click)="selectTab()"><i class="fa fa-film"></i> Movies</a>
|
<a id="movieTabButton" aria-controls="home" role="tab" data-toggle="tab" (click)="selectMovieTab()"><i class="fa fa-film"></i> Movies</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a id="tvTabButton" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTab()"><i class="fa fa-television"></i> TV Shows</a>
|
<a id="tvTabButton" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTvTab()"><i class="fa fa-television"></i> TV Shows</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -8,9 +8,13 @@ export class RequestComponent {
|
||||||
public showMovie = true;
|
public showMovie = true;
|
||||||
public showTv = false;
|
public showTv = false;
|
||||||
|
|
||||||
public selectTab() {
|
public selectMovieTab() {
|
||||||
this.showMovie = !this.showMovie;
|
this.showMovie = true;
|
||||||
this.showTv = !this.showTv;
|
this.showTv = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public selectTvTab() {
|
||||||
|
this.showMovie = false;
|
||||||
|
this.showTv = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
|
||||||
|
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/About']"><i class="fa fa-question" aria-hidden="true"></i> About</a></li>
|
||||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Ombi']">Ombi</a></li>
|
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Ombi']">Ombi</a></li>
|
||||||
|
|
||||||
<li class="dropdown" [routerLinkActive]="['active']">
|
<li class="dropdown" [routerLinkActive]="['active']">
|
||||||
|
@ -22,14 +24,14 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown" [routerLinkActive]="['active']">
|
<li class="dropdown" [routerLinkActive]="['active']">
|
||||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="fa fa-television" aria-hidden="true"></i> TV <span class="caret"></span>
|
<i class="fa fa-television" aria-hidden="true"></i> TV <span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Sonarr']" >Sonarr</a></li>
|
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Sonarr']">Sonarr</a></li>
|
||||||
<li [routerLinkActive]="['active']"><a>More Coming Soon...</a></li>
|
<li [routerLinkActive]="['active']"><a>More Coming Soon...</a></li>
|
||||||
<!--<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/SickRage']" >SickRage</a></li>-->
|
<!--<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/SickRage']">SickRage</a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -62,12 +64,11 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="dropdown" [routerLinkActive]="['active']">
|
<li class="dropdown" [routerLinkActive]="['active']">
|
||||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="fa fa-tachometer" aria-hidden="true"></i> System <span class="caret"></span>
|
<i class="fa fa-tachometer" aria-hidden="true"></i> System <span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/About']">About</a></li>
|
|
||||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Update']">Update</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/Logs']">Logs (Not available)</a></li>
|
||||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/ScheduledJobs']">Scheduled Jobs (Not available)</a></li>
|
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/ScheduledJobs']">Scheduled Jobs (Not available)</a></li>
|
||||||
|
|
|
@ -168,6 +168,7 @@ namespace Ombi
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|
||||||
//ApiKeyMiddlewear(app, serviceProvider);
|
//ApiKeyMiddlewear(app, serviceProvider);
|
||||||
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI(c =>
|
app.UseSwaggerUI(c =>
|
||||||
{
|
{
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
|
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Ombi
|
||||||
{
|
{
|
||||||
Version = "v1",
|
Version = "v1",
|
||||||
Title = "Ombi Api",
|
Title = "Ombi Api",
|
||||||
Description = "The API for Ombi, most of these calls require an auth token that you can get from calling POST:\"/connect/token/\" with the body of: \n {\n\"username\":\"YOURUSERNAME\",\n\"password\":\"YOURPASSWORD\"\n} \n" +
|
Description = "The API for Ombi, most of these calls require an auth token that you can get from calling POST:\"/api/v1/token\" with the body of: \n {\n\"username\":\"YOURUSERNAME\",\n\"password\":\"YOURPASSWORD\"\n} \n" +
|
||||||
"You can then use the returned token in the JWT Token field e.g. \"Bearer Token123xxff\"",
|
"You can then use the returned token in the JWT Token field e.g. \"Bearer Token123xxff\"",
|
||||||
Contact = new Contact
|
Contact = new Contact
|
||||||
{
|
{
|
||||||
|
@ -44,20 +44,31 @@ namespace Ombi
|
||||||
{
|
{
|
||||||
Console.WriteLine(e);
|
Console.WriteLine(e);
|
||||||
}
|
}
|
||||||
c.AddSecurityDefinition("Bearer", new ApiKeyScheme()
|
c.AddSecurityDefinition("Bearer", new JwtBearer
|
||||||
{
|
{
|
||||||
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
|
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
|
||||||
Name = "Authorization",
|
Name = "Authorization",
|
||||||
In = "header",
|
In = "header",
|
||||||
Type = "apiKey"
|
Type = "apiKey",
|
||||||
});
|
});
|
||||||
|
|
||||||
c.AddSecurityDefinition("Authentication", new ApiKeyScheme());
|
|
||||||
c.OperationFilter<SwaggerOperationFilter>();
|
c.OperationFilter<SwaggerOperationFilter>();
|
||||||
c.DescribeAllParametersInCamelCase();
|
c.DescribeAllParametersInCamelCase();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class JwtBearer : SecurityScheme
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string In { get; set; }
|
||||||
|
|
||||||
|
public JwtBearer()
|
||||||
|
{
|
||||||
|
this.Type = "bearer";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void AddAppSettingsValues(this IServiceCollection services, IConfigurationRoot configuration)
|
public static void AddAppSettingsValues(this IServiceCollection services, IConfigurationRoot configuration)
|
||||||
{
|
{
|
||||||
services.Configure<ApplicationSettings>(configuration.GetSection("ApplicationSettings"));
|
services.Configure<ApplicationSettings>(configuration.GetSection("ApplicationSettings"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue