-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: sovereign clouds #955
Open
thewahome
wants to merge
61
commits into
dev
Choose a base branch
from
feature/sovereign-clouds
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+522
−56
Open
Changes from 52 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
e46710a
get graph version from content between slashes
thewahome 2f94af6
detect cloud from application locale
thewahome 240e618
create type, action-creator and reducer
thewahome 2ca7d7c
change base-url on page load for pre-selected cloud
thewahome 787e42d
change base-url for app when config is set
thewahome 5b7d256
change parse function to handle long versions
thewahome 9f76404
destructure sample urls to parts regardless of version size
thewahome ed412ae
update base links with current cloud on reload and selection
thewahome 050180e
replace references to GRAPH_URL constant
thewahome 263eafa
sanitise urls with cloud base urls
thewahome 92ff83c
remove German cloud support
thewahome 0d3cb55
change login url with cloud change
thewahome 39a5554
display UI to manually select sovereign cloud
thewahome f36ca72
reset to global cloud when logging out
thewahome 3d559b2
display link only when options are available
thewahome 7652835
move sovereign cloud logic to own component
thewahome d3c1c5a
reuse dialog in cloud selection pop up
thewahome 995167b
move module logic to modules folder
thewahome 9d37e6d
set default cloud in state when none selected
thewahome 715a9b0
extract theme chooser from settings file
thewahome 03d79d8
extract permissions from settings file
thewahome ba2477a
add china cloud client ID to configuration
thewahome cb7ce35
Merge branch 'dev' into feature/sovereign-clouds
thewahome ff595da
place appropriate login url
thewahome 0fe995b
clear log in details when cloud is switched
thewahome ce77191
display cloud chooser prompt only once
thewahome bd295a2
sign out locally
thewahome 2270cee
place message string in translation file
thewahome 40cecfc
default to null early
thewahome 53ba1a9
rename filter variables
thewahome a795cdc
sign out explicitly
thewahome 41e4476
Merge branch 'dev' into feature/sovereign-clouds
thewahome e650e61
Merge branch 'dev' into feature/sovereign-clouds
thewahome 6b2bb3c
fix call to get logged in user's profile
thewahome 3f89732
replace the base url to match current cloud
thewahome ac6cdf7
logout from account in current cloud
thewahome d97e03c
reloads page when cloud is changed and profile exists
thewahome 2626bfa
change profile source only when it doesnt match with global
thewahome 85a32b9
Merge branch 'dev' into feature/sovereign-clouds
thewahome 13f13d3
Merge branch 'dev' into feature/sovereign-clouds
thewahome 7255ff1
change package reference to @fluentui/react
thewahome dfb5cd0
Merge branch 'dev' into feature/sovereign-clouds
thewahome 3e8d728
fix linting errors
thewahome b2082c1
set matching file
thewahome 7c35994
disable china cloud support
thewahome 6527374
Merge branch 'dev' into feature/sovereign-clouds
thewahome 617cfac
reset to global cloud when user logs out
thewahome 9ee5240
Merge branch 'feature/sovereign-clouds' of https://github.com/microso…
thewahome c95c205
Merge branch 'dev' into feature/sovereign-clouds
thewahome 547b296
fix linting errors
thewahome b04ab30
remove code smells
thewahome 9938b35
Merge branch 'dev' into feature/sovereign-clouds
thewahome c985ea2
Merge branch 'dev' into feature/sovereign-clouds
thewahome c7e307f
Merge branch 'dev' into feature/sovereign-clouds
thewahome 339d04e
Merge branch 'dev' into feature/sovereign-clouds
thewahome f51c8bf
Merge branch 'dev' into feature/sovereign-clouds
thewahome c02cd64
fix cloud telemetry
thewahome ba76b4b
enable canary only for test tenants
thewahome 2a4ed3e
Merge branch 'dev' into feature/sovereign-clouds
Onokaev c9a87ae
Merge branch 'dev' into feature/sovereign-clouds
thewahome 66dc7fe
[temp] use en-us to trigger cloud choice
thewahome File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,9 @@ | ||
import { IAction } from '../../../types/action'; | ||
import { SET_ACTIVE_CLOUD_SUCCESS } from '../redux-constants'; | ||
|
||
export function setActiveCloud(response: object): IAction { | ||
return { | ||
type: SET_ACTIVE_CLOUD_SUCCESS, | ||
response | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { usePrevious } from './usePrevious'; | ||
|
||
export default { | ||
usePrevious | ||
} |
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,17 @@ | ||
import { useRef, useEffect } from 'react'; | ||
/** | ||
* Keeps track of the previous value of the item passed to it before a re-render | ||
* | ||
* @param value | ||
* @description The ref object is a generic container whose current property is mutable | ||
* and can hold any value, similar to an instance property on a class | ||
* @returns Return previous value | ||
* (happens before update in useEffect) | ||
*/ | ||
export function usePrevious(value: any) { | ||
const ref = useRef(''); | ||
useEffect(() => { | ||
ref.current = value; | ||
}, [value]); | ||
return ref.current; | ||
} |
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,13 @@ | ||
import { globalCloud } from '../../../modules/sovereign-clouds'; | ||
import { IAction } from '../../../types/action'; | ||
import { ICloud } from '../../../types/cloud'; | ||
import { SET_ACTIVE_CLOUD_SUCCESS } from '../redux-constants'; | ||
|
||
const initialState: ICloud = globalCloud; | ||
|
||
export function cloud(state = initialState, action: IAction): ICloud { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Can we add a test for this reducer? |
||
if (action.type === SET_ACTIVE_CLOUD_SUCCESS) { | ||
return action.response; | ||
} | ||
return state; | ||
} |
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Can we add a test for this action?