Version Bleu

This commit is contained in:
Noe 2023-06-30 16:13:09 +02:00
parent 9e9a899f8e
commit f2c04e2ccc
9 changed files with 20613 additions and 10 deletions

Binary file not shown.

View File

@ -15,7 +15,7 @@ import NavigationButtons from "./components/Layout/NavigationButtons";
import InstallationPage from "./components/Installations/InstallationPage"; import InstallationPage from "./components/Installations/InstallationPage";
import { UserContext } from "./components/Context/UserContextProvider"; import { UserContext } from "./components/Context/UserContextProvider";
import ResetPassword from "./ResetPassword"; import ResetPassword from "./ResetPassword";
import innovenergyLogo from "./resources/innovenergy_Logo_onOrange-2.png(1).png"; import innovenergyLogo from "./resources/test.gif";
import { Background } from "reactflow"; import { Background } from "reactflow";
const App = () => { const App = () => {

View File

@ -88,6 +88,7 @@ const InstallationList = (props: InstallationListProps) => {
<ListItemButton <ListItemButton
id={"installation-list-button-" + installation.id} id={"installation-list-button-" + installation.id}
selected={installation.id === Number(routeMatch?.params.id)} selected={installation.id === Number(routeMatch?.params.id)}
disableRipple
sx={{ sx={{
mr: "1px", mr: "1px",
borderStyle: "solid", borderStyle: "solid",

View File

@ -66,6 +66,7 @@ const CheckboxTree = () => {
<Checkbox <Checkbox
checked={!!checked} checked={!!checked}
onClick={(e) => handleClick(e, element, checked)} onClick={(e) => handleClick(e, element, checked)}
color="info"
/> />
)} )}
{splitName[splitName.length - 1]} {splitName[splitName.length - 1]}
@ -86,19 +87,21 @@ const CheckboxTree = () => {
<> <>
{toggles !== null && routeMatch !== null && ( {toggles !== null && routeMatch !== null && (
<> <>
<Divider sx={{ mt: 2 }} />
<TreeView <TreeView
defaultCollapseIcon={<ExpandMoreIcon />} defaultCollapseIcon={<ExpandMoreIcon />}
defaultExpandIcon={<ChevronRightIcon />} defaultExpandIcon={<ChevronRightIcon />}
sx={{ sx={{
marginTop: 2,
flexGrow: 100, flexGrow: 100,
overflow: "auto", overflow: "auto",
overflowX: "hidden", overflowX: "hidden",
position: ["sticky", "-webkit-sticky"], position: ["sticky", "-webkit-sticky"],
top: 1, top: 1,
maxHeight: "90vh", maxHeight: "90vh",
borderBottomLeftRadius: 5, borderBottomLeftRadius: 7,
borderBottomRightRadius: 5, borderBottomRightRadius: 7,
borderTopLeftRadius: 7,
borderTopRightRadius: 7,
}} }}
> >
{renderTree(toggles)} {renderTree(toggles)}

View File

@ -39,6 +39,19 @@ const DateRangePicker = (props: DateRangePickerProps) => {
maxDate={dayjs(range[1])} maxDate={dayjs(range[1])}
label="From date" label="From date"
value={dayjs(range[0])} value={dayjs(range[0])}
sx={{
".MuiInputLabel-root": {
color: "#2b3e54",
},
".Mui-disabled": {
color: "red",
},
".Mui-focused fieldset.MuiOutlinedInput-notchedOutline": {
borderColor: "#2b3e54",
},
marginRight: 5,
}}
onChange={(newValue) => { onChange={(newValue) => {
if (newValue) { if (newValue) {
handleChange(newValue.toDate(), range[1]); handleChange(newValue.toDate(), range[1]);
@ -51,9 +64,16 @@ const DateRangePicker = (props: DateRangePickerProps) => {
label="To date" label="To date"
value={dayjs(range[1])} value={dayjs(range[1])}
sx={{ sx={{
".MuiInputLabel-root": {
color: "#2b3e54",
},
".Mui-disabled": { ".Mui-disabled": {
color: "red", color: "red",
}, },
".Mui-focused fieldset.MuiOutlinedInput-notchedOutline": {
borderColor: "#2b3e54",
},
}} }}
onChange={(newValue) => { onChange={(newValue) => {
if (newValue) { if (newValue) {

View File

@ -59,7 +59,7 @@ export const fetchData = (
const ScalarGraph = () => { const ScalarGraph = () => {
const timeRange = createTimes( const timeRange = createTimes(
UnixTime.now() /* .fromTicks(1682085650) */ UnixTime.now() /* .fromTicks(1682085650) */
.rangeBefore(TimeSpan.fromDays(1)), .rangeBefore(TimeSpan.fromDays(4)),
NUMBER_OF_NODES NUMBER_OF_NODES
); );
const [timeSeries, setTimeSeries] = useState<RecordSeries>([]); const [timeSeries, setTimeSeries] = useState<RecordSeries>([]);
@ -169,11 +169,10 @@ const ScalarGraph = () => {
if (checkedToggles.length > 0) { if (checkedToggles.length > 0) {
const coordinateTimeSeries = transformToGraphData(timeSeries); const coordinateTimeSeries = transformToGraphData(timeSeries);
const visibleGraphs = Object.keys(coordinateTimeSeries).filter((path) => { const visibleGraphs = Object.keys(coordinateTimeSeries).filter((path) => {
console.log('checkedToggles',coordinateTimeSeries, checkedToggles) console.log("checkedToggles", coordinateTimeSeries, checkedToggles);
return checkedToggles.find((toggle) => toggle === path) return checkedToggles.find((toggle) => toggle === path);
} });
); console.log("visibleGraphs", visibleGraphs);
console.log('visibleGraphs', visibleGraphs)
if (visibleGraphs.length > 0) { if (visibleGraphs.length > 0) {
return ( return (
<div style={{ marginTop: "20px" }}> <div style={{ marginTop: "20px" }}>

View File

@ -11,6 +11,13 @@ const root = ReactDOM.createRoot(
); );
const theme = createTheme({ const theme = createTheme({
components: {
MuiButtonBase: {
defaultProps: {
disableRipple: true,
},
},
},
palette: { palette: {
text: { text: {
primary: "#2b3e54", primary: "#2b3e54",
@ -28,6 +35,7 @@ const theme = createTheme({
main: "#90a7c5", main: "#90a7c5",
}, },
}, },
typography: { typography: {
fontFamily: `"Ubuntu", sans-serif`, fontFamily: `"Ubuntu", sans-serif`,
fontWeightRegular: 300, fontWeightRegular: 300,

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

20572
typescript/Web/db_v1139.json Normal file

File diff suppressed because it is too large Load Diff