Skip to content

Commit

Permalink
Merge pull request #17 from Relewise/feat/minor-fixes
Browse files Browse the repository at this point in the history
feat: minor fixes
  • Loading branch information
brianhdk authored Oct 27, 2022
2 parents a5b5961 + 560fb2f commit 16879ed
Show file tree
Hide file tree
Showing 9 changed files with 431 additions and 319 deletions.
19 changes: 10 additions & 9 deletions samples/UmbracoV10/App_Plugins/Relewise.Dashboard/dashboard.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<div ng-app id="relewiseDashboard" ng-controller="relewiseDashboardController as vm" class="relewise-dashboard">
<h2>Relewise</h2>
<umb-box>
<umb-box-content>
<h3 class="bold">Welcome to the Relewise dashboard!</h3>
<p>
Welcome to the Relewise dashboard - here you can perform export functions to get all your content exported into Relewise.<br />
It's also possible to see the settings for Relewise directly here.
You can perform various operations, e.g. Export all your content to Relewise.<br />
It's also possible to see the settings configured for Relewise directly here.
</p>
<div class="button-box" ng-if="!vm.configurationError">
<button class="btn btn-primary" ng-click="vm.exportContent()" ng-disabled="vm.exportLoading">
<hr />
<div class="button-box">
<button class="btn btn-primary" ng-click="vm.exportContent()" ng-disabled="vm.configuration === null || vm.configuration.factoryFailed || vm.exportLoading">
Export content
</button>

<button class="btn btn-danger" ng-click="vm.exportContentPermanentlyDelete()" ng-disabled="vm.exportLoading">
<button class="btn btn-danger" ng-click="vm.exportContentPermanentlyDelete()" ng-disabled="vm.configuration === null || vm.configuration.factoryFailed || vm.exportLoading">
Export content and remove old data
</button>
</div>
Expand All @@ -20,11 +21,11 @@ <h2>Relewise</h2>
</umb-box-content>
</umb-box>

<h3>Settings</h3>
<umb-box>
<umb-box-content>
<h3>Settings</h3>
<div ng-if="vm.configurationError">
<span class="error">Unexpected error occured. Please check the response on the XHR request or check logs.</span><br />
<span class="error">Unexpected error occurred. Please check the response on the XHR request or check logs.</span><br />
</div>

<div ng-if="vm.configuration !== null">
Expand Down Expand Up @@ -144,7 +145,7 @@ <h3 ng-if="vm.configuration !== null && vm.configuration.named">Clients</h3>
</div>
<div class="umb-table-row">
<div class="umb-table-cell not-fixed umb-table__name">
<span class="pl-20">DataAccessor</span>
<span class="pl-20">Data Accessor</span>
</div>
<div class="umb-table-cell not-fixed">{{ named.dataAccessor.datasetId }}</div>
<div class="umb-table-cell not-fixed">{{ named.dataAccessor.timeout }}</div>
Expand Down
9 changes: 6 additions & 3 deletions samples/UmbracoV10/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Relewise.UmbracoV10
{
Expand All @@ -13,7 +12,11 @@ public static void Main(string[] args)

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(x => x.ClearProviders())
.ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
.ConfigureUmbracoDefaults()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStaticWebAssets();
webBuilder.UseStartup<Startup>();
});
}
}
6 changes: 3 additions & 3 deletions samples/UmbracoV10/Relewise.UmbracoV10.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Relewise.Client" Version="1.35.0" />
<PackageReference Include="Relewise.Client" Version="1.39.0" />
<PackageReference Include="Relewise.Client.Extensions" Version="1.3.1" />
<PackageReference Include="Umbraco.Cms" Version="10.0.0" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="10.0.0" />
<PackageReference Include="Umbraco.Cms" Version="10.3.2" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="10.3.2" />
</ItemGroup>

<!-- Force windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older windows 10 and most if not all winodws servers will run NLS -->
Expand Down
3 changes: 2 additions & 1 deletion samples/UmbracoV10/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void ConfigureServices(IServiceCollection services)
{
// This setups the needed configuration for you to be able to interact with our API.
// You need to add you own dataset id and api-key in the appsettings.json before recommendations and search works
services.AddRelewise(options => options.ReadFromConfiguration(_config));
//services.AddRelewise(options => options.ReadFromConfiguration(_config));

services.AddHttpContextAccessor();
services.AddSingleton<CookieConsent>();
Expand Down Expand Up @@ -89,6 +89,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
}

app.UseRouting();

app.UseEndpoints(c => c
.MapContentRoutes()
.MapCatalogRoutes()
Expand Down
Loading

0 comments on commit 16879ed

Please sign in to comment.