From a5babb7895b1d5f07bafc43ffdfd4de1bbbd98bf Mon Sep 17 00:00:00 2001 From: Bruno Brito Date: Tue, 3 Sep 2019 16:40:58 -0300 Subject: [PATCH] v1.4.5 bugs fixes e new features --- README.md | 89 +++++++++++++++---- src/Frontend/Jp.AdminUI/package-lock.json | 8 ++ src/Frontend/Jp.AdminUI/package.json | 1 + .../src/app/core/settings/settings.service.ts | 2 +- .../src/app/shared/shared.module.ts | 4 +- .../Controllers/Account/AccountController.cs | 1 + .../Jp.UI.SSO/Models/LoginViewModel.cs | 1 + .../Jp.UI.SSO/Util/DbMigrationHelpers.cs | 2 +- .../Jp.UI.SSO/Views/Account/Login.cshtml | 24 +++-- .../Jp.UI.SSO/Views/Shared/_Layout.cshtml | 2 +- src/Frontend/Jp.UI.SSO/appsettings.json | 3 +- .../default-layout.component.html | 2 +- .../src/app/core/settings/settings.service.ts | 1 + 13 files changed, 110 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 5cff3f06..4a983573 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,53 @@ Jp Project is a Open Source UI Administration Tools for IdentityServer4 v2 - release 2.4.0. -## Admin UI +## Table of Contents ## + +- [Presentation](#presentation) + - [Admin UI](#admin-ui) + - [Login page](#login-page) + - [Consent page](#consent-page) + - [Profile](#profile) +- [Demo](#demo) + - [We are online at Azure.](#we-are-online-at-azure) +- [Docker](#docker) +- [Technologies](#technologies) + - [Architecture](#architecture) + - [Give a Star! ⭐](#give-a-star-%e2%ad%90) + - [How to build](#how-to-build) +- [Docs](#docs) + - [Contributing](#contributing) + - [Free](#free) + - [v1.4.5](#v145) + - [v1.4.0](#v140) + - [v1.3](#v13) + - [v1.2](#v12) +- [What comes next?](#what-comes-next) +- [License](#license) + +------------------ + +# Presentation + +Here some screenshots + +## Admin UI ## -## Login page +## Login page ## -## Consent page +## Consent page ## -## Profile +## Profile ## +# Demo # -# We are online at Azure. +Check our demo online. + +## We are online at Azure. @@ -31,7 +64,9 @@ You can check also [SSO](https://jpproject.azurewebsites.net/sso/) and [User Man _New users are readonly_ -# Docker Ready ❤️ +# Docker # + +Run through docker compose ❤️ Wanna try? As easy as: @@ -45,19 +80,24 @@ Linux users: * `docker-compose up` -# How it was made +# Technologies # -Written in ASP.NET Core and Angular 6. +Check below how it was developed. + +Written in ASP.NET Core and Angular 8. The main goal of project is to be a Management Ecosystem for IdentityServer4. Helping Startup's and Organization to Speed Up the Setup of User Management. Helping teams and entrepreneurs to achieve the company's primary purpose: Maximize shareholder value. -- Angular 7 +- Angular 8 - Rich UI interface - ASP.NET Core 2.2 - ASP.NET MVC Core - ASP.NET WebApi Core - ASP.NET Identity Core +- Argon2 Password Hashing - MySql Ready - Sql Ready +- Postgree Ready +- SQLite Ready - Entity Framework Core 2.2 - .NET Core Native DI - AutoMapper @@ -65,11 +105,12 @@ The main goal of project is to be a Management Ecosystem for IdentityServer4. He - MediatR - Swagger UI - High customizable -- Translation for English / Spanish (Autogenerated) / Portuguese (Autogenerated) +- Translation for 7 different languages + -## Architecture: +## Architecture -- Full architecture with responsibility separation concerns, SOLID and Clean Code +- Architecture with responsibility separation concerns, SOLID and Clean Code - Domain Driven Design (Layers and Domain Model Pattern) - Domain Events - Domain Notification @@ -98,7 +139,7 @@ Wait for ng to complete his proccess then go to http://localhost:5000! Any doubts? Go to docs -## Docs +# Docs # Wanna start? please [Read the docs](https://jp-project.readthedocs.io/en/latest/index.html) @@ -106,11 +147,20 @@ Wanna start? please [Read the docs](https://jp-project.readthedocs.io/en/latest/ We'll love it! Please [Read the docs](https://jp-project.readthedocs.io/en/latest/index.html) -## Free +## Free ## If you need help building or running your Jp Project platform There are several ways we can help you out. +## v1.4.5 + +Breaking change: **Argon2 password hashing**. Be careful before update. If you are using the old version all users must need to update their passwords. + +1. Bug fixes: + 1. Tooltip for admin-ui +2. Argon2 Password Hasher +3. Show version at footer + ## v1.4.0 1. Added :boom: **New Translations** (auto-generate) :green_heart: :blue_heart: @@ -125,7 +175,7 @@ There are several ways we can help you out. 2. Added integration with Azure DevOps for full CI/CD. ASAP SonarQube -3. Bug fixesz +3. Bug fixes ## v1.3 @@ -148,8 +198,11 @@ Check [Changelog.md](https://github.com/brunohbrito/JP-Project/blob/master/CHANG # What comes next? -Code coverage +* Code coverage +* UI for Device codes +* CI with SonarCloud + -UI for Device codes +# License -CI with SonarCloud \ No newline at end of file +Jp Project is Open Source software and is released under the MIT license. This license allow the use of Jp Project in free and commercial applications and libraries without restrictions. diff --git a/src/Frontend/Jp.AdminUI/package-lock.json b/src/Frontend/Jp.AdminUI/package-lock.json index 5587cad3..ad1f2bb2 100644 --- a/src/Frontend/Jp.AdminUI/package-lock.json +++ b/src/Frontend/Jp.AdminUI/package-lock.json @@ -7832,6 +7832,14 @@ "tslib": "^1.9.0" } }, + "ng2-tooltip-directive": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/ng2-tooltip-directive/-/ng2-tooltip-directive-2.1.9.tgz", + "integrity": "sha512-ZnlSRmxCMop65L0D+s1V7Me01FmhNdjxpuPd9n9e8U6wnmEQxqRy9Dd1Op6DnpkPYz0P48yn8GG0jYTP6yoXTQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "ng2-validation": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/ng2-validation/-/ng2-validation-4.2.0.tgz", diff --git a/src/Frontend/Jp.AdminUI/package.json b/src/Frontend/Jp.AdminUI/package.json index a4110139..c46d1576 100644 --- a/src/Frontend/Jp.AdminUI/package.json +++ b/src/Frontend/Jp.AdminUI/package.json @@ -67,6 +67,7 @@ "ng2-file-upload": "1.3.0", "ng2-img-cropper": "0.9.0", "ng2-material-dropdown": "^0.10.1", + "ng2-tooltip-directive": "^2.1.9", "ng2-validation": "4.2.0", "ngx-bootstrap": "^5.1.0", "ngx-chips": "^2.0.0-beta.0", diff --git a/src/Frontend/Jp.AdminUI/src/app/core/settings/settings.service.ts b/src/Frontend/Jp.AdminUI/src/app/core/settings/settings.service.ts index 648fb5c2..86d8d99c 100644 --- a/src/Frontend/Jp.AdminUI/src/app/core/settings/settings.service.ts +++ b/src/Frontend/Jp.AdminUI/src/app/core/settings/settings.service.ts @@ -30,7 +30,7 @@ export class SettingsService { name: "Jp Project - IS4Admin", description: "IdentityServer4 Admin Panel", year: ((new Date()).getFullYear()), - version: "1.0.0" + version: "1.4.5" }; // Layout Settings diff --git a/src/Frontend/Jp.AdminUI/src/app/shared/shared.module.ts b/src/Frontend/Jp.AdminUI/src/app/shared/shared.module.ts index c90ddc97..781e2110 100644 --- a/src/Frontend/Jp.AdminUI/src/app/shared/shared.module.ts +++ b/src/Frontend/Jp.AdminUI/src/app/shared/shared.module.ts @@ -17,11 +17,11 @@ import { ProgressbarModule } from "ngx-bootstrap/progressbar"; import { RatingModule } from "ngx-bootstrap/rating"; import { TabsModule } from "ngx-bootstrap/tabs"; import { TimepickerModule } from "ngx-bootstrap/timepicker"; -import { TooltipModule } from "ngx-bootstrap/tooltip"; import { PopoverModule } from "ngx-bootstrap/popover"; import { TypeaheadModule } from "ngx-bootstrap/typeahead"; import { DatepickerModule } from "ngx-bootstrap/datepicker"; import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'; +import {TooltipModule} from 'ng2-tooltip-directive'; import { FlotDirective } from "./directives/flot/flot.directive"; import { SparklineDirective } from "./directives/sparkline/sparkline.directive"; @@ -58,7 +58,7 @@ import { NumberDirective } from "./directives/numberCheck/numbers-only.directive RatingModule.forRoot(), TabsModule.forRoot(), TimepickerModule.forRoot(), - TooltipModule.forRoot(), + TooltipModule, PopoverModule.forRoot(), TypeaheadModule.forRoot(), ToasterModule, diff --git a/src/Frontend/Jp.UI.SSO/Controllers/Account/AccountController.cs b/src/Frontend/Jp.UI.SSO/Controllers/Account/AccountController.cs index 663fe95e..669f09f6 100644 --- a/src/Frontend/Jp.UI.SSO/Controllers/Account/AccountController.cs +++ b/src/Frontend/Jp.UI.SSO/Controllers/Account/AccountController.cs @@ -376,6 +376,7 @@ private async Task BuildLoginViewModelAsync(string returnUrl) EnableLocalLogin = local, ReturnUrl = returnUrl, Username = context?.LoginHint, + ShowDefaultUserPass = _configuration["ApplicationSettings:ShowDefaultUserPass"] == "true" }; if (!local) diff --git a/src/Frontend/Jp.UI.SSO/Models/LoginViewModel.cs b/src/Frontend/Jp.UI.SSO/Models/LoginViewModel.cs index 07b34145..09b0a4c4 100644 --- a/src/Frontend/Jp.UI.SSO/Models/LoginViewModel.cs +++ b/src/Frontend/Jp.UI.SSO/Models/LoginViewModel.cs @@ -19,5 +19,6 @@ public class LoginViewModel : LoginInputModel public bool IsExternalLoginOnly => EnableLocalLogin == false && ExternalProviders?.Count() == 1; public string ExternalLoginScheme => IsExternalLoginOnly ? ExternalProviders?.SingleOrDefault()?.AuthenticationScheme : null; public bool EnableExternalProviders { get; set; } + public bool ShowDefaultUserPass { get; set; } } } \ No newline at end of file diff --git a/src/Frontend/Jp.UI.SSO/Util/DbMigrationHelpers.cs b/src/Frontend/Jp.UI.SSO/Util/DbMigrationHelpers.cs index 591f4df3..f76d173f 100644 --- a/src/Frontend/Jp.UI.SSO/Util/DbMigrationHelpers.cs +++ b/src/Frontend/Jp.UI.SSO/Util/DbMigrationHelpers.cs @@ -46,7 +46,7 @@ public static async Task EnsureSeedData(IServiceProvider serviceProvider) var storeDb = scope.ServiceProvider.GetRequiredService(); await WaitForDb(id4Context); - var tst = id4Context.Database.GetPendingMigrations(); + await id4Context.Database.GetPendingMigrationsAsync(); await id4Context.Database.MigrateAsync(); await userContext.Database.MigrateAsync(); await storeDb.Database.MigrateAsync(); diff --git a/src/Frontend/Jp.UI.SSO/Views/Account/Login.cshtml b/src/Frontend/Jp.UI.SSO/Views/Account/Login.cshtml index 07209e20..4baa3fa9 100644 --- a/src/Frontend/Jp.UI.SSO/Views/Account/Login.cshtml +++ b/src/Frontend/Jp.UI.SSO/Views/Account/Login.cshtml @@ -1,5 +1,4 @@ -@using Jp.UI.SSO.Models -@model Jp.UI.SSO.Models.LoginViewModel +@model Jp.UI.SSO.Models.LoginViewModel @using Microsoft.AspNetCore.Mvc.Localization @using Microsoft.Extensions.Configuration @inject IConfiguration Configuration @@ -26,7 +25,14 @@ - + @if (Model.ShowDefaultUserPass) + { + + } + else + { + + }
@@ -34,7 +40,15 @@
- + @if (Model.ShowDefaultUserPass) + { + + } + else + { + + } +
@if (Model.AllowRememberLogin) { @@ -117,4 +131,4 @@ - + \ No newline at end of file diff --git a/src/Frontend/Jp.UI.SSO/Views/Shared/_Layout.cshtml b/src/Frontend/Jp.UI.SSO/Views/Shared/_Layout.cshtml index 0cf91f6e..64ae7860 100644 --- a/src/Frontend/Jp.UI.SSO/Views/Shared/_Layout.cshtml +++ b/src/Frontend/Jp.UI.SSO/Views/Shared/_Layout.cshtml @@ -107,7 +107,7 @@