Skip to content

Commit

Permalink
Merge pull request #1 from opengisch/upgrade-to-qwc2-lts2024
Browse files Browse the repository at this point in the history
[Draft] Upgrade to qwc2 lts2024
  • Loading branch information
vvmruder authored Dec 17, 2024
2 parents c67f500 + 7d46b39 commit 6d3e4b7
Show file tree
Hide file tree
Showing 38 changed files with 8,137 additions and 5,226 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-image-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@ jobs:
with:
context: ./
# do not push for the moment, to avoid load
# push: true
push: true
tags: ghcr.io/${{ github.repository }}-qwc2-minimal-base:${{ github.head_ref }}-${{ github.sha }}
target: base
- name: Build and push qwc2-minimal-dev
uses: docker/build-push-action@v3
with:
context: ./
# do not push for the moment, to avoid load
# push: true
push: true
tags: ghcr.io/${{ github.repository }}-qwc2-minimal-dev:${{ github.head_ref }}-${{ github.sha }}
target: dev
- name: Build and push qwc2-minimal-builder
uses: docker/build-push-action@v3
with:
context: ./
# do not push for the moment, to avoid load
# push: true
push: true
tags: ghcr.io/${{ github.repository }}-qwc2-minimal-builder:${{ github.head_ref }}-${{ github.sha }}
target: builder
- name: Build and push qwc2-minimal-prod
uses: docker/build-push-action@v3
with:
context: ./
# do not push for the moment, to avoid load
# push: true
push: true
tags: ghcr.io/${{ github.repository }}-qwc2-minimal-prod:${{ github.head_ref }}-${{ github.sha }}
target: prod
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG NODE_VERSION="18.10"
ARG NODE_VERSION="20.18"
FROM node:${NODE_VERSION} as base

ARG QWC2_VERSION_HASH="86ba224001cd3c9813ad645f4ccf4de7a17db801"
# 2024.11.27-lts
ARG QWC2_VERSION_HASH="1604782b19b5b9d357e750fbc480bade8ebeaf37"
ARG QWC2_DOWNLOAD_PATH="https://github.com/qgis/qwc2/archive/$QWC2_VERSION_HASH.zip"
ARG QWC2_REPO_VERSION_URL="https://github.com/qgis/qwc2/tree/$QWC2_VERSION_HASH"
RUN apt-get update && apt-get install -y \
Expand Down
11 changes: 8 additions & 3 deletions app/.babelrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-object-rest-spread"
],
"presets": [
[
Expand All @@ -11,5 +11,10 @@
}
],
"@babel/preset-react"
]
],
"env": {
"production": {
"plugins": ["transform-react-remove-prop-types"]
}
}
}
54 changes: 28 additions & 26 deletions app/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@
"jsx": true
},
"rules": {
/**
* Strict mode
*/
/**
* Strict mode
*/
// babel inserts "use strict"; for us
"strict": [2, "never"], // http://eslint.org/docs/rules/strict

/**
* ES6
*/
/**
* ES6
*/
"no-var": 2, // http://eslint.org/docs/rules/no-var
"prefer-const": 2, // http://eslint.org/docs/rules/prefer-const

/**
* Variables
*/
/**
* Variables
*/
"no-shadow": 2, // http://eslint.org/docs/rules/no-shadow
"no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names
"no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars
Expand All @@ -69,19 +69,19 @@
}],
"no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define

/**
* Possible errors
*/
/**
* Possible errors
*/
"comma-dangle": [2, "never"], // http://eslint.org/docs/rules/comma-dangle
"no-console": 1, // http://eslint.org/docs/rules/no-console
"no-alert": 1, // http://eslint.org/docs/rules/no-alert
"quote-props": [2, "consistent-as-needed"], // https://eslint.org/docs/rules/quote-props
"block-scoped-var": 2, // http://eslint.org/docs/rules/block-scoped-var


/**
* Best practices
*/
/**
* Best practices
*/
"consistent-return": 2, // http://eslint.org/docs/rules/consistent-return
"curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly
"default-case": 2, // http://eslint.org/docs/rules/default-case
Expand All @@ -95,6 +95,7 @@
"no-eval": 2, // http://eslint.org/docs/rules/no-eval
"no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native
"no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind
"no-extra-semi": "warn",
"no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal
"no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval
"no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks
Expand All @@ -116,14 +117,14 @@
"wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife
"yoda": 2, // http://eslint.org/docs/rules/yoda

/**
* Style
*/
/**
* Style
*/
"indent": [2, 4], // http://eslint.org/docs/rules/indent
"brace-style": [2, // http://eslint.org/docs/rules/brace-style
"1tbs", {
"allowSingleLine": true
}],
"allowSingleLine": true
}],
"quotes": [
0, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes
],
Expand All @@ -138,8 +139,8 @@
"eol-last": 2, // http://eslint.org/docs/rules/eol-last
"func-names": 0, // http://eslint.org/docs/rules/func-names
"key-spacing": [2, { // http://eslint.org/docs/rules/key-spacing
"beforeColon": false,
"afterColon": true
"beforeColon": false,
"afterColon": true
}],
"new-cap": [2, { // http://eslint.org/docs/rules/new-cap
"newIsCap": true
Expand All @@ -166,14 +167,15 @@
"space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops
"spaced-comment": 2, // http://eslint.org/docs/rules/spaced-comment

/**
* JSX style
*/
/**
* JSX style
*/
"react/jsx-boolean-value": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
"react/jsx-sort-props": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
"react/sort-prop-types": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md
"react/no-did-mount-set-state": [2, "disallow-in-func"], // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
"react/self-closing-comp": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
"react/jsx-wrap-multilines": 2 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
"react/jsx-wrap-multilines": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
"react/no-access-state-in-setstate": "error"
}
}
4 changes: 3 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
<meta name="HandheldFriendly" content="true" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>QGIS Web Client 2</title>
<title>OPENGIS.ch QGIS Web Client 2</title>
<link rel="stylesheet" type="text/css" href="assets/css/qwc2.css" />
<link rel="stylesheet" type="text/css" href="assets/css/colorschemes.css" />
<link rel="apple-touch-icon" href="assets/img/app_icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/app_icon_72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/app_icon_114.png"/>
Expand Down Expand Up @@ -49,6 +50,7 @@
}
}
</style>
<script type="text/javascript" src="assets/searchProviders.js" ></script>
<script type="text/javascript">
window.addEventListener("load", function(ev) {
document.getElementById('splash').style.display = 'none';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@ export function customAttributeCalculator(layer, feature) {
// )];
return [];
}

export function attributeTransform(name, value, layer, feature) {
// Here you can transform the attribute value.
return value;
}
export const customExporters = [
/*
{
id: "myexport",
title: "My Format",
allowClipboard: true,
export: (features, callback) => {
const data = convertToMyFormat(features);
callback({
data: data, type: "mime/type", filename: "export.ext"
});
}
}
*/
];
Loading

0 comments on commit 6d3e4b7

Please sign in to comment.