From 7860c1d535eb55449d43ad2a414389adc7036e58 Mon Sep 17 00:00:00 2001 From: Kosma Date: Fri, 4 Dec 2020 21:34:30 +0100 Subject: [PATCH 1/3] added ViewModels --- .../CharismaViewModels/CharismaViewModel.cs | 25 +++++++++++++++++ .../ConstitutionViewModel.cs | 17 ++++++++++++ .../DexterityViewModels/DexterityViewModel.cs | 23 ++++++++++++++++ .../IntelligenceViewModel.cs | 27 +++++++++++++++++++ .../StrengthViewModels/StrengthViewModel.cs | 19 +++++++++++++ .../WisdomViewModels/WisdomViewModel.cs | 27 +++++++++++++++++++ 6 files changed, 138 insertions(+) create mode 100644 SessionCompanion/SessionCompanion.ViewModels/CharismaViewModels/CharismaViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/ConstitutionViewModels/ConstitutionViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/DexterityViewModels/DexterityViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/IntelligenceViewModels/IntelligenceViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/StrengthViewModels/StrengthViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/WisdomViewModels/WisdomViewModel.cs diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharismaViewModels/CharismaViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharismaViewModels/CharismaViewModel.cs new file mode 100644 index 0000000..5ecce81 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/CharismaViewModels/CharismaViewModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.CharismaViewModels +{ + public class CharismaViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Deception { get; set; } + public bool CanDeception { get; set; } + public int Intimidation { get; set; } + public bool CanIntimidation { get; set; } + public int Performance { get; set; } + public bool CanPerformance { get; set; } + public int Persuasion { get; set; } + public bool CanPersuasion { get; set; } + } +} \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.ViewModels/ConstitutionViewModels/ConstitutionViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/ConstitutionViewModels/ConstitutionViewModel.cs new file mode 100644 index 0000000..bd1318f --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/ConstitutionViewModels/ConstitutionViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.ConstitutionViewModels +{ + public class ConstitutionViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + } +} \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.ViewModels/DexterityViewModels/DexterityViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/DexterityViewModels/DexterityViewModel.cs new file mode 100644 index 0000000..de82574 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/DexterityViewModels/DexterityViewModel.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.DexterityViewModels +{ + public class DexterityViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Acrobatics { get; set; } + public bool CanAcrobatics { get; set; } + public int SleightOfHand { get; set; } + public bool CanSleightOfHand { get; set; } + public int Stealth { get; set; } + public bool CanStealth { get; set; } + } +} \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.ViewModels/IntelligenceViewModels/IntelligenceViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/IntelligenceViewModels/IntelligenceViewModel.cs new file mode 100644 index 0000000..f72bafa --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/IntelligenceViewModels/IntelligenceViewModel.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.IntelligenceViewModels +{ + public class IntelligenceViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Arcana { get; set; } + public bool CanArcana { get; set; } + public int History { get; set; } + public bool CanHistory { get; set; } + public int Investigation { get; set; } + public bool CanInvestigation { get; set; } + public int Nature { get; set; } + public bool CanNature { get; set; } + public int Religion { get; set; } + public bool CanReligion { get; set; } + } +} \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.ViewModels/StrengthViewModels/StrengthViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/StrengthViewModels/StrengthViewModel.cs new file mode 100644 index 0000000..9be3c10 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/StrengthViewModels/StrengthViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.StrengthViewModels +{ + public class StrengthViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Athletics { get; set; } + public bool CanAthletics { get; set; } + } +} \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion.ViewModels/WisdomViewModels/WisdomViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/WisdomViewModels/WisdomViewModel.cs new file mode 100644 index 0000000..4b38191 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/WisdomViewModels/WisdomViewModel.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace SessionCompanion.ViewModels.WisdomViewModels +{ + public class WisdomViewModel + { + public int Id { get; set; } + public int CharacterId { get; set; } + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int AnimalHandling { get; set; } + public bool CanAnimalHandling { get; set; } + public int Insight { get; set; } + public bool CanInsight { get; set; } + public int Medicine { get; set; } + public bool CanMedicine { get; set; } + public int Perception { get; set; } + public bool CanPerception { get; set; } + public int Survival { get; set; } + public bool CanSurvival { get; set; } + } +} \ No newline at end of file -- 2.20.1 From 333283443e84dc961b4a72aad7d59a8c27943168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Sat, 5 Dec 2020 13:55:07 +0100 Subject: [PATCH 2/3] Change ViewModels to 5.0 --- .../SessionCompanion.ViewModels.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj index 01ca256..563e6f9 100644 --- a/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj +++ b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 -- 2.20.1 From cd63f5e4027ce221ec8e47aed27b59048bff83d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Sat, 5 Dec 2020 14:01:46 +0100 Subject: [PATCH 3/3] Again bug with vs --- Jenkinsfile | 42 +++--- .../SessionCompanion/ClientApp/package.json | 120 +++++++++--------- .../SessionCompanion/appsettings.json | 26 ++-- 3 files changed, 94 insertions(+), 94 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e8bae64..edc5f50 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,21 +1,21 @@ -pipeline { - agent any - stages { - stage('Build image') { - steps { - echo "Building docker image" - script { - dir('SessionCompanion/SessionCompanion'){ - def customImage = docker.build("session-companion:${env.BUILD_ID}") - //customImage.withRun('-p 5050:5050') - } - } - } - } - stage('Delete image') { - steps { - sh "docker rmi session-companion:${env.BUILD_ID}" - } - } - } -} +pipeline { + agent any + stages { + stage('Build image') { + steps { + echo "Building docker image" + script { + dir('SessionCompanion/SessionCompanion'){ + def customImage = docker.build("session-companion:${env.BUILD_ID}") + //customImage.withRun('-p 5050:5050') + } + } + } + } + stage('Delete image') { + steps { + sh "docker rmi session-companion:${env.BUILD_ID}" + } + } + } +} diff --git a/SessionCompanion/SessionCompanion/ClientApp/package.json b/SessionCompanion/SessionCompanion/ClientApp/package.json index 38ffe6c..65a59e2 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/package.json +++ b/SessionCompanion/SessionCompanion/ClientApp/package.json @@ -1,61 +1,61 @@ -{ - "name": "sessioncompanion", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "build:ssr": "ng run SessionCompanion:server:dev", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "8.2.12", - "@angular/cdk": "~8.2.3", - "@angular/common": "8.2.12", - "@angular/compiler": "8.2.12", - "@angular/core": "8.2.12", - "@angular/forms": "8.2.12", - "@angular/material": "^8.2.3", - "@angular/platform-browser": "8.2.12", - "@angular/platform-browser-dynamic": "8.2.12", - "@angular/platform-server": "8.2.12", - "@angular/router": "8.2.12", - "@nguniversal/module-map-ngfactory-loader": "8.1.1", - "aspnet-prerendering": "^3.0.1", - "bootstrap": "^4.3.1", - "core-js": "^3.3.3", - "hammerjs": "^2.0.8", - "jquery": "3.4.1", - "oidc-client": "^1.9.1", - "popper.js": "^1.16.0", - "rxjs": "^6.5.3", - "zone.js": "0.9.1" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^0.803.26", - "@angular/cli": "^8.3.26", - "@angular/compiler-cli": "^8.2.14", - "@angular/language-service": "^8.2.12", - "@types/jasmine": "~3.4.4", - "@types/jasminewd2": "~2.0.8", - "@types/node": "~12.11.6", - "codelyzer": "^5.2.0", - "jasmine-core": "~3.5.0", - "jasmine-spec-reporter": "~4.2.1", - "karma": "^5.0.2", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage-istanbul-reporter": "~2.1.0", - "karma-jasmine": "~2.0.1", - "karma-jasmine-html-reporter": "^1.4.2", - "typescript": "3.5.3" - }, - "optionalDependencies": { - "node-sass": "^4.12.0", - "protractor": "~5.4.2", - "ts-node": "~8.4.1", - "tslint": "~5.20.0" - } +{ + "name": "sessioncompanion", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "build:ssr": "ng run SessionCompanion:server:dev", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "8.2.12", + "@angular/cdk": "~8.2.3", + "@angular/common": "8.2.12", + "@angular/compiler": "8.2.12", + "@angular/core": "8.2.12", + "@angular/forms": "8.2.12", + "@angular/material": "^8.2.3", + "@angular/platform-browser": "8.2.12", + "@angular/platform-browser-dynamic": "8.2.12", + "@angular/platform-server": "8.2.12", + "@angular/router": "8.2.12", + "@nguniversal/module-map-ngfactory-loader": "8.1.1", + "aspnet-prerendering": "^3.0.1", + "bootstrap": "^4.3.1", + "core-js": "^3.3.3", + "hammerjs": "^2.0.8", + "jquery": "3.4.1", + "oidc-client": "^1.9.1", + "popper.js": "^1.16.0", + "rxjs": "^6.5.3", + "zone.js": "0.9.1" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^0.803.26", + "@angular/cli": "^8.3.26", + "@angular/compiler-cli": "^8.2.14", + "@angular/language-service": "^8.2.12", + "@types/jasmine": "~3.4.4", + "@types/jasminewd2": "~2.0.8", + "@types/node": "~12.11.6", + "codelyzer": "^5.2.0", + "jasmine-core": "~3.5.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "^5.0.2", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~2.1.0", + "karma-jasmine": "~2.0.1", + "karma-jasmine-html-reporter": "^1.4.2", + "typescript": "3.5.3" + }, + "optionalDependencies": { + "node-sass": "^4.12.0", + "protractor": "~5.4.2", + "ts-node": "~8.4.1", + "tslint": "~5.20.0" + } } \ No newline at end of file diff --git a/SessionCompanion/SessionCompanion/appsettings.json b/SessionCompanion/SessionCompanion/appsettings.json index cb23b68..d9cfdc6 100644 --- a/SessionCompanion/SessionCompanion/appsettings.json +++ b/SessionCompanion/SessionCompanion/appsettings.json @@ -1,13 +1,13 @@ -{ - "ConnectionStrings": { - "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SessionCompanion;Trusted_Connection=True;MultipleActiveResultSets=true" - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} +{ + "ConnectionStrings": { + "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SessionCompanion;Trusted_Connection=True;MultipleActiveResultSets=true" + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} -- 2.20.1