Browse Source

Merge branch 'main' of https://github.com/volosoft/eventhub

* 'main' of https://github.com/volosoft/eventhub:
  Update azurepipelines.yml
  Fix returnUrl problem
  Update appsettings.json
  improve
  Add * on the City field
  Improve error page
  Remove past and upcoming buttons if no event
  Fix login problem
  FIx logout problem
  Update dockerfile sdk version to .net9
  Update runtime version to .net9
pull/146/head
selmankoc 1 year ago
parent
commit
25abd76c3a
  1. 2
      etc/azure/Dockerfile.base
  2. 2
      etc/azure/azurepipelines.yml
  3. 2
      src/EventHub.Admin.HttpApi.Host/Dockerfile
  4. 2
      src/EventHub.Admin.HttpApi.Host/Dockerfile.azure
  5. 2
      src/EventHub.BackgroundServices/Dockerfile
  6. 2
      src/EventHub.BackgroundServices/Dockerfile.azure
  7. 2
      src/EventHub.DbMigrator/Dockerfile
  8. 2
      src/EventHub.DbMigrator/Dockerfile.azure
  9. 2
      src/EventHub.HttpApi.Host/Dockerfile
  10. 2
      src/EventHub.HttpApi.Host/Dockerfile.azure
  11. 3
      src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs
  12. 2
      src/EventHub.IdentityServer/Dockerfile
  13. 2
      src/EventHub.IdentityServer/Dockerfile.azure
  14. 2
      src/EventHub.IdentityServer/EventHub.IdentityServer.csproj
  15. 34
      src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml
  16. 4
      src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml
  17. 34
      src/EventHub.Web.Theme/Views/Error/Default.cshtml
  18. 2
      src/EventHub.Web/Dockerfile
  19. 2
      src/EventHub.Web/Dockerfile.azure
  20. 2
      src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml
  21. 2
      src/EventHub.Web/Pages/Events/Components/EventsArea/Default.cshtml
  22. 70
      src/EventHub.Web/Pages/Organizations/Profile.cshtml
  23. 23
      src/EventHub.Web/Pages/Organizations/Profile.cshtml.cs

2
etc/azure/Dockerfile.base

@ -1,3 +1,3 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY . .

2
etc/azure/azurepipelines.yml

@ -217,4 +217,4 @@ stages:
inputs:
targetPath: '$(Build.SourcesDirectory)/eventhub/etc/k8s/helm-chart/eventhub'
artifact: helm
publishLocation: pipeline
publishLocation: pipeline

2
src/EventHub.Admin.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.Admin.HttpApi.Host/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.Admin.HttpApi.Host
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80

2
src/EventHub.BackgroundServices/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY bin/Release/net9.0/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.BackgroundServices/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.BackgroundServices
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80

2
src/EventHub.DbMigrator/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy
FROM mcr.microsoft.com/dotnet/aspnet:9.0-jammy
COPY bin/Release/net9.0/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.DbMigrator/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.DbMigrator
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
COPY --from=base /app/eventhub/src/EventHub.DbMigrator/bin/Release/publish .
ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"]

2
src/EventHub.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.HttpApi.Host/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.HttpApi.Host
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80

3
src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs

@ -176,7 +176,8 @@ namespace EventHub
{
builder
.WithOrigins(
EventHubUrlOptions.GetWwwConfigValue(configuration)
EventHubUrlOptions.GetWwwConfigValue(configuration),
EventHubUrlOptions.GetAdminConfigValue(configuration)
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()

2
src/EventHub.IdentityServer/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.IdentityServer/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.IdentityServer
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80

2
src/EventHub.IdentityServer/EventHub.IdentityServer.csproj

@ -48,7 +48,7 @@
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="9.0.0" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="9.0.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="9.0.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="9.0.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="9.0.0" />
</ItemGroup>
<ItemGroup>

34
src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml

@ -1,4 +1,5 @@
page "/Account/LoggedOut"
@page "/Account/LoggedOut"
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Localization
@using Volo.Abp.Account.Web.Pages.Account
@ -18,18 +19,19 @@ page "/Account/LoggedOut"
@section styles {
<abp-style src="/Pages/Account/LoggedOut.css" />
}
<abp-card class="loggedOutCard">
<abp-card-body>
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title>
<abp-card-text>@L["LoggedOutText"]</abp-card-text>
@if (Model.PostLogoutRedirectUri != null)
{
<a abp-button="Primary" id="redirectButton" href="@Model.PostLogoutRedirectUri" cname="@Model.ClientName">@L["ReturnToText"]</a>
}
@if (Model.SignOutIframeUrl != null)
{
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe>
}
</abp-card-body>
</abp-card>
<div class="container mt-5">
<abp-card class="loggedOutCard">
<abp-card-body>
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title>
<abp-card-text>@L["LoggedOutText"]</abp-card-text>
@if (Model.PostLogoutRedirectUri != null)
{
<a abp-button="Primary" id="redirectButton" href="@Model.PostLogoutRedirectUri" cname="@Model.ClientName">@L["ReturnToText"]</a>
}
@if (Model.SignOutIframeUrl != null)
{
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe>
}
</abp-card-body>
</abp-card>
</div>

4
src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

@ -13,11 +13,13 @@
@inject IOptions<EventHubUrlOptions> UrlOptions
@{
var returnUrl = WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery());
var returnUrl = WebUtility.UrlEncode(Context.Request.Query.ContainsKey("returnUrl") ? Context.Request.Query["returnUrl"] : Context.Request.GetEncodedPathAndQuery());
if (returnUrl.IsNullOrWhiteSpace())
{
returnUrl = "/";
}
}
<nav class="navbar navbar-expand-lg navbar-light bg-light static-top">
<div class="container">

34
src/EventHub.Web.Theme/Views/Error/Default.cshtml

@ -0,0 +1,34 @@
@using Localization.Resources.AbpUi
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Alert
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Blockquote
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Views.Error.AbpErrorViewModel
@inject IHtmlLocalizer<AbpUiResource> L
<div class="container">
<div class="row">
<div class="col-lg-10 col-md-11 mx-auto">
<div class="d-flex flex-column justify-content-center min-vh-100 align-items-center">
<div class="card">
<div class="card-body p-lg-5">
<div class="row">
<div class="col-auto d-flex align-items-center">
<i class="bi bi-emoji-frown text-primary mb-3 mb-md-0 mx-3 mx-md-4" style="font-size: 12em;"></i>
</div>
<div class="col ps-2 ps-lg-4">
<div class="status-content">
<h1 class="fw-bolder display-1 text-brand">@Model.HttpStatusCode</h1>
<h5 class="text-muted">@Model.ErrorInfo.Message</h5>
<p class="mt-3 mb-4">@Model.ErrorInfo.Details</p>
<a href="javascript:history.back()" class="btn btn-primary soft me-2">@L["GoBack"]</a>
<a href="/" class="btn btn-primary">@L["GoHomePage"]</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

2
src/EventHub.Web/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
EXPOSE 80

2
src/EventHub.Web/Dockerfile.azure

@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base
WORKDIR /app/eventhub/src/EventHub.Web
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80

2
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml

@ -140,7 +140,7 @@
<div class="col-md-6 event-location-group">
<div class="form-label-group">
<input type="text" id="inputCity" asp-for="@Model.City" class="form-control" placeholder="City*">
<label for="inputCity">City</label>
<label for="inputCity">City *</label>
<span asp-validation-for="@Model.City" class="text-danger"></span>
</div>
</div>

2
src/EventHub.Web/Pages/Events/Components/EventsArea/Default.cshtml

@ -1,6 +1,6 @@
@model EventHub.Web.Pages.Events.Components.EventsArea.EventsAreaViewComponent.ListAreaViewComponentModel
@if (Model.Events != null && Model.Events.Count > 0)
@if (Model.Events is { Count: > 0 })
{
<div id="EventList" class="row" data-hash-code="@Model.GetHashCode()" data-total-count="@Model.TotalCount" data-skip-count="@Model.SkipCount" data-max-result-count="@Model.MaxResultCount">
<partial name="~/Pages/Events/Components/EventsArea/_eventListSection.cshtml" model="@Model.Events"/>

70
src/EventHub.Web/Pages/Organizations/Profile.cshtml

@ -132,34 +132,54 @@
<div class="row mb-4">
<div class="col-md">
</div>
<div class="col-md-auto">
<div class="list-style">
<ul class="nav nav-pills events" role="tablist">
<li class="nav-item">
<a href="#PastEvent" class="selected" data-bs-toggle="tab"><img src="/assets/past.svg"> Past</a>
</li>
<li class="nav-item">
<a href="#UpcomingEvent" data-bs-toggle="tab"><img src="/assets/now.svg"> Upcoming</a>
</li>
</ul>
@if (Model.HasPastEvents || Model.HasUpcomingEvents)
{
<div class="col-md-auto">
<div class="list-style">
<ul class="nav nav-pills events" role="tablist">
@if (Model.HasPastEvents)
{
<li class="nav-item">
<a href="#PastEvent" class="selected" data-bs-toggle="tab"><img src="/assets/past.svg"> Past</a>
</li>
}
@if (Model.HasUpcomingEvents)
{
<li class="nav-item">
<a href="#UpcomingEvent" data-bs-toggle="tab"><img src="/assets/now.svg"> Upcoming</a>
</li>
}
</ul>
</div>
</div>
</div>
}
</div>
<div class="tab-content">
<div id="PastEvent" class="tab-pane active">
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
organizationId = Model.Organization.Id,
maxDate = Clock.Now.ClearTime()
})
</div>
<div id="UpcomingEvent" class="tab-pane">
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
organizationId = Model.Organization.Id,
minDate = Clock.Now.ClearTime()
})
</div>
@if (!Model.HasPastEvents && !Model.HasUpcomingEvents)
{
<p>There is no Event</p>
}
@if (Model.HasPastEvents)
{
<div id="PastEvent" class="tab-pane active">
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
organizationId = Model.Organization.Id,
maxDate = Clock.Now.ClearTime()
})
</div>
}
@if (Model.HasUpcomingEvents)
{
var isActive = Model.HasPastEvents ? "" : "active";
<div id="UpcomingEvent" class="tab-pane @isActive">
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
organizationId = Model.Organization.Id,
minDate = Clock.Now.ClearTime()
})
</div>
}
</div>
</div>
<div id="members-section" class="tab-pane fade">

