-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): Convert spinnaker container to React (#8366)
* refactor(core): Convert spinnaker container to React * Include support for component and tempalte overrides * refactor(core): Merge with other branches
- Loading branch information
1 parent
fcb683a
commit b2b2f03
Showing
14 changed files
with
56 additions
and
57 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
app/scripts/modules/core/src/bootstrap/SpinnakerContainer.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,30 @@ | ||
import * as React from 'react'; | ||
import { UIView } from '@uirouter/react'; | ||
|
||
import { CustomBanner } from '../header/customBanner/CustomBanner'; | ||
import { Notifier } from '../widgets/notifier/Notifier'; | ||
import { SpinnakerHeader } from '../header/SpinnakerHeader'; | ||
import { Spinner } from '../widgets/spinners/Spinner'; | ||
|
||
export interface ISpinnakerContainerProps { | ||
authenticating: boolean; | ||
routing: boolean; | ||
} | ||
|
||
export const SpinnakerContainer = ({ authenticating, routing }: ISpinnakerContainerProps) => ( | ||
<> | ||
<div className="spinnaker-container grid-container"> | ||
{!authenticating && routing && ( | ||
<div className="transition-overlay"> | ||
<Spinner size="medium" /> | ||
</div> | ||
)} | ||
<div className="navbar-inverse grid-header"> | ||
<CustomBanner /> | ||
<SpinnakerHeader /> | ||
</div> | ||
<div className="spinnaker-content grid-contents">{!authenticating && <UIView name="main" />}</div> | ||
</div> | ||
<Notifier /> | ||
</> | ||
); |
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,13 +1,10 @@ | ||
import { IModule, module } from 'angular'; | ||
|
||
import { OVERRIDE_REGISTRY } from 'core/overrideRegistry/override.registry'; | ||
|
||
import { SPINNAKER_HEADER } from 'core/header/spinnakerHeader.component'; | ||
import { CUSTOM_BANNER } from 'core/header/customBanner/customBanner.component'; | ||
import { SPINNAKER_CONTAINER_COMPONENT } from './spinnakerContainer.component'; | ||
|
||
export const APPLICATION_BOOTSTRAP_MODULE = 'spinnaker.core.applicationBootstrap'; | ||
export const bootstrapModule = module(APPLICATION_BOOTSTRAP_MODULE, [ | ||
OVERRIDE_REGISTRY, | ||
SPINNAKER_HEADER, | ||
CUSTOM_BANNER, | ||
SPINNAKER_CONTAINER_COMPONENT, | ||
]) as IModule; |
This file was deleted.
Oops, something went wrong.
31 changes: 8 additions & 23 deletions
31
app/scripts/modules/core/src/bootstrap/spinnaker.component.ts
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
10 changes: 10 additions & 0 deletions
10
app/scripts/modules/core/src/bootstrap/spinnakerContainer.component.ts
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,10 @@ | ||
import { module } from 'angular'; | ||
import { react2angular } from 'react2angular'; | ||
|
||
import { SpinnakerContainer } from './SpinnakerContainer'; | ||
|
||
export const SPINNAKER_CONTAINER_COMPONENT = 'spinnaker.core.container.component'; | ||
module(SPINNAKER_CONTAINER_COMPONENT, []).component( | ||
'spinnakerContainer', | ||
react2angular(SpinnakerContainer, ['authenticating', 'routing']), | ||
); |
This file was deleted.
Oops, something went wrong.
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
7 changes: 0 additions & 7 deletions
7
app/scripts/modules/core/src/header/customBanner/customBanner.component.ts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
app/scripts/modules/core/src/header/spinnakerHeader.component.ts
This file was deleted.
Oops, something went wrong.
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
9 changes: 0 additions & 9 deletions
9
app/scripts/modules/core/src/widgets/notifier/notifier.component.ts
This file was deleted.
Oops, something went wrong.
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