summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/connectApp/src
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-03-13 10:39:11 +0100
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-03-13 10:39:11 +0100
commit05da65b2d01a75404059d7526b4cbb868f631dd7 (patch)
tree5a4a77ffd32c2a81567279c58c361344f52bb476 /sdnr/wt/odlux/apps/connectApp/src
parent25cb54c517caacafc76534b8972fa8df86a80dbf (diff)
Fix odlux bugs
Fix help and about app not scrollable Fix filter hiding and showing without user interaction and default sort in all tables Issue-ID: SDNC-1117 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I5c6ff86c73a3b222a8d9022125454788496f6399
Diffstat (limited to 'sdnr/wt/odlux/apps/connectApp/src')
-rw-r--r--sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx12
-rw-r--r--sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx9
-rw-r--r--sdnr/wt/odlux/apps/connectApp/src/views/connectView.tsx4
3 files changed, 21 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx b/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx
index ad7b247b0..96f6c8a6b 100644
--- a/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx
+++ b/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx
@@ -35,6 +35,9 @@ const ConnectionStatusTable = MaterialTable as MaterialTableCtorType<NetworkElem
type ConnectionStatusLogComponentProps = Connect<typeof mapProps, typeof mapDispatch>;
+let initialSorted = false;
+
+
class ConnectionStatusLogComponent extends React.Component<ConnectionStatusLogComponentProps> {
render(): JSX.Element {
return (
@@ -46,6 +49,15 @@ class ConnectionStatusLogComponent extends React.Component<ConnectionStatusLogCo
</ConnectionStatusTable>
);
};
+
+ componentDidMount() {
+ if (!initialSorted) {
+ initialSorted = true;
+ this.props.connectionStatusLogActions.onHandleExplicitRequestSort("timestamp", "desc");
+ } else {
+ this.props.connectionStatusLogActions.onRefresh();
+ }
+ }
}
export const ConnectionStatusLog = connect(mapProps, mapDispatch)(ConnectionStatusLogComponent);
diff --git a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx
index d50a81ed5..53e10481a 100644
--- a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx
+++ b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx
@@ -83,7 +83,7 @@ type NetworkElementsListComponentState = {
}
const emptyRequireNetworkElement: NetworkElementConnection = { id: "", nodeId: "", host: "", port: 0, status: "Disconnected", isRequired: false };
-
+let initialSorted = false;
const NetworkElementTable = MaterialTable as MaterialTableCtorType<NetworkElementConnection>;
export class NetworkElementsListComponent extends React.Component<NetworkElementsListComponentProps, NetworkElementsListComponentState> {
@@ -173,7 +173,12 @@ export class NetworkElementsListComponent extends React.Component<NetworkElement
};
public componentDidMount() {
- this.props.networkElementsActions.onRefresh();
+ if (!initialSorted) {
+ initialSorted = true;
+ this.props.networkElementsActions.onHandleRequestSort("node-id");
+ } else {
+ this.props.networkElementsActions.onRefresh();
+ }
}
private onOpenAddNetworkElementDialog = (event: React.MouseEvent<HTMLElement>, element: NetworkElementConnection) => {
diff --git a/sdnr/wt/odlux/apps/connectApp/src/views/connectView.tsx b/sdnr/wt/odlux/apps/connectApp/src/views/connectView.tsx
index a96d3d635..a7feae923 100644
--- a/sdnr/wt/odlux/apps/connectApp/src/views/connectView.tsx
+++ b/sdnr/wt/odlux/apps/connectApp/src/views/connectView.tsx
@@ -61,8 +61,8 @@ class ConnectApplicationComponent extends React.Component<ConnectApplicationComp
if (this.props.panelId === null) { //don't change tabs, if one is selected already
this.onTogglePanel("NetworkElements");
}
- this.props.networkElementsActions.onToggleFilter();
- this.props.connectionStatusLogActions.onToggleFilter();
+ //this.props.networkElementsActions.onToggleFilter();
+ //this.props.connectionStatusLogActions.onToggleFilter();
}
public componentDidUpdate = async () => {