-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev'
- Loading branch information
Showing
14 changed files
with
187 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.2.5 | ||
6.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/Moryx.CommandCenter.Web/src/common/components/ModuleHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Copyright (c) 2020, Phoenix Contact GmbH & Co. KG | ||
* Licensed under the Apache License, Version 2.0 | ||
*/ | ||
|
||
import { mdiCogs, mdiConsole, mdiConsoleLine, mdiDatabase, mdiHexagon, mdiHexagonMultiple, mdiMonitor } from "@mdi/js"; | ||
import Icon from "@mdi/react"; | ||
import * as React from "react"; | ||
import { connect } from "react-redux"; | ||
import { Link, NavLink } from "react-router-dom"; | ||
import { Nav, Navbar, NavItem } from "reactstrap"; | ||
import { FailureBehaviour } from "../../modules/models/FailureBehaviour"; | ||
import { ModuleStartBehaviour } from "../../modules/models/ModuleStartBehaviour"; | ||
import ServerModuleModel from "../../modules/models/ServerModuleModel"; | ||
import { updateFailureBehaviour, updateStartBehaviour } from "../../modules/redux/ModulesActions"; | ||
import { AppState } from "../redux/AppState"; | ||
import { ActionType } from "../redux/Types"; | ||
|
||
interface ModuleHeaderPropModel { | ||
Module?: ServerModuleModel; | ||
} | ||
|
||
const mapStateToProps = (state: AppState): ModuleHeaderPropModel => { | ||
return { | ||
}; | ||
}; | ||
|
||
const mapDispatchToProps = (dispatch: React.Dispatch<ActionType<{}>>): ModuleDispatchPropModel => { | ||
return { | ||
onUpdateStartBehaviour: (moduleName: string, startBehaviour: ModuleStartBehaviour) => dispatch(updateStartBehaviour(moduleName, startBehaviour)), | ||
onUpdateFailureBehaviour: (moduleName: string, failureBehaviour: FailureBehaviour) => dispatch(updateFailureBehaviour(moduleName, failureBehaviour)), | ||
}; | ||
}; | ||
|
||
interface ModulePropModel { | ||
ModuleName: string; | ||
} | ||
|
||
export class ModuleHeader extends React.Component<ModulePropModel & ModuleDispatchPropModel> { | ||
constructor(props: ModulePropModel & ModuleDispatchPropModel) { | ||
super(props); | ||
|
||
// This.state = { HasWarningsOrErrors: false, IsNotificationDialogOpened: false, SelectedNotification: null }; | ||
} | ||
|
||
public render(): React.ReactNode { | ||
return ( | ||
<Navbar className="navbar-default" expand="md"> | ||
<Nav className="navbar-left" navbar={true}> | ||
<NavItem> | ||
<NavLink exact={true} to={`/modules/${this.props.ModuleName}`} className="navbar-nav-link"> | ||
<Icon path={mdiMonitor} className="icon right-space" /> | ||
Overview | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink to={`/modules/${this.props.ModuleName}/configuration`} className="navbar-nav-link"> | ||
<Icon path={mdiCogs} className="icon right-space" /> | ||
Configuration | ||
</NavLink> | ||
</NavItem> | ||
<NavItem > | ||
<NavLink to={`/modules/${this.props.ModuleName}/console`} className="navbar-nav-link"> | ||
<Icon path={mdiConsoleLine}className="icon right-space" /> | ||
Console | ||
</NavLink> | ||
</NavItem> | ||
</Nav> | ||
</Navbar> | ||
); | ||
} | ||
} | ||
|
||
interface ModuleDispatchPropModel { | ||
onUpdateStartBehaviour?(moduleName: string, startBehaviour: ModuleStartBehaviour): void; | ||
onUpdateFailureBehaviour?(moduleName: string, failureBehaviour: FailureBehaviour): void; | ||
} | ||
|
||
export default connect<{}, ModuleDispatchPropModel>(null, mapDispatchToProps)(ModuleHeader); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.