fixing deploy configuration

parent 081ad105
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"options": { "options": {
"outputPath": "dist/ipmworks-web", "outputPath": "dist/ipmworks-web",
"index": "src/index.html", "index": "src/index.html",
"baseHref": "/toolbox/",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
...@@ -40,15 +41,17 @@ ...@@ -40,15 +41,17 @@
}, },
"configurations": { "configurations": {
"production": { "production": {
"buildOptimizer": true,
"optimization": false,
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "500kb", "maximumWarning": "10mb",
"maximumError": "1mb" "maximumError": "5mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "2kb", "maximumWarning": "5mb",
"maximumError": "4kb" "maximumError": "4kb"
} }
], ],
...@@ -61,7 +64,7 @@ ...@@ -61,7 +64,7 @@
"outputHashing": "all" "outputHashing": "all"
}, },
"development": { "development": {
"buildOptimizer": false, "buildOptimizer": true,
"optimization": false, "optimization": false,
"vendorChunk": true, "vendorChunk": true,
"extractLicenses": false, "extractLicenses": false,
......
plugins { plugins {
id 'java' id 'java'
id "com.github.node-gradle.node" version "2.2.4"
id 'war'
} }
group 'org.example'
version '1.0-SNAPSHOT'
repositories { repositories {
mavenCentral() mavenCentral()
} }
dependencies { node {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' version = '12.18.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' npmVersion = '7.15.0'
download = true
} }
test { war.dependsOn 'npm_run_build'
useJUnitPlatform()
} war {
\ No newline at end of file from 'dist/ipmworks-web'
enabled = true
}
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"@angular/platform-browser": "~12.0.2", "@angular/platform-browser": "~12.0.2",
"@angular/platform-browser-dynamic": "~12.0.2", "@angular/platform-browser-dynamic": "~12.0.2",
"@angular/router": "~12.0.2", "@angular/router": "~12.0.2",
"package.json": "~2.0.1",
"primeflex": "~2.0.0", "primeflex": "~2.0.0",
"primeicons": "~4.1.0", "primeicons": "~4.1.0",
"primeng": "~12.0.0-rc.1", "primeng": "~12.0.0-rc.1",
......
rootProject.name = 'ipmworks-web' pluginManagement {
repositories {
gradlePluginPortal ()
}
}
rootProject.name = 'ipmworks-web'
<p-menubar> <p-menubar>
<ng-template pTemplate="start"> <ng-template pTemplate="start">
<img src="/assets/logo-white.png" height="50" class="p-mr-2" routerLink="/home"alt="brand logo"> <img src="assets/logo-white.png" height="50" class="p-mr-2" routerLink="/home"alt="brand logo">
</ng-template> </ng-template>
<ng-template pTemplate="end"> <ng-template pTemplate="end">
<p-button label="Login" icon="pi pi-login" iconPos="left" styleClass="buttonColor"></p-button> <p-button label="Login" icon="pi pi-login" iconPos="left" styleClass="buttonColor"></p-button>
......
...@@ -25,6 +25,7 @@ import { ResourceComponent } from './component/resource/resource.component'; ...@@ -25,6 +25,7 @@ import { ResourceComponent } from './component/resource/resource.component';
import { AddResourceComponent } from './component/add-resource/add-resource.component'; import { AddResourceComponent } from './component/add-resource/add-resource.component';
import {InputTextareaModule} from "primeng/inputtextarea"; import {InputTextareaModule} from "primeng/inputtextarea";
import {RadioButtonModule} from "primeng/radiobutton"; import {RadioButtonModule} from "primeng/radiobutton";
import {FileUploadModule} from "primeng/fileupload";
@NgModule({ @NgModule({
...@@ -60,6 +61,7 @@ import {RadioButtonModule} from "primeng/radiobutton"; ...@@ -60,6 +61,7 @@ import {RadioButtonModule} from "primeng/radiobutton";
ButtonModule, ButtonModule,
RadioButtonModule, RadioButtonModule,
InputTextareaModule, InputTextareaModule,
FileUploadModule
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]
......
...@@ -52,15 +52,15 @@ ...@@ -52,15 +52,15 @@
</p-tag> </p-tag>
</div> </div>
<img alt="Card" [src]="resource.imagePath"> <img alt="Card" [src]="resource.imagePath">
<img class="flag" alt="Card" [src]="'/assets/flags/'+resource.language.toLowerCase()+'.svg'"> <img class="flag" alt="Card" [src]="'assets/flags/'+resource.language.toLowerCase()+'.svg'">
</ng-template> </ng-template>
<div *ngFor="let sector of resource.relevantSectors" class="horizontal"> <div *ngFor="let sector of resource.relevantSectors" class="horizontal">
<ng-container [ngSwitch]=sector.sectorId> <ng-container [ngSwitch]=sector.sectorId>
<img *ngSwitchCase="1" class="sector" [src]="'/assets/sectors/arable.svg'" pTooltip="{{sector.value}}"> <img *ngSwitchCase="1" class="sector" [src]="'assets/sectors/arable.svg'" pTooltip="{{sector.value}}">
<img *ngSwitchCase="5" class="sector" [src]="'/assets/sectors/greenhouse.svg'" pTooltip="{{sector.value}}"> <img *ngSwitchCase="5" class="sector" [src]="'assets/sectors/greenhouse.svg'" pTooltip="{{sector.value}}">
<img *ngSwitchCase="3" class="sector"[src]="'/assets/sectors/orchard.svg'" pTooltip="{{sector.value}}"> <img *ngSwitchCase="3" class="sector"[src]="'assets/sectors/orchard.svg'" pTooltip="{{sector.value}}">
<img *ngSwitchCase="4" class="sector"[src]="'/assets/sectors/vegetables.svg'" pTooltip="{{sector.value}}"> <img *ngSwitchCase="4" class="sector"[src]="'assets/sectors/vegetables.svg'" pTooltip="{{sector.value}}">
<img *ngSwitchCase="2" class="sector" [src]="'/assets/sectors/vineyard.svg'" pTooltip="{{sector.value}}"> <img *ngSwitchCase="2" class="sector" [src]="'assets/sectors/vineyard.svg'" pTooltip="{{sector.value}}">
</ng-container> </ng-container>
</div> </div>
<ng-template pTemplate="footer"> <ng-template pTemplate="footer">
......
...@@ -126,75 +126,251 @@ ...@@ -126,75 +126,251 @@
"value":"Vineyard" "value":"Vineyard"
} }
] ]
} },
,
{ {
"resourceId": 6, "resourceId": 3,
"title": "Resource 5", "title": "Resource 3",
"description": "Some description", "description": "Some description",
"rating": 1, "rating": 5,
"language": "Serbian" "imagePath": "assets/asset3.jpg",
} "language": "English",
, "contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{ {
"resourceId": 7, "resourceId": 4,
"title": "Resource 5", "title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
} "imagePath": "assets/asset4.jpg",
, "language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{ {
"title": "Resource 5", "resourceId": 3,
"title": "Resource 3",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 5,
} "imagePath": "assets/asset3.jpg",
, "language": "English",
"contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{ {
"title": "Resource 5", "resourceId": 4,
"title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
} "imagePath": "assets/asset4.jpg",
, "language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{ {
"title": "Resource 5", "resourceId": 3,
"title": "Resource 3",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 5,
} "imagePath": "assets/asset3.jpg",
, "language": "English",
"contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{ {
"title": "Resource 5", "resourceId": 4,
"title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
} "imagePath": "assets/asset4.jpg",
"language": "Serbian",
, "contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{ {
"title": "Resource 5", "resourceId": 3,
"title": "Resource 3",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 5,
} "imagePath": "assets/asset3.jpg",
, "language": "English",
"contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{ {
"title": "Resource 5", "resourceId": 4,
"title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
} "imagePath": "assets/asset4.jpg",
, "language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{ {
"title": "Resource 5", "resourceId": 3,
"title": "Resource 3",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 5,
} "imagePath": "assets/asset3.jpg",
, "language": "English",
"contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{ {
"title": "Resource 5", "resourceId": 4,
"title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
} "imagePath": "assets/asset4.jpg",
, "language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{ {
"title": "Resource 5", "resourceId": 3,
"title": "Resource 3",
"description": "Some description",
"rating": 5,
"imagePath": "assets/asset3.jpg",
"language": "English",
"contentType": {
"resourceTypeId": 1,
"value": "IPM technique"
},
"relevantSectors": [{
"sectorId": 3,
"value":"Orchards"
},
{
"sectorId": 2,
"value":"Vineyard"
},
{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}
]
},
{
"resourceId": 4,
"title": "Resource 4",
"description": "Some description", "description": "Some description",
"rating": 1 "rating": 3,
"imagePath": "assets/asset4.jpg",
"language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
} }
] ]
export const environment = { export const environment = {
production: true production: true,
baseUrl: 'http://localhost:8080/ipmworks-back'
}; };
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>IpmworksWeb</title> <title>IPMworks toolbox</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" href="assets/logo.png"></head>
</head>
<body> <body>
<app-root></app-root> <app-root></app-root>
</body> </body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment