fixing deploy configuration

parent 081ad105
......@@ -22,6 +22,7 @@
"options": {
"outputPath": "dist/ipmworks-web",
"index": "src/index.html",
"baseHref": "/toolbox/",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
......@@ -40,15 +41,17 @@
},
"configurations": {
"production": {
"buildOptimizer": true,
"optimization": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "10mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumWarning": "5mb",
"maximumError": "4kb"
}
],
......@@ -61,7 +64,7 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"buildOptimizer": true,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
......
plugins {
id 'java'
id "com.github.node-gradle.node" version "2.2.4"
id 'war'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
node {
version = '12.18.2'
npmVersion = '7.15.0'
download = true
}
test {
useJUnitPlatform()
war.dependsOn 'npm_run_build'
war {
from 'dist/ipmworks-web'
enabled = true
}
......@@ -18,7 +18,6 @@
"@angular/platform-browser": "~12.0.2",
"@angular/platform-browser-dynamic": "~12.0.2",
"@angular/router": "~12.0.2",
"package.json": "~2.0.1",
"primeflex": "~2.0.0",
"primeicons": "~4.1.0",
"primeng": "~12.0.0-rc.1",
......
rootProject.name = 'ipmworks-web'
pluginManagement {
repositories {
gradlePluginPortal ()
}
}
rootProject.name = 'ipmworks-web'
<p-menubar>
<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 pTemplate="end">
<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';
import { AddResourceComponent } from './component/add-resource/add-resource.component';
import {InputTextareaModule} from "primeng/inputtextarea";
import {RadioButtonModule} from "primeng/radiobutton";
import {FileUploadModule} from "primeng/fileupload";
@NgModule({
......@@ -60,6 +61,7 @@ import {RadioButtonModule} from "primeng/radiobutton";
ButtonModule,
RadioButtonModule,
InputTextareaModule,
FileUploadModule
],
providers: [],
bootstrap: [AppComponent]
......
......@@ -52,15 +52,15 @@
</p-tag>
</div>
<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>
<div *ngFor="let sector of resource.relevantSectors" class="horizontal">
<ng-container [ngSwitch]=sector.sectorId>
<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="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="2" class="sector" [src]="'/assets/sectors/vineyard.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="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="2" class="sector" [src]="'assets/sectors/vineyard.svg'" pTooltip="{{sector.value}}">
</ng-container>
</div>
<ng-template pTemplate="footer">
......
......@@ -126,75 +126,251 @@
"value":"Vineyard"
}
]
}
,
},
{
"resourceId": 6,
"title": "Resource 5",
"resourceId": 3,
"title": "Resource 3",
"description": "Some description",
"rating": 1,
"language": "Serbian"
"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": 7,
"title": "Resource 5",
"resourceId": 4,
"title": "Resource 4",
"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": 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",
"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": 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",
"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": 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",
"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": 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",
"rating": 1
"rating": 3,
"imagePath": "assets/asset4.jpg",
"language": "Serbian",
"contentType": {
"resourceTypeId": 2,
"value":"Economic Threshold"
},
"relevantSectors": [{
"sectorId": 5,
"value":"Greenhouse and protected horticulture"
}]
},
{
"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"
}
,
]
},
{
"title": "Resource 5",
"resourceId": 4,
"title": "Resource 4",
"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 = {
production: true
production: true,
baseUrl: 'http://localhost:8080/ipmworks-back'
};
......@@ -2,11 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>IpmworksWeb</title>
<title>IPMworks toolbox</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<link rel="icon" href="assets/logo.png"></head>
<body>
<app-root></app-root>
</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