Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #50

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*
# Dependencies
!.tool-versions
# Python
!poetry.lock
!pyproject.toml
Expand Down
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 20.11.0
python 3.8.17
poetry 1.6.1
yarn 1.22.19
nodejs 20.18.2
python 3.8.19
poetry 1.8.5
yarn 1.22.22
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# syntax = docker/dockerfile:1
ARG RMS_IMAGE
FROM node:20.11.0-alpine3.18 AS node
FROM node:20.18.2-alpine3.21 AS node

ENV CODE=/code
ENV NODE_MODULES=$CODE/node_modules
ENV TRUNCATION_RULES=src/stores/truncation-rules/templates/truncationRules.json

FROM bitnami/nginx:1.25.2-debian-11-r46 AS nginx
FROM bitnami/nginx:1.27.3-debian-12-r5 AS nginx

FROM ${RMS_IMAGE} AS python
# RMS 12.0 and earlier uses Python 3.6.1, but it is so old that I was unable to update the CA certificates,
# and thus unable to download poetry

ENV POETRY_VERSION=1.6.1

WORKDIR /code
ENV PATH="/root/.local/bin:$PATH"

RUN roxenv pip install --user "poetry==$POETRY_VERSION"
COPY .tool-versions ./
RUN <<EOF
#!/usr/bin/env bash
POETRY_VERSION="$(cat .tool-versions|grep poetry | grep -o -E '([0-9]+\.?)+')"
roxenv pip install --user "poetry==$POETRY_VERSION"
EOF

# This will overwrite RMS' installed packages in favor of those specified by us
RUN roxenv poetry config virtualenvs.create false --local
Expand Down Expand Up @@ -53,6 +56,11 @@ elif [[ $OS_ID == 'centos' ]]; then
yum update -y
yum install -y $@
}
elif [[ $OS_ID == 'rhel' ]]; then
install () {
dnf update -y
dnf install -y $@
}
else
echo "Unsupported OS ($OS_ID)" >/dev/stderr
exit 1
Expand Down
4 changes: 2 additions & 2 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
"ts-custom-error": "^3.3.1",
"typescript": "^5.3.3",
"vite": "^6.0.0",
"vite-plugin-checker": "^0.6.4",
"vite-plugin-checker": "^0.8.0",
"vue-eslint-parser": "^9.4.2",
"vue-meta": "^2.4.0",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.2.0"
},
"postcss": {
"plugins": {}
Expand Down
3 changes: 1 addition & 2 deletions gui/src/components/TheToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ async function loadModelFile(
const { valid, error } = await rms.isApsModelValid(btoa(fileContent))
if (valid) {
rootStore.$reset()
rootStore.loadingMessage = 'Resetting the state...'
await rootStore.fetch()
await rootStore.fetch('Resetting the state...')
await useModelFileLoaderStore()
.populateGUI(json, fileName)

Expand Down
6 changes: 5 additions & 1 deletion gui/src/stores/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ export const useRootStore = defineStore('root', () => {
return { zone: zoneStore.current as Zone, region: regionStore.current as Region | null }
})

async function fetch() {
async function fetch(message?: string) {
if (!mayLoadParameters.value) return

if (message !== undefined) {
loadingMessage.value = message
}
const wasLoading = _loading.value
_loading.value = true

Expand All @@ -105,6 +108,7 @@ export const useRootStore = defineStore('root', () => {

_loading.value = wasLoading
_loaded.value = true
loadingMessage.value = ''
}

async function refresh(
Expand Down
Loading