Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • minerva/frontend
1 result
Show changes
Commits on Source (44)
Showing
with 211 additions and 17 deletions
......@@ -3,6 +3,7 @@ stages:
- prettier
- test
- deploy
- packaging
cache:
paths:
- ~/.cache
......@@ -75,3 +76,22 @@ deploy_staging:
- vercel pull --yes --environment=production --token=$VERCEL_TOKEN
- vercel build --prod --token=$VERCEL_TOKEN
- vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
build:deb:
image: node:16.16.0
stage: packaging
only:
- tags
- development
before_script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y dh-make build-essential lintian devscripts xsltproc fakeroot xsltproc docbook-xsl curl gnupg git zip
artifacts:
# you cannot enforce never here yet
expire_in: 1000 yrs
paths:
- 'debian/*.deb'
script:
- export DEBFULLNAME="Piotr Gawron"
- export DEBEMAIL="piotr.gawron@uni.lu"
- debian/create-debian-pkg.sh
minerva-front (18.0.0~beta.5) stable; urgency=medium
* Small improvements: when exporting map as image provide default selections
in for format and submap (#295)
* Small improvements: dropdown sections in exporting map as image are
unfolded permanently (#296)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 04 Oct 2024 13:00:00 +0200
minerva-front (18.0.0~beta.4) stable; urgency=medium
* Bugfix: connectivity issue should report a problem with network instead of
submitting error report(#293)
* Bugfix: source map for js was missing (#292)
* Bugfix: sometimes project don't have link to disease or organism, this
crashed listing of projects after log in (#290)
* Bugfix: show proper message when there is a problem with overlay data
instead error report form (#291)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 02 Oct 2024 13:00:00 +0200
minerva-front (18.0.0~beta.3) stable; urgency=medium
* Bugfix: link to download project source was invalid
* Bugfix: change background to empty after overlay is loaded so there is no
blank background (#285)
* Bugfix: license info styling (#280)
* Bugfix: list of plugins did not contain version (#287)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 26 Sep 2024 13:00:00 +0200
minerva-front (18.0.0~beta.2) stable; urgency=medium
* Feature: minerva frontend - first version
* Bugfix: when opening overlay provide loading info (#285)
* Bugfix: problem with reporting errors in minervanet (#284)
* Bugfix: license info styling (#284)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 19 Sep 2024 13:00:00 +0200
#!/bin/bash
set -e
#Where source file of the debian package should be placed
SRC_DIR=debian/src
ROOT_DIR=`pwd`
#clean build directories
rm -rf $SRC_DIR debian/minerva-front*
#recreate directory
mkdir $SRC_DIR
export APP_PREFIX=/minerva
npm install
npm run build
cp -r out $SRC_DIR/front
cd $SRC_DIR
zip -r front.zip front
rm -r front
cd $ROOT_DIR
#copy changelog file
cp CHANGELOG $ROOT_DIR/debian/template/changelog
current_version=`cat CHANGELOG |grep minerva-front |head -1 | cut -f2 -d'(' | cut -f1 -d')'`
echo "Current version: " $current_version
#dh_make requires directory name to be like <package>-<version>
# this points to the directory
DEBIAN_DIR=debian/minerva-front-$current_version/
mkdir $DEBIAN_DIR
# copy all source files to this directory
cp $SRC_DIR/* $DEBIAN_DIR
#because dh_make works only from within directory where
#package data will be generated we need to change it
cd $DEBIAN_DIR
#this should be improved (to include src properly)
dh_make -s --createorig -e piotr.gawron@uni.lu -y -t $ROOT_DIR/debian/template
echo "1.0" > debian/source/format
#remove example files generated by dh_make
find -name '*.ex' ! -name 'minerva-front*' -type f -exec rm -f {} +
#set proper architecture
arch=`dpkg --print-architecture`
echo "Architecture: $arch" >>debian/control
#remove some sample file
rm debian/*.ex debian/*.EX debian/README.Debian debian/README.source debian/minerva-front-docs.docs
#build debian package
debuild -us -uc --lintian-opts --suppress-tags bad-distribution-in-changes-file
#run separately to fail on errors (does not work on old debian)
#lintian --suppress-tags bad-distribution-in-changes-file --no-tag-display-limit
# remove temporary changelog
rm $ROOT_DIR/debian/template/changelog
10
Source: minerva-front
Section: science
Priority: optional
Maintainer: Piotr Gawron <piotr.gawron@uni.lu>
Standards-Version: 3.9.7
Vcs-Browser: https://gitlab.lcsb.uni.lu/minerva/frontend
Build-Depends: debhelper (>=10)
Package: minerva-front
Priority: optional
Description: Frontend for standalone web application for visualization,
exploration and management of molecular networks encoded in SBGN-compliant
format. After installation, the resource is used and managed via a web browser,
under the default address 'http://localhost:8080/minerva/'. Full documentation
can be found here: https://minerva.pages.uni.lu/doc/
Homepage: https://minerva.pages.uni.lu/
Depends: ${misc:Depends}
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: minerva-front
Source: https://minerva.pages.uni.lu/doc/
Files: front.zip
Copyright: 2024 Piotr Gawron <piotr.gawron@uni.lu>
License: AGPL-3.0
Comment: Manual for the package.
Files: debian/*
Copyright: 2024 Piotr Gawron <piotr.gawron@uni.lu>
License: AGPL-3.0
License: AGPL-3.0
Copyright (C) 2024 Piotr Gawron
.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
front.zip /usr/share/minerva/
#!/usr/bin/make -f
%:
dh $@
......@@ -3,6 +3,7 @@ const nextConfig = {
reactStrictMode: true,
basePath: process.env.APP_PREFIX ? process.env.APP_PREFIX + '/index.html' : '',
assetPrefix: process.env.APP_PREFIX ? process.env.APP_PREFIX : '',
productionBrowserSourceMaps: true,
output: 'export',
images: {
unoptimized: true,
......
......@@ -2,6 +2,6 @@ window.config = {
BASE_API_URL: 'https://lux1.atcomp.pl/minerva/api',
BASE_NEW_API_URL: 'https://lux1.atcomp.pl/minerva/new_api/',
BASE_MAP_IMAGES_URL: 'https://lux1.atcomp.pl/',
DEFAULT_PROJECT_ID: 'pdmap_appu_test',
DEFAULT_PROJECT_ID: 'sample',
ADMIN_PANEL_URL: 'https://lux1.atcomp.pl/minerva/admin.xhtml',
};
......@@ -28,7 +28,6 @@ export const ErrorReportModal: React.FC = () => {
const javaStacktrace = getValue(errorData?.javaStacktrace);
const stacktrace = getValue(errorData?.stacktrace);
const version = getValue(errorData?.version);
const message = getValue(errorData?.message);
const timestamp = errorData ? errorData.timestamp : Math.floor(+new Date() / ONE_THOUSAND);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
......@@ -42,7 +41,6 @@ export const ErrorReportModal: React.FC = () => {
stacktrace,
version,
timestamp,
message,
});
const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {
......@@ -77,7 +75,6 @@ export const ErrorReportModal: React.FC = () => {
return (
<div className="w-[800px] border border-t-[#E1E0E6] bg-white">
<form onSubmit={handleSubmit} className="p-4">
<p className="my-4 font-bold"> {errorDataToSend.message}</p>
<p className="my-4">
If you agree to submit the following information to the minerva maintainers please uncheck
all boxes that might contain sensitive data.
......
......@@ -48,7 +48,7 @@ describe('AvailablePluginsDrawer - component', () => {
},
});
const pluginLabel = screen.getByText(currentPlugin.name);
const pluginLabel = screen.getByText(`${currentPlugin.name} (${currentPlugin.version})`);
expect(pluginLabel).toBeInTheDocument();
},
);
......
......@@ -43,7 +43,7 @@ describe('LoadPlugin - component', () => {
it('renders plugin name', () => {
renderComponent({ plugin });
const title = screen.getByText(plugin.name);
const title = screen.getByText(`${plugin.name} (${plugin.version})`);
expect(title).toBeInTheDocument();
});
......
......@@ -22,7 +22,9 @@ export const LoadPlugin = ({ plugin }: Props): JSX.Element => {
return (
<div className="flex w-full items-center justify-between text-sm">
<span className="text-cetacean-blue">{plugin.name}</span>
<span className="text-cetacean-blue">
{plugin.name} ({plugin.version})
</span>
<Button
variantStyles="secondary"
className="h-10 self-end rounded-e rounded-s text-xs font-medium"
......
......@@ -12,12 +12,14 @@ type CollapsibleSectionProps = {
title: string;
children: React.ReactNode;
onOpened?(): void;
dangerouslySetExpanded?: boolean;
};
export const CollapsibleSection = ({
title,
children,
onOpened,
dangerouslySetExpanded,
}: CollapsibleSectionProps): React.ReactNode => {
const handleOnChange = (ids: ID[]): void => {
const hasBeenOpened = ids.length > ZERO;
......@@ -29,7 +31,7 @@ export const CollapsibleSection = ({
return (
<Accordion allowZeroExpanded onChange={handleOnChange}>
<AccordionItem>
<AccordionItem dangerouslySetExpanded={dangerouslySetExpanded}>
<AccordionItemHeading>
<AccordionItemButton>{title}</AccordionItemButton>
</AccordionItemHeading>
......
......@@ -40,8 +40,6 @@ describe('ImageFormat - component', () => {
},
});
expect(screen.queryByTestId('checkbox-filter')).not.toBeVisible();
const navigationButton = screen.getByTestId('accordion-item-button');
act(() => {
......
......@@ -4,7 +4,8 @@ import {
loadingConfigurationMainSelector,
} from '@/redux/configuration/configuration.selectors';
import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { useContext } from 'react';
import { useContext, useState } from 'react';
import { CheckboxItem } from '@/components/Map/Drawer/ExportDrawer/CheckboxFilter/CheckboxFilter.types';
import { CheckboxFilter } from '../../CheckboxFilter';
import { CollapsibleSection } from '../../CollapsibleSection';
import { ExportContext } from '../ExportCompound.context';
......@@ -23,8 +24,18 @@ export const ImageFormat = (): React.ReactNode => {
label: name,
}));
const options = useState<CheckboxItem[]>(mappedElementAnnotations);
if (
!isPending &&
currentImageFormats.length === ZERO &&
options.length > ZERO &&
options[ZERO].length > ZERO
) {
setImageFormats([options[ZERO][ZERO]]);
}
return (
<CollapsibleSection title="Image format">
<CollapsibleSection title="Image format" dangerouslySetExpanded>
{isPending && <p>Loading...</p>}
{!isPending && mappedElementAnnotations.length > ZERO && (
<CheckboxFilter
......
......@@ -5,7 +5,7 @@ export const ImageSize = (): React.ReactNode => {
const { width, height, handleChangeHeight, handleChangeWidth } = useImageSize();
return (
<CollapsibleSection title="Image size">
<CollapsibleSection title="Image size" dangerouslySetExpanded>
<div className="flex flex-col gap-4">
<label className="flex h-9 items-center gap-4">
<span className="w-12">Width:&nbsp;</span>
......
......@@ -39,8 +39,6 @@ describe('Submap - component', () => {
},
});
expect(screen.queryByTestId('checkbox-filter')).not.toBeVisible();
const navigationButton = screen.getByTestId('accordion-item-button');
act(() => {
......
import { ZERO } from '@/constants/common';
import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { loadingModelsSelector, modelsDataSelector } from '@/redux/models/models.selectors';
import { useContext } from 'react';
import { useContext, useState } from 'react';
import { CheckboxItem } from '@/components/Map/Drawer/ExportDrawer/CheckboxFilter/CheckboxFilter.types';
import { CheckboxFilter } from '../../CheckboxFilter';
import { CollapsibleSection } from '../../CollapsibleSection';
import { ExportContext } from '../ExportCompound.context';
......@@ -18,8 +19,18 @@ export const Submap = (): React.ReactNode => {
label: name,
}));
const options = useState<CheckboxItem[]>(mappedElementAnnotations);
if (
!isPending &&
currentSelectedModels.length === ZERO &&
options.length > ZERO &&
options[ZERO].length > ZERO
) {
setModels([options[ZERO][ZERO]]);
}
return (
<CollapsibleSection title="Submap">
<CollapsibleSection title="Submap" dangerouslySetExpanded>
{isPending && <p>Loading...</p>}
{!isPending && mappedElementAnnotations && mappedElementAnnotations.length > ZERO && (
<CheckboxFilter
......