23
src/EventHub.Web/Pages/Organizations/Profile.cshtml.cs

@ -1,8 +1,10 @@
using System;
using System.Threading.Tasks;
using EventHub.Events;
using EventHub.Organizations;
using EventHub.Organizations.Memberships;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
namespace EventHub.Web.Pages.Organizations
{
@ -16,14 +18,21 @@ namespace EventHub.Web.Pages.Organizations
public bool IsOrganizationOwner { get; private set; }
public bool IsShowSocialMediaContent { get; set; }
public bool HasPastEvents { get; set; }
public bool HasUpcomingEvents { get; set; }
private readonly IOrganizationAppService _organizationAppService;
private readonly IEventAppService _eventAppService;
public ProfilePageModel(
IOrganizationAppService organizationAppService,
IOrganizationMembershipAppService organizationMembershipAppService)
IOrganizationMembershipAppService organizationMembershipAppService,
IEventAppService eventAppService)
{
_organizationAppService = organizationAppService;
_eventAppService = eventAppService;
}
public async Task OnGetAsync()
@ -31,6 +40,18 @@ namespace EventHub.Web.Pages.Organizations
await GetProfileAsync();
IsOrganizationOwner = await _organizationAppService.IsOrganizationOwnerAsync(Organization.Id);
HasPastEvents = (await _eventAppService.GetListAsync(new EventListFilterDto()
{
OrganizationId = Organization.Id,
MaxDate = Clock.Now.ClearTime()
})).TotalCount > 0;
HasUpcomingEvents = (await _eventAppService.GetListAsync(new EventListFilterDto()
{
OrganizationId = Organization.Id,
MinDate = Clock.Now.ClearTime()
})).TotalCount > 0;
}
private async Task GetProfileAsync()

Loading…
Cancel
Save