Skip to content

Commit

Permalink
Merge pull request #57 from luizen/14-implement-web-front-end
Browse files Browse the repository at this point in the history
14 implement web front end
  • Loading branch information
luizen authored Jun 18, 2024
2 parents a6eb0c1 + c474d50 commit a479071
Show file tree
Hide file tree
Showing 99 changed files with 6,989 additions and 381 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ src/als-tools.infrastructure/bin/*
src/als-tools.ui.cli/bin/*
src/als-tools.ui.cli/obj/*
src/als-tools.ui.cli/output/*
src/als-tools.ui.web/bin/*
src/als-tools.ui.web/obj/*
src/als-tools.ui.web/bin/*
src/als-tools.ui.web/obj/*
ravendb-license.json
42 changes: 42 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug - Blazor Server",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-blazor",
"program": "${workspaceFolder}/src/als-tools.ui.web/bin/Debug/net8.0/als-tools.ui.web.dll",
"cwd": "${workspaceFolder}/src/als-tools.ui.web",
"args": [],
"stopAtEntry": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
},
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+http://\\S+:([0-9]+)",
"uriFormat": "http://localhost:%s"
}
},
{
"name": "Debug - initdb folders FULL MEGA BLASTER ALL",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/als-tools.ui.cli/bin/Debug/net8.0/als-tools.ui.cli.dll",
"cwd": "${workspaceFolder}/src/als-tools.ui.cli",
"args": [
"initdb",
"--folders",
"~/Splice",
"~/Documents/Producao/Criacoes",
"/Volumes/SamsungT5Zen/Users/zenluiz/Documentos/Producao/Masterizacoes",
"/Volumes/SamsungT5Zen/Users/zenluiz/Documentos/Producao/Mixagens",
"~/Music/Ableton/User Library",
"--log-level",
"information"
],
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Debug - initdb files <path>",
"type": "coreclr",
Expand Down
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-blazor",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"${workspaceFolder}/src/als-tools.ui.web/als-tools.ui.web.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"label": "build",
"command": "dotnet",
Expand Down
7 changes: 6 additions & 1 deletion docs/DevReferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@

## Xpath

<http://xpather.com>
<http://xpather.com>

## Blazor

<https://blazor.radzen.com>
<https://blazor.radzen.com/icon>
3,827 changes: 3,827 additions & 0 deletions extras/sidechain-example.xml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/als-tools.core/Config/InitDbOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace AlsTools.Core.Config;

public class InitDbOptions
{
public string[] Folders { get; set; } = [];
public string[] Files { get; set; } = [];
public bool IncludeBackups { get; set; }
}
16 changes: 16 additions & 0 deletions src/als-tools.core/Entities/LiveProject.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using AlsTools.Core.Enums;
using AlsTools.Core.ValueObjects;
using AlsTools.Core.ValueObjects.Tracks;

Expand Down Expand Up @@ -45,6 +46,11 @@ public LiveProject()
/// </summary>
public string MajorVersion { get; set; } = string.Empty;

/// <summary>
/// The project type (Set or Clip)
/// </summary>
public ProjectType ProjectType { get; set; }

/// <summary>
/// Schema change count
/// </summary>
Expand Down Expand Up @@ -79,4 +85,14 @@ public LiveProject()
/// The locators this project contains
/// </summary>
public IReadOnlyList<Locator> Locators { get; set; }

/// <summary>
/// The creation time of the project file
/// </summary>
public DateTime CreationTime { get; set; }

/// <summary>
/// The last modification time of the project file
/// </summary>
public DateTime LastModified { get; set; }
}
14 changes: 14 additions & 0 deletions src/als-tools.core/Enums/ProjectFilterableProperties.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace AlsTools.Core.Enums;

public enum ProjectFilterableProperties
{
PluginName,
PluginFormat,
PluginSort,
StockDeviceName,
StockDeviceUserName,
StockDeviceSort,
MaxForLiveDeviceName,
MaxForLiveDeviceUserName,
MaxForLiveDeviceSort
}
11 changes: 11 additions & 0 deletions src/als-tools.core/Enums/ProjectType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace AlsTools.Core.Enums;

/// <summary>
/// Project type
/// </summary>
public enum ProjectType
{
Set = 0,

Clip = 1
}
2 changes: 1 addition & 1 deletion src/als-tools.core/Extensions/NullableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AlsTools.Core;
namespace AlsTools.Core.Extensions;

public static class NullableExtensions
{
Expand Down
8 changes: 4 additions & 4 deletions src/als-tools.core/Factories/TrackFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AlsTools.Core.Factories;

public static class TrackFactory
{
public static ITrack CreateTrack(TrackType type, int? id, string? effectiveName, string userName, string annotation, bool? isFrozen, bool? isMuted, bool? isSoloed, TrackDelay trackDelay, int parentGroupId)
public static ITrack CreateTrack(TrackType type, int? id, string? effectiveName, string userName, string annotation, bool? isFrozen, bool? isMuted, bool? isSoloed, TrackDelay trackDelay, int parentGroupId, int? color)
{
ITrack track = type switch
{
Expand All @@ -16,10 +16,10 @@ public static ITrack CreateTrack(TrackType type, int? id, string? effectiveName,
_ => new MasterTrack()
};

return SetDefaultProperties(track, id, effectiveName, userName, annotation, isFrozen, isMuted, isSoloed, trackDelay, parentGroupId);
return SetDefaultProperties(track, id, effectiveName, userName, annotation, isFrozen, isMuted, isSoloed, trackDelay, parentGroupId, color);
}

private static ITrack SetDefaultProperties(ITrack track, int? id, string? effectiveName, string userName, string annotation, bool? isFrozen, bool? isMuted, bool? isSoloed, TrackDelay trackDelay, int parentGroupId)
private static ITrack SetDefaultProperties(ITrack track, int? id, string? effectiveName, string userName, string annotation, bool? isFrozen, bool? isMuted, bool? isSoloed, TrackDelay trackDelay, int parentGroupId, int? color)
{
track.Id = id;
track.EffectiveName = effectiveName;
Expand All @@ -30,7 +30,7 @@ private static ITrack SetDefaultProperties(ITrack track, int? id, string? effect
track.IsSoloed = isSoloed;
track.TrackDelay = trackDelay;
track.TrackGroupId = parentGroupId;

track.Color = LiveColor.FromValue(color);
return track;
}
}
6 changes: 6 additions & 0 deletions src/als-tools.core/Interfaces/IEnabledResultSet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace AlsTools.Core.Interfaces;

public interface IEnabledResultSet
{
bool IsEnabled { get; set; }
}
39 changes: 29 additions & 10 deletions src/als-tools.core/Interfaces/ILiveProjectAsyncRepository.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AlsTools.Core.Entities;
using AlsTools.Core.ValueObjects.Devices;
using AlsTools.Core.ValueObjects.ResultSets;

namespace AlsTools.Core.Interfaces;
Expand All @@ -7,27 +8,45 @@ public interface ILiveProjectAsyncRepository
{
Task InsertAsync(LiveProject project);

Task UpdateAsync(LiveProject project);

Task InsertAsync(IEnumerable<LiveProject> projects);

Task<IReadOnlyList<LiveProject>> GetProjectsContainingPluginsAsync(IEnumerable<string> pluginsToLocate);

Task<IReadOnlyList<LiveProject>> GetAllProjectsAsync();

Task<IEnumerable<LiveProject>> GetProjectsContainingPluginsAsync(IEnumerable<string> pluginsToLocate);

Task<IEnumerable<LiveProject>> GetAllProjectsAsync(int? limit = null);

Task<IEnumerable<LiveProjectWithChildrenCountsResult>> GetAllProjectsWithChildrenCountsAsync(int? limit = null);

Task<LiveProject?> GetProjectByIdAsync(string id);

Task DeleteAllAsync();

Task<int> CountProjectsAsync();

Task<IEnumerable<ItemsCountPerProjectResult>> GetTracksCountPerProject();

Task<IEnumerable<ItemsCountPerProjectResult>> GetPluginsCountPerProject(bool ignoreDisabled);
Task<IEnumerable<ItemsCountPerProjectResult>> GetPluginsCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetStockDevicesCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetMaxForLiveDevicesCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestTracksCount(int? limit = null);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestPluginsCount(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedPlugins(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedStockDevices(int? limit, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedMaxForLiveDevices(int? limit, bool ignoreDisabled);

Task<IEnumerable<ItemsCountPerProjectResult>> GetStockDevicesCountPerProject(bool ignoreDisabled);
Task<IEnumerable<PluginDevice>> GetAllPluginsFromProjects(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestTracksCount(int limit);
Task<IEnumerable<StockDevice>> GetAllStockDevicesFromProjects(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestPluginsCount(int limit, bool ignoreDisabled);
Task<IEnumerable<MaxForLiveDevice>> GetAllMaxForLiveDevicesFromProjects(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedPlugins(int limit, bool ignoreDisabled);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedStockDevices(int limit, bool ignoreDisabled);
}
38 changes: 26 additions & 12 deletions src/als-tools.core/Interfaces/ILiveProjectAsyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,45 @@ namespace AlsTools.Core.Interfaces;

public interface ILiveProjectAsyncService
{
Task<int> InitializeDbFromFilesAsync(IEnumerable<string> filePaths);
Task<int> InitializeDbFromPathsAsync(IEnumerable<string> paths, bool includeBackupFolder = false, IProgress<double>? progress = null);

Task<int> InitializeDbFromFoldersAsync(IEnumerable<string> folderPaths, bool includeBackupFolder);
Task ReloadAllFileDatesAsync(IProgress<double>? progress = null);

Task<IReadOnlyList<LiveProject>> GetAllProjectsAsync();
Task<IEnumerable<LiveProject>> GetAllProjectsAsync(int? limit = null);

Task<IReadOnlyList<LiveProject>> GetProjectsContainingPluginsAsync(IEnumerable<string> pluginsToLocate);
Task<IEnumerable<LiveProjectWithChildrenCountsResult>> GetAllProjectsWithChildrenCountsAsync(int? limit = null);

Task<LiveProject?> GetProjectByIdAsync(string id);

Task<IEnumerable<LiveProject>> GetProjectsContainingPluginsAsync(IEnumerable<string> pluginsToLocate);

Task<int> CountProjectsAsync();

Task<IReadOnlyList<PluginDevice>> GetPluginUsageResults(IList<PluginDevice> availablePlugins, PluginUsageSelection selection);
Task<IEnumerable<PluginDevice>> GetPluginUsageResults(IList<PluginDevice> availablePlugins, PluginUsageSelection selection);

Task<IEnumerable<ItemsCountPerProjectResult>> GetTracksCountPerProject();

Task<IEnumerable<ItemsCountPerProjectResult>> GetPluginsCountPerProject(bool ignoreDisabled);
Task<IEnumerable<ItemsCountPerProjectResult>> GetPluginsCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetStockDevicesCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetMaxForLiveDevicesCountPerProject(bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestTracksCount(int? limit = null);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestPluginsCount(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedPlugins(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetStockDevicesCountPerProject(bool ignoreDisabled);
Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedStockDevices(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestTracksCount(int limit);
Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedMaxForLiveDevices(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<ItemsCountPerProjectResult>> GetProjectsWithHighestPluginsCount(int limit, bool ignoreDisabled);
Task DeleteAllProjectsAsync();

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedPlugins(int limit, bool ignoreDisabled);
Task<IEnumerable<PluginDevice>> GetAllPluginsFromProjects(int? limit = null, bool ignoreDisabled = false);

Task<IEnumerable<DevicesUsageCountResult>> GetMostUsedStockDevices(int limit, bool ignoreDisabled);
Task<IEnumerable<StockDevice>> GetAllStockDevicesFromProjects(int? limit = null, bool ignoreDisabled = false);

Task<int> GetProjectsCount();
Task<IEnumerable<MaxForLiveDevice>> GetAllMaxForLiveDevicesFromProjects(int? limit = null, bool ignoreDisabled = false);
}
6 changes: 4 additions & 2 deletions src/als-tools.core/Interfaces/ILiveProjectFileSystem.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using AlsTools.Core.Entities;

namespace AlsTools.Core.Interfaces;

public interface ILiveProjectFileSystem
{
IReadOnlyList<string> GetProjectFilesFullPathFromDirectories(IEnumerable<string> folderPaths, bool includeBackupFolder);
IEnumerable<string> GetProjectFilesFullPathFromPaths(IEnumerable<string> paths, bool includeBackupFolder = false);

IReadOnlyList<string> GetProjectFilesFullPathFromSetFiles(IEnumerable<string> setFilePaths);
void SetFileDates(LiveProject project);
}
Loading

0 comments on commit a479071

Please sign in to comment.