Compare commits
No commits in common. "d98dfa9f7e3d5edd283dec018687e7f452e720ef" and "68f837b104b25560ec2ff3a2d1c8d5293c15159c" have entirely different histories.
d98dfa9f7e
...
68f837b104
@ -1,41 +0,0 @@
|
|||||||
name: Create and publish a Docker image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['main']
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: git.zetcraft.ru
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ gitea.actor }}
|
|
||||||
password: ${{ secrets.TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: https://github.com/docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
|
||||||
with:
|
|
||||||
context: PaydayFrontend
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
@ -1,15 +0,0 @@
|
|||||||
using System.Diagnostics;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using PaydayFrontend.Models;
|
|
||||||
|
|
||||||
namespace PaydayFrontend.Controllers;
|
|
||||||
|
|
||||||
public class AdminController : Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
||||||
public IActionResult Error()
|
|
||||||
{
|
|
||||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
||||||
}
|
|
||||||
}
|
|
@ -28,19 +28,12 @@ public class HomeController : Controller
|
|||||||
return View(universities.ToList());
|
return View(universities.ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("Directions")]
|
public IActionResult SecondPage([FromQuery] long universityId)
|
||||||
public IActionResult Directions(long universityId)
|
|
||||||
{
|
{
|
||||||
Console.WriteLine(universityId);
|
|
||||||
if (universityId == 0)
|
|
||||||
return RedirectToAction("Index");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Credits()
|
public IActionResult ThirdPage()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
EXPOSE 443
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["PaydayFrontend.csproj", "PaydayFrontend/"]
|
COPY ["PaydayFrontend/PaydayFrontend.csproj", "PaydayFrontend/"]
|
||||||
RUN dotnet restore "PaydayFrontend.csproj"
|
RUN dotnet restore "PaydayFrontend/PaydayFrontend.csproj"
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src"
|
WORKDIR "/src/PaydayFrontend"
|
||||||
RUN dotnet build "PaydayFrontend.csproj" -c Release -o /app/build
|
RUN dotnet build "PaydayFrontend.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
namespace PaydayFrontend.Models;
|
|
||||||
|
|
||||||
public class Direction
|
|
||||||
{
|
|
||||||
public long Id { get; set; }
|
|
||||||
public long UniversityId { get; set; }
|
|
||||||
public string Code { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string Url { get; set; }
|
|
||||||
public int PlaceCost { get; set; }
|
|
||||||
}
|
|
@ -6,7 +6,6 @@ namespace PaydayFrontend.Services;
|
|||||||
public interface IUniversityService
|
public interface IUniversityService
|
||||||
{
|
{
|
||||||
public Task<List<University>> GetAllUniversity();
|
public Task<List<University>> GetAllUniversity();
|
||||||
public Task<List<University>> GetDirectionsByUniversityId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UniversityService : IUniversityService
|
public class UniversityService : IUniversityService
|
||||||
@ -29,15 +28,4 @@ public class UniversityService : IUniversityService
|
|||||||
});
|
});
|
||||||
return university;
|
return university;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<University>> GetDirectionsByUniversityId()
|
|
||||||
{
|
|
||||||
var response = await _httpClient.GetAsync("v1/public/university");
|
|
||||||
var result = await response.Content.ReadAsStringAsync();
|
|
||||||
var university = JsonSerializer.Deserialize<List<University>>(result, new JsonSerializerOptions
|
|
||||||
{
|
|
||||||
PropertyNameCaseInsensitive = true
|
|
||||||
});
|
|
||||||
return university;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -14,26 +14,27 @@
|
|||||||
@{
|
@{
|
||||||
foreach (var university in Model)
|
foreach (var university in Model)
|
||||||
{
|
{
|
||||||
<a href="Directions?UniversityId=@university.Id" class="col-2 universe_card universe_card_text">
|
<div universityId="@university.Id" class="col-2 universe_card universe_card_text">
|
||||||
<img src="@university.ImageUrl" alt="universe" class="universe_icon">
|
<img src="@university.ImageUrl" alt="universe" class="universe_icon">
|
||||||
@university.Name
|
@university.Name
|
||||||
@if (university.MinPlaceCost != 0)
|
@if (university.MinPlaceCost != 0)
|
||||||
{
|
{
|
||||||
<span>от @university.MinPlaceCost тыс. руб</span>
|
<span>от @university.MinPlaceCost тыс. руб</span>
|
||||||
}
|
}
|
||||||
</a>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation_choise">
|
<a asp-controller="Home" asp-action="SecondPage">
|
||||||
<div class="navigation_slid">
|
<input type="button" class="btn btn-primary"/>
|
||||||
<span class="navigation_slid_active"></span>
|
</a>
|
||||||
<span class="navigation_slid_disable"></span>
|
<div class="universe_slid">
|
||||||
<span class="navigation_slid_disable"></span>
|
<span class="universe_slid_active"></span>
|
||||||
<span class="navigation_slid_disable"></span>
|
<span class="universe_slid_disable"></span>
|
||||||
</div>
|
<span class="universe_slid_disable"></span>
|
||||||
|
<span class="universe_slid_disable"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,12 +22,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation_choise">
|
|
||||||
<div class="navigation_slid">
|
<div class="navigation_slid">
|
||||||
<span class="navigation_slid_disable"></span>
|
<span class="navigation_slid_disable"></span>
|
||||||
<span class="navigation_slid_active"></span>
|
<span class="navigation_slid_active"></span>
|
||||||
<span class="navigation_slid_disable"></span>
|
<span class="navigation_slid_disable"></span>
|
||||||
<span class="navigation_slid_disable"></span>
|
<span class="navigation_slid_disable"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user