diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 7fbc52e..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,94 +0,0 @@ -Newer release changelog see https://github.com/orangecoding/fredy/releases - ---- - -###### [V5.5.0] - -- Upgrading dependencies -- fixing provider -- allow multiple instances of 1 provider -- **BREAKING**: Minimum node version is now 16 - -###### [V5.4.6] - -- Adding Instana node.js monitoring -- - -###### [V5.4.5] - -- Adding Instana node.js monitoring - -###### [V5.4.4] - -- Add support for Immo Südwest Presse (immo.swp.de) -- Telegram: Use job name instead of ID and link in title -- Fix race condition if user ID is in session but not in user store -- Allow visiting the original provider URL - -###### [V5.4.3] - -- re-writing readme -- improving docker build -- using github's actions to build docker and test automatically - -###### [V5.4.2] - -- Fixing prod build - -###### [V5.4.1] - -- Upgrading dependencies -- Provider urls are now automagically been changed to include the correct sort order for search results - -``` -Note: It has been an point of confusion since the very beginning of Fredy, that people simply copied the url, but -did not take care of sorting the search results by date. If this is not done, Fredy will most likely not see the latest -results, thus cannot report them. This release fixes it by adding the necessary params (or replaces them). -``` - -###### [V5.3.0] - -- Upgrading dependencies -- It's now possible to send mails to multiple receiver using comma separation for MailJet & Sendgrid -- Fixing Immowelt scraping - -###### [V5.2.0] - -- Upgrading dependencies -- Adding new similarity check layer (Duplicates are being removed now) -- Adding paging for search results - -###### [V5.1.0] - -- Upgrading dependencies -- NodeJS 12.13 is now the minimum supported version -- Adding general settings as new configuration page to ui -- Adding new feature working hours - -###### [V5.0.0] - -- Upgrading dependencies -- NodeJS 12 is now the minimum supported version - -###### [V4.0.0] - -Bringing back Immoscout :tada: - -###### [V3.0.0] - -This is basically a re-write, your old config file will not be compatible anymore. Please re-created your search jobs -on the new ui and use the values from your previous config file if needed. - -``` -- We're getting rid of manual config changes, Fredy, now ships with a UI so that it's easy for you to create and edit jobs -``` - -###### [V2.0.0] - -``` -- Fredy can now run multiple search job on one instance -- Changed lot's of the structure of Fredy to make this happen -[BREAKING CHANGES] -- The config has been changed, the config of V1.x will not work any longer -- Sources have been renamed to provider -``` diff --git a/lib/services/crons/geocoding-cron.js b/lib/services/crons/geocoding-cron.js index d6bd2e3..7494735 100644 --- a/lib/services/crons/geocoding-cron.js +++ b/lib/services/crons/geocoding-cron.js @@ -8,6 +8,8 @@ import { getListingsToGeocode, updateListingGeocoordinates } from '../storage/li import { geocodeAddress, isGeocodingPaused } from '../geocoding/geoCodingService.js'; import { getJobs } from '../storage/jobStorage.js'; import { calculateDistanceForJob } from '../geocoding/distanceService.js'; +import { getSettings } from '../storage/settingsStorage.js'; +import logger from '../logger.js'; export async function runGeoCordTask() { const listings = getListingsToGeocode(); @@ -32,6 +34,11 @@ export async function runGeoCordTask() { } export async function initGeocodingCron() { + const settings = await getSettings(); + if (settings.demoMode) { + logger.info('Do not start geo service as we are in demo mode'); + return; + } // run directly on start await runGeoCordTask(); // then every 6 hours diff --git a/lib/services/crons/listing-alive-cron.js b/lib/services/crons/listing-alive-cron.js index dd584c5..f434508 100644 --- a/lib/services/crons/listing-alive-cron.js +++ b/lib/services/crons/listing-alive-cron.js @@ -5,12 +5,19 @@ import cron from 'node-cron'; import runActiveChecker from '../listings/listingActiveService.js'; +import logger from '../logger.js'; +import { getSettings } from '../storage/settingsStorage.js'; async function runTask() { await runActiveChecker(); } export async function initActiveCheckerCron() { + const settings = await getSettings(); + if (settings.demoMode) { + logger.info('Do not start listing active checker as we are in demo mode'); + return; + } //run directly on start await runTask(); // then every day at 1 am diff --git a/package.json b/package.json index 7173f1a..c3d1669 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fredy", - "version": "19.3.2", + "version": "19.3.3", "description": "[F]ind [R]eal [E]states [d]amn eas[y].", "scripts": { "prepare": "husky", diff --git a/ui/src/App.less b/ui/src/App.less index dbdfeec..919767d 100644 --- a/ui/src/App.less +++ b/ui/src/App.less @@ -17,6 +17,8 @@ padding: 24px; background-color: var(--semi-color-bg-0); box-sizing: border-box; + display: flex; + flex-direction: column; @media (max-width: 768px) { padding: 12px; diff --git a/ui/src/components/segment/SegmentPart.jsx b/ui/src/components/segment/SegmentPart.jsx index fae9fa0..b14c5f4 100644 --- a/ui/src/components/segment/SegmentPart.jsx +++ b/ui/src/components/segment/SegmentPart.jsx @@ -8,12 +8,12 @@ import { Card } from '@douyinfe/semi-ui-19'; import './SegmentParts.less'; -export const SegmentPart = ({ name, Icon = null, children, helpText = null }) => { +export const SegmentPart = ({ name, Icon = null, children, helpText = null, className = '' }) => { const { Meta } = Card; return ( } /> diff --git a/ui/src/views/dashboard/Dashboard.jsx b/ui/src/views/dashboard/Dashboard.jsx index ff729bb..63ad72c 100644 --- a/ui/src/views/dashboard/Dashboard.jsx +++ b/ui/src/views/dashboard/Dashboard.jsx @@ -20,7 +20,6 @@ import { import { useSelector, useActions } from '../../services/state/store'; import KpiCard from '../../components/cards/KpiCard.jsx'; import PieChartCard from '../../components/cards/PieChartCard.jsx'; -import Headline from '../../components/headline/Headline.jsx'; import './Dashboard.less'; import { SegmentPart } from '../../components/segment/SegmentPart.jsx'; @@ -39,8 +38,6 @@ export default function Dashboard() { return (
- - @@ -153,7 +150,12 @@ export default function Dashboard() { - +
diff --git a/ui/src/views/dashboard/Dashboard.less b/ui/src/views/dashboard/Dashboard.less index a97f9a1..da62d63 100644 --- a/ui/src/views/dashboard/Dashboard.less +++ b/ui/src/views/dashboard/Dashboard.less @@ -1,4 +1,8 @@ .dashboard { + display: flex; + flex-direction: column; + flex: 1; + &__row { margin-bottom: 24px; flex-wrap: wrap; @@ -7,4 +11,23 @@ margin-bottom: 0; // Handled by Row gutter } } + + &__provider-insights { + flex: 1; + display: flex; + flex-direction: column; + margin: 0 !important; + + .semi-card-body { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + max-height: 300px; + + > * { + flex: 1; + } + } + } } diff --git a/ui/src/views/userSettings/UserSettings.jsx b/ui/src/views/userSettings/UserSettings.jsx index b35d1cd..a41df26 100644 --- a/ui/src/views/userSettings/UserSettings.jsx +++ b/ui/src/views/userSettings/UserSettings.jsx @@ -4,15 +4,13 @@ */ import React, { useEffect, useState, useMemo } from 'react'; -import { Divider, Button, AutoComplete, Toast, Typography, Banner } from '@douyinfe/semi-ui-19'; +import { Divider, Button, AutoComplete, Toast, Banner } from '@douyinfe/semi-ui-19'; import { IconSave, IconHome } from '@douyinfe/semi-icons'; import { useSelector, useActions } from '../../services/state/store'; import { xhrGet, xhrPost } from '../../services/xhr'; import { SegmentPart } from '../../components/segment/SegmentPart'; import debounce from 'lodash/debounce'; -const { Title } = Typography; - const UserSettings = () => { const actions = useActions(); const homeAddress = useSelector((state) => state.userSettings.settings.home_address); @@ -72,8 +70,6 @@ const UserSettings = () => { return (
- User Specific Settings -