New: Multi target net framework 4.6.2 and net core 3.0

This commit is contained in:
ta264
2019-10-14 22:42:30 +01:00
committed by Qstick
parent d0f13e16d5
commit 057829c3b0
112 changed files with 1056 additions and 1254 deletions

View File

@@ -54,6 +54,37 @@ const mapDispatchToProps = {
dispatchFetchTagDetails: fetchTagDetails
};
function Logger(minimumLogLevel) {
this.minimumLogLevel = minimumLogLevel;
}
Logger.prototype.cleanse = function(message) {
const apikey = new RegExp(`access_token=${window.Radarr.apiKey}`, 'g');
return message.replace(apikey, 'access_token=(removed)');
};
Logger.prototype.log = function(logLevel, message) {
// see https://github.com/aspnet/AspNetCore/blob/21c9e2cc954c10719878839cd3f766aca5f57b34/src/SignalR/clients/ts/signalr/src/Utils.ts#L147
if (logLevel >= this.minimumLogLevel) {
switch (logLevel) {
case signalR.LogLevel.Critical:
case signalR.LogLevel.Error:
console.error(`[signalR] ${signalR.LogLevel[logLevel]}: ${this.cleanse(message)}`);
break;
case signalR.LogLevel.Warning:
console.warn(`[signalR] ${signalR.LogLevel[logLevel]}: ${this.cleanse(message)}`);
break;
case signalR.LogLevel.Information:
console.info(`[signalR] ${signalR.LogLevel[logLevel]}: ${this.cleanse(message)}`);
break;
default:
// console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug
console.log(`[signalR] ${signalR.LogLevel[logLevel]}: ${this.cleanse(message)}`);
break;
}
}
};
class SignalRConnector extends Component {
//
@@ -71,6 +102,7 @@ class SignalRConnector extends Component {
const url = `${window.Radarr.urlBase}/signalr/messages`;
this.connection = new signalR.HubConnectionBuilder()
.configureLogging(new Logger(signalR.LogLevel.Information))
.withUrl(`${url}?access_token=${window.Radarr.apiKey}`)
.withAutomaticReconnect({
nextRetryDelayInMilliseconds: (retryContext) => {

View File

@@ -97,7 +97,6 @@ class GeneralSettings extends Component {
settings,
hasSettings,
isResettingApiKey,
isMono,
isWindows,
isWindowsService,
mode,
@@ -162,7 +161,7 @@ class GeneralSettings extends Component {
<UpdateSettings
advancedSettings={advancedSettings}
settings={settings}
isMono={isMono}
isWindows={isWindows}
onInputChange={onInputChange}
/>
@@ -203,7 +202,6 @@ GeneralSettings.propTypes = {
settings: PropTypes.object.isRequired,
isResettingApiKey: PropTypes.bool.isRequired,
hasSettings: PropTypes.bool.isRequired,
isMono: PropTypes.bool.isRequired,
isWindows: PropTypes.bool.isRequired,
isWindowsService: PropTypes.bool.isRequired,
mode: PropTypes.string.isRequired,

View File

@@ -24,7 +24,6 @@ function createMapStateToProps() {
return {
advancedSettings,
isResettingApiKey,
isMono: systemStatus.isMono,
isWindows: systemStatus.isWindows,
isWindowsService: systemStatus.isWindows && systemStatus.mode === 'service',
mode: systemStatus.mode,

View File

@@ -88,7 +88,7 @@ function HostSettings(props) {
</FormGroup>
{
enableSsl.value &&
enableSsl.value ?
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
@@ -104,11 +104,12 @@ function HostSettings(props) {
onChange={onInputChange}
{...sslPort}
/>
</FormGroup>
</FormGroup> :
null
}
{
enableSsl.value &&
enableSsl.value ?
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
@@ -123,11 +124,12 @@ function HostSettings(props) {
onChange={onInputChange}
{...sslCertPath}
/>
</FormGroup>
</FormGroup> :
null
}
{
enableSsl.value &&
enableSsl.value ?
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
@@ -142,7 +144,8 @@ function HostSettings(props) {
onChange={onInputChange}
{...sslCertPassword}
/>
</FormGroup>
</FormGroup> :
null
}
{

View File

@@ -10,7 +10,7 @@ function UpdateSettings(props) {
const {
advancedSettings,
settings,
isMono,
isWindows,
onInputChange
} = props;
@@ -49,7 +49,7 @@ function UpdateSettings(props) {
</FormGroup>
{
isMono &&
!isWindows &&
<div>
<FormGroup
advancedSettings={advancedSettings}
@@ -110,7 +110,7 @@ function UpdateSettings(props) {
UpdateSettings.propTypes = {
advancedSettings: PropTypes.bool.isRequired,
settings: PropTypes.object.isRequired,
isMono: PropTypes.bool.isRequired,
isWindows: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired
};

View File

@@ -38,7 +38,7 @@ class MediaManagement extends Component {
error,
settings,
hasSettings,
isMono,
isWindows,
onInputChange,
onSavePress,
...otherProps
@@ -118,7 +118,7 @@ class MediaManagement extends Component {
legend="Importing"
>
{
isMono &&
!isWindows &&
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
@@ -319,7 +319,7 @@ class MediaManagement extends Component {
</FieldSet>
{
advancedSettings && isMono &&
advancedSettings && !isWindows &&
<FieldSet
legend="Permissions"
>
@@ -424,7 +424,7 @@ MediaManagement.propTypes = {
error: PropTypes.object,
settings: PropTypes.object.isRequired,
hasSettings: PropTypes.bool.isRequired,
isMono: PropTypes.bool.isRequired,
isWindows: PropTypes.bool.isRequired,
onSavePress: PropTypes.func.isRequired,
onInputChange: PropTypes.func.isRequired
};

View File

@@ -22,7 +22,7 @@ function createMapStateToProps() {
advancedSettings,
...sectionSettings,
hasPendingChanges: !_.isEmpty(namingSettings.pendingChanges) || sectionSettings.hasPendingChanges,
isMono: systemStatus.isMono
isWindows: systemStatus.isWindows
};
}
);

View File

@@ -15,7 +15,8 @@ class About extends Component {
render() {
const {
version,
isMonoRuntime,
isNetCore,
isMono,
isDocker,
runtimeVersion,
migrationVersion,
@@ -36,18 +37,26 @@ class About extends Component {
/>
{
isMonoRuntime &&
isMono &&
<DescriptionListItem
title="Mono Version"
data={runtimeVersion}
/>
}
{
isNetCore &&
<DescriptionListItem
title=".NET Core"
data={'Yes'}
/>
}
{
isDocker &&
<DescriptionListItem
title="Docker"
data={'True'}
data={'Yes'}
/>
}
@@ -90,7 +99,8 @@ class About extends Component {
About.propTypes = {
version: PropTypes.string.isRequired,
isMonoRuntime: PropTypes.bool.isRequired,
isNetCore: PropTypes.bool.isRequired,
isMono: PropTypes.bool.isRequired,
runtimeVersion: PropTypes.string.isRequired,
isDocker: PropTypes.bool.isRequired,
migrationVersion: PropTypes.number.isRequired,