Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
* upd VERSION tag

* upd CHANGELOG

* drop chemotion_ELN plugins: clean JS code
  • Loading branch information
PiTrem committed Sep 26, 2022
1 parent 9a6c244 commit a6e2533
Show file tree
Hide file tree
Showing 22 changed files with 85 additions and 187 deletions.
33 changes: 29 additions & 4 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
SFTP_HOST=sftp-host-production
SFTP_PORT=sftp-port-production
SFTP_UPLOAD_FOLDER=sftp-upload-folder # e.g. uploads
SFTP_USER=sftp-user-production
# default uri of your Chemotion ELN for http links in e-mails and notification:
PUBLIC_URL='http://sld.tld'
# senders e-mail:
DEVISE_SENDER='[email protected]'

## SMTP config
# Remote mail server
SMTP_ADDRESS='smtp.sld.tld'
SMTP_PORT=587
# login user name & password:
SMTP_USERNAME='[email protected]'
SMTP_PASSWORD='s3cr3tPW'
# optional, HELO domain
SMTP_DOMAIN='sld.tld'
# detect STARTTLS
SMTP_TLS=true
# authentication type ('plain' 'login' (Base64 encoded) or 'cram_md5')
SMTP_AUTH='plain'
# how OpenSSL checks the certificate ('none' or 'peer')
SMTP_SSL_MODE='none'

# disable mail delivery
# DISABLE_MAIL_DELIVERY='nomail'


#SFTP_HOST=sftp-host-production
#SFTP_PORT=sftp-port-production
#SFTP_UPLOAD_FOLDER=sftp-upload-folder # e.g. uploads
#SFTP_USER=sftp-user-production

# Choose between password and ssh-key authentication.
# The default key locations are ~/.ssh/id_rsa,~/.ssh/id_dsa. If you want to use
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"plugins": [
"react"
],
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.16.0
v14.20.0
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,35 @@
* Fixes


# [v1.3.1-pre]
## [v1.4.0]
> 2022-09-26
* Important for admin and developers:
* change of environment variable: use PUBLIC_URL instead of HOST and SMTP_HOST
* nodejs upd to 14.20.0
* drop support for bionic

* Features and Improvements:
* ketcherservice: server generation of sample svg
* Reaction coefficient: improve yield calculation (https://github.com/ComPlat/chemotion_ELN/issues/544)
* Metadata-converter: v0.6.0
* Chemspectra: v0.10.15 (allow reprocessing, read Bruker processed files if present)
* Inbox: delete multiple attachments at once (https://github.com/ComPlat/chemotion_ELN/issues/571)
* research-plan: improve context-menu in tables


* Fixes:
* SVG generation for sample and reaction: (https://github.com/ComPlat/chemotion_ELN/issues/846)
* Sample amount metric
* report svg composer: skip image if image file does not exist.
* chemspectra: duplicate image generation






## [v1.3.1]
> 2022-07-07
* Features and Improvements:
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version: 1.3.1
base_revision: d7c0c64dda79f938430e5236ce7559ab3bc17242
version: 1.4.0
base_revision: 9a6c2441a52356989aa69da67f8283a27a279ff6
current_revision: 0
12 changes: 0 additions & 12 deletions app/packs/src/components/CollectionManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import MyCollections from './collection_management/MyCollections';
import MySharedCollections from './collection_management/MySharedCollections';
import SharedWithMeCollections from './collection_management/SharedWithMeCollections';
import SyncWithMeCollections from './collection_management/SyncWithMeCollections';
import XTabs from './extra/CollectionManagementXTabs';

const CollectionManagement = () => {
const tabContents = [
Expand All @@ -14,17 +13,6 @@ const CollectionManagement = () => {
<Tab eventKey={2} key={2} title="Collections shared with me "><SharedWithMeCollections /></Tab>,
<Tab eventKey={3} key={3} title="Collections synchronized with me "><SyncWithMeCollections /></Tab>,
];
const offset = tabContents.length;
for (let j = 0; j < XTabs.count; j += 1) {
if (XTabs[`on${j}`]()) {
const NoName = XTabs[`content${j}`];
tabContents.push((
<Tab eventKey={offset + j} key={offset + j} title={XTabs[`title${j}`]} >
<NoName />
</Tab>
));
}
}

return (
<div id="collection-management">
Expand Down
7 changes: 0 additions & 7 deletions app/packs/src/components/CollectionTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import LoadingActions from './actions/LoadingActions';
import UIStore from './stores/UIStore';
import ElementStore from './stores/ElementStore';
import InboxStore from './stores/InboxStore';
import Xdiv from './extra/CollectionTreeXdiv';
import UserInfos from './UserInfos';

import DeviceBox from './inbox/DeviceBox';
Expand Down Expand Up @@ -287,11 +286,6 @@ export default class CollectionTree extends React.Component {

render() {
let {ownCollectionVisible, inboxVisible, inbox} = this.state
let extraDiv = [];
for (let j=0;j < Xdiv.count;j++){
let NoName = Xdiv["content"+j];
extraDiv.push(<NoName key={"Xdiv"+j} />);
}

const ownCollectionDisplay = ownCollectionVisible ? '' : 'none';
const inboxDisplay = inboxVisible ? '' : 'none';
Expand Down Expand Up @@ -320,7 +314,6 @@ export default class CollectionTree extends React.Component {
<div className="tree-wrapper">
{this.remoteSyncInSubtrees()}
</div>
{extraDiv.map((e)=>{return e})}
<div className="tree-view">
<div className="title" style={{ backgroundColor: 'white' }}>
<button
Expand Down
10 changes: 1 addition & 9 deletions app/packs/src/components/ElementsTableEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ElementStore from './stores/ElementStore';
import KeyboardStore from './stores/KeyboardStore';

import DragDropItemTypes from './DragDropItemTypes';
import XTdCont from './extra/ElementsTableEntriesXTdCont';
import { elementShowOrNew } from './routesUtils';
import SvgWithPopover from './common/SvgWithPopover';
import UserStore from './stores/UserStore';
Expand Down Expand Up @@ -190,33 +189,26 @@ export default class ElementsTableEntries extends Component {
textAlign: 'center',
cursor: 'pointer'
};
let tdExtraContents = [];
for (let j=0;j < XTdCont.count;j++){
let NoName = XTdCont["content"+j];
tdExtraContents.push(<NoName element={element}/>);
}


const {showPreviews} = UIStore.getState();
const clickToShowDetails = e => this.showDetails(element);
if (showPreviews && (element.type == 'reaction')) {
return (
<td style={svgContainerStyle} onClick={e => this.showDetails(element)}>
<SVG src={element.svgPath} className={classNames} key={element.svgPath}/>
{tdExtraContents.map((e)=>{return e;})}
</td>
);
} else if (element.type === 'research_plan') {
if (element.thumb_svg !== 'not available') {
return (
<td style={svgContainerStyle} onClick={e => this.showDetails(element)}>
<img src={`data:image/png;base64,${element.thumb_svg}`} alt="" style={{ cursor: 'pointer' }} />
{tdExtraContents.map((e) => { return e; })}
</td>
);
}
return (
<td style={svgContainerStyle} onClick={e => this.showDetails(element)}>
{tdExtraContents.map((e) => { return e; })}
</td>
);
}
Expand Down
8 changes: 0 additions & 8 deletions app/packs/src/components/ElementsTableSampleEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import KeyboardStore from './stores/KeyboardStore';

import DragDropItemTypes from './DragDropItemTypes';
import SampleName from './common/SampleName';
import XMolHeadCont from './extra/ElementsTableSampleEntriesXMolHeadCont';
import { sampleShowOrNew } from './routesUtils';
import SvgWithPopover from './common/SvgWithPopover';
import { ShowUserLabels } from './UserLabels';
Expand Down Expand Up @@ -140,12 +139,6 @@ const svgPreview = (showPreviews, sample) => (

const MoleculeHeader = ({ sample, show, showDragColumn, onClick, targetType }) => {
const showIndicator = (show) ? 'glyphicon-chevron-down' : 'glyphicon-chevron-right';
const tdExtraContents = [];

for (let j = 0; j < XMolHeadCont.count; j++) {
const NoName = XMolHeadCont[`content${j}`];
tdExtraContents.push(<NoName element={sample} key={`exMolHead${j}`} />);
}

const { collId, showPreviews } = UIStore.getState();
return (
Expand All @@ -170,7 +163,6 @@ const MoleculeHeader = ({ sample, show, showDragColumn, onClick, targetType }) =
</div>
<div style={{ position: 'absolute', top: '10px', right: '25px', float: 'right' }} >
<ChemrepoLabels chemrepoId={sample.molecule.chem_repo && sample.molecule.chem_repo.id} />
{tdExtraContents.map(e => e)}
<PubchemLabels element={sample} />
</div>
<div style={{ position: 'absolute', bottom: '10px', right: '25px', float: 'right' }} >
Expand Down
27 changes: 0 additions & 27 deletions app/packs/src/components/ReactionDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import ReactionDetailsProperties from './ReactionDetailsProperties';
import GreenChemistry from './green_chem/GreenChemistry';
import Utils from './utils/Functions';
import PrintCodeButton from './common/PrintCodeButton';
import XTabs from './extra/ReactionDetailsXTabs';
import UIStore from './stores/UIStore';
import UIActions from './actions/UIActions';
import { setReactionByType } from './ReactionDetailsShare';
Expand Down Expand Up @@ -231,19 +230,6 @@ export default class ReactionDetails extends Component {
);
}

extraTab(ind) {
const reaction = this.state.reaction || {};
const num = ind;
const NoName = XTabs["content"+num];
const TabName = XTabs["title"+num];
return (
<Tab eventKey={ind + 5} title={TabName} key={`sampleDetailsTab${ind + 3}`} >
<ListGroupItem style={{ paddingBottom: 20 }}>
<NoName reaction={reaction} />
</ListGroupItem>
</Tab>
);
}

reactionSVG(reaction) {
if(!reaction.svgPath) {
Expand Down Expand Up @@ -450,19 +436,6 @@ export default class ReactionDetails extends Component {
green_chemistry: 'Green Chemistry'
}

for (let j = 0; j < XTabs.count; j += 1) {
if (XTabs[`on${j}`](reaction)) {
const NoName = XTabs[`content${j}`];
tabContentsMap[`xtab_${j}`] = (
<Tab eventKey={`xtab_${j}`} key={`xtab_${j}`} title={XTabs[`title${j}`]} >
<ListGroupItem style={{ paddingBottom: 20 }} >
<NoName reaction={reaction} />
</ListGroupItem>
</Tab>
);
tabTitlesMap[`xtab_${j}`] = XTabs[`title${j}`];
}
}

addSegmentTabs(reaction, this.handleSegmentsChange, tabContentsMap);

Expand Down
24 changes: 0 additions & 24 deletions app/packs/src/components/SampleDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import PubchemLabels from './PubchemLabels';
import ElementReactionLabels from './ElementReactionLabels';
import SampleDetailsContainers from './SampleDetailsContainers';

import XLabels from './extra/SampleDetailsXLabels';
import XTabs from './extra/SampleDetailsXTabs';

import StructureEditorModal from './structure_editor/StructureEditorModal';

import Sample from './models/Sample';
Expand Down Expand Up @@ -557,7 +554,6 @@ export default class SampleDetails extends React.Component {
{colLabel}
<ElementAnalysesLabels element={sample} key={`${sample.id}_analyses`} />
<PubchemLabels element={sample} />
{this.extraLabels().map((Lab, i) => <Lab key={i} element={sample} />)}
</div>
<ShowUserLabels element={sample} />
</div>
Expand Down Expand Up @@ -1136,13 +1132,6 @@ export default class SampleDetails extends React.Component {
);
}

extraLabels() {
let labels = [];
for (let j = 0; j < XLabels.count; j += 1) {
labels.push(XLabels[`content${j}`]);
}
return labels;
}

sampleIsValid() {
const { sample, loadingMolecule, quickCreator } = this.state;
Expand Down Expand Up @@ -1295,19 +1284,6 @@ export default class SampleDetails extends React.Component {
measurements: 'Measurements!'
};

for (let j = 0; j < XTabs.count; j += 1) {
if (XTabs[`on${j}`](sample)) {
const NoName = XTabs[`content${j}`];
tabContentsMap[`xtab_${j}`] = (
<Tab eventKey={`xtab_${j}`} key={`xtab_${j}`} title={XTabs[`title${j}`]} >
<ListGroupItem style={{ paddingBottom: 20 }} >
<NoName sample={sample} />
</ListGroupItem>
</Tab>
);
tabTitlesMap[`xtab_${j}`] = XTabs[`title${j}`];
}
}

addSegmentTabs(sample, this.handleSegmentsChange, tabContentsMap);
const stb = [];
Expand Down
7 changes: 0 additions & 7 deletions app/packs/src/components/inbox/InboxModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import LoadingActions from '../actions/LoadingActions';
import DeviceBox from '../inbox/DeviceBox';
import UnsortedBox from '../inbox/UnsortedBox';

import Xdiv from '../extra/CollectionTreeXdiv';

export default class InboxModal extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -90,11 +88,6 @@ export default class InboxModal extends React.Component {
const { showCollectionTree } = this.props;
const { visible, inboxVisible } = this.state;

const extraDiv = [];
for (let j = 0; j < Xdiv.count; j += 1) {
const NoName = Xdiv[`Xdiv${j}`];
extraDiv.push(<NoName key={`Xdiv${j}`} />);
}

const panelClass = showCollectionTree ? 'small-col col-md-6' : 'small-col col-md-5';
const inboxDisplay = inboxVisible ? '' : 'none';
Expand Down
9 changes: 1 addition & 8 deletions app/packs/src/components/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@ import UserStore from './stores/UserStore';
import UIActions from './actions/UIActions';
import UserActions from './actions/UserActions';
import ElementActions from './actions/ElementActions';
import rXr from './extra/routesXroutes';
import * as routesUtils from './routesUtils';
import UIFetcher from './fetchers/UIFetcher';
import klasses from '../../../../config/klasses.json';


const allRoutes = (r) => {
let rts = { ...r };
for (let i = 0; i < rXr.count; i++) { rts = { ...rts, ...rXr[`content${i}`] }; }
return rts;
}

const routes = {
'/': 'root',
target: {
Expand Down Expand Up @@ -134,5 +127,5 @@ klasses && klasses.forEach((klass) => {
export default function() {
Aviator.root = '/mydb';
Aviator.pushStateEnabled = true;
Aviator.setRoutes(allRoutes(routes));
Aviator.setRoutes(routes);
}
8 changes: 2 additions & 6 deletions app/packs/src/components/search/SearchFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import {Button, FormControl} from 'react-bootstrap'
import Select from 'react-select'
import UIActions from '../actions/UIActions';
import XSearchParams from "../extra/AdvancedSearchXSearchParams";


export default class SearchFilter extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -60,11 +60,7 @@ export default class SearchFilter extends React.Component {
}
];

for (let i = 0; i < XSearchParams.count; i++){
if (XSearchParams[`on${i}`]) {
this.listOptions = this.listOptions.concat(XSearchParams[`content${i}`])
}
}


this.andOrOps = [
{ value: "AND", label: "AND" },
Expand Down
Loading

0 comments on commit a6e2533

Please sign in to comment.