mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-10 07:13:47 -07:00
Add DB Version to About Page (#124)
This commit is contained in:
parent
b3f92ccaef
commit
e8d44d1cc2
5 changed files with 26 additions and 3 deletions
|
@ -15,6 +15,7 @@ class About extends Component {
|
||||||
version,
|
version,
|
||||||
isMonoRuntime,
|
isMonoRuntime,
|
||||||
runtimeVersion,
|
runtimeVersion,
|
||||||
|
migrationVersion,
|
||||||
appData,
|
appData,
|
||||||
startupPath,
|
startupPath,
|
||||||
mode
|
mode
|
||||||
|
@ -38,6 +39,11 @@ class About extends Component {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<DescriptionListItem
|
||||||
|
title="DB Migration"
|
||||||
|
data={migrationVersion}
|
||||||
|
/>
|
||||||
|
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title="AppData directory"
|
title="AppData directory"
|
||||||
data={appData}
|
data={appData}
|
||||||
|
@ -63,6 +69,7 @@ About.propTypes = {
|
||||||
version: PropTypes.string,
|
version: PropTypes.string,
|
||||||
isMonoRuntime: PropTypes.bool,
|
isMonoRuntime: PropTypes.bool,
|
||||||
runtimeVersion: PropTypes.string,
|
runtimeVersion: PropTypes.string,
|
||||||
|
migrationVersion: PropTypes.number,
|
||||||
appData: PropTypes.string,
|
appData: PropTypes.string,
|
||||||
startupPath: PropTypes.string,
|
startupPath: PropTypes.string,
|
||||||
mode: PropTypes.string
|
mode: PropTypes.string
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Nancy;
|
using Nancy;
|
||||||
using Nancy.Routing;
|
using Nancy.Routing;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
|
@ -67,6 +67,7 @@ namespace Lidarr.Api.V1.System
|
||||||
Branch = _configFileProvider.Branch,
|
Branch = _configFileProvider.Branch,
|
||||||
Authentication = _configFileProvider.AuthenticationMethod,
|
Authentication = _configFileProvider.AuthenticationMethod,
|
||||||
SqliteVersion = _database.Version,
|
SqliteVersion = _database.Version,
|
||||||
|
MigrationVersion = _database.Migration,
|
||||||
UrlBase = _configFileProvider.UrlBase,
|
UrlBase = _configFileProvider.UrlBase,
|
||||||
RuntimeVersion = _platformInfo.Version,
|
RuntimeVersion = _platformInfo.Version,
|
||||||
RuntimeName = PlatformInfo.Platform
|
RuntimeName = PlatformInfo.Platform
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace NzbDrone.Core.Datastore
|
||||||
{
|
{
|
||||||
IDataMapper GetDataMapper();
|
IDataMapper GetDataMapper();
|
||||||
Version Version { get; }
|
Version Version { get; }
|
||||||
|
int Migration { get; }
|
||||||
void Vacuum();
|
void Vacuum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +40,16 @@ namespace NzbDrone.Core.Datastore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Migration
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var migration = _datamapperFactory()
|
||||||
|
.ExecuteScalar("SELECT version from VersionInfo ORDER BY version DESC LIMIT 1").ToString();
|
||||||
|
return Convert.ToInt32(migration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Vacuum()
|
public void Vacuum()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using Marr.Data;
|
using Marr.Data;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Datastore
|
namespace NzbDrone.Core.Datastore
|
||||||
|
@ -24,6 +24,8 @@ namespace NzbDrone.Core.Datastore
|
||||||
|
|
||||||
public Version Version => _database.Version;
|
public Version Version => _database.Version;
|
||||||
|
|
||||||
|
public int Migration => _database.Migration;
|
||||||
|
|
||||||
public void Vacuum()
|
public void Vacuum()
|
||||||
{
|
{
|
||||||
_database.Vacuum();
|
_database.Vacuum();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using Marr.Data;
|
using Marr.Data;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Datastore
|
namespace NzbDrone.Core.Datastore
|
||||||
|
@ -24,6 +24,8 @@ namespace NzbDrone.Core.Datastore
|
||||||
|
|
||||||
public Version Version => _database.Version;
|
public Version Version => _database.Version;
|
||||||
|
|
||||||
|
public int Migration => _database.Migration;
|
||||||
|
|
||||||
public void Vacuum()
|
public void Vacuum()
|
||||||
{
|
{
|
||||||
_database.Vacuum();
|
_database.Vacuum();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue