master
Tudor Stanciu 2020-06-05 02:05:55 +03:00
parent 435a9efadc
commit 3cd8daba76
4 changed files with 33 additions and 38 deletions

View File

@ -66,6 +66,17 @@
}, },
"MessageForAuthor": "Message for author" "MessageForAuthor": "Message for author"
}, },
"Charts": {
"Server": {
"Sessions": {
"RunningTime": {
"Title": "Sessions running time",
"X": "Running time",
"Y": "Sessions"
}
}
}
},
"Notifications": { "Notifications": {
"MessageSaved": "Message saved" "MessageSaved": "Message saved"
} }

View File

@ -57,6 +57,17 @@
}, },
"MessageForAuthor": "Mesaj pentru autor" "MessageForAuthor": "Mesaj pentru autor"
}, },
"Charts": {
"Server": {
"Sessions": {
"RunningTime": {
"Title": "Timp de rulare sesiuni",
"X": "Timp de rulare",
"Y": "Sesiuni"
}
}
}
},
"Notifications": { "Notifications": {
"MessageSaved": "Mesaj salvat" "MessageSaved": "Mesaj salvat"
} }

View File

@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
import CanvasJSReact from "../../../../assets/js/canvasjs.react"; import CanvasJSReact from "../../../../assets/js/canvasjs.react";
var CanvasJSChart = CanvasJSReact.CanvasJSChart; var CanvasJSChart = CanvasJSReact.CanvasJSChart;
var CanvasJS = CanvasJSReact.CanvasJS; var CanvasJS = CanvasJSReact.CanvasJS;
import Spinner from "../../../../components/common/Spinner";
const SessionsRunningTimeChart = ({ data }) => { const SessionsRunningTimeChart = ({ data }) => {
const { t } = useTranslation(); const { t } = useTranslation();
@ -25,16 +26,16 @@ const SessionsRunningTimeChart = ({ data }) => {
animationEnabled: true, animationEnabled: true,
theme: "light2", theme: "light2",
title: { title: {
text: "Sessions running time", text: t("Charts.Server.Sessions.RunningTime.Title"),
fontSize: 20 fontSize: 20
}, },
axisX: { axisX: {
title: "Sessions", title: t("Charts.Server.Sessions.RunningTime.Y"),
reversed: true, reversed: true,
interval: 1 interval: 1
}, },
axisY: { axisY: {
title: "Running time", title: t("Charts.Server.Sessions.RunningTime.X"),
labelFormatter: addSymbols labelFormatter: addSymbols
}, },
data: [ data: [
@ -47,13 +48,13 @@ const SessionsRunningTimeChart = ({ data }) => {
}; };
return ( return (
<div> <>
<CanvasJSChart {data.loading || !data.loaded ? (
options={options} <Spinner />
/* onRef={ref => this.chart = ref} */ ) : (
/> <CanvasJSChart options={options} />
{/*You can get reference to the chart instance as shown above using onRef. This allows you to access all chart properties and methods*/} )}
</div> </>
); );
}; };

View File

@ -90,34 +90,6 @@ const ServerComponent = ({
<Collapse in={expanded} timeout="auto" unmountOnExit> <Collapse in={expanded} timeout="auto" unmountOnExit>
<CardContent> <CardContent>
<ServerChartsContainer /> <ServerChartsContainer />
<Typography paragraph>Method:</Typography>
<Typography paragraph>
Heat 1/2 cup of the broth in a pot until simmering, add saffron and
set aside for 10 minutes.
</Typography>
<Typography paragraph>
Heat oil in a (14- to 16-inch) paella pan or a large, deep skillet
over medium-high heat. Add chicken, shrimp and chorizo, and cook,
stirring occasionally until lightly browned, 6 to 8 minutes.
Transfer shrimp to a large plate and set aside, leaving chicken and
chorizo in the pan. Add pimentón, bay leaves, garlic, tomatoes,
onion, salt and pepper, and cook, stirring often until thickened and
fragrant, about 10 minutes. Add saffron broth and remaining 4 1/2
cups chicken broth; bring to a boil.
</Typography>
<Typography paragraph>
Add rice and stir very gently to distribute. Top with artichokes and
peppers, and cook without stirring, until most of the liquid is
absorbed, 15 to 18 minutes. Reduce heat to medium-low, add reserved
shrimp and mussels, tucking them down into the rice, and cook again
without stirring, until mussels have opened and rice is just tender,
5 to 7 minutes more. (Discard any mussels that dont open.)
</Typography>
<Typography>
Set aside off of the heat to let rest for 10 minutes, and then
serve.
</Typography>
</CardContent> </CardContent>
</Collapse> </Collapse>
</Card> </Card>