Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #783 from dedica-team/develop
Browse files Browse the repository at this point in the history
Preparing release 0.4.3
  • Loading branch information
bonndan authored Nov 18, 2021
2 parents 8c292b8 + a807f61 commit f4d9299
Show file tree
Hide file tree
Showing 54 changed files with 975 additions and 578 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ assignees: ''

---

- [] check screenshots
- [] test-click through app, reports
- [] check docs
- [] gather changelog
- [] merge to master and tag
- [] AFTER release increment pom and package.json versions
- [ ] check screenshots
- [ ] test-click through app, reports
- [ ] check docs
- [ ] gather changelog
- [ ] merge to master and tag
- [ ] AFTER release increment pom and package.json versions
Binary file modified docs/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions nivio-demo/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

This folder contains sources to construct a demo landscape for [https://github.com/dedica-team/nivio]

## Usage
## Quick Start

Just run

DEMO=1 docker-compose up

and then head to http://localhost:8080

## Custom Input

### Setup

Expand All @@ -20,7 +28,7 @@ You can try one of these:
php -S 127.0.0.1:3000
ruby -run -ehttpd . -p3000

### Running the Demo manually
### Running the Demo manually with specific files

* First create a landscape:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.bonndan</groupId>
<artifactId>nivio</artifactId>
<version>0.4.2</version>
<version>0.4.3</version>

<parent>
<groupId>org.springframework.boot</groupId>
Expand Down
6 changes: 3 additions & 3 deletions src/main/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nivio",
"version": "0.4.2",
"version": "0.4.3",
"private": true,
"homepage": "./",
"dependencies": {
Expand All @@ -11,8 +11,8 @@
"@stomp/stompjs": "^5.4.4",
"@types/dateformat": "^3.0.1",
"@types/jest": "^26.0.24",
"@types/node": "^14.17.18",
"@types/react": "^16.14.15",
"@types/node": "^14.17.29",
"@types/react": "^16.14.20",
"@types/react-dom": "^16.9.14",
"@types/react-html-parser": "^2.0.2",
"@types/react-router-dom": "^5.3.0",
Expand Down
28 changes: 4 additions & 24 deletions src/main/app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement, useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';

import LandscapeOverview from './Components/Landscape/Overview/Overview';
Expand Down Expand Up @@ -27,7 +27,6 @@ interface Index {
}

const App: React.FC = () => {
const [sidebarContent, setSidebarContent] = useState<ReactElement[]>([]);
const [pageTitle, setPageTitle] = useState<string>('');
const [logo, setLogo] = useState<string>('');
const [message, setMessage] = useState<string>('');
Expand Down Expand Up @@ -94,19 +93,12 @@ const App: React.FC = () => {
<CssBaseline />
<Router hashType='slash'>
<Switch>
<Layout
sidebarContent={sidebarContent}
setSidebarContent={setSidebarContent}
logo={logo}
pageTitle={pageTitle}
version={version}
>
<Layout logo={logo} pageTitle={pageTitle} version={version}>
<Route
exact
path='/'
render={(props) => (
<LandscapeOverview
setSidebarContent={setSidebarContent}
setPageTitle={setPageTitle}
welcomeMessage={message}
{...props}
Expand All @@ -116,24 +108,12 @@ const App: React.FC = () => {
<Route
exact
path={Routes.MAP_ROUTE}
render={(props) => (
<LandscapeMap
setSidebarContent={setSidebarContent}
setPageTitle={setPageTitle}
{...props}
/>
)}
render={(props) => <LandscapeMap setPageTitle={setPageTitle} {...props} />}
/>
<Route
exact
path='/man/:usage'
render={(props) => (
<Man
setSidebarContent={setSidebarContent}
setPageTitle={setPageTitle}
{...props}
/>
)}
render={(props) => <Man setPageTitle={setPageTitle} {...props} />}
/>
</Layout>
</Switch>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,18 @@ const KPIConfigLayout: React.FC<Props> = ({ name, kpi }) => {
}

return (
<Box key={`kpi_${kpi.label}`}>
<Accordion key={name} style={{ boxShadow: 'none' }}>
<Box key={`kpi_${kpi.label}`} padding={1}>
<Typography variant={'h5'}>{name}</Typography>
<Accordion key={name} style={{ boxShadow: 'none', background: 'none' }}>
<AccordionSummary
style={{ padding: 2 }}
expandIcon={<ExpandMore />}
aria-controls={'panel_kpi' + name + 'bh-content'}
id={'panel_kpi' + name + 'bh-header'}
>
<Typography variant={'h6'}>{name}</Typography>
{kpi.description}
</AccordionSummary>
<AccordionDetails style={{ display: 'block', padding: 2 }}>
<div style={{ width: '100%' }}>{kpi.description}</div>
<AccordionDetails style={{ display: 'block', padding: 5 }}>
<br />

{ranges.length ? (
<Table>
<TableBody>{ranges}</TableBody>
Expand Down
58 changes: 20 additions & 38 deletions src/main/app/src/Components/Landscape/Dashboard/StatusBarLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
import React, { useContext, useState } from 'react';
import React, { useContext } from 'react';
import { IGroup } from '../../../interfaces';
import StatusChip from '../../StatusChip/StatusChip';
import Button from '@material-ui/core/Button';
import {
AppBar,
Card,
CardHeader,
Box,
Tab,
Table,
TableBody,
TableCell,
TableRow,
Tabs,
Typography,
} from '@material-ui/core';
import { LandscapeContext } from '../../../Context/LandscapeContext';
import componentStyles from '../../../Resources/styling/ComponentStyles';
import IconButton from '@material-ui/core/IconButton';
import { Close, Settings, Warning } from '@material-ui/icons';
import { Settings, Warning } from '@material-ui/icons';
import ItemAvatar from '../Modals/Item/ItemAvatar';
import GroupAvatar from '../Modals/Group/GroupAvatar';
import { a11yProps, TabPanel } from '../Utils/TabUtils';
import CardContent from '@material-ui/core/CardContent';
import KPIConfigLayout from './KPIConfigLayout';

interface Props {
Expand All @@ -33,8 +30,6 @@ interface Props {
*/
const StatusBarLayout: React.FC<Props> = ({ onItemClick, onGroupClick }) => {
const context = useContext(LandscapeContext);
const componentClasses = componentStyles();
const [visible, setVisible] = useState<boolean>(true);
const [currentTab, setCurrentTab] = React.useState(0);

const getItems = (group: IGroup) => {
Expand Down Expand Up @@ -122,8 +117,6 @@ const StatusBarLayout: React.FC<Props> = ({ onItemClick, onGroupClick }) => {
setCurrentTab(newValue);
};

if (!visible) return null;

const kpiConfig = context.landscape?.kpis;
let kpis: JSX.Element[] = [];
if (kpiConfig) {
Expand All @@ -136,19 +129,10 @@ const StatusBarLayout: React.FC<Props> = ({ onItemClick, onGroupClick }) => {
}

return (
<Card className={componentClasses.card}>
<CardHeader
title={'Status'}
action={
<IconButton
onClick={() => {
setVisible(false);
}}
>
<Close />
</IconButton>
}
/>
<Box>
<div>
<Typography variant={'h5'}>Status</Typography>
</div>
<AppBar position={'static'}>
<Tabs
value={currentTab}
Expand All @@ -172,20 +156,18 @@ const StatusBarLayout: React.FC<Props> = ({ onItemClick, onGroupClick }) => {
/>
</Tabs>
</AppBar>
<CardContent>
<TabPanel value={currentTab} index={0} prefix={'statusbar'}>
<Table>
<TableBody>
{context.landscape ? getGroups(context.landscape.groups) : null}
{context.landscape?.groups.map((group) => getItems(group))}
</TableBody>
</Table>
</TabPanel>
<TabPanel value={currentTab} index={1} prefix={'statusbar'}>
{kpis}
</TabPanel>
</CardContent>
</Card>
<TabPanel value={currentTab} index={0} prefix={'statusbar'}>
<Table>
<TableBody>
{context.landscape ? getGroups(context.landscape.groups) : null}
{context.landscape?.groups.map((group) => getItems(group))}
</TableBody>
</Table>
</TabPanel>
<TabPanel value={currentTab} index={1} prefix={'statusbar'}>
{kpis}
</TabPanel>
</Box>
);
};

Expand Down
Loading

0 comments on commit f4d9299

Please sign in to comment.