Skip to content

Commit

Permalink
10898 New contact page (#11531)
Browse files Browse the repository at this point in the history
* Fix background image

* Fix height

* Rename background image of Overview

* New contact page

* Add breadcrumb & clean css

* Fix css on small screens

* Fix unit tests

* Fix translations

* Move Contact page inside the Administration folder

* Clean up RouterRoute properties

* Revert changes in resources

* Revert changes from prettier

* Extract duplicated PageContainer code to new Component

* Clean up css

* Fix breadcrumb using semantic html

* Move contact title to general & clean up css values

* Fix contact tests

* Fix texts

* Add link to contact page on overview page

* Add link to contact page in error messages

* Move Contact page to own package

* Replace contact package with studio-root package

* Remove breadcrumb from contact page

* Handle invalid routes at root

* Fix routing

* Fix header for unauthenticated users

* Clean up code

* Clean up css

* datamodelll and policy controller tests split on run

* test split in dotnet run

---------

Co-authored-by: Mirko Sekulic <misha.sekulic@gmail.com>
  • Loading branch information
mlqn and mirkoSekulic authored Nov 24, 2023
1 parent 4d43dc6 commit d76cbaa
Show file tree
Hide file tree
Showing 54 changed files with 808 additions and 165 deletions.
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ area/text-editor:
area/ui-editor:
- 'frontend/packages/ux-editor/**/*'

area/studio-root:
- 'frontend/studio-root/**/*'

## Other labels
kind/dependencies:
- 'backend/packagegroups/NuGet.props'
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/designer-dotnet-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
analyze:
strategy:
matrix:
os: [ubuntu-latest,windows-latest,macos-latest] #windows-latest and macos-latest excluded temporarily
os: [ubuntu-latest,windows-latest,macos-latest]
name: Run dotnet build and test
runs-on: ${{ matrix.os}}
env:
Expand All @@ -36,4 +36,11 @@ jobs:
dotnet build backend/Designer.sln -v m
- name: Test
run: |
dotnet test backend/Designer.sln --filter FullyQualifiedName~AppDevelopmentController --no-build; dotnet test backend/Designer.sln --filter FullyQualifiedName~PreviewController --no-build; dotnet test backend/Designer.sln --filter "(Category!=GiteaIntegrationTest)&(FullyQualifiedName!~AppDevelopmentController)&(FullyQualifiedName!~PreviewController)" -v m --no-build
dotnet test backend/Designer.sln --filter FullyQualifiedName~AppDevelopmentController --no-build;
dotnet test backend/Designer.sln --filter FullyQualifiedName~PolicyControllerTests --no-build;
dotnet test backend/Designer.sln --filter FullyQualifiedName~PreviewController --no-build;
dotnet test backend/Designer.sln --filter FullyQualifiedName~DataModelsController --no-build;
dotnet test backend/Designer.sln --filter FullyQualifiedName~ResourceAdminController --no-build;
dotnet test backend/Designer.sln --filter FullyQualifiedName~TextController --no-build;
dotnet test backend/Designer.sln --filter "(Category!=GiteaIntegrationTest)&(FullyQualifiedName~RepositoryController)" --no-build;
dotnet test backend/Designer.sln --filter "(Category!=GiteaIntegrationTest)&(FullyQualifiedName!~AppDevelopmentController)&(FullyQualifiedName!~PreviewController)&(FullyQualifiedName!~PolicyControllerTests)&(FullyQualifiedName!~DataModelsController)&(FullyQualifiedName!~ResourceAdminController)&(FullyQualifiedName!~TextController)&(FullyQualifiedName!~RepositoryController)" -v m --no-build
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final
EXPOSE 80
WORKDIR /app
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
DOTNET_RUNNING_IN_CONTAINER=true
DOTNET_RUNNING_IN_CONTAINER=true
RUN apk add --no-cache icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib

COPY --from=generate-studio-backend /app_output .
Expand All @@ -32,6 +32,7 @@ COPY --from=generate-studio-frontend /build/frontend/dist/app-preview ./wwwroot/
COPY --from=generate-studio-frontend /build/frontend/dist/dashboard ./wwwroot/designer/frontend/dashboard
COPY --from=generate-studio-frontend /build/frontend/dist/resourceadm ./wwwroot/designer/frontend/resourceadm
COPY --from=generate-studio-frontend /build/frontend/dist/language ./wwwroot/designer/frontend/lang
COPY --from=generate-studio-frontend /build/frontend/dist/studio-root ./wwwroot/designer/frontend/studio-root

## Copying app template
COPY --from=generate-studio-backend /app_template ./Templates/AspNet
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ is configured with the following variables.
DEVELOP_BACKEND=0
DEVELOP_DASHBOARD=0
DEVELOP_APP_DEVELOPMENT=0
DEVELOP_STUDIO_ROOT=0
```

## Developing Backend
Expand Down
11 changes: 9 additions & 2 deletions backend/src/Designer/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,24 @@ public async Task<ActionResult> StartPage()
return LocalRedirect("/dashboard");
}

[Route("/{*AllValues:regex(^(?!designer).*$)}")]
public IActionResult Index()
{
ViewBag.InstrumentationKey = _applicationInsightsSettings.InstrumentationKey;
return View();
}

/// <summary>
/// The default action presenting a list of available apps when the user is logged in
/// </summary>
/// <returns>The front page</returns>
[Route("/[controller]/[action]")]
[Authorize]
[Route("/dashboard/{*AllValues}", Name = "DefaultLoggedIn")]
public ActionResult Index()
public ActionResult Dashboard()
{
ViewBag.InstrumentationKey = _applicationInsightsSettings.InstrumentationKey;
return View();
return View("Dashboard");
}

/// <summary>
Expand Down
17 changes: 17 additions & 0 deletions backend/src/Designer/Views/Home/Dashboard.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@{ViewBag.Title = "Altinn Studio";}

<html lang="no">
<head>
<title>@ViewBag.Title</title>
<link rel="shortcut icon" href="/designer/img/favicon.ico"/>
<script type="text/javascript">
var instrumentationKey = "@ViewBag.InstrumentationKey"
window.instrumentationKey = instrumentationKey;
</script>
</head>
<body>
<div id="root" class="media-body flex-column d-flex"></div>
<link href="/designer/frontend/dashboard/dashboard.css" rel="stylesheet" asp-append-version="true"/>
<script src="/designer/frontend/dashboard/dashboard.js" type="text/javascript" asp-append-version="true"></script>
</body>
</html>
28 changes: 18 additions & 10 deletions backend/src/Designer/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
@{ViewBag.Title = "Altinn Studio";}
@{
ViewBag.Title = "Altinn Studio";
}

<html lang="no">

<head>
<title>@ViewBag.Title</title>
<link rel="shortcut icon" href="/designer/img/favicon.ico"/>
<script type="text/javascript">
var instrumentationKey = "@ViewBag.InstrumentationKey"
window.instrumentationKey = instrumentationKey;
</script>
<title>@ViewBag.Title</title>
<link href="https://altinncdn.no/fonts/roboto/latin/roboto.css" rel="stylesheet">
<link href="https://altinncdn.no/fonts/inter/inter.css" rel="stylesheet">
<link rel="shortcut icon" href="/designer/img/favicon.ico" />
<script type="text/javascript">
var instrumentationKey = "@ViewBag.InstrumentationKey"
window.instrumentationKey = instrumentationKey;
</script>
</head>

<body>
<div id="root" class="media-body flex-column d-flex"></div>
<link href="/designer/frontend/dashboard/dashboard.css" rel="stylesheet" asp-append-version="true"/>
<script src="/designer/frontend/dashboard/dashboard.js" type="text/javascript" asp-append-version="true"></script>
<div id="root" class="media-body flex-column d-flex"></div>
<link href="/designer/frontend/studio-root/studio-root.css" rel="stylesheet" asp-append-version="true" />
<script src="/designer/frontend/studio-root/studio-root.js" type="text/javascript"
asp-append-version="true"></script>
</body>

</html>
Loading

0 comments on commit d76cbaa

Please sign in to comment.