mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-09 04:25:57 +00:00
Compare commits
1 Commits
master
...
userssaksh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
156f748b5e |
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@@ -164,8 +164,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
shardTotal: [20]
|
||||
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
|
||||
shardTotal: [16]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 18.x
|
||||
@@ -192,29 +192,24 @@ jobs:
|
||||
NOSQL_READONLY_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-sql-readonly.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$NOSQL_READONLY_TESTACCOUNT_TOKEN"
|
||||
echo NOSQL_READONLY_TESTACCOUNT_TOKEN=$NOSQL_READONLY_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-sql-containercopyonly.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN"
|
||||
echo NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN=$NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
TABLE_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-tables.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$TABLE_TESTACCOUNT_TOKEN"
|
||||
echo TABLE_TESTACCOUNT_TOKEN=$TABLE_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
GREMLIN_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-gremlin.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$GREMLIN_TESTACCOUNT_TOKEN"
|
||||
echo GREMLIN_TESTACCOUNT_TOKEN=$GREMLIN_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
# CASSANDRA_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-cassandra.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
# echo "::add-mask::$CASSANDRA_TESTACCOUNT_TOKEN"
|
||||
# echo CASSANDRA_TESTACCOUNT_TOKEN=$CASSANDRA_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
# MONGO_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
# echo "::add-mask::$MONGO_TESTACCOUNT_TOKEN"
|
||||
# echo MONGO_TESTACCOUNT_TOKEN=$MONGO_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
# MONGO32_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo32.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
# echo "::add-mask::$MONGO32_TESTACCOUNT_TOKEN"
|
||||
# echo MONGO32_TESTACCOUNT_TOKEN=$MONGO32_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
# MONGO_READONLY_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo-readonly.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
# echo "::add-mask::$MONGO_READONLY_TESTACCOUNT_TOKEN"
|
||||
# echo MONGO_READONLY_TESTACCOUNT_TOKEN=$MONGO_READONLY_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
- name: List test files for shard ${{ matrix['shardIndex'] }} of ${{ matrix['shardTotal']}}
|
||||
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --list
|
||||
CASSANDRA_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-cassandra.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$CASSANDRA_TESTACCOUNT_TOKEN"
|
||||
echo CASSANDRA_TESTACCOUNT_TOKEN=$CASSANDRA_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
MONGO_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$MONGO_TESTACCOUNT_TOKEN"
|
||||
echo MONGO_TESTACCOUNT_TOKEN=$MONGO_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
MONGO32_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo32.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$MONGO32_TESTACCOUNT_TOKEN"
|
||||
echo MONGO32_TESTACCOUNT_TOKEN=$MONGO32_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
MONGO_READONLY_TESTACCOUNT_TOKEN=$(az account get-access-token --scope "https://github-e2etests-mongo-readonly.documents.azure.com/.default" -o tsv --query accessToken)
|
||||
echo "::add-mask::$MONGO_READONLY_TESTACCOUNT_TOKEN"
|
||||
echo MONGO_READONLY_TESTACCOUNT_TOKEN=$MONGO_READONLY_TESTACCOUNT_TOKEN >> $GITHUB_ENV
|
||||
- name: Run test shard ${{ matrix['shardIndex'] }} of ${{ matrix['shardTotal']}}
|
||||
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers=3
|
||||
- name: Upload blob report to GitHub Actions Artifacts
|
||||
|
||||
4
.github/workflows/cleanup.yml
vendored
4
.github/workflows/cleanup.yml
vendored
@@ -6,8 +6,8 @@ on:
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Once every two hours
|
||||
- cron: "0 */2 * * *"
|
||||
# Once every hour
|
||||
- cron: "0 15 * * *"
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
|
||||
<path d="M4 4c0-1.1.9-2 2-2h3.59c.4 0 .78.16 1.06.44l3.91 3.91c.28.28.44.67.44 1.06V14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V8h-3.5A1.5 1.5 0 0 1 9 6.5V3H6Zm4 .2v3.3c0 .28.22.5.5.5h3.3L10 3.2ZM17 9a1 1 0 0 0-1-1v6a3 3 0 0 1-3 3H6a1 1 0 0 0 1 1h6.06A3.94 3.94 0 0 0 17 14.06V9Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 439 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.85032 3.0153C10.4276 3.21621 12.4563 5.37119 12.4563 8C12.4563 10.7614 10.2177 13 7.45629 13C5.70158 13 4.15722 12.0961 3.26465 10.7271C4.66791 10.3479 6.58077 9.42526 7.42438 7.17555C7.97709 5.70162 8.00857 4.23763 7.85032 3.0153ZM13.4563 8C13.4563 4.68629 10.77 2 7.45629 2C7.38577 2 7.31552 2.00122 7.24555 2.00364C7.09984 2.00867 6.96358 2.07706 6.87247 2.19089C6.78136 2.30471 6.74447 2.45263 6.77147 2.59591C7.00024 3.81021 7.05064 5.32413 6.48805 6.82444C5.68804 8.95787 3.68609 9.66359 2.41062 9.89533C2.25698 9.92325 2.1252 10.0213 2.05438 10.1605C1.98356 10.2997 1.98182 10.4639 2.04969 10.6046C3.01873 12.6128 5.07502 14 7.45629 14C10.77 14 13.4563 11.3137 13.4563 8Z" fill="#0078d4" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 814 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 1.33C8.276 1.33 8.5 1.554 8.5 1.83V2.83C8.5 3.106 8.276 3.33 8 3.33C7.724 3.33 7.5 3.106 7.5 2.83V1.83C7.5 1.554 7.724 1.33 8 1.33ZM8 11.33C9.841 11.33 11.33 9.841 11.33 8C11.33 6.159 9.841 4.67 8 4.67C6.159 4.67 4.67 6.159 4.67 8C4.67 9.841 6.159 11.33 8 11.33ZM8 10.33C6.711 10.33 5.67 9.289 5.67 8C5.67 6.711 6.711 5.67 8 5.67C9.289 5.67 10.33 6.711 10.33 8C10.33 9.289 9.289 10.33 8 10.33ZM14.17 8.5C14.446 8.5 14.67 8.276 14.67 8C14.67 7.724 14.446 7.5 14.17 7.5H13.17C12.894 7.5 12.67 7.724 12.67 8C12.67 8.276 12.894 8.5 13.17 8.5H14.17ZM8 12.67C8.276 12.67 8.5 12.894 8.5 13.17V14.17C8.5 14.446 8.276 14.67 8 14.67C7.724 14.67 7.5 14.446 7.5 14.17V13.17C7.5 12.894 7.724 12.67 8 12.67ZM2.83 8.5C3.106 8.5 3.33 8.276 3.33 8C3.33 7.724 3.106 7.5 2.83 7.5H1.83C1.554 7.5 1.33 7.724 1.33 8C1.33 8.276 1.554 8.5 1.83 8.5H2.83ZM2.813 2.813C3.009 2.617 3.325 2.617 3.521 2.813L4.521 3.813C4.717 4.009 4.717 4.325 4.521 4.521C4.325 4.717 4.009 4.717 3.813 4.521L2.813 3.521C2.617 3.325 2.617 3.009 2.813 2.813ZM3.521 13.187C3.325 13.383 3.009 13.383 2.813 13.187C2.617 12.991 2.617 12.675 2.813 12.479L3.813 11.479C4.009 11.283 4.325 11.283 4.521 11.479C4.717 11.675 4.717 11.991 4.521 12.187L3.521 13.187ZM13.187 2.813C12.991 2.617 12.675 2.617 12.479 2.813L11.479 3.813C11.283 4.009 11.283 4.325 11.479 4.521C11.675 4.717 11.991 4.717 12.187 4.521L13.187 3.521C13.383 3.325 13.383 3.009 13.187 2.813ZM12.479 13.187C12.675 13.383 12.991 13.383 13.187 13.187C13.383 12.991 13.383 12.675 13.187 12.479L12.187 11.479C11.991 11.283 11.675 11.283 11.479 11.479C11.283 11.675 11.283 11.991 11.479 12.187L12.479 13.187Z" fill="#0078d4" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 7.5C4 5.567 5.567 4 7.5 4C8.5 4 9.4 4.4 10 5.1C9.5 4.8 8.9 4.6 8.3 4.6C6.8 4.6 5.6 5.8 5.6 7.3C5.6 8.8 6.8 10 8.3 10C8.9 10 9.5 9.8 10 9.5C9.4 10.2 8.5 10.6 7.5 10.6C5.567 10.6 4 9.033 4 7.1V7.5Z" fill="#0078D4"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 328 B |
@@ -1,11 +0,0 @@
|
||||
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 2C6 1.44772 6.44772 1 7 1C7.55228 1 8 1.44772 8 2C8 2.55228 7.55228 3 7 3C6.44772 3 6 2.55228 6 2Z" fill="#0078D4"/>
|
||||
<path d="M6 13C6 12.4477 6.44772 12 7 12C7.55228 12 8 12.4477 8 13C8 13.5523 7.55228 14 7 14C6.44772 14 6 13.5523 6 13Z" fill="#0078D4"/>
|
||||
<path d="M1 7C1 6.44772 1.44772 6 2 6C2.55228 6 3 6.44772 3 7C3 7.55228 2.55228 8 2 8C1.44772 8 1 7.55228 1 7Z" fill="#0078D4"/>
|
||||
<path d="M12 7C12 6.44772 12.4477 6 13 6C13.5523 6 14 6.44772 14 7C14 7.55228 13.5523 8 13 8C12.4477 8 12 7.55228 12 7Z" fill="#0078D4"/>
|
||||
<path d="M2.63604 3.63604C3.02656 3.24551 3.65973 3.24551 4.05025 3.63604C4.44078 4.02656 4.44078 4.65973 4.05025 5.05025C3.65973 5.44078 3.02656 5.44078 2.63604 5.05025C2.24551 4.65973 2.24551 4.02656 2.63604 3.63604Z" fill="#0078D4"/>
|
||||
<path d="M10.9497 9.94975C11.3403 9.55922 11.9734 9.55922 12.364 9.94975C12.7545 10.3403 12.7545 10.9734 12.364 11.364C11.9734 11.7545 11.3403 11.7545 10.9497 11.364C10.5592 10.9734 10.5592 10.3403 10.9497 9.94975Z" fill="#0078D4"/>
|
||||
<path d="M10.9497 5.05025C10.5592 4.65973 10.5592 4.02656 10.9497 3.63604C11.3403 3.24551 11.9734 3.24551 12.364 3.63604C12.7545 4.02656 12.7545 4.65973 12.364 5.05025C11.9734 5.44078 11.3403 5.44078 10.9497 5.05025Z" fill="#0078D4"/>
|
||||
<path d="M2.63604 11.364C2.24551 10.9734 2.24551 10.3403 2.63604 9.94975C3.02656 9.55922 3.65973 9.55922 4.05025 9.94975C4.44078 10.3403 4.44078 10.9734 4.05025 11.364C3.65973 11.7545 3.02656 11.7545 2.63604 11.364Z" fill="#0078D4"/>
|
||||
<circle cx="7.5" cy="7.5" r="2.5" fill="#0078D4"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -128,7 +128,7 @@
|
||||
@provisionDatabaseThroughputInfo: 200px;
|
||||
|
||||
//tabs container
|
||||
@ActiveTabHeight: 32px;
|
||||
@ActiveTabHeight: 31px;
|
||||
@ActiveTabWidth: 141px;
|
||||
@TabsHeight: 30px;
|
||||
@TabsWidth: 140px;
|
||||
@@ -237,11 +237,11 @@
|
||||
*********************************************************************************************/
|
||||
|
||||
.hover() {
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
background-color: @AccentLight;
|
||||
}
|
||||
|
||||
.active() {
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
background-color: @AccentExtra;
|
||||
}
|
||||
|
||||
.focus() {
|
||||
|
||||
@@ -406,11 +406,7 @@ body {
|
||||
width: 440px;
|
||||
min-height: 565px;
|
||||
}
|
||||
.dataExplorerLoaderforcopyJobs{
|
||||
width: 100%;
|
||||
min-height: 565px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dataExplorerTabLoaderContainer {
|
||||
left: initial;
|
||||
top: initial;
|
||||
@@ -1744,7 +1740,7 @@ input::-webkit-calendar-picker-indicator {
|
||||
flex: 1;
|
||||
padding-left: 34px;
|
||||
padding-right: 34px;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseDark;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
margin: (2 * @MediumSpace) 0px;
|
||||
@@ -1753,6 +1749,7 @@ input::-webkit-calendar-picker-indicator {
|
||||
.contextual-pane .panelMainContent {
|
||||
padding-left: 34px;
|
||||
padding-right: 34px;
|
||||
color: @BaseDark;
|
||||
margin: (2 * @MediumSpace) 0px;
|
||||
}
|
||||
|
||||
@@ -1917,8 +1914,7 @@ input::-webkit-calendar-picker-indicator::after {
|
||||
}
|
||||
|
||||
.nav-tabs-margin {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
background-color: #f2f2f2;
|
||||
|
||||
.nav-tabs {
|
||||
display: flex;
|
||||
@@ -1926,19 +1922,11 @@ input::-webkit-calendar-picker-indicator::after {
|
||||
align-items: flex-end;
|
||||
height: 100%;
|
||||
margin-bottom: -0.5px;
|
||||
background-color: var(--colorNeutralBackground1Selected);
|
||||
|
||||
li {
|
||||
// Override the bootstrap defaults here to align with our layout constants.
|
||||
margin-bottom: 0px;
|
||||
height: 32px;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--colorNeutralBackground1Pressed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1952,9 +1940,8 @@ input::-webkit-calendar-picker-indicator::after {
|
||||
.nav.nav-tabs.qslevel > li > a:hover {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background-color: var(--colorNeutralBackground1Selected);
|
||||
background-color: transparent !important;
|
||||
border-color: transparent;
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.numbersize {
|
||||
@@ -2389,8 +2376,6 @@ a:link {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0; // This prevents it to grow past the parent's width if its content is too wide
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.tabs {
|
||||
@@ -2646,16 +2631,14 @@ a:link {
|
||||
}
|
||||
|
||||
.tabPanesContainer {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.paddingspan4 {
|
||||
@@ -2672,18 +2655,24 @@ a:link {
|
||||
.nav-tabs > li.active > .tabNavContentContainer,
|
||||
.nav-tabs > li.active > .tabNavContentContainer:focus,
|
||||
.nav-tabs > li.active > .tabNavContentContainer:hover {
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: #555;
|
||||
cursor: default;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
border-color: var(--colorNeutralStroke1);
|
||||
background-color: @BaseLight;
|
||||
border-color: @BaseMedium;
|
||||
border-bottom-color: @BaseLight;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
height: @ActiveTabHeight;
|
||||
width: @ActiveTabWidth;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active .contentWrapper .tabNavText {
|
||||
border-bottom: 2px solid var(--colorCompoundBrandBackground);
|
||||
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content > .contentWrapper > .tabNavText {
|
||||
font-weight: bolder;
|
||||
border-bottom: 2px solid rgba(0, 120, 212, 1);
|
||||
}
|
||||
|
||||
.nav-tabs > li.active:focus > .tabNavContentContainer {
|
||||
.focus();
|
||||
}
|
||||
|
||||
.tabNavContentContainer {
|
||||
@@ -2692,7 +2681,7 @@ a:link {
|
||||
justify-content: space-between;
|
||||
border-radius: 2px 2px 0 0;
|
||||
padding: @DefaultSpace 0px @SmallSpace 0px;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseHigh;
|
||||
width: @TabsWidth;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
@@ -2700,21 +2689,19 @@ a:link {
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
border-color: transparent;
|
||||
background-color: @BaseMediumLow;
|
||||
border-color: @BaseMediumLow;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--colorNeutralBackground1Pressed);
|
||||
background-color: @BaseMediumLow;
|
||||
}
|
||||
|
||||
.tab_Content {
|
||||
.flex-display();
|
||||
width: @TabsWidth;
|
||||
border-right: @ButtonBorderWidth solid var(--colorNeutralStroke1);
|
||||
border-right: @ButtonBorderWidth solid @BaseMedium;
|
||||
white-space: nowrap;
|
||||
color: var(--colorNeutralForeground1);
|
||||
|
||||
.contentWrapper {
|
||||
.flex-display();
|
||||
width: @ContentWrapper;
|
||||
@@ -2736,8 +2723,9 @@ a:link {
|
||||
background-image: url(../images/error_no_outline.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 3px;
|
||||
display: block;
|
||||
margin: 4px 0px 0px 6px;
|
||||
margin: 1px 0px 0px 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2762,60 +2750,39 @@ a:link {
|
||||
.loadingIcon {
|
||||
width: @LoadingErrorIconSize;
|
||||
height: @LoadingErrorIconSize;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.warningIconContainer {
|
||||
width: @ErrorIconContainer;
|
||||
height: @ErrorIconContainer;
|
||||
margin-top: 1px;
|
||||
margin: 0px 0px @SmallSpace @SmallSpace;
|
||||
}
|
||||
}
|
||||
|
||||
.tabNavText {
|
||||
margin-left: @SmallSpace;
|
||||
margin-right: 2px;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseDark;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
flex-grow: 1;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.tabIconSection {
|
||||
width: 29px;
|
||||
position: relative;
|
||||
padding-top: 2px;
|
||||
|
||||
.cancelButton {
|
||||
padding: 0px @SmallSpace 0px @SmallSpace;
|
||||
color: var(--colorNeutralForeground1);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
color: var(--colorNeutralForeground1);
|
||||
.hover();
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: var(--colorNeutralBackground1Pressed);
|
||||
color: var(--colorNeutralForeground1);
|
||||
.focus();
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--colorNeutralBackground1Pressed);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "×";
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
.active();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3170,12 +3137,3 @@ a:link {
|
||||
.sidebarContainer {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.close-Icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ html {
|
||||
body {
|
||||
font-family: @FabricFont;
|
||||
background-color: #f5f5f5;
|
||||
--colorCompoundBrandBackground: @FabricAccentMedium;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -42,7 +41,7 @@ a:focus {
|
||||
}
|
||||
|
||||
.nav-tabs-margin {
|
||||
padding-top: 0px;
|
||||
padding-top: 5px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
@@ -69,20 +68,17 @@ a:focus {
|
||||
}
|
||||
|
||||
.nav-tabs > li > .tabNavContentContainer > .tab_Content:hover {
|
||||
border-bottom: none;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content,
|
||||
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content:hover {
|
||||
border-bottom: none;
|
||||
border-bottom: 2px solid @FabricAccentMedium;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content > .contentWrapper > .tabNavText {
|
||||
border-bottom: 0px none transparent;
|
||||
}
|
||||
.nav-tabs > li.active .contentWrapper .tabNavText {
|
||||
border-bottom: 2px solid @FabricAccentMedium;
|
||||
}
|
||||
|
||||
.tabNavContentContainer {
|
||||
padding: @SmallSpace 0px @SmallSpace 0px;
|
||||
@@ -218,7 +214,6 @@ a:focus {
|
||||
|
||||
.tabPanesContainer {
|
||||
overflow: auto !important;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
|
||||
.storageCapacityTitle {
|
||||
padding: @LargeSpace 0px;
|
||||
|
||||
}
|
||||
.throughputStorageValue {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.estimatedCost,
|
||||
.largePartitionKeyEnabled {
|
||||
.estimatedCost, .largePartitionKeyEnabled {
|
||||
padding: @SmallSpace 0px @LargeSpace;
|
||||
}
|
||||
|
||||
@@ -109,25 +109,18 @@
|
||||
}
|
||||
|
||||
.formTree {
|
||||
border: 1px solid var(--colorNeutralStroke1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
border: 1px solid #969696;
|
||||
color: #393939;
|
||||
padding: 0px 12px 1px 8px;
|
||||
}
|
||||
|
||||
.formTree:hover {
|
||||
border: 1px solid var(--colorNeutralStroke1Hover);
|
||||
background-color: var(--colorNeutralBackground1Hover);
|
||||
}
|
||||
|
||||
.formTree::placeholder {
|
||||
color: var(--colorNeutralForeground2);
|
||||
opacity: 1;
|
||||
border: 1px solid #969696;
|
||||
background-color: #e6f8fe;
|
||||
}
|
||||
|
||||
.formTree:active {
|
||||
border: 1px solid var(--colorNeutralStroke1Pressed);
|
||||
background-color: var(--colorNeutralBackground1Pressed);
|
||||
border: 1px solid #1ebbee;
|
||||
}
|
||||
|
||||
.scaleForm {
|
||||
@@ -146,6 +139,7 @@
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
.spUdfTriggerHeader {
|
||||
padding: @DefaultSpace 0px @SmallSpace (2 * @MediumSpace);
|
||||
}
|
||||
@@ -157,33 +151,33 @@
|
||||
|
||||
.unselectedRadio {
|
||||
background-color: white;
|
||||
border-color: #eee !important;
|
||||
border-color: #EEE!important;
|
||||
color: black!important;
|
||||
}
|
||||
|
||||
.disabledRadio {
|
||||
background-color: #a19f9d;
|
||||
border-color: #eee !important;
|
||||
background-color: #A19F9D;
|
||||
border-color: #EEE!important;
|
||||
color: white!important;
|
||||
}
|
||||
|
||||
.selectedRadio {
|
||||
background-color: @AccentMediumHigh;
|
||||
border-color: #eee !important;
|
||||
border-color: #EEE!important;
|
||||
color: white!important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selectedRadio:hover {
|
||||
background-color: @AccentMediumHigh;
|
||||
border-color: #eee !important;
|
||||
border-color: #EEE!important;
|
||||
color: white!important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selectedRadio:active {
|
||||
background-color: #0072c6;
|
||||
border-color: #eee !important;
|
||||
border-color: #EEE!important;
|
||||
color: white!important;
|
||||
cursor: pointer;
|
||||
border: 1px solid #0072c6;
|
||||
@@ -210,18 +204,8 @@
|
||||
|
||||
.trigger-field {
|
||||
width: 40%;
|
||||
margin-top: 10px;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
.trigger-field input::placeholder {
|
||||
color: var(--colorNeutralForeground3);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.trigger-form {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
padding: 10px 30px;
|
||||
padding: 10px 30px 10px 30px;
|
||||
}
|
||||
@@ -255,7 +255,7 @@ body {
|
||||
flex: 1;
|
||||
padding-left: 34px;
|
||||
padding-right: 34px;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseDark;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
margin: (2 * @MediumSpace) 0px;
|
||||
|
||||
270
less/tree.less
Normal file
270
less/tree.less
Normal file
@@ -0,0 +1,270 @@
|
||||
@import "./Common/Constants";
|
||||
|
||||
.resourceTree {
|
||||
height: 100%;
|
||||
flex: 0 0 auto;
|
||||
.main {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.resourceTreeScroll {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.userSelectNone {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
.treeHovermargin {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
padding: @SmallSpace 2px;
|
||||
outline: 0;
|
||||
|
||||
&:hover {
|
||||
.hover();
|
||||
}
|
||||
|
||||
&:active {
|
||||
.active();
|
||||
}
|
||||
|
||||
&:focus {
|
||||
.focus();
|
||||
}
|
||||
}
|
||||
|
||||
.contextmenushowing {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.collectionstree {
|
||||
width: 100%;
|
||||
margin-top: @DefaultSpace;
|
||||
|
||||
.databaseList {
|
||||
list-style-type: none;
|
||||
padding-left: 0px;
|
||||
|
||||
.collectionList {
|
||||
padding-left: (2 * @MediumSpace);
|
||||
}
|
||||
|
||||
.collectionChildList {
|
||||
padding-left: @LargeSpace;
|
||||
}
|
||||
|
||||
.databaseDocuments {
|
||||
padding-left: (5 * @MediumSpace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pointerCursor {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menuEllipsis {
|
||||
padding-right: 6px;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top: -5px;
|
||||
left: 0px;
|
||||
float: right;
|
||||
display: none;
|
||||
padding-left: 6px !important;
|
||||
line-height: @TreeLineHeight;
|
||||
}
|
||||
|
||||
.databaseMenu {
|
||||
.flex-display();
|
||||
}
|
||||
|
||||
.databaseMenu:hover .menuEllipsis,
|
||||
.databaseMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.databaseCollChildTextOverflow {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.collectionMenu {
|
||||
.flex-display();
|
||||
}
|
||||
|
||||
.collectionMenu:hover .menuEllipsis,
|
||||
.collectionMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.documentsMenu:hover .menuEllipsis,
|
||||
.documentsMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.treeChildMenu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.storedProcedureMenu:hover .menuEllipsis,
|
||||
.storedProcedureMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.childMenu {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding-left: (6 * @MediumSpace);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.storedChildMenu:hover .menuEllipsis,
|
||||
.storedChildMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.contextmenu6 {
|
||||
top: -29px;
|
||||
}
|
||||
|
||||
.userDefinedMenu:hover .contextmenu6 {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.userDefinedchildMenu:hover .menuEllipsis,
|
||||
.userDefinedchildMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.triggersMenu:hover .menuEllipsis,
|
||||
.triggersMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.triggersChildMenu:hover .menuEllipsis,
|
||||
.triggersChildMenu:focus .menuEllipsis {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.databaseId {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.storedUdfTriggerMenu {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.collectionstree img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
img.collectionsTreeCollapseExpand {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.collapsed::before {
|
||||
content: "\23F5";
|
||||
margin-left: 0px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.expanded::before {
|
||||
content: "\23F7";
|
||||
margin-left: 0px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.collectionMenuChildren {
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
.main-nav {
|
||||
width: 100vh;
|
||||
height: 40px;
|
||||
background: white;
|
||||
transform-origin: left top;
|
||||
-webkit-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
transform: rotate(-90deg) translateX(-100%);
|
||||
-webkit-transform: rotate(-90deg) translateX(-100%);
|
||||
-ms-transform: rotate(-90deg) translateX(-100%);
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.main-nav-img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: -32px 0 0 0;
|
||||
transform: rotate(-90deg) translateX(-100%);
|
||||
-webkit-transform: rotate(-90deg) translateX(-100%);
|
||||
-ms-transform: rotate(-90deg) translateX(-100%);
|
||||
}
|
||||
|
||||
.main-nav-img.main-nav-sub-img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0px 0px 0 0;
|
||||
transform: rotate(180deg) translateX(0%);
|
||||
-webkit-transform: rotate(180deg) translateX(0%);
|
||||
-ms-transform: rotate(180deg) translateX(0%);
|
||||
position: absolute;
|
||||
right: -8px;
|
||||
top: 16px;
|
||||
}
|
||||
|
||||
ul.nav {
|
||||
margin: 0 auto;
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.mini ul.nav li {
|
||||
float: right;
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.spancolchildstyle {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.contextmenubutton {
|
||||
float: right;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.highlight:hover > .contextmenubutton {
|
||||
display: unset;
|
||||
}
|
||||
|
||||
.highlight:hover > .contextmenubutton::after {
|
||||
content: "\2026";
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.showEllipsis {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -116,8 +116,8 @@
|
||||
"tinykeys": "2.1.0",
|
||||
"underscore": "1.12.1",
|
||||
"utility-types": "3.10.0",
|
||||
"uuid": "9.0.0",
|
||||
"web-vitals": "4.2.4",
|
||||
"uuid": "9.0.0",
|
||||
"zustand": "3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -11,8 +11,8 @@ export default defineConfig({
|
||||
reporter: process.env.CI ? "blob" : "html",
|
||||
timeout: 10 * 60 * 1000,
|
||||
use: {
|
||||
trace: "retain-on-failure",
|
||||
video: "retain-on-failure",
|
||||
trace: "off",
|
||||
video: "off",
|
||||
screenshot: "on",
|
||||
testIdAttribute: "data-test",
|
||||
contextOptions: {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Overlay, Spinner, SpinnerSize } from "@fluentui/react";
|
||||
import { useThemeStore } from "hooks/useTheme";
|
||||
import React from "react";
|
||||
|
||||
interface LoadingOverlayProps {
|
||||
@@ -8,17 +7,15 @@ interface LoadingOverlayProps {
|
||||
}
|
||||
|
||||
const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ isLoading, label }) => {
|
||||
const isDarkMode = useThemeStore((state) => state.isDarkMode);
|
||||
if (!isLoading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Overlay
|
||||
data-test="loading-overlay"
|
||||
styles={{
|
||||
root: {
|
||||
backgroundColor: isDarkMode ? "rgba(32, 31, 30, 0.9)" : "rgba(255,255,255,0.9)",
|
||||
backgroundColor: "rgba(255,255,255,0.9)",
|
||||
zIndex: 9999,
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
@@ -26,11 +23,7 @@ const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ isLoading, label }) =>
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Spinner
|
||||
size={SpinnerSize.large}
|
||||
label={label}
|
||||
styles={{ label: { fontWeight: 600, color: isDarkMode ? "#ffffff" : "#323130" } }}
|
||||
/>
|
||||
<Spinner size={SpinnerSize.large} label={label} styles={{ label: { fontWeight: 600 } }} />
|
||||
</Overlay>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -11,14 +11,3 @@
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Override dark mode inherit for pagination icons */
|
||||
body.isDarkMode .pager-container .ms-Button .ms-Button-icon,
|
||||
body.isDarkMode .pager-container .ms-Button i {
|
||||
color: var(--colorBrandForeground1);
|
||||
}
|
||||
|
||||
body.isDarkMode .pager-container .ms-Button:disabled .ms-Button-icon,
|
||||
body.isDarkMode .pager-container .ms-Button:disabled i {
|
||||
color: var(--colorNeutralForegroundDisabled);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ const Pager: React.FC<PagerProps> = ({
|
||||
return (
|
||||
<div className={className || "pager-container"}>
|
||||
{showItemCount && (
|
||||
<Text className="themeText">
|
||||
<Text>
|
||||
Showing {startIndex + 1} - {endIndex} of {totalCount} items
|
||||
</Text>
|
||||
)}
|
||||
@@ -82,7 +82,7 @@ const Pager: React.FC<PagerProps> = ({
|
||||
disabled={disabled || currentPage === 1}
|
||||
styles={iconButtonStyles}
|
||||
/>
|
||||
<Text className="themeText">
|
||||
<Text>
|
||||
Page {currentPage} of {totalPages}
|
||||
</Text>
|
||||
<IconButton
|
||||
|
||||
@@ -50,33 +50,10 @@ export const Upload: FunctionComponent<UploadProps> = ({
|
||||
const title = label + " to upload";
|
||||
return (
|
||||
<div>
|
||||
<span className="renewUploadItemsHeader" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
{label}
|
||||
</span>
|
||||
<span className="renewUploadItemsHeader">{label}</span>
|
||||
{tooltip && <InfoTooltip>{tooltip}</InfoTooltip>}
|
||||
<Stack horizontal>
|
||||
<TextField
|
||||
styles={{
|
||||
fieldGroup: {
|
||||
width: 300,
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
field: {
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
subComponentStyles: {
|
||||
label: {
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
readOnly
|
||||
value={selectedFilesTitle.toString()}
|
||||
/>
|
||||
<TextField styles={{ fieldGroup: { width: 300 } }} readOnly value={selectedFilesTitle.toString()} />
|
||||
<input
|
||||
type="file"
|
||||
id="importFileInput"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
exports[`LoadingOverlay should handle long labels properly 1`] = `
|
||||
<div
|
||||
class="ms-Overlay root-109"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-111"
|
||||
@@ -23,7 +22,6 @@ exports[`LoadingOverlay should handle long labels properly 1`] = `
|
||||
exports[`LoadingOverlay should render loading overlay when isLoading is true 1`] = `
|
||||
<div
|
||||
class="ms-Overlay root-109"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-111"
|
||||
@@ -43,7 +41,6 @@ exports[`LoadingOverlay should render loading overlay when isLoading is true 1`]
|
||||
exports[`LoadingOverlay should render loading overlay with custom label 1`] = `
|
||||
<div
|
||||
class="ms-Overlay root-109"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-111"
|
||||
@@ -63,7 +60,6 @@ exports[`LoadingOverlay should render loading overlay with custom label 1`] = `
|
||||
exports[`LoadingOverlay should render loading overlay with empty label 1`] = `
|
||||
<div
|
||||
class="ms-Overlay root-109"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-111"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { configContext } from "ConfigContext";
|
||||
import { ApiType, userContext } from "UserContext";
|
||||
import * as NotificationConsoleUtils from "Utils/NotificationConsoleUtils";
|
||||
import {
|
||||
@@ -15,12 +14,9 @@ import {
|
||||
DataTransferJobFeedResults,
|
||||
DataTransferJobGetResults,
|
||||
} from "Utils/arm/generatedClients/dataTransferService/types";
|
||||
import { armRequest } from "Utils/arm/request";
|
||||
import { addToPolling, removeFromPolling, updateDataTransferJob, useDataTransferJobs } from "hooks/useDataTransferJobs";
|
||||
import promiseRetry, { AbortError, FailedAttemptError } from "p-retry";
|
||||
|
||||
export const DATA_TRANSFER_JOB_API_VERSION = "2025-05-01-preview";
|
||||
|
||||
export interface DataTransferParams {
|
||||
jobName: string;
|
||||
apiType: ApiType;
|
||||
@@ -37,34 +33,26 @@ export const getDataTransferJobs = async (
|
||||
subscriptionId: string,
|
||||
resourceGroup: string,
|
||||
accountName: string,
|
||||
signal?: AbortSignal,
|
||||
): Promise<DataTransferJobGetResults[]> => {
|
||||
let dataTransferJobs: DataTransferJobGetResults[] = [];
|
||||
let dataTransferFeeds: DataTransferJobFeedResults = await listByDatabaseAccount(
|
||||
subscriptionId,
|
||||
resourceGroup,
|
||||
accountName,
|
||||
signal,
|
||||
);
|
||||
dataTransferJobs = [...dataTransferJobs, ...(dataTransferFeeds?.value || [])];
|
||||
while (dataTransferFeeds?.nextLink) {
|
||||
/**
|
||||
* The `nextLink` URL returned by the Cosmos DB SQL API pointed to an incorrect endpoint, causing timeouts.
|
||||
* (i.e: https://cdbmgmtprodby.documents.azure.com:450/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.DocumentDB/databaseAccounts/{account}/sql/dataTransferJobs?$top=100&$skiptoken=...)
|
||||
* We manipulate the URL by parsing it to extract the path and query parameters,
|
||||
* then construct the correct URL for the Azure Resource Manager (ARM) API.
|
||||
* This ensures that the request is made to the correct base URL (`configContext.ARM_ENDPOINT`),
|
||||
* which is required for ARM operations.
|
||||
*/
|
||||
const parsedUrl = new URL(dataTransferFeeds.nextLink);
|
||||
const nextUrlPath = parsedUrl.pathname + parsedUrl.search;
|
||||
dataTransferFeeds = await armRequest({
|
||||
host: configContext.ARM_ENDPOINT,
|
||||
path: nextUrlPath,
|
||||
method: "GET",
|
||||
apiVersion: DATA_TRANSFER_JOB_API_VERSION,
|
||||
const nextResponse = await window.fetch(dataTransferFeeds.nextLink, {
|
||||
headers: {
|
||||
Authorization: userContext.authorizationToken,
|
||||
},
|
||||
});
|
||||
dataTransferJobs.push(...(dataTransferFeeds?.value || []));
|
||||
if (nextResponse.ok) {
|
||||
dataTransferFeeds = await nextResponse.json();
|
||||
dataTransferJobs = [...dataTransferJobs, ...(dataTransferFeeds?.value || [])];
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return dataTransferJobs;
|
||||
};
|
||||
|
||||
@@ -50,5 +50,4 @@ export enum MessageTypes {
|
||||
OpenCESCVAFeedbackBlade,
|
||||
ActivateTab,
|
||||
OpenContainerCopyFeedbackBlade,
|
||||
UpdateTheme,
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
TriggerDefinition,
|
||||
UserDefinedFunctionDefinition,
|
||||
} from "@azure/cosmos";
|
||||
import type Explorer from "../Explorer/Explorer";
|
||||
import Explorer from "../Explorer/Explorer";
|
||||
import { ConsoleData } from "../Explorer/Menus/NotificationConsole/ConsoleData";
|
||||
import { CassandraTableKey, CassandraTableKeys } from "../Explorer/Tables/TableDataClient";
|
||||
import ConflictId from "../Explorer/Tree/ConflictId";
|
||||
@@ -447,9 +447,6 @@ export interface DataExplorerInputsFrame {
|
||||
aadToken?: string;
|
||||
containerCopyEnabled?: boolean;
|
||||
sessionId?: string;
|
||||
theme?: {
|
||||
mode: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SelfServeFrameInputs {
|
||||
@@ -483,6 +480,3 @@ export interface DropdownOption<T> {
|
||||
value: T;
|
||||
disable?: boolean;
|
||||
}
|
||||
|
||||
// Remove the duplicate Explorer interface and export the type
|
||||
export type { Explorer };
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import "@testing-library/jest-dom";
|
||||
import Explorer from "Explorer/Explorer";
|
||||
import { getDataTransferJobs } from "../../../Common/dataAccess/dataTransfers";
|
||||
import * as Logger from "../../../Common/Logger";
|
||||
import { useSidePanel } from "../../../hooks/useSidePanel";
|
||||
import * as dataTransferService from "../../../Utils/arm/generatedClients/dataTransferService/dataTransferJobs";
|
||||
@@ -31,7 +30,6 @@ jest.mock("../../../Common/Logger");
|
||||
jest.mock("../../../Utils/arm/generatedClients/dataTransferService/dataTransferJobs");
|
||||
jest.mock("../MonitorCopyJobs/MonitorCopyJobRefState");
|
||||
jest.mock("../CopyJobUtils");
|
||||
jest.mock("../../../Common/dataAccess/dataTransfers");
|
||||
|
||||
describe("CopyJobActions", () => {
|
||||
beforeEach(() => {
|
||||
@@ -156,7 +154,8 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should fetch and format copy jobs successfully", async () => {
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "job-1",
|
||||
@@ -178,9 +177,10 @@ describe("CopyJobActions", () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -201,7 +201,8 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should filter jobs by CosmosDBSql component", async () => {
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "sql-job",
|
||||
@@ -228,9 +229,10 @@ describe("CopyJobActions", () => {
|
||||
destination: { component: "CosmosDBSql", databaseName: "db2", containerName: "c2" },
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -245,7 +247,8 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should sort jobs by last updated time (newest first)", async () => {
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "older-job",
|
||||
@@ -272,9 +275,10 @@ describe("CopyJobActions", () => {
|
||||
destination: { component: "CosmosDBSql", databaseName: "db4", containerName: "c4" },
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -289,7 +293,8 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should calculate completion percentage correctly", async () => {
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "job-1",
|
||||
@@ -303,9 +308,10 @@ describe("CopyJobActions", () => {
|
||||
destination: { component: "CosmosDBSql", databaseName: "db2", containerName: "c2" },
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -319,7 +325,8 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should handle zero total count gracefully", async () => {
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "job-1",
|
||||
@@ -333,9 +340,10 @@ describe("CopyJobActions", () => {
|
||||
destination: { component: "CosmosDBSql", databaseName: "db2", containerName: "c2" },
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -353,7 +361,8 @@ describe("CopyJobActions", () => {
|
||||
message: "Error message line 1\r\n\r\nError message line 2",
|
||||
code: "ErrorCode123",
|
||||
};
|
||||
const mockResponse = [
|
||||
const mockResponse = {
|
||||
value: [
|
||||
{
|
||||
properties: {
|
||||
jobName: "failed-job",
|
||||
@@ -368,9 +377,10 @@ describe("CopyJobActions", () => {
|
||||
error: mockError,
|
||||
},
|
||||
},
|
||||
];
|
||||
],
|
||||
};
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue(mockResponse);
|
||||
(CopyJobUtils.formatUTCDateTime as jest.Mock).mockReturnValue({
|
||||
formattedDateTime: "1/1/2025, 10:00:00 AM",
|
||||
timestamp: 1704106800000,
|
||||
@@ -398,7 +408,7 @@ describe("CopyJobActions", () => {
|
||||
};
|
||||
(global as any).AbortController = jest.fn(() => mockAbortController);
|
||||
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue([]);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue({ value: [] });
|
||||
|
||||
getCopyJobs();
|
||||
expect(mockAbortController.abort).not.toHaveBeenCalled();
|
||||
@@ -408,7 +418,9 @@ describe("CopyJobActions", () => {
|
||||
});
|
||||
|
||||
it("should throw error for invalid response format", async () => {
|
||||
(getDataTransferJobs as jest.Mock).mockResolvedValue("not-an-array");
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockResolvedValue({
|
||||
value: "not-an-array",
|
||||
});
|
||||
|
||||
await expect(getCopyJobs()).rejects.toThrow("Invalid migration job status response: Expected an array of jobs.");
|
||||
});
|
||||
@@ -418,7 +430,7 @@ describe("CopyJobActions", () => {
|
||||
message: "Aborted",
|
||||
content: JSON.stringify({ message: "signal is aborted without reason" }),
|
||||
};
|
||||
(getDataTransferJobs as jest.Mock).mockRejectedValue(abortError);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockRejectedValue(abortError);
|
||||
|
||||
await expect(getCopyJobs()).rejects.toMatchObject({
|
||||
message: expect.stringContaining("Previous copy job request was cancelled."),
|
||||
@@ -427,7 +439,7 @@ describe("CopyJobActions", () => {
|
||||
|
||||
it("should handle generic errors", async () => {
|
||||
const genericError = new Error("Network error");
|
||||
(getDataTransferJobs as jest.Mock).mockRejectedValue(genericError);
|
||||
(dataTransferService.listByDatabaseAccount as jest.Mock).mockRejectedValue(genericError);
|
||||
|
||||
await expect(getCopyJobs()).rejects.toThrow("Network error");
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Explorer from "Explorer/Explorer";
|
||||
import React from "react";
|
||||
import { userContext } from "UserContext";
|
||||
import { getDataTransferJobs } from "../../../Common/dataAccess/dataTransfers";
|
||||
import { logError } from "../../../Common/Logger";
|
||||
import { useSidePanel } from "../../../hooks/useSidePanel";
|
||||
import {
|
||||
cancel,
|
||||
complete,
|
||||
create,
|
||||
listByDatabaseAccount,
|
||||
pause,
|
||||
resume,
|
||||
} from "../../../Utils/arm/generatedClients/dataTransferService/dataTransferJobs";
|
||||
@@ -63,8 +63,14 @@ export const getCopyJobs = async (): Promise<CopyJobType[]> => {
|
||||
const { subscriptionId, resourceGroup, accountName } = getAccountDetailsFromResourceId(
|
||||
userContext.databaseAccount?.id || "",
|
||||
);
|
||||
const jobs = await getDataTransferJobs(subscriptionId, resourceGroup, accountName, copyJobsAbortController.signal);
|
||||
const response = await listByDatabaseAccount(
|
||||
subscriptionId,
|
||||
resourceGroup,
|
||||
accountName,
|
||||
copyJobsAbortController.signal,
|
||||
);
|
||||
|
||||
const jobs = response.value || [];
|
||||
if (!Array.isArray(jobs)) {
|
||||
throw new Error("Invalid migration job status response: Expected an array of jobs.");
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ describe("CopyJobCommandBar", () => {
|
||||
|
||||
render(<CopyJobCommandBar explorer={mockExplorer} />);
|
||||
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer, false);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
@@ -163,7 +163,7 @@ describe("CopyJobCommandBar", () => {
|
||||
|
||||
render(<CopyJobCommandBar explorer={mockExplorer} />);
|
||||
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer, false);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer);
|
||||
expect(mockConvertButton.mock.calls[0][0]).toEqual(mockCommandButtonProps);
|
||||
});
|
||||
|
||||
@@ -175,11 +175,11 @@ describe("CopyJobCommandBar", () => {
|
||||
mockConvertButton.mockReturnValue([]);
|
||||
|
||||
const { rerender } = render(<CopyJobCommandBar explorer={mockExplorer1} />);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer1, false);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer1);
|
||||
|
||||
rerender(<CopyJobCommandBar explorer={mockExplorer2} />);
|
||||
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer2, false);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledWith(mockExplorer2);
|
||||
expect(mockGetCommandBarButtons).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
import { CommandBar as FluentCommandBar, ICommandBarItemProps } from "@fluentui/react";
|
||||
import React from "react";
|
||||
import { useThemeStore } from "../../../hooks/useTheme";
|
||||
import { StyleConstants } from "../../../Common/StyleConstants";
|
||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||
import * as CommandBarUtil from "../../Menus/CommandBar/CommandBarUtil";
|
||||
import { getThemeTokens } from "../../Theme/ThemeUtil";
|
||||
import { ContainerCopyProps } from "../Types/CopyJobTypes";
|
||||
import { getCommandBarButtons } from "./Utils";
|
||||
|
||||
const CopyJobCommandBar: React.FC<ContainerCopyProps> = ({ explorer }) => {
|
||||
const isDarkMode = useThemeStore((state) => state.isDarkMode);
|
||||
const themeTokens = getThemeTokens(isDarkMode);
|
||||
const backgroundColor = themeTokens.colorNeutralBackground1;
|
||||
|
||||
const backgroundColor = StyleConstants.BaseLight;
|
||||
const rootStyle = {
|
||||
root: {
|
||||
backgroundColor: backgroundColor,
|
||||
},
|
||||
};
|
||||
|
||||
const commandBarItems: CommandButtonComponentProps[] = getCommandBarButtons(explorer, isDarkMode);
|
||||
const CopyJobCommandBar: React.FC<ContainerCopyProps> = ({ explorer }) => {
|
||||
const commandBarItems: CommandButtonComponentProps[] = getCommandBarButtons(explorer);
|
||||
const controlButtons: ICommandBarItemProps[] = CommandBarUtil.convertButton(commandBarItems, backgroundColor);
|
||||
|
||||
return (
|
||||
<div className="commandBarContainer" style={{ backgroundColor }}>
|
||||
<div className="commandBarContainer">
|
||||
<FluentCommandBar
|
||||
ariaLabel="Use left and right arrow keys to navigate between commands"
|
||||
styles={rootStyle}
|
||||
|
||||
@@ -50,7 +50,7 @@ describe("CommandBar Utils", () => {
|
||||
|
||||
describe("getCommandBarButtons", () => {
|
||||
it("should return an array of command button props", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
expect(buttons).toBeDefined();
|
||||
expect(Array.isArray(buttons)).toBe(true);
|
||||
@@ -58,7 +58,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should include create copy job button", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const createButton = buttons[0];
|
||||
|
||||
expect(createButton).toBeDefined();
|
||||
@@ -70,7 +70,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should include refresh button", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const refreshButton = buttons[1];
|
||||
|
||||
expect(refreshButton).toBeDefined();
|
||||
@@ -80,11 +80,11 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should include feedback button when platform is Portal", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
expect(buttons.length).toBe(4);
|
||||
expect(buttons.length).toBe(3);
|
||||
|
||||
const feedbackButton = buttons[3];
|
||||
const feedbackButton = buttons[2];
|
||||
expect(feedbackButton).toBeDefined();
|
||||
expect(feedbackButton.ariaLabel).toBe("Provide feedback on copy jobs");
|
||||
expect(feedbackButton.tooltipText).toBe("Feedback");
|
||||
@@ -105,13 +105,13 @@ describe("CommandBar Utils", () => {
|
||||
}));
|
||||
|
||||
const { getCommandBarButtons: getCommandBarButtonsEmulator } = await import("./Utils");
|
||||
const buttons = getCommandBarButtonsEmulator(mockExplorer, false);
|
||||
const buttons = getCommandBarButtonsEmulator(mockExplorer);
|
||||
|
||||
expect(buttons.length).toBe(3);
|
||||
expect(buttons.length).toBe(2);
|
||||
});
|
||||
|
||||
it("should call openCreateCopyJobPanel when create button is clicked", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const createButton = buttons[0];
|
||||
|
||||
createButton.onCommandClick({} as React.SyntheticEvent);
|
||||
@@ -121,7 +121,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should call refreshJobList when refresh button is clicked", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const refreshButton = buttons[1];
|
||||
|
||||
refreshButton.onCommandClick({} as React.SyntheticEvent);
|
||||
@@ -130,8 +130,8 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should call openContainerCopyFeedbackBlade when feedback button is clicked", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const feedbackButton = buttons[3];
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const feedbackButton = buttons[2];
|
||||
|
||||
feedbackButton.onCommandClick({} as React.SyntheticEvent);
|
||||
|
||||
@@ -139,7 +139,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should return buttons with correct icon sources", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
expect(buttons[0].iconSrc).toBeDefined();
|
||||
expect(buttons[0].iconAlt).toBe("Create Copy Job");
|
||||
@@ -148,10 +148,7 @@ describe("CommandBar Utils", () => {
|
||||
expect(buttons[1].iconAlt).toBe("Refresh");
|
||||
|
||||
expect(buttons[2].iconSrc).toBeDefined();
|
||||
expect(buttons[2].iconAlt).toBe("Dark Theme");
|
||||
|
||||
expect(buttons[3].iconSrc).toBeDefined();
|
||||
expect(buttons[3].iconAlt).toBe("Feedback");
|
||||
expect(buttons[2].iconAlt).toBe("Feedback");
|
||||
});
|
||||
|
||||
it("should handle null MonitorCopyJobsRefState ref gracefully", () => {
|
||||
@@ -160,14 +157,14 @@ describe("CommandBar Utils", () => {
|
||||
return selector(state);
|
||||
});
|
||||
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
const refreshButton = buttons[1];
|
||||
|
||||
expect(() => refreshButton.onCommandClick({} as React.SyntheticEvent)).not.toThrow();
|
||||
});
|
||||
|
||||
it("should set hasPopup to false for all buttons", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.hasPopup).toBe(false);
|
||||
@@ -175,7 +172,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should set commandButtonLabel to undefined for all buttons", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.commandButtonLabel).toBeUndefined();
|
||||
@@ -183,7 +180,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should respect disabled state when provided", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.disabled).toBe(false);
|
||||
@@ -191,7 +188,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should return CommandButtonComponentProps with all required properties", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button: CommandButtonComponentProps) => {
|
||||
expect(button).toHaveProperty("iconSrc");
|
||||
@@ -205,19 +202,18 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should maintain button order: create, refresh, themeToggle, feedback", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
it("should maintain button order: create, refresh, feedback", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
expect(buttons[0].tooltipText).toBe("Create Copy Job");
|
||||
expect(buttons[1].tooltipText).toBe("Refresh");
|
||||
expect(buttons[2].tooltipText).toBe("Dark Theme");
|
||||
expect(buttons[3].tooltipText).toBe("Feedback");
|
||||
expect(buttons[2].tooltipText).toBe("Feedback");
|
||||
});
|
||||
});
|
||||
|
||||
describe("Button click handlers", () => {
|
||||
it("should execute click handlers without errors", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(() => button.onCommandClick({} as React.SyntheticEvent)).not.toThrow();
|
||||
@@ -225,7 +221,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should call correct action for each button", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons[0].onCommandClick({} as React.SyntheticEvent);
|
||||
expect(Actions.openCreateCopyJobPanel).toHaveBeenCalledWith(mockExplorer);
|
||||
@@ -233,14 +229,14 @@ describe("CommandBar Utils", () => {
|
||||
buttons[1].onCommandClick({} as React.SyntheticEvent);
|
||||
expect(mockRefreshJobList).toHaveBeenCalled();
|
||||
|
||||
buttons[3].onCommandClick({} as React.SyntheticEvent);
|
||||
buttons[2].onCommandClick({} as React.SyntheticEvent);
|
||||
expect(mockOpenContainerCopyFeedbackBlade).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe("Accessibility", () => {
|
||||
it("should have aria labels for all buttons", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.ariaLabel).toBeDefined();
|
||||
@@ -250,7 +246,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should have tooltip text for all buttons", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.tooltipText).toBeDefined();
|
||||
@@ -260,7 +256,7 @@ describe("CommandBar Utils", () => {
|
||||
});
|
||||
|
||||
it("should have icon alt text for all buttons", () => {
|
||||
const buttons = getCommandBarButtons(mockExplorer, false);
|
||||
const buttons = getCommandBarButtons(mockExplorer);
|
||||
|
||||
buttons.forEach((button) => {
|
||||
expect(button.iconAlt).toBeDefined();
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import AddIcon from "../../../../images/Add.svg";
|
||||
import FeedbackIcon from "../../../../images/Feedback-Command.svg";
|
||||
import MoonIcon from "../../../../images/MoonIcon.svg";
|
||||
import RefreshIcon from "../../../../images/refresh-cosmos.svg";
|
||||
import SunIcon from "../../../../images/SunIcon.svg";
|
||||
import { configContext, Platform } from "../../../ConfigContext";
|
||||
import { useThemeStore } from "../../../hooks/useTheme";
|
||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||
import Explorer from "../../Explorer";
|
||||
import * as Actions from "../Actions/CopyJobActions";
|
||||
@@ -12,7 +9,7 @@ import ContainerCopyMessages from "../ContainerCopyMessages";
|
||||
import { MonitorCopyJobsRefState } from "../MonitorCopyJobs/MonitorCopyJobRefState";
|
||||
import { CopyJobCommandBarBtnType } from "../Types/CopyJobTypes";
|
||||
|
||||
function getCopyJobBtns(explorer: Explorer, isDarkMode: boolean): CopyJobCommandBarBtnType[] {
|
||||
function getCopyJobBtns(explorer: Explorer): CopyJobCommandBarBtnType[] {
|
||||
const monitorCopyJobsRef = MonitorCopyJobsRefState((state) => state.ref);
|
||||
const buttons: CopyJobCommandBarBtnType[] = [
|
||||
{
|
||||
@@ -29,15 +26,7 @@ function getCopyJobBtns(explorer: Explorer, isDarkMode: boolean): CopyJobCommand
|
||||
ariaLabel: ContainerCopyMessages.refreshButtonAriaLabel,
|
||||
onClick: () => monitorCopyJobsRef?.refreshJobList(),
|
||||
},
|
||||
{
|
||||
key: "themeToggle",
|
||||
iconSrc: isDarkMode ? SunIcon : MoonIcon,
|
||||
label: isDarkMode ? "Light Theme" : "Dark Theme",
|
||||
ariaLabel: isDarkMode ? "Switch to Light Theme" : "Switch to Dark Theme",
|
||||
onClick: () => useThemeStore.getState().toggleTheme(),
|
||||
},
|
||||
];
|
||||
|
||||
if (configContext.platform === Platform.Portal) {
|
||||
buttons.push({
|
||||
key: "feedback",
|
||||
@@ -65,6 +54,6 @@ function btnMapper(config: CopyJobCommandBarBtnType): CommandButtonComponentProp
|
||||
};
|
||||
}
|
||||
|
||||
export function getCommandBarButtons(explorer: Explorer, isDarkMode: boolean): CommandButtonComponentProps[] {
|
||||
return getCopyJobBtns(explorer, isDarkMode).map(btnMapper);
|
||||
export function getCommandBarButtons(explorer: Explorer): CommandButtonComponentProps[] {
|
||||
return getCopyJobBtns(explorer).map(btnMapper);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,7 @@ import useToggle from "./hooks/useToggle";
|
||||
const managedIdentityTooltip = (
|
||||
<Text>
|
||||
{ContainerCopyMessages.addManagedIdentity.tooltip.content}
|
||||
<Link
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
href={ContainerCopyMessages.addManagedIdentity.tooltip.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Link href={ContainerCopyMessages.addManagedIdentity.tooltip.href} target="_blank" rel="noopener noreferrer">
|
||||
{ContainerCopyMessages.addManagedIdentity.tooltip.hrefText}
|
||||
</Link>
|
||||
</Text>
|
||||
@@ -31,7 +26,7 @@ const AddManagedIdentity: React.FC<AddManagedIdentityProps> = () => {
|
||||
|
||||
return (
|
||||
<Stack className="addManagedIdentityContainer" tokens={{ childrenGap: 15, padding: "0 0 0 20px" }}>
|
||||
<Text className="themeText">
|
||||
<Text>
|
||||
{ContainerCopyMessages.addManagedIdentity.description} 
|
||||
<Link href={ContainerCopyMessages.addManagedIdentity.descriptionHref} target="_blank" rel="noopener noreferrer">
|
||||
{ContainerCopyMessages.addManagedIdentity.descriptionHrefText}
|
||||
@@ -40,7 +35,6 @@ const AddManagedIdentity: React.FC<AddManagedIdentityProps> = () => {
|
||||
<InfoTooltip content={managedIdentityTooltip} />
|
||||
</Text>
|
||||
<Toggle
|
||||
data-test="btn-toggle"
|
||||
checked={systemAssigned}
|
||||
onText={ContainerCopyMessages.toggleBtn.onText}
|
||||
offText={ContainerCopyMessages.toggleBtn.offText}
|
||||
|
||||
@@ -13,12 +13,7 @@ import useToggle from "./hooks/useToggle";
|
||||
const TooltipContent = (
|
||||
<Text>
|
||||
{ContainerCopyMessages.readPermissionAssigned.tooltip.content}
|
||||
<Link
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
href={ContainerCopyMessages.readPermissionAssigned.tooltip.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Link href={ContainerCopyMessages.readPermissionAssigned.tooltip.href} target="_blank" rel="noopener noreferrer">
|
||||
{ContainerCopyMessages.readPermissionAssigned.tooltip.hrefText}
|
||||
</Link>
|
||||
</Text>
|
||||
@@ -70,7 +65,6 @@ const AddReadPermissionToDefaultIdentity: React.FC<AddReadPermissionToDefaultIde
|
||||
<InfoTooltip content={TooltipContent} />
|
||||
</Text>
|
||||
<Toggle
|
||||
data-test="btn-toggle"
|
||||
checked={readPermissionAssigned}
|
||||
onText={ContainerCopyMessages.toggleBtn.onText}
|
||||
offText={ContainerCopyMessages.toggleBtn.offText}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { useCopyJobPrerequisitesCache } from "../../Utils/useCopyJobPrerequisite
|
||||
import usePermissionSections, { PermissionGroupConfig, PermissionSectionConfig } from "./hooks/usePermissionsSection";
|
||||
|
||||
const PermissionSection: React.FC<PermissionSectionConfig> = ({ id, title, Component, completed, disabled }) => (
|
||||
<AccordionItem key={id} value={id} disabled={disabled} data-test="accordion-item">
|
||||
<AccordionItem key={id} value={id} disabled={disabled}>
|
||||
<AccordionHeader className="accordionHeader">
|
||||
<Text className="accordionHeaderText" variant="medium">
|
||||
{title}
|
||||
@@ -25,13 +25,13 @@ const PermissionSection: React.FC<PermissionSectionConfig> = ({ id, title, Compo
|
||||
height={completed ? 20 : 24}
|
||||
/>
|
||||
</AccordionHeader>
|
||||
<AccordionPanel aria-disabled={disabled} className="accordionPanel" data-test="accordion-panel">
|
||||
<AccordionPanel aria-disabled={disabled} className="accordionPanel">
|
||||
<Component />
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
);
|
||||
|
||||
const PermissionGroup: React.FC<PermissionGroupConfig> = ({ id, title, description, sections }) => {
|
||||
const PermissionGroup: React.FC<PermissionGroupConfig> = ({ title, description, sections }) => {
|
||||
const [openItems, setOpenItems] = React.useState<string[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -44,12 +44,11 @@ const PermissionGroup: React.FC<PermissionGroupConfig> = ({ id, title, descripti
|
||||
|
||||
return (
|
||||
<Stack
|
||||
data-test={`permission-group-container-${id}`}
|
||||
tokens={{ childrenGap: 15 }}
|
||||
styles={{
|
||||
root: {
|
||||
background: "var(--colorNeutralBackground2)",
|
||||
border: "1px solid var(--colorNeutralStroke1)",
|
||||
background: "#fafafa",
|
||||
border: "1px solid #e1e1e1",
|
||||
borderRadius: 8,
|
||||
padding: 16,
|
||||
boxShadow: "0 1px 3px rgba(0,0,0,0.1)",
|
||||
@@ -57,11 +56,11 @@ const PermissionGroup: React.FC<PermissionGroupConfig> = ({ id, title, descripti
|
||||
}}
|
||||
>
|
||||
<Stack tokens={{ childrenGap: 5 }}>
|
||||
<Text variant="medium" style={{ fontWeight: 600, color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text variant="medium" style={{ fontWeight: 600 }}>
|
||||
{title}
|
||||
</Text>
|
||||
{description && (
|
||||
<Text variant="small" styles={{ root: { color: "var(--colorNeutralForeground2)" } }}>
|
||||
<Text variant="small" styles={{ root: { color: "#605E5C" } }}>
|
||||
{description}
|
||||
</Text>
|
||||
)}
|
||||
@@ -100,12 +99,8 @@ const AssignPermissions = () => {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Stack
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
className="assignPermissionsContainer"
|
||||
tokens={{ childrenGap: 20 }}
|
||||
>
|
||||
<Text variant="medium" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Stack className="assignPermissionsContainer" tokens={{ childrenGap: 20 }}>
|
||||
<Text variant="medium">
|
||||
{isSameAccount && copyJobState.migrationType === CopyJobMigrationType.Online
|
||||
? ContainerCopyMessages.assignPermissions.intraAccountOnlineDescription(
|
||||
copyJobState?.source?.account?.name || "",
|
||||
|
||||
@@ -12,12 +12,7 @@ import useToggle from "./hooks/useToggle";
|
||||
const managedIdentityTooltip = (
|
||||
<Text>
|
||||
{ContainerCopyMessages.defaultManagedIdentity.tooltip.content}
|
||||
<Link
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
href={ContainerCopyMessages.defaultManagedIdentity.tooltip.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Link href={ContainerCopyMessages.defaultManagedIdentity.tooltip.href} target="_blank" rel="noopener noreferrer">
|
||||
{ContainerCopyMessages.defaultManagedIdentity.tooltip.hrefText}
|
||||
</Link>
|
||||
</Text>
|
||||
@@ -36,7 +31,6 @@ const DefaultManagedIdentity: React.FC<AddManagedIdentityProps> = () => {
|
||||
<InfoTooltip content={managedIdentityTooltip} />
|
||||
</div>
|
||||
<Toggle
|
||||
data-test="btn-toggle"
|
||||
checked={defaultSystemAssigned}
|
||||
onText={ContainerCopyMessages.toggleBtn.onText}
|
||||
offText={ContainerCopyMessages.toggleBtn.offText}
|
||||
|
||||
@@ -13,12 +13,7 @@ import InfoTooltip from "../Components/InfoTooltip";
|
||||
const tooltipContent = (
|
||||
<Text>
|
||||
{ContainerCopyMessages.pointInTimeRestore.tooltip.content}
|
||||
<Link
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
href={ContainerCopyMessages.pointInTimeRestore.tooltip.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Link href={ContainerCopyMessages.pointInTimeRestore.tooltip.href} target="_blank" rel="noopener noreferrer">
|
||||
{ContainerCopyMessages.pointInTimeRestore.tooltip.hrefText}
|
||||
</Link>
|
||||
</Text>
|
||||
@@ -132,7 +127,6 @@ const PointInTimeRestore: React.FC = () => {
|
||||
<Stack.Item>
|
||||
{showRefreshButton ? (
|
||||
<PrimaryButton
|
||||
data-test="pointInTimeRestore:RefreshBtn"
|
||||
className="fullWidth"
|
||||
text={ContainerCopyMessages.refreshButtonLabel}
|
||||
iconProps={{ iconName: "Refresh" }}
|
||||
@@ -140,7 +134,6 @@ const PointInTimeRestore: React.FC = () => {
|
||||
/>
|
||||
) : (
|
||||
<PrimaryButton
|
||||
data-test="pointInTimeRestore:PrimaryBtn"
|
||||
className="fullWidth"
|
||||
text={loading ? "" : ContainerCopyMessages.pointInTimeRestore.buttonText}
|
||||
{...(loading ? { iconProps: { iconName: "SyncStatusSolid" } } : {})}
|
||||
|
||||
@@ -5,7 +5,7 @@ exports[`AddManagedIdentity Snapshot Tests renders initial state correctly 1`] =
|
||||
class="ms-Stack addManagedIdentityContainer css-109"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
A system-assigned managed identity is restricted to one per resource and is tied to the lifecycle of this resource. Once enabled, you can grant permissions to the managed identity by using Azure role-based access control (Azure RBAC). The managed identity is authenticated with Microsoft Entra ID, so you don’t have to store any credentials in code.
|
||||
|
||||
@@ -67,7 +67,6 @@ exports[`AddManagedIdentity Snapshot Tests renders initial state correctly 1`] =
|
||||
class="ms-Toggle-background pill-117"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle1"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -93,7 +92,7 @@ exports[`AddManagedIdentity Snapshot Tests renders loading state 1`] = `
|
||||
class="ms-Stack addManagedIdentityContainer css-109"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
A system-assigned managed identity is restricted to one per resource and is tied to the lifecycle of this resource. Once enabled, you can grant permissions to the managed identity by using Azure role-based access control (Azure RBAC). The managed identity is authenticated with Microsoft Entra ID, so you don’t have to store any credentials in code.
|
||||
|
||||
@@ -155,7 +154,6 @@ exports[`AddManagedIdentity Snapshot Tests renders loading state 1`] = `
|
||||
class="ms-Toggle-background pill-121"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle11"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -175,12 +173,10 @@ exports[`AddManagedIdentity Snapshot Tests renders loading state 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground loading css-123"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<div
|
||||
class="ms-Overlay root-135"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-137"
|
||||
@@ -196,13 +192,13 @@ exports[`AddManagedIdentity Snapshot Tests renders loading state 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
class="themeText css-124"
|
||||
class="css-124"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Enable system assigned managed identity
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
Enable system-assigned managed identity on the test-target-account. To confirm, click the "Yes" button.
|
||||
</span>
|
||||
@@ -265,7 +261,7 @@ exports[`AddManagedIdentity Snapshot Tests renders with toggle on and popover vi
|
||||
class="ms-Stack addManagedIdentityContainer css-109"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
A system-assigned managed identity is restricted to one per resource and is tied to the lifecycle of this resource. Once enabled, you can grant permissions to the managed identity by using Azure role-based access control (Azure RBAC). The managed identity is authenticated with Microsoft Entra ID, so you don’t have to store any credentials in code.
|
||||
|
||||
@@ -327,7 +323,6 @@ exports[`AddManagedIdentity Snapshot Tests renders with toggle on and popover vi
|
||||
class="ms-Toggle-background pill-121"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle3"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -347,17 +342,16 @@ exports[`AddManagedIdentity Snapshot Tests renders with toggle on and popover vi
|
||||
</div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-123"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-124"
|
||||
class="css-124"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Enable system assigned managed identity
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
Enable system-assigned managed identity on the test-target-account. To confirm, click the "Yes" button.
|
||||
</span>
|
||||
|
||||
@@ -41,7 +41,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Edge Cases should handle m
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle17"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -104,7 +103,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Edge Cases should handle m
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle16"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -167,7 +165,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Rendering should render co
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle3"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -230,7 +227,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Rendering should render co
|
||||
class="ms-Toggle-background pill-119"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle1"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -318,7 +314,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Rendering should render co
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle0"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -381,7 +376,6 @@ exports[`AddReadPermissionToDefaultIdentity Component Rendering should render co
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle2"
|
||||
role="switch"
|
||||
type="button"
|
||||
|
||||
@@ -4,7 +4,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -16,7 +15,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-testGroup"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -38,7 +36,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -88,7 +85,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -138,7 +134,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div>
|
||||
Incomplete Component
|
||||
@@ -147,7 +142,6 @@ exports[`AssignPermissions Component Accordion Behavior should render accordion
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___lyghz50_53x5ri0 f1s2aq7o f1c21dwh f1s184ao ft85np5 fwrgwhw"
|
||||
@@ -207,7 +201,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -219,7 +212,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-testGroup"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -241,7 +233,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -291,7 +282,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -341,7 +331,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div>
|
||||
Incomplete Component
|
||||
@@ -350,7 +339,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___lyghz50_53x5ri0 f1s2aq7o f1c21dwh f1s184ao ft85np5 fwrgwhw"
|
||||
@@ -410,7 +398,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -422,7 +409,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-testGroup"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -444,7 +430,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -494,7 +479,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -544,7 +528,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div>
|
||||
Incomplete Component
|
||||
@@ -553,7 +536,6 @@ exports[`AssignPermissions Component Edge Cases should calculate correct indent
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___lyghz50_53x5ri0 f1s2aq7o f1c21dwh f1s184ao ft85np5 fwrgwhw"
|
||||
@@ -613,7 +595,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -625,7 +606,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-testGroup"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -647,7 +627,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -697,7 +676,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -747,7 +725,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div>
|
||||
Incomplete Component
|
||||
@@ -756,7 +733,6 @@ exports[`AssignPermissions Component Edge Cases should handle missing account na
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___lyghz50_53x5ri0 f1s2aq7o f1c21dwh f1s184ao ft85np5 fwrgwhw"
|
||||
@@ -816,7 +792,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -828,7 +803,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-crossAccountConfigs"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -850,7 +824,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -902,7 +875,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
</div>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-onlineConfigs"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -924,7 +896,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -974,7 +945,6 @@ exports[`AssignPermissions Component Permission Groups should render multiple pe
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div
|
||||
data-testid="online-copy-enabled"
|
||||
@@ -994,7 +964,6 @@ exports[`AssignPermissions Component Permission Groups should render online migr
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -1006,7 +975,6 @@ exports[`AssignPermissions Component Permission Groups should render online migr
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-onlineConfigs"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -1028,7 +996,6 @@ exports[`AssignPermissions Component Permission Groups should render online migr
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -1078,7 +1045,6 @@ exports[`AssignPermissions Component Permission Groups should render online migr
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -1128,7 +1094,6 @@ exports[`AssignPermissions Component Permission Groups should render online migr
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div
|
||||
data-testid="online-copy-enabled"
|
||||
@@ -1148,7 +1113,6 @@ exports[`AssignPermissions Component Permission Groups should render permission
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -1160,7 +1124,6 @@ exports[`AssignPermissions Component Permission Groups should render permission
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-112"
|
||||
data-test="permission-group-container-crossAccountConfigs"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack css-113"
|
||||
@@ -1182,7 +1145,6 @@ exports[`AssignPermissions Component Permission Groups should render permission
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -1232,7 +1194,6 @@ exports[`AssignPermissions Component Permission Groups should render permission
|
||||
</div>
|
||||
<div
|
||||
class="fui-AccordionItem"
|
||||
data-test="accordion-item"
|
||||
>
|
||||
<div
|
||||
class="fui-AccordionHeader accordionHeader ___kex8dp0_1udlp87 f19n0e5 f1c21dwh f1s184ao ft85np5"
|
||||
@@ -1282,7 +1243,6 @@ exports[`AssignPermissions Component Permission Groups should render permission
|
||||
<div
|
||||
aria-disabled="false"
|
||||
class="fui-AccordionPanel accordionPanel ___1rufncu_1hx1scr f1axvtxu"
|
||||
data-test="accordion-panel"
|
||||
>
|
||||
<div
|
||||
data-testid="add-read-permission"
|
||||
@@ -1302,7 +1262,6 @@ exports[`AssignPermissions Component Rendering should render without crashing wi
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
@@ -1324,7 +1283,6 @@ exports[`AssignPermissions Component Rendering should render without crashing wi
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack assignPermissionsContainer css-109"
|
||||
data-test="Panel:AssignPermissionsContainer"
|
||||
>
|
||||
<span
|
||||
class="css-110"
|
||||
|
||||
@@ -41,7 +41,6 @@ exports[`DefaultManagedIdentity Edge Cases should handle missing account name gr
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle14"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -104,7 +103,6 @@ exports[`DefaultManagedIdentity Edge Cases should handle null account 1`] = `
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle15"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -167,7 +165,6 @@ exports[`DefaultManagedIdentity Loading States should render loading state snaps
|
||||
class="ms-Toggle-background pill-119"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle10"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -259,7 +256,6 @@ exports[`DefaultManagedIdentity Rendering should render correctly with default s
|
||||
class="ms-Toggle-background pill-115"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle0"
|
||||
role="switch"
|
||||
type="button"
|
||||
@@ -322,7 +318,6 @@ exports[`DefaultManagedIdentity Toggle Interactions should render toggle with ch
|
||||
class="ms-Toggle-background pill-119"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="btn-toggle"
|
||||
id="Toggle7"
|
||||
role="switch"
|
||||
type="button"
|
||||
|
||||
@@ -56,7 +56,6 @@ exports[`PointInTimeRestore Initial Render should render correctly with default
|
||||
<button
|
||||
class="ms-Button ms-Button--primary fullWidth root-115"
|
||||
data-is-focusable="true"
|
||||
data-test="pointInTimeRestore:PrimaryBtn"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
@@ -132,7 +131,6 @@ exports[`PointInTimeRestore Initial Render should render with empty account name
|
||||
<button
|
||||
class="ms-Button ms-Button--primary fullWidth root-115"
|
||||
data-is-focusable="true"
|
||||
data-test="pointInTimeRestore:PrimaryBtn"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
@@ -163,7 +161,6 @@ exports[`PointInTimeRestore Snapshots should match snapshot in loading state 1`]
|
||||
>
|
||||
<div
|
||||
class="ms-Overlay root-123"
|
||||
data-test="loading-overlay"
|
||||
>
|
||||
<div
|
||||
class="ms-Spinner root-125"
|
||||
@@ -226,7 +223,6 @@ exports[`PointInTimeRestore Snapshots should match snapshot in loading state 1`]
|
||||
aria-disabled="true"
|
||||
class="ms-Button ms-Button--primary is-disabled fullWidth root-128"
|
||||
data-is-focusable="false"
|
||||
data-test="pointInTimeRestore:PrimaryBtn"
|
||||
disabled=""
|
||||
type="button"
|
||||
>
|
||||
@@ -305,7 +301,6 @@ exports[`PointInTimeRestore Snapshots should match snapshot with refresh button
|
||||
<button
|
||||
class="ms-Button ms-Button--primary fullWidth root-115"
|
||||
data-is-focusable="true"
|
||||
data-test="pointInTimeRestore:RefreshBtn"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
|
||||
@@ -19,21 +19,9 @@ const NavigationControls: React.FC<NavigationControlsProps> = ({
|
||||
isPreviousDisabled,
|
||||
}) => (
|
||||
<Stack horizontal tokens={{ childrenGap: 20 }}>
|
||||
<PrimaryButton
|
||||
data-test="copy-job-primary"
|
||||
text={primaryBtnText}
|
||||
onClick={onPrimary}
|
||||
allowDisabledFocus
|
||||
disabled={isPrimaryDisabled}
|
||||
/>
|
||||
<DefaultButton
|
||||
data-test="copy-job-previous"
|
||||
text="Previous"
|
||||
onClick={onPrevious}
|
||||
allowDisabledFocus
|
||||
disabled={isPreviousDisabled}
|
||||
/>
|
||||
<DefaultButton data-test="copy-job-cancel" text="Cancel" onClick={onCancel} />
|
||||
<PrimaryButton text={primaryBtnText} onClick={onPrimary} allowDisabledFocus disabled={isPrimaryDisabled} />
|
||||
<DefaultButton text="Previous" onClick={onPrevious} allowDisabledFocus disabled={isPreviousDisabled} />
|
||||
<DefaultButton text="Cancel" onClick={onCancel} />
|
||||
</Stack>
|
||||
);
|
||||
|
||||
|
||||
@@ -17,16 +17,15 @@ const PopoverContainer: React.FC<PopoverContainerProps> = React.memo(
|
||||
({ isLoading = false, title, children, onPrimary, onCancel }) => {
|
||||
return (
|
||||
<Stack
|
||||
data-test="popover-container"
|
||||
className={`popover-container foreground ${isLoading ? "loading" : ""}`}
|
||||
tokens={{ childrenGap: 20 }}
|
||||
style={{ maxWidth: 450 }}
|
||||
>
|
||||
<LoadingOverlay isLoading={isLoading} label={ContainerCopyMessages.popoverOverlaySpinnerLabel} />
|
||||
<Text variant="mediumPlus" className="themeText" style={{ fontWeight: 600 }}>
|
||||
<Text variant="mediumPlus" style={{ fontWeight: 600 }}>
|
||||
{title}
|
||||
</Text>
|
||||
<Text className="themeText">{children}</Text>
|
||||
<Text>{children}</Text>
|
||||
<Stack horizontal tokens={{ childrenGap: 20 }}>
|
||||
<PrimaryButton text={"Yes"} onClick={onPrimary} disabled={isLoading} />
|
||||
<DefaultButton text="No" onClick={onCancel} disabled={isLoading} />
|
||||
|
||||
@@ -4,15 +4,14 @@ exports[`PopoverMessage Component Edge Cases should handle empty string title 1`
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
/>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
Test content
|
||||
@@ -72,11 +71,10 @@ exports[`PopoverMessage Component Edge Cases should handle null children 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Test Title
|
||||
@@ -135,11 +133,10 @@ exports[`PopoverMessage Component Edge Cases should handle undefined children 1`
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Test Title
|
||||
@@ -198,17 +195,16 @@ exports[`PopoverMessage Component Edge Cases should handle very long title 1`] =
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
This is a very long title that might cause layout issues or text wrapping in the popover component
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
Test content
|
||||
@@ -270,17 +266,16 @@ exports[`PopoverMessage Component Rendering should render correctly when visible
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Test Title
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
Test content
|
||||
@@ -340,17 +335,16 @@ exports[`PopoverMessage Component Rendering should render correctly with differe
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Test Title
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
<p>
|
||||
@@ -415,17 +409,16 @@ exports[`PopoverMessage Component Rendering should render correctly with differe
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Custom Title
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
Test content
|
||||
@@ -485,7 +478,6 @@ exports[`PopoverMessage Component Rendering should render correctly with loading
|
||||
<div>
|
||||
<div
|
||||
class="ms-Stack popover-container foreground loading css-109"
|
||||
data-test="popover-container"
|
||||
style="max-width: 450px;"
|
||||
>
|
||||
<div
|
||||
@@ -493,13 +485,13 @@ exports[`PopoverMessage Component Rendering should render correctly with loading
|
||||
data-testid="loading-overlay"
|
||||
/>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
style="font-weight: 600;"
|
||||
>
|
||||
Test Title
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
<div>
|
||||
Test content
|
||||
|
||||
@@ -41,7 +41,7 @@ const AddCollectionPanelWrapper: React.FunctionComponent<AddCollectionPanelWrapp
|
||||
return (
|
||||
<Stack className="addCollectionPanelWrapper">
|
||||
<Stack.Item className="addCollectionPanelHeader">
|
||||
<Text className="themeText">{ContainerCopyMessages.createNewContainerSubHeading}</Text>
|
||||
<Text>{ContainerCopyMessages.createNewContainerSubHeading}</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item className="addCollectionPanelBody">
|
||||
<AddCollectionPanel explorer={explorer} isCopyJobFlow={true} onSubmitSuccess={handleAddCollectionSuccess} />
|
||||
|
||||
@@ -9,7 +9,7 @@ exports[`AddCollectionPanelWrapper Component Rendering should match snapshot 1`]
|
||||
class="ms-StackItem addCollectionPanelHeader css-110"
|
||||
>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
Select the properties for your container.
|
||||
</span>
|
||||
@@ -50,7 +50,7 @@ exports[`AddCollectionPanelWrapper Component Rendering should match snapshot wit
|
||||
class="ms-StackItem addCollectionPanelHeader css-110"
|
||||
>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
Select the properties for your container.
|
||||
</span>
|
||||
@@ -91,7 +91,7 @@ exports[`AddCollectionPanelWrapper Component Rendering should match snapshot wit
|
||||
class="ms-StackItem addCollectionPanelHeader css-110"
|
||||
>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
Select the properties for your container.
|
||||
</span>
|
||||
@@ -132,7 +132,7 @@ exports[`AddCollectionPanelWrapper Component Rendering should match snapshot wit
|
||||
class="ms-StackItem addCollectionPanelHeader css-110"
|
||||
>
|
||||
<span
|
||||
class="themeText css-111"
|
||||
class="css-111"
|
||||
>
|
||||
Select the properties for your container.
|
||||
</span>
|
||||
|
||||
@@ -22,7 +22,6 @@ const CreateCopyJobScreens: React.FC = () => {
|
||||
<Stack.Item className="createCopyJobScreensContent">
|
||||
{contextError && (
|
||||
<MessageBar
|
||||
data-test="Panel:ErrorContainer"
|
||||
className="createCopyJobErrorMessageBar"
|
||||
messageBarType={MessageBarType.blocked}
|
||||
isMultiline={false}
|
||||
|
||||
@@ -31,21 +31,17 @@ const PreviewCopyJob: React.FC = () => {
|
||||
}));
|
||||
};
|
||||
return (
|
||||
<Stack tokens={{ childrenGap: 20 }} className="previewCopyJobContainer" data-test="Panel:PreviewCopyJob">
|
||||
<Stack tokens={{ childrenGap: 20 }} className="previewCopyJobContainer">
|
||||
<FieldRow label={ContainerCopyMessages.jobNameLabel}>
|
||||
<TextField data-test="job-name-textfield" value={jobName} onChange={onJobNameChange} />
|
||||
<TextField value={jobName} onChange={onJobNameChange} />
|
||||
</FieldRow>
|
||||
<Stack>
|
||||
<Text className="bold themeText">{ContainerCopyMessages.sourceSubscriptionLabel}</Text>
|
||||
<Text data-test="source-subscription-name" className="themeText">
|
||||
{copyJobState.source?.subscription?.displayName}
|
||||
</Text>
|
||||
<Text className="bold">{ContainerCopyMessages.sourceSubscriptionLabel}</Text>
|
||||
<Text>{copyJobState.source?.subscription?.displayName}</Text>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text className="bold themeText">{ContainerCopyMessages.sourceAccountLabel}</Text>
|
||||
<Text data-test="source-account-name" className="themeText">
|
||||
{copyJobState.source?.account?.name}
|
||||
</Text>
|
||||
<Text className="bold">{ContainerCopyMessages.sourceAccountLabel}</Text>
|
||||
<Text>{copyJobState.source?.account?.name}</Text>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<DetailsList
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
exports[`PreviewCopyJob should handle special characters in database and container names 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -33,7 +32,6 @@ exports[`PreviewCopyJob should handle special characters in database and contain
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField84"
|
||||
type="text"
|
||||
value="job-with@special#chars_123"
|
||||
@@ -47,13 +45,12 @@ exports[`PreviewCopyJob should handle special characters in database and contain
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -62,13 +59,12 @@ exports[`PreviewCopyJob should handle special characters in database and contain
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -325,7 +321,6 @@ exports[`PreviewCopyJob should handle special characters in database and contain
|
||||
exports[`PreviewCopyJob should render component with cross-subscription setup 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -355,7 +350,6 @@ exports[`PreviewCopyJob should render component with cross-subscription setup 1`
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField96"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -369,13 +363,12 @@ exports[`PreviewCopyJob should render component with cross-subscription setup 1`
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -384,13 +377,12 @@ exports[`PreviewCopyJob should render component with cross-subscription setup 1`
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -647,7 +639,6 @@ exports[`PreviewCopyJob should render component with cross-subscription setup 1`
|
||||
exports[`PreviewCopyJob should render with default state and empty job name 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -677,7 +668,6 @@ exports[`PreviewCopyJob should render with default state and empty job name 1`]
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField0"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -691,13 +681,12 @@ exports[`PreviewCopyJob should render with default state and empty job name 1`]
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -706,13 +695,12 @@ exports[`PreviewCopyJob should render with default state and empty job name 1`]
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -969,7 +957,6 @@ exports[`PreviewCopyJob should render with default state and empty job name 1`]
|
||||
exports[`PreviewCopyJob should render with long subscription and account names 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -999,7 +986,6 @@ exports[`PreviewCopyJob should render with long subscription and account names 1
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField60"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -1013,13 +999,12 @@ exports[`PreviewCopyJob should render with long subscription and account names 1
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
This is a very long subscription name that might cause display issues if not handled properly
|
||||
</span>
|
||||
@@ -1028,13 +1013,12 @@ exports[`PreviewCopyJob should render with long subscription and account names 1
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
this-is-a-very-long-database-account-name-that-might-cause-display-issues
|
||||
</span>
|
||||
@@ -1291,7 +1275,6 @@ exports[`PreviewCopyJob should render with long subscription and account names 1
|
||||
exports[`PreviewCopyJob should render with missing source account information 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -1321,7 +1304,6 @@ exports[`PreviewCopyJob should render with missing source account information 1`
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField36"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -1335,13 +1317,12 @@ exports[`PreviewCopyJob should render with missing source account information 1`
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -1350,7 +1331,7 @@ exports[`PreviewCopyJob should render with missing source account information 1`
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
@@ -1607,7 +1588,6 @@ exports[`PreviewCopyJob should render with missing source account information 1`
|
||||
exports[`PreviewCopyJob should render with missing source subscription information 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -1637,7 +1617,6 @@ exports[`PreviewCopyJob should render with missing source subscription informati
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField24"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -1651,7 +1630,7 @@ exports[`PreviewCopyJob should render with missing source subscription informati
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
@@ -1660,13 +1639,12 @@ exports[`PreviewCopyJob should render with missing source subscription informati
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -1923,7 +1901,6 @@ exports[`PreviewCopyJob should render with missing source subscription informati
|
||||
exports[`PreviewCopyJob should render with online migration type 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -1953,7 +1930,6 @@ exports[`PreviewCopyJob should render with online migration type 1`] = `
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField72"
|
||||
type="text"
|
||||
value="online-migration-job"
|
||||
@@ -1967,13 +1943,12 @@ exports[`PreviewCopyJob should render with online migration type 1`] = `
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -1982,13 +1957,12 @@ exports[`PreviewCopyJob should render with online migration type 1`] = `
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -2245,7 +2219,6 @@ exports[`PreviewCopyJob should render with online migration type 1`] = `
|
||||
exports[`PreviewCopyJob should render with pre-filled job name 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -2275,7 +2248,6 @@ exports[`PreviewCopyJob should render with pre-filled job name 1`] = `
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField12"
|
||||
type="text"
|
||||
value="custom-job-name-123"
|
||||
@@ -2289,13 +2261,12 @@ exports[`PreviewCopyJob should render with pre-filled job name 1`] = `
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -2304,13 +2275,12 @@ exports[`PreviewCopyJob should render with pre-filled job name 1`] = `
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
@@ -2567,7 +2537,6 @@ exports[`PreviewCopyJob should render with pre-filled job name 1`] = `
|
||||
exports[`PreviewCopyJob should render with undefined database and container names 1`] = `
|
||||
<div
|
||||
class="ms-Stack previewCopyJobContainer css-109"
|
||||
data-test="Panel:PreviewCopyJob"
|
||||
>
|
||||
<div
|
||||
class="ms-Stack flex-row css-110"
|
||||
@@ -2597,7 +2566,6 @@ exports[`PreviewCopyJob should render with undefined database and container name
|
||||
<input
|
||||
aria-invalid="false"
|
||||
class="ms-TextField-field field-115"
|
||||
data-test="job-name-textfield"
|
||||
id="TextField48"
|
||||
type="text"
|
||||
value=""
|
||||
@@ -2611,13 +2579,12 @@ exports[`PreviewCopyJob should render with undefined database and container name
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source subscription
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-subscription-name"
|
||||
class="css-125"
|
||||
>
|
||||
Test Subscription
|
||||
</span>
|
||||
@@ -2626,13 +2593,12 @@ exports[`PreviewCopyJob should render with undefined database and container name
|
||||
class="ms-Stack css-124"
|
||||
>
|
||||
<span
|
||||
class="bold themeText css-125"
|
||||
class="bold css-125"
|
||||
>
|
||||
Source account
|
||||
</span>
|
||||
<span
|
||||
class="themeText css-125"
|
||||
data-test="source-account-name"
|
||||
class="css-125"
|
||||
>
|
||||
test-account
|
||||
</span>
|
||||
|
||||
@@ -9,7 +9,7 @@ import ContainerCopyMessages from "../../../../ContainerCopyMessages";
|
||||
import { CopyJobContext } from "../../../../Context/CopyJobContext";
|
||||
import { CopyJobMigrationType } from "../../../../Enums/CopyJobEnums";
|
||||
import { CopyJobContextProviderType, CopyJobContextState } from "../../../../Types/CopyJobTypes";
|
||||
import { AccountDropdown, normalizeAccountId } from "./AccountDropdown";
|
||||
import { AccountDropdown } from "./AccountDropdown";
|
||||
|
||||
jest.mock("../../../../../../hooks/useDatabaseAccounts");
|
||||
jest.mock("../../../../../../UserContext", () => ({
|
||||
@@ -202,16 +202,13 @@ describe("AccountDropdown", () => {
|
||||
|
||||
const stateUpdateFunction = mockSetCopyJobState.mock.calls[0][0];
|
||||
const newState = stateUpdateFunction(mockCopyJobState);
|
||||
expect(newState.source.account).toEqual({
|
||||
...mockDatabaseAccount1,
|
||||
id: normalizeAccountId(mockDatabaseAccount1.id),
|
||||
});
|
||||
expect(newState.source.account).toBe(mockDatabaseAccount1);
|
||||
});
|
||||
|
||||
it("should auto-select predefined account from userContext if available", async () => {
|
||||
const userContextAccount = {
|
||||
...mockDatabaseAccount2,
|
||||
id: "/subscriptions/test-sub/resourceGroups/test-rg/providers/Microsoft.DocumentDB/databaseAccounts/account2",
|
||||
id: "/subscriptions/test-sub/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/account2",
|
||||
};
|
||||
|
||||
(userContext as any).databaseAccount = userContextAccount;
|
||||
@@ -226,10 +223,7 @@ describe("AccountDropdown", () => {
|
||||
|
||||
const stateUpdateFunction = mockSetCopyJobState.mock.calls[0][0];
|
||||
const newState = stateUpdateFunction(mockCopyJobState);
|
||||
expect(newState.source.account).toEqual({
|
||||
...mockDatabaseAccount2,
|
||||
id: normalizeAccountId(mockDatabaseAccount2.id),
|
||||
});
|
||||
expect(newState.source.account).toBe(mockDatabaseAccount2);
|
||||
});
|
||||
|
||||
it("should keep current account if it exists in the filtered list", async () => {
|
||||
@@ -254,16 +248,7 @@ describe("AccountDropdown", () => {
|
||||
|
||||
const stateUpdateFunction = mockSetCopyJobState.mock.calls[0][0];
|
||||
const newState = stateUpdateFunction(contextWithSelectedAccount.copyJobState);
|
||||
expect(newState).toEqual({
|
||||
...contextWithSelectedAccount.copyJobState,
|
||||
source: {
|
||||
...contextWithSelectedAccount.copyJobState.source,
|
||||
account: {
|
||||
...mockDatabaseAccount1,
|
||||
id: normalizeAccountId(mockDatabaseAccount1.id),
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(newState).toBe(contextWithSelectedAccount.copyJobState);
|
||||
});
|
||||
|
||||
it("should handle account change when user selects different account", async () => {
|
||||
@@ -287,7 +272,7 @@ describe("AccountDropdown", () => {
|
||||
it("should normalize account ID for Portal platform", () => {
|
||||
const portalAccount = {
|
||||
...mockDatabaseAccount1,
|
||||
id: "/subscriptions/test-sub/resourceGroups/test-rg/providers/Microsoft.DocumentDB/databaseAccounts/account1",
|
||||
id: "/subscriptions/test-sub/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/account1",
|
||||
};
|
||||
|
||||
(configContext as any).platform = Platform.Portal;
|
||||
|
||||
@@ -12,7 +12,7 @@ import FieldRow from "../../Components/FieldRow";
|
||||
|
||||
interface AccountDropdownProps {}
|
||||
|
||||
export const normalizeAccountId = (id: string = "") => {
|
||||
const normalizeAccountId = (id: string) => {
|
||||
if (configContext.platform === Platform.Portal) {
|
||||
return id.replace("/Microsoft.DocumentDb/", "/Microsoft.DocumentDB/");
|
||||
} else if (configContext.platform === Platform.Hosted) {
|
||||
@@ -27,12 +27,7 @@ export const AccountDropdown: React.FC<AccountDropdownProps> = () => {
|
||||
|
||||
const selectedSubscriptionId = copyJobState?.source?.subscription?.subscriptionId;
|
||||
const allAccounts: DatabaseAccount[] = useDatabaseAccounts(selectedSubscriptionId);
|
||||
const sqlApiOnlyAccounts = (allAccounts || [])
|
||||
.filter((account) => apiType(account) === "SQL")
|
||||
.map((account) => ({
|
||||
...account,
|
||||
id: normalizeAccountId(account.id),
|
||||
}));
|
||||
const sqlApiOnlyAccounts: DatabaseAccount[] = (allAccounts || []).filter((account) => apiType(account) === "SQL");
|
||||
|
||||
const updateCopyJobState = (newAccount: DatabaseAccount) => {
|
||||
setCopyJobState((prevState) => {
|
||||
@@ -52,7 +47,7 @@ export const AccountDropdown: React.FC<AccountDropdownProps> = () => {
|
||||
useEffect(() => {
|
||||
if (sqlApiOnlyAccounts && sqlApiOnlyAccounts.length > 0 && selectedSubscriptionId) {
|
||||
const currentAccountId = copyJobState?.source?.account?.id;
|
||||
const predefinedAccountId = normalizeAccountId(userContext.databaseAccount?.id);
|
||||
const predefinedAccountId = userContext.databaseAccount?.id;
|
||||
const selectedAccountId = currentAccountId || predefinedAccountId;
|
||||
|
||||
const targetAccount: DatabaseAccount | null =
|
||||
@@ -63,7 +58,7 @@ export const AccountDropdown: React.FC<AccountDropdownProps> = () => {
|
||||
|
||||
const accountOptions =
|
||||
sqlApiOnlyAccounts?.map((account) => ({
|
||||
key: account.id,
|
||||
key: normalizeAccountId(account.id),
|
||||
text: account.name,
|
||||
data: account,
|
||||
})) || [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable react/prop-types */
|
||||
/* eslint-disable react/display-name */
|
||||
import { Checkbox, ICheckboxStyles, Stack } from "@fluentui/react";
|
||||
import { Checkbox, Stack } from "@fluentui/react";
|
||||
import React from "react";
|
||||
import ContainerCopyMessages from "../../../../ContainerCopyMessages";
|
||||
|
||||
@@ -9,25 +9,8 @@ interface MigrationTypeCheckboxProps {
|
||||
onChange: (_ev?: React.FormEvent, checked?: boolean) => void;
|
||||
}
|
||||
|
||||
const checkboxStyles: ICheckboxStyles = {
|
||||
text: { color: "var(--colorNeutralForeground1)" },
|
||||
checkbox: { borderColor: "var(--colorNeutralStroke1)" },
|
||||
root: {
|
||||
selectors: {
|
||||
":hover .ms-Checkbox-text": { color: "var(--colorNeutralForeground1)" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const MigrationTypeCheckbox: React.FC<MigrationTypeCheckboxProps> = React.memo(({ checked, onChange }) => {
|
||||
return (
|
||||
<Stack horizontal horizontalAlign="space-between" className="migrationTypeRow" data-test="migration-type-checkbox">
|
||||
<Checkbox
|
||||
label={ContainerCopyMessages.migrationTypeCheckboxLabel}
|
||||
checked={checked}
|
||||
onChange={onChange}
|
||||
styles={checkboxStyles}
|
||||
/>
|
||||
export const MigrationTypeCheckbox: React.FC<MigrationTypeCheckboxProps> = React.memo(({ checked, onChange }) => (
|
||||
<Stack horizontal horizontalAlign="space-between" className="migrationTypeRow">
|
||||
<Checkbox label={ContainerCopyMessages.migrationTypeCheckboxLabel} checked={checked} onChange={onChange} />
|
||||
</Stack>
|
||||
);
|
||||
});
|
||||
));
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
exports[`MigrationTypeCheckbox Component Rendering should render in checked state 1`] = `
|
||||
<div
|
||||
class="ms-Stack migrationTypeRow css-109"
|
||||
data-test="migration-type-checkbox"
|
||||
>
|
||||
<div
|
||||
class="ms-Checkbox is-checked is-enabled root-119"
|
||||
@@ -44,7 +43,6 @@ exports[`MigrationTypeCheckbox Component Rendering should render in checked stat
|
||||
exports[`MigrationTypeCheckbox Component Rendering should render with default props (unchecked state) 1`] = `
|
||||
<div
|
||||
class="ms-Stack migrationTypeRow css-109"
|
||||
data-test="migration-type-checkbox"
|
||||
>
|
||||
<div
|
||||
class="ms-Checkbox is-enabled root-110"
|
||||
|
||||
@@ -21,7 +21,7 @@ const SelectAccount = React.memo(() => {
|
||||
|
||||
return (
|
||||
<Stack data-test="Panel:SelectAccountContainer" className="selectAccountContainer" tokens={{ childrenGap: 15 }}>
|
||||
<Text className="themeText">{ContainerCopyMessages.selectAccountDescription}</Text>
|
||||
<Text>{ContainerCopyMessages.selectAccountDescription}</Text>
|
||||
|
||||
<SubscriptionDropdown />
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ exports[`SelectAccount Component Rendering should render correctly with snapshot
|
||||
data-test="Panel:SelectAccountContainer"
|
||||
>
|
||||
<span
|
||||
class="themeText css-110"
|
||||
class="css-110"
|
||||
>
|
||||
Please select a source account from which to copy.
|
||||
</span>
|
||||
|
||||
@@ -47,12 +47,8 @@ const SelectSourceAndTargetContainers = ({ showAddCollectionPanel }: SelectSourc
|
||||
const onDropdownChange = dropDownChangeHandler(setCopyJobState);
|
||||
|
||||
return (
|
||||
<Stack
|
||||
data-test="Panel:SelectSourceAndTargetContainers"
|
||||
className="selectSourceAndTargetContainers"
|
||||
tokens={{ childrenGap: 25 }}
|
||||
>
|
||||
<span className="themeText">{ContainerCopyMessages.selectSourceAndTargetContainersDescription}</span>
|
||||
<Stack className="selectSourceAndTargetContainers" tokens={{ childrenGap: 25 }}>
|
||||
<span>{ContainerCopyMessages.selectSourceAndTargetContainersDescription}</span>
|
||||
<DatabaseContainerSection
|
||||
heading={ContainerCopyMessages.sourceContainerSubHeading}
|
||||
databaseOptions={sourceDatabaseOptions}
|
||||
@@ -63,7 +59,6 @@ const SelectSourceAndTargetContainers = ({ showAddCollectionPanel }: SelectSourc
|
||||
selectedContainer={source?.containerId}
|
||||
containerDisabled={!source?.databaseId}
|
||||
containerOnChange={onDropdownChange("sourceContainer")}
|
||||
sectionType="source"
|
||||
/>
|
||||
<DatabaseContainerSection
|
||||
heading={ContainerCopyMessages.targetContainerSubHeading}
|
||||
@@ -76,7 +71,6 @@ const SelectSourceAndTargetContainers = ({ showAddCollectionPanel }: SelectSourc
|
||||
containerDisabled={!target?.databaseId}
|
||||
containerOnChange={onDropdownChange("targetContainer")}
|
||||
handleOnDemandCreateContainer={showAddCollectionPanel}
|
||||
sectionType="target"
|
||||
/>
|
||||
</Stack>
|
||||
);
|
||||
|
||||
@@ -32,7 +32,6 @@ describe("DatabaseContainerSection", () => {
|
||||
selectedContainer: "container1",
|
||||
containerDisabled: false,
|
||||
containerOnChange: mockContainerOnChange,
|
||||
sectionType: "source",
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -293,7 +292,6 @@ describe("DatabaseContainerSection", () => {
|
||||
containerOptions: mockContainerOptions,
|
||||
selectedContainer: "container1",
|
||||
containerOnChange: mockContainerOnChange,
|
||||
sectionType: "source",
|
||||
};
|
||||
|
||||
render(<DatabaseContainerSection {...minimalProps} />);
|
||||
@@ -395,7 +393,6 @@ describe("DatabaseContainerSection", () => {
|
||||
containerOptions: [{ key: "c1", text: "Container 1", data: { id: "c1" } }],
|
||||
selectedContainer: "c1",
|
||||
containerOnChange: jest.fn(),
|
||||
sectionType: "source",
|
||||
};
|
||||
|
||||
const { container } = render(<DatabaseContainerSection {...minimalProps} />);
|
||||
@@ -414,7 +411,6 @@ describe("DatabaseContainerSection", () => {
|
||||
containerDisabled: false,
|
||||
containerOnChange: jest.fn(),
|
||||
handleOnDemandCreateContainer: jest.fn(),
|
||||
sectionType: "target",
|
||||
};
|
||||
|
||||
const { container } = render(<DatabaseContainerSection {...fullProps} />);
|
||||
@@ -432,7 +428,6 @@ describe("DatabaseContainerSection", () => {
|
||||
selectedContainer: "container1",
|
||||
containerDisabled: true,
|
||||
containerOnChange: jest.fn(),
|
||||
sectionType: "target",
|
||||
};
|
||||
|
||||
const { container } = render(<DatabaseContainerSection {...disabledProps} />);
|
||||
@@ -448,7 +443,6 @@ describe("DatabaseContainerSection", () => {
|
||||
containerOptions: [],
|
||||
selectedContainer: "",
|
||||
containerOnChange: jest.fn(),
|
||||
sectionType: "target",
|
||||
};
|
||||
|
||||
const { container } = render(<DatabaseContainerSection {...emptyOptionsProps} />);
|
||||
|
||||
@@ -15,7 +15,6 @@ export const DatabaseContainerSection = ({
|
||||
containerDisabled,
|
||||
containerOnChange,
|
||||
handleOnDemandCreateContainer,
|
||||
sectionType,
|
||||
}: DatabaseContainerSectionProps) => (
|
||||
<Stack tokens={{ childrenGap: 15 }} className="databaseContainerSection">
|
||||
<label className="subHeading">{heading}</label>
|
||||
@@ -28,7 +27,6 @@ export const DatabaseContainerSection = ({
|
||||
disabled={!!databaseDisabled}
|
||||
selectedKey={selectedDatabase}
|
||||
onChange={databaseOnChange}
|
||||
data-test={`${sectionType}-databaseDropdown`}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow label={ContainerCopyMessages.containerDropdownLabel}>
|
||||
@@ -41,14 +39,9 @@ export const DatabaseContainerSection = ({
|
||||
disabled={!!containerDisabled}
|
||||
selectedKey={selectedContainer}
|
||||
onChange={containerOnChange}
|
||||
data-test={`${sectionType}-containerDropdown`}
|
||||
/>
|
||||
{handleOnDemandCreateContainer && (
|
||||
<ActionButton
|
||||
className="create-container-link-btn"
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
onClick={() => handleOnDemandCreateContainer()}
|
||||
>
|
||||
<ActionButton className="create-container-link-btn" onClick={() => handleOnDemandCreateContainer()}>
|
||||
{ContainerCopyMessages.createContainerButtonLabel}
|
||||
</ActionButton>
|
||||
)}
|
||||
|
||||
@@ -37,7 +37,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with all pro
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="target-databaseDropdown"
|
||||
id="Dropdown98"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
@@ -95,7 +94,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with all pro
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="target-containerDropdown"
|
||||
id="Dropdown99"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
@@ -184,7 +182,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with disable
|
||||
class="ms-Dropdown is-disabled is-required dropdown-143"
|
||||
data-is-focusable="false"
|
||||
data-ktp-target="true"
|
||||
data-test="target-databaseDropdown"
|
||||
id="Dropdown103"
|
||||
role="combobox"
|
||||
tabindex="-1"
|
||||
@@ -242,7 +239,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with disable
|
||||
class="ms-Dropdown is-disabled is-required dropdown-143"
|
||||
data-is-focusable="false"
|
||||
data-ktp-target="true"
|
||||
data-test="target-containerDropdown"
|
||||
id="Dropdown104"
|
||||
role="combobox"
|
||||
tabindex="-1"
|
||||
@@ -310,7 +306,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with empty o
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="target-databaseDropdown"
|
||||
id="Dropdown105"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
@@ -368,7 +363,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with empty o
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="target-containerDropdown"
|
||||
id="Dropdown106"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
@@ -436,7 +430,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with minimal
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="source-databaseDropdown"
|
||||
id="Dropdown96"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
@@ -494,7 +487,6 @@ exports[`DatabaseContainerSection Snapshot Testing matches snapshot with minimal
|
||||
class="ms-Dropdown is-required dropdown-112"
|
||||
data-is-focusable="true"
|
||||
data-ktp-target="true"
|
||||
data-test="source-containerDropdown"
|
||||
id="Dropdown97"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
|
||||
@@ -83,7 +83,6 @@ const CopyJobActionMenu: React.FC<CopyJobActionMenuProps> = ({ job, handleClick
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
data-test={`CopyJobActionMenu/Button:${job.Name}`}
|
||||
role="button"
|
||||
iconProps={{ iconName: "More", styles: { root: { fontSize: "20px", fontWeight: "bold" } } }}
|
||||
menuProps={{ items: getMenuItems() }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { DetailsList, DetailsListLayoutMode, IColumn, Stack, Text } from "@fluentui/react";
|
||||
import React, { memo } from "react";
|
||||
import { useThemeStore } from "../../../../hooks/useTheme";
|
||||
import ContainerCopyMessages from "../../ContainerCopyMessages";
|
||||
import { CopyJobStatusType } from "../../Enums/CopyJobEnums";
|
||||
import { CopyJobType } from "../../Types/CopyJobTypes";
|
||||
@@ -64,19 +63,6 @@ const getCopyJobDetailsListColumns = (): IColumn[] => {
|
||||
};
|
||||
|
||||
const CopyJobDetails: React.FC<CopyJobDetailsProps> = ({ job }) => {
|
||||
const isDarkMode = useThemeStore((state) => state.isDarkMode);
|
||||
|
||||
const errorMessageStyle: React.CSSProperties = {
|
||||
whiteSpace: "pre-wrap",
|
||||
...(isDarkMode && {
|
||||
whiteSpace: "pre-wrap",
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
padding: "10px",
|
||||
borderRadius: "4px",
|
||||
}),
|
||||
};
|
||||
|
||||
const selectedContainers = [
|
||||
{
|
||||
sourceContainerName: job?.Source?.containerName || "N/A",
|
||||
@@ -91,10 +77,10 @@ const CopyJobDetails: React.FC<CopyJobDetailsProps> = ({ job }) => {
|
||||
<Stack className="copyJobDetailsContainer" tokens={{ childrenGap: 15 }} data-testid="copy-job-details">
|
||||
{job.Error ? (
|
||||
<Stack.Item data-testid="error-stack" style={sectionCss.verticalAlign}>
|
||||
<Text className="bold themeText" style={sectionCss.headingText}>
|
||||
<Text className="bold" style={sectionCss.headingText}>
|
||||
{ContainerCopyMessages.errorTitle}
|
||||
</Text>
|
||||
<Text as="pre" style={errorMessageStyle}>
|
||||
<Text as="pre" style={{ whiteSpace: "pre-wrap" }}>
|
||||
{job.Error.message}
|
||||
</Text>
|
||||
</Stack.Item>
|
||||
@@ -102,16 +88,16 @@ const CopyJobDetails: React.FC<CopyJobDetailsProps> = ({ job }) => {
|
||||
<Stack.Item data-testid="selectedcollection-stack">
|
||||
<Stack tokens={{ childrenGap: 15 }}>
|
||||
<Stack.Item style={sectionCss.verticalAlign}>
|
||||
<Text className="bold themeText">{ContainerCopyMessages.MonitorJobs.Columns.lastUpdatedTime}</Text>
|
||||
<Text className="themeText">{job.LastUpdatedTime}</Text>
|
||||
<Text className="bold">{ContainerCopyMessages.MonitorJobs.Columns.lastUpdatedTime}</Text>
|
||||
<Text>{job.LastUpdatedTime}</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item style={sectionCss.verticalAlign}>
|
||||
<Text className="bold themeText">{ContainerCopyMessages.sourceAccountLabel}</Text>
|
||||
<Text className="themeText">{job.Source?.remoteAccountName}</Text>
|
||||
<Text className="bold">{ContainerCopyMessages.sourceAccountLabel}</Text>
|
||||
<Text>{job.Source?.remoteAccountName}</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item style={sectionCss.verticalAlign}>
|
||||
<Text className="bold themeText">{ContainerCopyMessages.MonitorJobs.Columns.mode}</Text>
|
||||
<Text className="themeText">{job.Mode}</Text>
|
||||
<Text className="bold">{ContainerCopyMessages.MonitorJobs.Columns.mode}</Text>
|
||||
<Text>{job.Mode}</Text>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
|
||||
@@ -1,14 +1,30 @@
|
||||
import { FontIcon, mergeStyles, Spinner, SpinnerSize, Stack, Text } from "@fluentui/react";
|
||||
import { FontIcon, getTheme, mergeStyles, mergeStyleSets, Spinner, SpinnerSize, Stack, Text } from "@fluentui/react";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react";
|
||||
import ContainerCopyMessages from "../../ContainerCopyMessages";
|
||||
import { CopyJobStatusType } from "../../Enums/CopyJobEnums";
|
||||
|
||||
const theme = getTheme();
|
||||
|
||||
const iconClass = mergeStyles({
|
||||
fontSize: "16px",
|
||||
marginRight: "8px",
|
||||
});
|
||||
|
||||
const classNames = mergeStyleSets({
|
||||
[CopyJobStatusType.Pending]: [{ color: theme.semanticColors.bodySubtext }, iconClass],
|
||||
[CopyJobStatusType.InProgress]: [{ color: theme.palette.themePrimary }, iconClass],
|
||||
[CopyJobStatusType.Running]: [{ color: theme.palette.themePrimary }, iconClass],
|
||||
[CopyJobStatusType.Partitioning]: [{ color: theme.palette.themePrimary }, iconClass],
|
||||
[CopyJobStatusType.Paused]: [{ color: theme.palette.themePrimary }, iconClass],
|
||||
[CopyJobStatusType.Skipped]: [{ color: theme.semanticColors.bodySubtext }, iconClass],
|
||||
[CopyJobStatusType.Cancelled]: [{ color: theme.semanticColors.bodySubtext }, iconClass],
|
||||
[CopyJobStatusType.Failed]: [{ color: theme.semanticColors.errorIcon }, iconClass],
|
||||
[CopyJobStatusType.Faulted]: [{ color: theme.semanticColors.errorIcon }, iconClass],
|
||||
[CopyJobStatusType.Completed]: [{ color: theme.semanticColors.successIcon }, iconClass],
|
||||
unknown: [{ color: theme.semanticColors.bodySubtext }, iconClass],
|
||||
});
|
||||
|
||||
const iconMap: Partial<Record<CopyJobStatusType, string>> = {
|
||||
[CopyJobStatusType.Pending]: "Clock",
|
||||
[CopyJobStatusType.Paused]: "CirclePause",
|
||||
@@ -19,17 +35,6 @@ const iconMap: Partial<Record<CopyJobStatusType, string>> = {
|
||||
[CopyJobStatusType.Completed]: "CompletedSolid",
|
||||
};
|
||||
|
||||
// Icon colors for different statuses
|
||||
const statusIconColors: Partial<Record<CopyJobStatusType, string>> = {
|
||||
[CopyJobStatusType.Failed]: "var(--colorPaletteRedForeground1)",
|
||||
[CopyJobStatusType.Faulted]: "var(--colorPaletteRedForeground1)",
|
||||
[CopyJobStatusType.Completed]: "var(--colorSuccessGreen)",
|
||||
[CopyJobStatusType.InProgress]: "var(--colorBrandForeground1)",
|
||||
[CopyJobStatusType.Running]: "var(--colorBrandForeground1)",
|
||||
[CopyJobStatusType.Partitioning]: "var(--colorBrandForeground1)",
|
||||
[CopyJobStatusType.Paused]: "var(--colorBrandForeground1)",
|
||||
};
|
||||
|
||||
export interface CopyJobStatusWithIconProps {
|
||||
status: CopyJobStatusType;
|
||||
}
|
||||
@@ -42,17 +47,19 @@ const CopyJobStatusWithIcon: React.FC<CopyJobStatusWithIconProps> = React.memo((
|
||||
CopyJobStatusType.InProgress,
|
||||
CopyJobStatusType.Partitioning,
|
||||
].includes(status);
|
||||
const iconColor = statusIconColors[status] || "var(--colorNeutralForeground2)";
|
||||
const iconStyle = mergeStyles(iconClass, { color: iconColor });
|
||||
|
||||
return (
|
||||
<Stack horizontal verticalAlign="center">
|
||||
{isSpinnerStatus ? (
|
||||
<Spinner size={SpinnerSize.small} style={{ marginRight: "8px" }} />
|
||||
) : (
|
||||
<FontIcon aria-label={status} iconName={iconMap[status] || "UnknownSolid"} className={iconStyle} />
|
||||
<FontIcon
|
||||
aria-label={status}
|
||||
iconName={iconMap[status] || "UnknownSolid"}
|
||||
className={classNames[status] || classNames.unknown}
|
||||
/>
|
||||
)}
|
||||
<Text className="themeText">{statusText}</Text>
|
||||
<Text>{statusText}</Text>
|
||||
</Stack>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -15,8 +15,6 @@ import {
|
||||
} from "@fluentui/react";
|
||||
import React, { useEffect } from "react";
|
||||
import Pager from "../../../../Common/Pager";
|
||||
import { useThemeStore } from "../../../../hooks/useTheme";
|
||||
import { getThemeTokens } from "../../../Theme/ThemeUtil";
|
||||
import { openCopyJobDetailsPanel } from "../../Actions/CopyJobActions";
|
||||
import { CopyJobType, HandleJobActionClickType } from "../../Types/CopyJobTypes";
|
||||
import { getColumns } from "./CopyJobColumns";
|
||||
@@ -28,15 +26,13 @@ interface CopyJobsListProps {
|
||||
}
|
||||
|
||||
const styles = {
|
||||
container: { height: "100%" } as React.CSSProperties,
|
||||
container: { height: "calc(100vh - 25em)" } as React.CSSProperties,
|
||||
stackItem: { position: "relative", marginBottom: "20px" } as React.CSSProperties,
|
||||
};
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
|
||||
const CopyJobsList: React.FC<CopyJobsListProps> = ({ jobs, handleActionClick, pageSize = PAGE_SIZE }) => {
|
||||
const isDarkMode = useThemeStore((state) => state.isDarkMode);
|
||||
const themeTokens = getThemeTokens(isDarkMode);
|
||||
const [startIndex, setStartIndex] = React.useState(0);
|
||||
const [sortedJobs, setSortedJobs] = React.useState<CopyJobType[]>(jobs);
|
||||
const [sortedColumnKey, setSortedColumnKey] = React.useState<string | undefined>(undefined);
|
||||
@@ -84,7 +80,6 @@ const CopyJobsList: React.FC<CopyJobsListProps> = ({ jobs, handleActionClick, pa
|
||||
<Stack.Item verticalFill={true} grow={1} shrink={1} style={styles.stackItem}>
|
||||
<ScrollablePane scrollbarVisibility={ScrollbarVisibility.auto}>
|
||||
<ShimmeredDetailsList
|
||||
className="CopyJobListContainer"
|
||||
onRenderRow={_onRenderRow}
|
||||
checkboxVisibility={2}
|
||||
columns={columns}
|
||||
@@ -92,28 +87,11 @@ const CopyJobsList: React.FC<CopyJobsListProps> = ({ jobs, handleActionClick, pa
|
||||
enableShimmer={false}
|
||||
constrainMode={ConstrainMode.unconstrained}
|
||||
layoutMode={DetailsListLayoutMode.justified}
|
||||
onRenderDetailsHeader={(props, defaultRender) => {
|
||||
const bgColor = themeTokens.colorNeutralBackground3;
|
||||
const textColor = themeTokens.colorNeutralForeground1;
|
||||
return (
|
||||
<Sticky stickyPosition={StickyPositionType.Header} isScrollSynced stickyBackgroundColor={bgColor}>
|
||||
<div style={{ backgroundColor: bgColor }}>
|
||||
{defaultRender({
|
||||
...props,
|
||||
styles: {
|
||||
root: {
|
||||
backgroundColor: bgColor,
|
||||
selectors: {
|
||||
".ms-DetailsHeader-cellTitle": { color: textColor },
|
||||
".ms-DetailsHeader-cellName": { color: textColor },
|
||||
},
|
||||
},
|
||||
},
|
||||
})}
|
||||
</div>
|
||||
onRenderDetailsHeader={(props, defaultRender) => (
|
||||
<Sticky stickyPosition={StickyPositionType.Header} isScrollSynced>
|
||||
{defaultRender({ ...props })}
|
||||
</Sticky>
|
||||
);
|
||||
}}
|
||||
)}
|
||||
/>
|
||||
</ScrollablePane>
|
||||
</Stack.Item>
|
||||
|
||||
@@ -13,7 +13,7 @@ exports[`CopyJobStatusWithIcon Spinner Status Types renders InProgress with spin
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Running
|
||||
</span>
|
||||
@@ -33,7 +33,7 @@ exports[`CopyJobStatusWithIcon Spinner Status Types renders Partitioning with sp
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Running
|
||||
</span>
|
||||
@@ -53,7 +53,7 @@ exports[`CopyJobStatusWithIcon Spinner Status Types renders Running with spinner
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Running
|
||||
</span>
|
||||
@@ -66,7 +66,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Cancelled"
|
||||
class="ms-Icon root-105 css-118 mocked-styles"
|
||||
class="ms-Icon root-105 css-118 mocked-style-Cancelled"
|
||||
data-icon-name="StatusErrorFull"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-4";"
|
||||
@@ -74,7 +74,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Cancelled
|
||||
</span>
|
||||
@@ -87,7 +87,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Completed"
|
||||
class="ms-Icon root-105 css-120 mocked-styles"
|
||||
class="ms-Icon root-105 css-120 mocked-style-Completed"
|
||||
data-icon-name="CompletedSolid"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-5";"
|
||||
@@ -95,7 +95,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Completed
|
||||
</span>
|
||||
@@ -108,7 +108,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Failed"
|
||||
class="ms-Icon root-105 css-118 mocked-styles"
|
||||
class="ms-Icon root-105 css-118 mocked-style-Failed"
|
||||
data-icon-name="StatusErrorFull"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-4";"
|
||||
@@ -116,7 +116,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Failed
|
||||
</span>
|
||||
@@ -129,7 +129,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Faulted"
|
||||
class="ms-Icon root-105 css-118 mocked-styles"
|
||||
class="ms-Icon root-105 css-118 mocked-style-Faulted"
|
||||
data-icon-name="StatusErrorFull"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-4";"
|
||||
@@ -137,7 +137,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Failed
|
||||
</span>
|
||||
@@ -150,7 +150,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Paused"
|
||||
class="ms-Icon root-105 css-114 mocked-styles"
|
||||
class="ms-Icon root-105 css-114 mocked-style-Paused"
|
||||
data-icon-name="CirclePause"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-11";"
|
||||
@@ -158,7 +158,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Paused
|
||||
</span>
|
||||
@@ -171,7 +171,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Pending"
|
||||
class="ms-Icon root-105 css-111 mocked-styles"
|
||||
class="ms-Icon root-105 css-111 mocked-style-Pending"
|
||||
data-icon-name="Clock"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-2";"
|
||||
@@ -179,7 +179,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Queued
|
||||
</span>
|
||||
@@ -192,7 +192,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
>
|
||||
<i
|
||||
aria-label="Skipped"
|
||||
class="ms-Icon root-105 css-116 mocked-styles"
|
||||
class="ms-Icon root-105 css-116 mocked-style-Skipped"
|
||||
data-icon-name="StatusCircleBlock2"
|
||||
role="img"
|
||||
style="font-family: "FabricMDL2Icons-9";"
|
||||
@@ -200,7 +200,7 @@ exports[`CopyJobStatusWithIcon Static Icon Status Types - Snapshot Tests renders
|
||||
|
||||
</i>
|
||||
<span
|
||||
class="themeText css-112"
|
||||
class="css-112"
|
||||
>
|
||||
Cancelled
|
||||
</span>
|
||||
|
||||
@@ -10,7 +10,7 @@ import CopyJobsNotFound from "../MonitorCopyJobs/Components/CopyJobs.NotFound";
|
||||
import { CopyJobType, JobActionUpdatorType } from "../Types/CopyJobTypes";
|
||||
import CopyJobsList from "./Components/CopyJobsList";
|
||||
|
||||
const FETCH_INTERVAL = 2 * 60 * 1000;
|
||||
const FETCH_INTERVAL_MS = 30 * 1000;
|
||||
const SHIMMER_INDENT_LEVELS: IndentLevel[] = Array(7).fill({ level: 0, width: "100%" });
|
||||
|
||||
interface MonitorCopyJobsProps {
|
||||
@@ -57,7 +57,7 @@ const MonitorCopyJobs = forwardRef<MonitorCopyJobsRef, MonitorCopyJobsProps>(({
|
||||
|
||||
useEffect(() => {
|
||||
fetchJobs();
|
||||
const intervalId = setInterval(fetchJobs, FETCH_INTERVAL);
|
||||
const intervalId = setInterval(fetchJobs, FETCH_INTERVAL_MS);
|
||||
|
||||
return () => clearInterval(intervalId);
|
||||
}, [fetchJobs]);
|
||||
|
||||
@@ -49,7 +49,6 @@ export interface DatabaseContainerSectionProps {
|
||||
containerDisabled?: boolean;
|
||||
containerOnChange: (ev: React.FormEvent<HTMLDivElement>, option: DropdownOptionType) => void;
|
||||
handleOnDemandCreateContainer?: () => void;
|
||||
sectionType: "source" | "target";
|
||||
}
|
||||
|
||||
export interface CopyJobContextState {
|
||||
|
||||
@@ -1,30 +1,6 @@
|
||||
@import "../../../less/Common/Constants.less";
|
||||
|
||||
// Common theme-aware classes
|
||||
.themeText {
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.themeTextSecondary {
|
||||
color: var(--colorNeutralForeground2);
|
||||
}
|
||||
|
||||
.themeLinkText {
|
||||
color: var(--colorBrandForeground1);
|
||||
}
|
||||
|
||||
.themeBackground {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
}
|
||||
|
||||
.themeBackgroundSecondary {
|
||||
background-color: var(--colorNeutralBackground2);
|
||||
}
|
||||
|
||||
#containerCopyWrapper {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
|
||||
.centerContent {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -33,31 +9,21 @@
|
||||
.noCopyJobsMessage {
|
||||
font-weight: 600;
|
||||
margin: 0 auto;
|
||||
color: var(--colorNeutralForeground2);
|
||||
color: @FocusColor;
|
||||
}
|
||||
button.createCopyJobButton {
|
||||
color: var(--colorBrandForeground1);
|
||||
color: @LinkColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
.createCopyJobScreensContainer {
|
||||
height: 100%;
|
||||
padding: 1em 1.5em;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
|
||||
.pointInTimeRestoreContainer, .onlineCopyContainer {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toggle-label {
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.accordionHeaderText {
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
label {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -105,7 +71,7 @@
|
||||
}
|
||||
.foreground {
|
||||
z-index: 10;
|
||||
background-color: var(--colorNeutralBackground2);
|
||||
background-color: #f9f9f9;
|
||||
padding: 20px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
transform: translate(0%, -9%);
|
||||
@@ -114,40 +80,14 @@
|
||||
.createCopyJobErrorMessageBar {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
body.isDarkMode & {
|
||||
.ms-TooltipHost .ms-Image {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
.ms-TextField {
|
||||
.ms-TextField-fieldGroup {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
border-color: var(--colorNeutralStroke1);
|
||||
}
|
||||
|
||||
.ms-TextField-field {
|
||||
color: var(--colorNeutralForeground1);
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
|
||||
&::placeholder {
|
||||
color: var(--colorNeutralForeground4);
|
||||
}
|
||||
}
|
||||
|
||||
.ms-Label {
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.create-container-link-btn {
|
||||
padding: 0;
|
||||
height: 25px;
|
||||
color: var(--colorBrandForeground1);
|
||||
color: @LinkColor;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Create collection panel */
|
||||
@@ -165,6 +105,7 @@
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
.ms-DetailsList {
|
||||
width: 100%;
|
||||
|
||||
@@ -173,33 +114,33 @@
|
||||
padding: @DefaultSpace 20px;
|
||||
font-weight: 600;
|
||||
font-size: @DefaultFontSize;
|
||||
color: var(--colorNeutralForeground1);
|
||||
background-color: var(--colorNeutralBackground2);
|
||||
border-bottom: @ButtonBorderWidth solid var(--colorNeutralStroke1);
|
||||
color: @BaseHigh;
|
||||
background-color: @BaseLow;
|
||||
border-bottom: @ButtonBorderWidth solid @BaseMedium;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--colorNeutralBackground3);
|
||||
background-color: @BaseMediumLow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ms-DetailsRow {
|
||||
border-bottom: @ButtonBorderWidth solid var(--colorNeutralStroke1);
|
||||
border-bottom: @ButtonBorderWidth solid @BaseMedium;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--colorNeutralBackground2);
|
||||
background-color: @BaseMediumLow;
|
||||
}
|
||||
|
||||
.ms-DetailsRow-cell {
|
||||
padding: @MediumSpace 20px;
|
||||
font-size: @DefaultFontSize;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseHigh;
|
||||
min-height: 48px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.jobNameLink {
|
||||
color: var(--colorBrandForeground1);
|
||||
color: @LinkColor;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -227,7 +168,7 @@
|
||||
}
|
||||
.ms-DetailsRow-cell {
|
||||
font-size: @DefaultFontSize;
|
||||
color: var(--colorNeutralForeground1);
|
||||
color: @BaseHigh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class CollapsibleSectionComponent extends React.Component<CollapsibleSect
|
||||
aria-expanded={this.state.isExpanded}
|
||||
>
|
||||
<Icon iconName={this.state.isExpanded ? "ChevronDown" : "ChevronRight"} />
|
||||
<Label styles={{ root: { color: "var(--colorNeutralForeground1)" } }}>{this.props.title}</Label>
|
||||
<Label>{this.props.title}</Label>
|
||||
{this.props.tooltipContent && (
|
||||
<TooltipHost
|
||||
directionalHint={DirectionalHint.bottomLeftEdge}
|
||||
@@ -79,14 +79,6 @@ export class CollapsibleSectionComponent extends React.Component<CollapsibleSect
|
||||
id={`delete-${this.props.title.split(" ").join("-")}`}
|
||||
iconProps={{ iconName: "Delete" }}
|
||||
style={{ height: 27, marginRight: "20px" }}
|
||||
styles={{
|
||||
rootHovered: {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
rootPressed: {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
}}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
this.props.onDelete();
|
||||
|
||||
@@ -20,15 +20,7 @@ exports[`CollapsibleSectionComponent renders 1`] = `
|
||||
<Icon
|
||||
iconName="ChevronDown"
|
||||
/>
|
||||
<StyledLabelBase
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase>
|
||||
Sample title
|
||||
</StyledLabelBase>
|
||||
</Stack>
|
||||
|
||||
@@ -58,26 +58,6 @@ export interface CommandButtonComponentProps {
|
||||
*/
|
||||
tooltipText?: string;
|
||||
|
||||
/**
|
||||
* Custom styles to apply to the button using Fluent UI theme tokens
|
||||
*/
|
||||
styles?: {
|
||||
root?: {
|
||||
backgroundColor?: string;
|
||||
color?: string;
|
||||
selectors?: {
|
||||
":hover"?: {
|
||||
backgroundColor?: string;
|
||||
color?: string;
|
||||
};
|
||||
":active"?: {
|
||||
backgroundColor?: string;
|
||||
color?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* tabindex for the command button
|
||||
*/
|
||||
@@ -270,8 +250,6 @@ export class CommandButtonComponent extends React.Component<CommandButtonCompone
|
||||
contentClassName += " hasHiddenItems";
|
||||
}
|
||||
|
||||
const style = this.props.styles?.root || {};
|
||||
|
||||
return (
|
||||
<div className="commandButtonReact">
|
||||
<span
|
||||
@@ -284,7 +262,6 @@ export class CommandButtonComponent extends React.Component<CommandButtonCompone
|
||||
aria-disabled={this.props.disabled}
|
||||
aria-haspopup={this.props.hasPopup}
|
||||
aria-label={this.props.ariaLabel}
|
||||
style={style}
|
||||
onClick={(e: React.MouseEvent<HTMLSpanElement>) => this.commandClickCallback(e)}
|
||||
>
|
||||
<div className={contentClassName}>
|
||||
|
||||
@@ -179,18 +179,8 @@ export const Dialog: FC = () => {
|
||||
title,
|
||||
subText,
|
||||
styles: {
|
||||
title: {
|
||||
fontSize: DIALOG_TITLE_FONT_SIZE,
|
||||
fontWeight: DIALOG_TITLE_FONT_WEIGHT,
|
||||
},
|
||||
subText: {
|
||||
fontSize: DIALOG_SUBTEXT_FONT_SIZE,
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
content: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
title: { fontSize: DIALOG_TITLE_FONT_SIZE, fontWeight: DIALOG_TITLE_FONT_WEIGHT },
|
||||
subText: { fontSize: DIALOG_SUBTEXT_FONT_SIZE },
|
||||
},
|
||||
showCloseButton: showCloseButton || false,
|
||||
onDismiss,
|
||||
@@ -198,60 +188,18 @@ export const Dialog: FC = () => {
|
||||
modalProps: { isBlocking: isModal, isDarkOverlay: false },
|
||||
minWidth: DIALOG_MIN_WIDTH,
|
||||
maxWidth: DIALOG_MAX_WIDTH,
|
||||
styles: {
|
||||
main: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
selectors: {
|
||||
".ms-Dialog-title": { color: "var(--colorNeutralForeground1)" },
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const primaryButtonProps: IButtonProps = {
|
||||
text: primaryButtonText,
|
||||
disabled: primaryButtonDisabled || false,
|
||||
onClick: onPrimaryButtonClick,
|
||||
styles: {
|
||||
root: {
|
||||
backgroundColor: "var(--colorBrandBackground)",
|
||||
color: "var(--colorNeutralForegroundOnBrand)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
backgroundColor: "var(--colorBrandBackgroundHover)",
|
||||
color: "var(--colorNeutralForegroundOnBrand)",
|
||||
},
|
||||
":active": {
|
||||
backgroundColor: "var(--colorBrandBackgroundPressed)",
|
||||
color: "var(--colorNeutralForegroundOnBrand)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const secondaryButtonProps: IButtonProps =
|
||||
secondaryButtonText && onSecondaryButtonClick
|
||||
? {
|
||||
text: secondaryButtonText,
|
||||
onClick: onSecondaryButtonClick,
|
||||
styles: {
|
||||
root: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
":active": {
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
borderColor: "var(--colorCompoundBrandStroke1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
: undefined;
|
||||
return visible ? (
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Spinner, SpinnerSize } from "@fluentui/react";
|
||||
import { monacoTheme, useThemeStore } from "hooks/useTheme";
|
||||
import * as React from "react";
|
||||
import { loadMonaco, monaco } from "../../LazyMonaco";
|
||||
// import "./EditorReact.less";
|
||||
@@ -67,7 +66,6 @@ export class EditorReact extends React.Component<EditorReactProps, EditorReactSt
|
||||
private rootNode: HTMLElement;
|
||||
public editor: monaco.editor.IStandaloneCodeEditor;
|
||||
private selectionListener: monaco.IDisposable;
|
||||
private themeUnsubscribe: () => void;
|
||||
monacoApi: {
|
||||
default: typeof monaco;
|
||||
Emitter: typeof monaco.Emitter;
|
||||
@@ -96,13 +94,6 @@ export class EditorReact extends React.Component<EditorReactProps, EditorReactSt
|
||||
public componentDidMount(): void {
|
||||
this.createEditor(this.configureEditor.bind(this));
|
||||
|
||||
this.themeUnsubscribe = useThemeStore.subscribe((state) => {
|
||||
if (this.editor) {
|
||||
const newTheme = state.isDarkMode ? "vs-dark" : "vs";
|
||||
this.monacoApi?.editor.setTheme(newTheme);
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
const suggestionWidget = this.editor?.getDomNode()?.querySelector(".suggest-widget") as HTMLElement;
|
||||
if (suggestionWidget) {
|
||||
@@ -137,7 +128,6 @@ export class EditorReact extends React.Component<EditorReactProps, EditorReactSt
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
this.selectionListener && this.selectionListener.dispose();
|
||||
this.themeUnsubscribe && this.themeUnsubscribe();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
@@ -221,7 +211,7 @@ export class EditorReact extends React.Component<EditorReactProps, EditorReactSt
|
||||
ariaLabel: this.props.ariaLabel,
|
||||
fontSize: this.props.fontSize || 12,
|
||||
automaticLayout: true,
|
||||
theme: monacoTheme(),
|
||||
theme: this.props.theme,
|
||||
wordWrap: this.props.wordWrap || "off",
|
||||
lineNumbers: this.props.lineNumbers || "off",
|
||||
lineNumbersMinChars: this.props.lineNumbersMinChars,
|
||||
|
||||
@@ -2,7 +2,6 @@ import {
|
||||
DefaultButton,
|
||||
Dropdown,
|
||||
IDropdownOption,
|
||||
IDropdownStyles,
|
||||
IStyleFunctionOrObject,
|
||||
ITextFieldStyleProps,
|
||||
ITextFieldStyles,
|
||||
@@ -36,167 +35,31 @@ export interface FullTextPolicyData {
|
||||
const labelStyles = {
|
||||
root: {
|
||||
fontSize: 12,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
};
|
||||
|
||||
const textFieldStyles: IStyleFunctionOrObject<ITextFieldStyleProps, ITextFieldStyles> = {
|
||||
fieldGroup: {
|
||||
height: 27,
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
field: {
|
||||
fontSize: 12,
|
||||
padding: "0 8px",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
},
|
||||
root: {
|
||||
selectors: {
|
||||
input: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
"input:focus": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorBrandBackground)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const dropdownStyles: Partial<IDropdownStyles> = {
|
||||
root: {
|
||||
width: "40%",
|
||||
marginTop: "10px",
|
||||
selectors: {
|
||||
"&:hover .ms-Dropdown-title": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&:hover span.ms-Dropdown-title": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus .ms-Dropdown-title": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
},
|
||||
"&:focus span.ms-Dropdown-title": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
label: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
const dropdownStyles = {
|
||||
title: {
|
||||
height: 27,
|
||||
lineHeight: "24px",
|
||||
fontSize: 12,
|
||||
},
|
||||
dropdown: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
title: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover .ms-Dropdown-titleText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus .ms-Dropdown-titleText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"& .ms-Dropdown-titleText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&.ms-Dropdown-title--hasPlaceholder": {
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
errorMessage: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
caretDown: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
callout: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
border: "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
dropdownItems: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
height: 27,
|
||||
lineHeight: "24px",
|
||||
},
|
||||
dropdownItem: {
|
||||
backgroundColor: "transparent",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
minHeight: "36px",
|
||||
lineHeight: "36px",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover .ms-Dropdown-optionText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:active": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"& .ms-Dropdown-optionText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
dropdownItemSelected: {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.08)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
minHeight: "36px",
|
||||
lineHeight: "36px",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover .ms-Dropdown-optionText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:active": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"& .ms-Dropdown-optionText": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
dropdownOptionText: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
dropdownItemHeader: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
fontSize: 12,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -363,32 +226,7 @@ export const FullTextPoliciesComponent: React.FunctionComponent<FullTextPolicies
|
||||
</Stack>
|
||||
</CollapsibleSectionComponent>
|
||||
))}
|
||||
<DefaultButton
|
||||
id={`add-vector-policy`}
|
||||
styles={{
|
||||
root: {
|
||||
maxWidth: 170,
|
||||
fontSize: 12,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
rootHovered: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
rootPressed: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
rootDisabled: {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
}}
|
||||
onClick={onAdd}
|
||||
>
|
||||
<DefaultButton id={`add-vector-policy`} styles={{ root: { maxWidth: 170, fontSize: 12 } }} onClick={onAdd}>
|
||||
Add full text path
|
||||
</DefaultButton>
|
||||
</Stack>
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.settingsV2ToolTip {
|
||||
@@ -25,8 +23,6 @@
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
font-family: @DataExplorerFont;
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
.settingsV2Editor {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IPivotItemProps, IPivotProps, Pivot, PivotItem, Stack } from "@fluentui/react";
|
||||
import { IPivotItemProps, IPivotProps, Pivot, PivotItem } from "@fluentui/react";
|
||||
import { sendMessage } from "Common/MessageHandler";
|
||||
import { FabricMessageTypes } from "Contracts/FabricMessageTypes";
|
||||
import {
|
||||
@@ -1477,98 +1477,10 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
selectedKey: SettingsV2TabTypes[this.state.selectedTab],
|
||||
};
|
||||
|
||||
const pivotStyles = {
|
||||
root: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
"& .ms-Pivot-link": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"& .ms-Pivot-link.is-selected::before": {
|
||||
backgroundColor: "var(--colorCompoundBrandBackground)",
|
||||
},
|
||||
},
|
||||
},
|
||||
link: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:active": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
'&[aria-selected="true"]': {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:active": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
itemContainer: {
|
||||
// padding: '20px 24px',
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
};
|
||||
|
||||
const contentStyles = {
|
||||
root: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
// padding: '20px 24px'
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="settingsV2MainContainer"
|
||||
style={
|
||||
{
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
position: "relative",
|
||||
} as React.CSSProperties
|
||||
}
|
||||
>
|
||||
{this.shouldShowKeyspaceSharedThroughputMessage() && (
|
||||
<div>This table shared throughput is configured at the keyspace</div>
|
||||
)}
|
||||
|
||||
<div
|
||||
className="settingsV2TabsContainer"
|
||||
style={
|
||||
{
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
position: "relative",
|
||||
padding: "20px 24px",
|
||||
} as React.CSSProperties
|
||||
}
|
||||
>
|
||||
<Pivot {...pivotProps} styles={pivotStyles}>
|
||||
{tabs.map((tab) => {
|
||||
const pivotItems = tabs.map((tab) => {
|
||||
const pivotItemProps: IPivotItemProps = {
|
||||
itemKey: SettingsV2TabTypes[tab.tab],
|
||||
style: {
|
||||
marginTop: 20,
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
style: { marginTop: 20 },
|
||||
headerText: getTabTitle(tab.tab),
|
||||
headerButtonProps: {
|
||||
"data-test": `settings-tab-header/${SettingsV2TabTypes[tab.tab]}`,
|
||||
@@ -1577,11 +1489,19 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
|
||||
return (
|
||||
<PivotItem key={pivotItemProps.itemKey} {...pivotItemProps}>
|
||||
<Stack styles={contentStyles}>{tab.content}</Stack>
|
||||
{tab.content}
|
||||
</PivotItem>
|
||||
);
|
||||
})}
|
||||
</Pivot>
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="settingsV2MainContainer">
|
||||
{this.shouldShowKeyspaceSharedThroughputMessage() && (
|
||||
<div>This table shared throughput is configured at the keyspace</div>
|
||||
)}
|
||||
|
||||
<div className="settingsV2TabsContainer">
|
||||
<Pivot {...pivotProps}>{pivotItems}</Pivot>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -63,7 +63,7 @@ export interface PriceBreakdown {
|
||||
|
||||
export type editorType = "indexPolicy" | "computedProperties" | "dataMasking";
|
||||
|
||||
export const infoAndToolTipTextStyle: ITextStyles = { root: { fontSize: 14, color: "var(--colorNeutralForeground1)" } };
|
||||
export const infoAndToolTipTextStyle: ITextStyles = { root: { fontSize: 14, color: "windowtext" } };
|
||||
|
||||
export const noLeftPaddingCheckBoxStyle: ICheckboxStyles = {
|
||||
label: {
|
||||
@@ -119,89 +119,15 @@ export const addMongoIndexSubElementsTokens: IStackTokens = {
|
||||
|
||||
export const mediumWidthStackStyles: IStackStyles = { root: { width: 600 } };
|
||||
|
||||
export const shortWidthTextFieldStyles: Partial<ITextFieldStyles> = {
|
||||
root: { paddingLeft: 10, width: 210 },
|
||||
fieldGroup: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
field: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
},
|
||||
};
|
||||
export const shortWidthTextFieldStyles: Partial<ITextFieldStyles> = { root: { paddingLeft: 10, width: 210 } };
|
||||
|
||||
export const shortWidthDropDownStyles: Partial<IDropdownStyles> = {
|
||||
dropdown: { paddingLeft: 10, width: 202 },
|
||||
title: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
},
|
||||
caretDown: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
callout: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
border: "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
dropdownItems: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
},
|
||||
dropdownItem: {
|
||||
backgroundColor: "transparent",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:focus": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
dropdownItemSelected: {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.08)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
dropdownOptionText: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
};
|
||||
export const shortWidthDropDownStyles: Partial<IDropdownStyles> = { dropdown: { paddingleft: 10, width: 202 } };
|
||||
|
||||
export const transparentDetailsRowStyles: Partial<IDetailsRowStyles> = {
|
||||
root: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground1Hover)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
":hover .ms-DetailsRow-cell": {
|
||||
backgroundColor: "var(--colorNeutralBackground1Hover)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&.ms-DetailsRow": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
cell: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground1Hover)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
background: "transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -209,11 +135,9 @@ export const transparentDetailsRowStyles: Partial<IDetailsRowStyles> = {
|
||||
|
||||
export const transparentDetailsHeaderStyle: Partial<IDetailsColumnStyles> = {
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
background: "var(--colorNeutralBackground1Hover)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
background: "transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -225,35 +149,6 @@ export const customDetailsListStyles: Partial<IDetailsListStyles> = {
|
||||
".ms-FocusZone": {
|
||||
paddingTop: 0,
|
||||
},
|
||||
".ms-DetailsHeader": {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
},
|
||||
".ms-DetailsHeader-cell": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
selectors: {
|
||||
":hover": {
|
||||
backgroundColor: "var(--colorNeutralBackground1Hover)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
".ms-DetailsHeader-cellTitle": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow-cell": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
// Tooltip styling for cells
|
||||
".ms-TooltipHost": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow-cell .ms-TooltipHost": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -271,18 +166,7 @@ export const separatorStyles: Partial<ISeparatorStyles> = {
|
||||
};
|
||||
|
||||
export const messageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
marginTop: "5px",
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
selectors: {
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
backgroundColor: "var(--colorNeutralBackground4)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
},
|
||||
},
|
||||
},
|
||||
root: { marginTop: "5px", backgroundColor: "white" },
|
||||
text: { fontSize: 14 },
|
||||
};
|
||||
|
||||
@@ -338,11 +222,9 @@ export const getEstimatedSpendingElement = (
|
||||
const ruRange: string = isAutoscale ? throughput / 10 + " RU/s - " : "";
|
||||
return (
|
||||
<Stack>
|
||||
<Text style={{ fontWeight: 600, color: "var(--colorNeutralForeground1)" }}>Cost estimate*</Text>
|
||||
<Text style={{ fontWeight: 600 }}>Cost estimate*</Text>
|
||||
{costElement}
|
||||
<Text style={{ fontWeight: 600, marginTop: 15, color: "var(--colorNeutralForeground1)" }}>
|
||||
How we calculate this
|
||||
</Text>
|
||||
<Text style={{ fontWeight: 600, marginTop: 15 }}>How we calculate this</Text>
|
||||
<Stack id="throughputSpendElement" style={{ marginTop: 5 }}>
|
||||
<span>
|
||||
{numberOfRegions} region{numberOfRegions > 1 && <span>s</span>}
|
||||
@@ -356,7 +238,7 @@ export const getEstimatedSpendingElement = (
|
||||
{priceBreakdown.pricePerRu}/RU
|
||||
</span>
|
||||
</Stack>
|
||||
<Text style={{ marginTop: 15, color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text style={{ marginTop: 15 }}>
|
||||
<em>*{estimatedCostDisclaimer}</em>
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -403,7 +285,7 @@ export const updateThroughputDelayedApplyWarningMessage: JSX.Element = (
|
||||
|
||||
export const getUpdateThroughputBeyondInstantLimitMessage = (instantMaximumThroughput: number): JSX.Element => {
|
||||
return (
|
||||
<Text id="updateThroughputDelayedApplyWarningMessage">
|
||||
<Text styles={infoAndToolTipTextStyle} id="updateThroughputDelayedApplyWarningMessage">
|
||||
Scaling up will take 4-6 hours as it exceeds what Azure Cosmos DB can instantly support currently based on your
|
||||
number of physical partitions. You can increase your throughput to {instantMaximumThroughput} instantly or proceed
|
||||
with this value and wait until the scale-up is completed.
|
||||
@@ -421,7 +303,7 @@ export const getUpdateThroughputBeyondSupportLimitMessage = (
|
||||
Your request to increase throughput exceeds the pre-allocated capacity which may take longer than expected.
|
||||
There are three options you can choose from to proceed:
|
||||
</Text>
|
||||
<ol style={{ fontSize: 14, color: "var(--colorNeutralForeground1)", marginTop: "5px" }}>
|
||||
<ol style={{ fontSize: 14, color: "windowtext", marginTop: "5px" }}>
|
||||
<li>You can instantly scale up to {instantMaximumThroughput} RU/s.</li>
|
||||
{instantMaximumThroughput < maximumThroughput && (
|
||||
<li>You can asynchronously scale up to any value under {maximumThroughput} RU/s in 4-6 hours.</li>
|
||||
@@ -457,7 +339,7 @@ export const getUpdateThroughputBelowMinimumMessage = (minimum: number): JSX.Ele
|
||||
};
|
||||
|
||||
export const saveThroughputWarningMessage: JSX.Element = (
|
||||
<Text>
|
||||
<Text styles={infoAndToolTipTextStyle}>
|
||||
Your bill will be affected as you update your throughput settings. Please review the updated cost estimate below
|
||||
before saving your changes
|
||||
</Text>
|
||||
@@ -577,13 +459,9 @@ export const changeFeedPolicyToolTip: JSX.Element = (
|
||||
);
|
||||
|
||||
export const mongoIndexingPolicyDisclaimer: JSX.Element = (
|
||||
<Text style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text>
|
||||
For queries that filter on multiple properties, create multiple single field indexes instead of a compound index.
|
||||
<Link
|
||||
href="https://docs.microsoft.com/azure/cosmos-db/mongodb-indexing#index-types"
|
||||
target="_blank"
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
>
|
||||
<Link href="https://docs.microsoft.com/azure/cosmos-db/mongodb-indexing#index-types" target="_blank">
|
||||
{` Compound indexes `}
|
||||
</Link>
|
||||
are only used for sorting query results. If you need to add a compound index, you can create one using the Mongo
|
||||
@@ -592,7 +470,7 @@ export const mongoIndexingPolicyDisclaimer: JSX.Element = (
|
||||
);
|
||||
|
||||
export const mongoCompoundIndexNotSupportedMessage: JSX.Element = (
|
||||
<Text style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text>
|
||||
Collections with compound indexes are not yet supported in the indexing editor. To modify indexing policy for this
|
||||
collection, use the Mongo Shell.
|
||||
</Text>
|
||||
@@ -641,50 +519,14 @@ export const getTextFieldStyles = (current: isDirtyTypes, baseline: isDirtyTypes
|
||||
fieldGroup: {
|
||||
height: 25,
|
||||
width: 300,
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: isDirty(current, baseline) ? StyleConstants.Dirty : "var(--colorNeutralStroke1)",
|
||||
borderColor: isDirty(current, baseline) ? StyleConstants.Dirty : "",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
input: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
"input#autopilotInput": {
|
||||
backgroundColor: "var(--colorNeutralBackground4)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: StyleConstants.BaseMedium,
|
||||
borderColor: StyleConstants.BaseMediumHigh,
|
||||
},
|
||||
},
|
||||
},
|
||||
field: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
subComponentStyles: {
|
||||
label: {
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
suffix: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
border: "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
});
|
||||
|
||||
export const getChoiceGroupStyles = (
|
||||
@@ -692,28 +534,6 @@ export const getChoiceGroupStyles = (
|
||||
baseline: isDirtyTypes,
|
||||
isHorizontal?: boolean,
|
||||
): Partial<IChoiceGroupStyles> => ({
|
||||
label: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
root: {
|
||||
selectors: {
|
||||
".ms-ChoiceFieldLabel": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
flexContainer: [
|
||||
{
|
||||
selectors: {
|
||||
@@ -728,16 +548,6 @@ export const getChoiceGroupStyles = (
|
||||
fontSize: 14,
|
||||
fontFamily: StyleConstants.DataExplorerFont,
|
||||
padding: "2px 5px",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
display: isHorizontal ? "inline-flex" : "default",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { FontIcon, IMessageBarStyles, Link, MessageBar, MessageBarType, Stack, Text } from "@fluentui/react";
|
||||
import { FontIcon, Link, MessageBar, MessageBarType, Stack, Text } from "@fluentui/react";
|
||||
import * as DataModels from "Contracts/DataModels";
|
||||
import { titleAndInputStackProps, unsavedEditorWarningMessage } from "Explorer/Controls/Settings/SettingsRenderUtils";
|
||||
import { isDirty } from "Explorer/Controls/Settings/SettingsUtils";
|
||||
import { loadMonaco } from "Explorer/LazyMonaco";
|
||||
import { monacoTheme, useThemeStore } from "hooks/useTheme";
|
||||
import * as monaco from "monaco-editor";
|
||||
import * as React from "react";
|
||||
|
||||
export interface ComputedPropertiesComponentProps {
|
||||
computedPropertiesContent: DataModels.ComputedProperties;
|
||||
computedPropertiesContentBaseline: DataModels.ComputedProperties;
|
||||
@@ -27,24 +27,6 @@ export class ComputedPropertiesComponent extends React.Component<
|
||||
private shouldCheckComponentIsDirty = true;
|
||||
private computedPropertiesDiv = React.createRef<HTMLDivElement>();
|
||||
private computedPropertiesEditor: monaco.editor.IStandaloneCodeEditor;
|
||||
private themeUnsubscribe: () => void;
|
||||
|
||||
private darkThemeMessageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
selectors: {
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorStatusWarningBackground1)",
|
||||
border: "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
constructor(props: ComputedPropertiesComponentProps) {
|
||||
super(props);
|
||||
@@ -66,10 +48,6 @@ export class ComputedPropertiesComponent extends React.Component<
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
this.themeUnsubscribe && this.themeUnsubscribe();
|
||||
}
|
||||
|
||||
public resetComputedPropertiesEditor = (): void => {
|
||||
if (!this.computedPropertiesEditor) {
|
||||
this.createComputedPropertiesEditor();
|
||||
@@ -108,16 +86,8 @@ export class ComputedPropertiesComponent extends React.Component<
|
||||
value: value,
|
||||
language: "json",
|
||||
ariaLabel: "Computed properties",
|
||||
theme: monacoTheme(),
|
||||
});
|
||||
if (this.computedPropertiesEditor) {
|
||||
// Subscribe to theme changes
|
||||
this.themeUnsubscribe = useThemeStore.subscribe(() => {
|
||||
if (this.computedPropertiesEditor) {
|
||||
monaco.editor.setTheme(monacoTheme());
|
||||
}
|
||||
});
|
||||
|
||||
const computedPropertiesEditorModel = this.computedPropertiesEditor.getModel();
|
||||
computedPropertiesEditorModel.onDidChangeContent(this.onEditorContentChange.bind(this));
|
||||
this.props.logComputedPropertiesSuccessMessage();
|
||||
@@ -141,15 +111,11 @@ export class ComputedPropertiesComponent extends React.Component<
|
||||
return (
|
||||
<Stack {...titleAndInputStackProps}>
|
||||
{isDirty(this.props.computedPropertiesContent, this.props.computedPropertiesContentBaseline) && (
|
||||
<MessageBar
|
||||
messageBarType={MessageBarType.warning}
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
>
|
||||
<MessageBar messageBarType={MessageBarType.warning}>
|
||||
{unsavedEditorWarningMessage("computedProperties")}
|
||||
</MessageBar>
|
||||
)}
|
||||
<Text style={{ marginLeft: "30px", marginBottom: "10px", color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text style={{ marginLeft: "30px", marginBottom: "10px" }}>
|
||||
<Link target="_blank" href="https://aka.ms/computed-properties-preview/">
|
||||
{"Learn more"} <FontIcon iconName="NavigateExternalInline" />
|
||||
</Link>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
conflictResolutionCustomToolTip,
|
||||
conflictResolutionLwwTooltip,
|
||||
getChoiceGroupStyles,
|
||||
getTextFieldStyles,
|
||||
subComponentStackProps,
|
||||
} from "../SettingsRenderUtils";
|
||||
import { isDirty } from "../SettingsUtils";
|
||||
@@ -105,46 +106,10 @@ export class ConflictResolutionComponent extends React.Component<ConflictResolut
|
||||
id="conflictResolutionLwwTextField"
|
||||
label={"Conflict Resolver Property"}
|
||||
onRenderLabel={this.onRenderLwwComponentTextField}
|
||||
styles={{
|
||||
fieldGroup: {
|
||||
height: 25,
|
||||
width: 300,
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
input: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
field: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
subComponentStyles: {
|
||||
label: {
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
styles={getTextFieldStyles(
|
||||
this.props.conflictResolutionPolicyPath,
|
||||
this.props.conflictResolutionPolicyPathBaseline,
|
||||
)}
|
||||
value={this.props.conflictResolutionPolicyPath}
|
||||
onChange={this.onConflictResolutionPolicyPathChange}
|
||||
/>
|
||||
@@ -154,57 +119,19 @@ export class ConflictResolutionComponent extends React.Component<ConflictResolut
|
||||
<ToolTipLabelComponent label={props.label} toolTipElement={conflictResolutionCustomToolTip} />
|
||||
);
|
||||
|
||||
private getConflictResolutionCustomComponent = (): JSX.Element => {
|
||||
return (
|
||||
private getConflictResolutionCustomComponent = (): JSX.Element => (
|
||||
<TextField
|
||||
id="conflictResolutionCustomTextField"
|
||||
label="Stored procedure"
|
||||
onRenderLabel={this.onRenderCustomComponentTextField}
|
||||
styles={{
|
||||
fieldGroup: {
|
||||
height: 25,
|
||||
width: 300,
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
borderColor: "var(--colorNeutralStroke1)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
input: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
field: {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
selectors: {
|
||||
":disabled": {
|
||||
backgroundColor: "var(--colorNeutralBackground2)",
|
||||
color: "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
subComponentStyles: {
|
||||
label: {
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
styles={getTextFieldStyles(
|
||||
this.props.conflictResolutionPolicyProcedure,
|
||||
this.props.conflictResolutionPolicyProcedureBaseline,
|
||||
)}
|
||||
value={this.props.conflictResolutionPolicyProcedure}
|
||||
onChange={this.onConflictResolutionPolicyProcedureChange}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -102,57 +102,11 @@ export const ContainerPolicyComponent: React.FC<ContainerPolicyComponentProps> =
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Pivot
|
||||
onLinkClick={onPivotChange}
|
||||
selectedKey={ContainerPolicyTabTypes[selectedTab]}
|
||||
styles={{
|
||||
root: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
link: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
selectors: {
|
||||
":hover": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
":active": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
linkIsSelected: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
selectors: {
|
||||
":before": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorBrandForeground1)",
|
||||
},
|
||||
":hover": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
":active": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
linkContent: {
|
||||
color: "inherit",
|
||||
},
|
||||
text: {
|
||||
color: "inherit",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Pivot onLinkClick={onPivotChange} selectedKey={ContainerPolicyTabTypes[selectedTab]}>
|
||||
{isVectorSearchEnabled && (
|
||||
<PivotItem
|
||||
itemKey={ContainerPolicyTabTypes[ContainerPolicyTabTypes.VectorPolicyTab]}
|
||||
style={{ marginTop: 20, color: "var(--colorNeutralForeground1)" }}
|
||||
style={{ marginTop: 20 }}
|
||||
headerText="Vector Policy"
|
||||
>
|
||||
<Stack {...titleAndInputStackProps} styles={{ root: { position: "relative", maxWidth: "400px" } }}>
|
||||
@@ -174,7 +128,7 @@ export const ContainerPolicyComponent: React.FC<ContainerPolicyComponentProps> =
|
||||
{isFullTextSearchEnabled && (
|
||||
<PivotItem
|
||||
itemKey={ContainerPolicyTabTypes[ContainerPolicyTabTypes.FullTextPolicyTab]}
|
||||
style={{ marginTop: 20, color: "var(--colorNeutralForeground1)" }}
|
||||
style={{ marginTop: 20 }}
|
||||
headerText="Full Text Policy"
|
||||
>
|
||||
<Stack {...titleAndInputStackProps} styles={{ root: { position: "relative", maxWidth: "400px" } }}>
|
||||
@@ -190,27 +144,7 @@ export const ContainerPolicyComponent: React.FC<ContainerPolicyComponentProps> =
|
||||
) : (
|
||||
<DefaultButton
|
||||
id={"create-full-text-policy"}
|
||||
styles={{
|
||||
root: {
|
||||
fontSize: 12,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
rootHovered: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
rootPressed: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "transparent",
|
||||
borderColor: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
rootDisabled: {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
}}
|
||||
styles={{ root: { fontSize: 12 } }}
|
||||
onClick={() => {
|
||||
checkAndSendFullTextPolicyToSettings({
|
||||
defaultLanguage: getFullTextLanguageOptions()[0].key as never,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { IMessageBarStyles, MessageBar, MessageBarType, Stack } from "@fluentui/react";
|
||||
import { monacoTheme, useThemeStore } from "hooks/useTheme";
|
||||
import { MessageBar, MessageBarType, Stack } from "@fluentui/react";
|
||||
import * as monaco from "monaco-editor";
|
||||
import * as React from "react";
|
||||
import * as DataModels from "../../../../Contracts/DataModels";
|
||||
@@ -7,6 +6,7 @@ import { loadMonaco } from "../../../LazyMonaco";
|
||||
import { titleAndInputStackProps, unsavedEditorWarningMessage } from "../SettingsRenderUtils";
|
||||
import { isDirty, isIndexTransforming } from "../SettingsUtils";
|
||||
import { IndexingPolicyRefreshComponent } from "./IndexingPolicyRefresh/IndexingPolicyRefreshComponent";
|
||||
|
||||
export interface IndexingPolicyComponentProps {
|
||||
shouldDiscardIndexingPolicy: boolean;
|
||||
resetShouldDiscardIndexingPolicy: () => void;
|
||||
@@ -31,24 +31,6 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
private shouldCheckComponentIsDirty = true;
|
||||
private indexingPolicyDiv = React.createRef<HTMLDivElement>();
|
||||
private indexingPolicyEditor: monaco.editor.IStandaloneCodeEditor;
|
||||
private themeUnsubscribe: () => void;
|
||||
|
||||
private darkThemeMessageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
selectors: {
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorStatusWarningBackground1)",
|
||||
border: "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
constructor(props: IndexingPolicyComponentProps) {
|
||||
super(props);
|
||||
@@ -70,10 +52,6 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
this.themeUnsubscribe && this.themeUnsubscribe();
|
||||
}
|
||||
|
||||
public resetIndexingPolicyEditor = (): void => {
|
||||
if (!this.indexingPolicyEditor) {
|
||||
this.createIndexingPolicyEditor();
|
||||
@@ -109,32 +87,20 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
};
|
||||
|
||||
private async createIndexingPolicyEditor(): Promise<void> {
|
||||
if (!this.indexingPolicyDiv.current) {
|
||||
return;
|
||||
}
|
||||
const value: string = JSON.stringify(this.props.indexingPolicyContent, undefined, 4);
|
||||
const monaco = await loadMonaco();
|
||||
if (this.indexingPolicyDiv.current) {
|
||||
this.indexingPolicyEditor = monaco.editor.create(this.indexingPolicyDiv.current, {
|
||||
value: value,
|
||||
language: "json",
|
||||
readOnly: isIndexTransforming(this.props.indexTransformationProgress),
|
||||
ariaLabel: "Indexing Policy",
|
||||
theme: monacoTheme(),
|
||||
});
|
||||
if (this.indexingPolicyEditor) {
|
||||
this.themeUnsubscribe = useThemeStore.subscribe(() => {
|
||||
if (this.indexingPolicyEditor) {
|
||||
monaco.editor.setTheme(monacoTheme());
|
||||
}
|
||||
});
|
||||
|
||||
const indexingPolicyEditorModel = this.indexingPolicyEditor.getModel();
|
||||
indexingPolicyEditorModel.onDidChangeContent(this.onEditorContentChange.bind(this));
|
||||
this.props.logIndexingPolicySuccessMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onEditorContentChange = (): void => {
|
||||
const indexingPolicyEditorModel = this.indexingPolicyEditor.getModel();
|
||||
@@ -155,13 +121,7 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
refreshIndexTransformationProgress={this.props.refreshIndexTransformationProgress}
|
||||
/>
|
||||
{isDirty(this.props.indexingPolicyContent, this.props.indexingPolicyContentBaseline) && (
|
||||
<MessageBar
|
||||
messageBarType={MessageBarType.warning}
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
>
|
||||
{unsavedEditorWarningMessage("indexPolicy")}
|
||||
</MessageBar>
|
||||
<MessageBar messageBarType={MessageBarType.warning}>{unsavedEditorWarningMessage("indexPolicy")}</MessageBar>
|
||||
)}
|
||||
<div className="settingsV2Editor" tabIndex={0} ref={this.indexingPolicyDiv}></div>
|
||||
</Stack>
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
DetailsListLayoutMode,
|
||||
IColumn,
|
||||
IconButton,
|
||||
IMessageBarStyles,
|
||||
MessageBar,
|
||||
MessageBarType,
|
||||
SelectionMode,
|
||||
@@ -31,12 +30,12 @@ import {
|
||||
} from "../../SettingsRenderUtils";
|
||||
import {
|
||||
AddMongoIndexProps,
|
||||
getMongoIndexType,
|
||||
getMongoIndexTypeText,
|
||||
isIndexTransforming,
|
||||
MongoIndexIdField,
|
||||
MongoIndexTypes,
|
||||
MongoNotificationType,
|
||||
getMongoIndexType,
|
||||
getMongoIndexTypeText,
|
||||
isIndexTransforming,
|
||||
} from "../../SettingsUtils";
|
||||
import { IndexingPolicyRefreshComponent } from "../IndexingPolicyRefresh/IndexingPolicyRefreshComponent";
|
||||
import { AddMongoIndexComponent } from "./AddMongoIndexComponent";
|
||||
@@ -64,24 +63,6 @@ interface MongoIndexDisplayProps {
|
||||
export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingPolicyComponentProps> {
|
||||
private shouldCheckComponentIsDirty = true;
|
||||
private addMongoIndexComponentRefs: React.RefObject<AddMongoIndexComponent>[] = [];
|
||||
|
||||
private darkThemeMessageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
selectors: {
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorStatusWarningBackground1)",
|
||||
border: "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
private initialIndexesColumns: IColumn[] = [
|
||||
{ key: "definition", name: "Definition", fieldName: "definition", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||
{ key: "type", name: "Type", fieldName: "type", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||
@@ -190,8 +171,8 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
||||
let mongoIndexDisplayProps: MongoIndexDisplayProps;
|
||||
if (type) {
|
||||
mongoIndexDisplayProps = {
|
||||
definition: <Text style={{ color: "var(--colorNeutralForeground1)" }}>{definition}</Text>,
|
||||
type: <Text style={{ color: "var(--colorNeutralForeground1)" }}>{getMongoIndexTypeText(type)}</Text>,
|
||||
definition: <Text>{definition}</Text>,
|
||||
type: <Text>{getMongoIndexTypeText(type)}</Text>,
|
||||
actionButton: definition === MongoIndexIdField ? <></> : this.getActionButton(arrayPosition, isCurrentIndex),
|
||||
};
|
||||
}
|
||||
@@ -325,15 +306,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
||||
indexTransformationProgress={this.props.indexTransformationProgress}
|
||||
refreshIndexTransformationProgress={this.props.refreshIndexTransformationProgress}
|
||||
/>
|
||||
{warningMessage && (
|
||||
<MessageBar
|
||||
messageBarType={MessageBarType.warning}
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
>
|
||||
{warningMessage}
|
||||
</MessageBar>
|
||||
)}
|
||||
{warningMessage && <MessageBar messageBarType={MessageBarType.warning}>{warningMessage}</MessageBar>}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,14 +22,6 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
||||
onChange={[Function]}
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
},
|
||||
"root": {
|
||||
"paddingLeft": 10,
|
||||
"width": 210,
|
||||
@@ -57,52 +49,10 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
||||
selectedKey="Single"
|
||||
styles={
|
||||
{
|
||||
"callout": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"caretDown": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"dropdown": {
|
||||
"paddingLeft": 10,
|
||||
"paddingleft": 10,
|
||||
"width": 202,
|
||||
},
|
||||
"dropdownItem": {
|
||||
"backgroundColor": "transparent",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
"&:focus": {
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover": {
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"dropdownItemSelected": {
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.08)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
"&:hover": {
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"dropdownItems": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
},
|
||||
"dropdownOptionText": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"title": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`MongoIndexingPolicyComponent error shown for collection with compound indexes 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Collections with compound indexes are not yet supported in the indexing editor. To modify indexing policy for this collection, use the Mongo Shell.
|
||||
</Text>
|
||||
`;
|
||||
@@ -23,21 +17,10 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
|
||||
<IndexingPolicyRefreshComponent
|
||||
refreshIndexTransformationProgress={[Function]}
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
For queries that filter on multiple properties, create multiple single field indexes instead of a compound index.
|
||||
<StyledLinkBase
|
||||
href="https://docs.microsoft.com/azure/cosmos-db/mongodb-indexing#index-types"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorBrandForeground1)",
|
||||
}
|
||||
}
|
||||
target="_blank"
|
||||
>
|
||||
Compound indexes
|
||||
@@ -100,37 +83,9 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
|
||||
{
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-DetailsHeader": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
},
|
||||
".ms-DetailsHeader-cell": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
":hover": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1Hover)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
".ms-DetailsHeader-cellTitle": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow-cell": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-DetailsRow-cell .ms-TooltipHost": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-FocusZone": {
|
||||
"paddingTop": 0,
|
||||
},
|
||||
".ms-TooltipHost": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
DefaultButton,
|
||||
FontWeights,
|
||||
IMessageBarStyles,
|
||||
Link,
|
||||
MessageBar,
|
||||
MessageBarType,
|
||||
@@ -33,23 +32,6 @@ export interface PartitionKeyComponentProps {
|
||||
isReadOnly?: boolean; // true: cannot change partition key
|
||||
}
|
||||
|
||||
const darkThemeMessageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
selectors: {
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorStatusWarningBackground1)",
|
||||
border: "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({
|
||||
database,
|
||||
collection,
|
||||
@@ -84,15 +66,13 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({
|
||||
const partitionKeyValue = getPartitionKeyValue();
|
||||
|
||||
const textHeadingStyle = {
|
||||
root: { fontWeight: FontWeights.semibold, fontSize: 16, color: "var(--colorNeutralForeground1)" },
|
||||
root: { fontWeight: FontWeights.semibold, fontSize: 16 },
|
||||
};
|
||||
|
||||
const textSubHeadingStyle = {
|
||||
root: { fontWeight: FontWeights.semibold, color: "var(--colorNeutralForeground1)" },
|
||||
};
|
||||
const textSubHeadingStyle1 = {
|
||||
root: { color: "var(--colorNeutralForeground1)" },
|
||||
root: { fontWeight: FontWeights.semibold },
|
||||
};
|
||||
|
||||
const startPollingforUpdate = (currentJob: DataTransferJobGetResults) => {
|
||||
if (isCurrentJobInProgress(currentJob)) {
|
||||
const jobName = currentJob?.properties?.jobName;
|
||||
@@ -187,41 +167,32 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({
|
||||
<Text styles={textSubHeadingStyle}>Current {partitionKeyName.toLowerCase()}</Text>
|
||||
<Text styles={textSubHeadingStyle}>Partitioning</Text>
|
||||
</Stack>
|
||||
<Stack tokens={{ childrenGap: 5 }} data-test="partition-key-values">
|
||||
<Text styles={textSubHeadingStyle1}>{partitionKeyValue}</Text>
|
||||
<Text styles={textSubHeadingStyle1}>
|
||||
{isHierarchicalPartitionedContainer() ? "Hierarchical" : "Non-hierarchical"}
|
||||
</Text>
|
||||
<Stack tokens={{ childrenGap: 5 }}>
|
||||
<Text>{partitionKeyValue}</Text>
|
||||
<Text>{isHierarchicalPartitionedContainer() ? "Hierarchical" : "Non-hierarchical"}</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{!isReadOnly && (
|
||||
<>
|
||||
<MessageBar
|
||||
data-test="partition-key-warning"
|
||||
messageBarType={MessageBarType.warning}
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={darkThemeMessageBarStyles}
|
||||
>
|
||||
<MessageBar messageBarType={MessageBarType.warning}>
|
||||
To safeguard the integrity of the data being copied to the new container, ensure that no updates are made to
|
||||
the source container for the entire duration of the partition key change process.
|
||||
<Link
|
||||
href="https://learn.microsoft.com/azure/cosmos-db/container-copy#how-does-container-copy-work"
|
||||
target="_blank"
|
||||
underline
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
>
|
||||
Learn more
|
||||
</Link>
|
||||
</MessageBar>
|
||||
<Text styles={{ root: { color: "var(--colorNeutralForeground1)" } }}>
|
||||
<Text>
|
||||
To change the partition key, a new destination container must be created or an existing destination
|
||||
container selected. Data will then be copied to the destination container.
|
||||
</Text>
|
||||
{configContext.platform !== Platform.Emulator && (
|
||||
<PrimaryButton
|
||||
data-test="change-partition-key-button"
|
||||
styles={{ root: { width: "fit-content" } }}
|
||||
text="Change"
|
||||
onClick={startPartitionkeyChangeWorkflow}
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
import {
|
||||
ChoiceGroup,
|
||||
IChoiceGroupOption,
|
||||
Label,
|
||||
Link,
|
||||
MessageBar,
|
||||
Stack,
|
||||
Text,
|
||||
TextField,
|
||||
TooltipHost,
|
||||
mergeStyleSets,
|
||||
} from "@fluentui/react";
|
||||
import { ChoiceGroup, IChoiceGroupOption, Label, Link, MessageBar, Stack, Text, TextField } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import * as ViewModels from "../../../../Contracts/ViewModels";
|
||||
import { userContext } from "../../../../UserContext";
|
||||
@@ -36,11 +25,6 @@ import {
|
||||
} from "../SettingsUtils";
|
||||
import { ToolTipLabelComponent } from "./ToolTipLabelComponent";
|
||||
|
||||
const classNames = mergeStyleSets({
|
||||
hintText: {
|
||||
color: "var(--colorNeutralForeground1)", // theme-aware
|
||||
},
|
||||
});
|
||||
export interface SubSettingsComponentProps {
|
||||
collection: ViewModels.Collection;
|
||||
timeToLive: TtlType;
|
||||
@@ -201,31 +185,13 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
|
||||
userContext.apiType === "Mongo" ? (
|
||||
<MessageBar
|
||||
messageBarIconProps={{ iconName: "InfoSolid", className: "messageBarInfoIcon" }}
|
||||
styles={{
|
||||
root: {
|
||||
backgroundColor: "var(--colorNeutralBackground1)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
text: {
|
||||
fontSize: 14,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
icon: {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Text style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
To enable time-to-live (TTL) for your collection/documents,{" "}
|
||||
<Link
|
||||
href="https://docs.microsoft.com/en-us/azure/cosmos-db/mongodb-time-to-live"
|
||||
target="_blank"
|
||||
style={{ color: "var(--colorBrandForeground1)" }}
|
||||
styles={{ text: { fontSize: 14 } }}
|
||||
>
|
||||
To enable time-to-live (TTL) for your collection/documents,
|
||||
<Link href="https://docs.microsoft.com/en-us/azure/cosmos-db/mongodb-time-to-live" target="_blank">
|
||||
create a TTL index
|
||||
</Link>
|
||||
.
|
||||
</Text>
|
||||
</MessageBar>
|
||||
) : (
|
||||
<Stack {...titleAndInputStackProps}>
|
||||
@@ -353,34 +319,23 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
|
||||
private getPartitionKeyComponent = (): JSX.Element => (
|
||||
<Stack {...titleAndInputStackProps}>
|
||||
{this.getPartitionKeyVisible() && (
|
||||
<TooltipHost
|
||||
content={`This ${this.partitionKeyName.toLowerCase()} is used to distribute data across multiple partitions for scalability. The value "${
|
||||
this.partitionKeyValue
|
||||
}" determines how documents are partitioned.`}
|
||||
styles={{
|
||||
root: {
|
||||
display: "block",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<TextField
|
||||
label={this.partitionKeyName}
|
||||
disabled
|
||||
styles={getTextFieldStyles(undefined, undefined)}
|
||||
defaultValue={this.partitionKeyValue}
|
||||
/>
|
||||
</TooltipHost>
|
||||
)}
|
||||
|
||||
{userContext.apiType === "SQL" && this.isLargePartitionKeyEnabled() && (
|
||||
<Text className={classNames.hintText}>Large {this.partitionKeyName.toLowerCase()} has been enabled.</Text>
|
||||
<Text>Large {this.partitionKeyName.toLowerCase()} has been enabled.</Text>
|
||||
)}
|
||||
|
||||
{userContext.apiType === "SQL" &&
|
||||
(this.isHierarchicalPartitionedContainer() ? (
|
||||
<Text className={classNames.hintText}>Hierarchically partitioned container.</Text>
|
||||
<Text>Hierarchically partitioned container.</Text>
|
||||
) : (
|
||||
<Text className={classNames.hintText}>Non-hierarchically partitioned container.</Text>
|
||||
<Text>Non-hierarchically partitioned container.</Text>
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
|
||||
@@ -65,7 +65,7 @@ export const ThroughputBucketsComponent: FC<ThroughputBucketsComponentProps> = (
|
||||
|
||||
return (
|
||||
<Stack tokens={{ childrenGap: "m" }} styles={{ root: { width: "70%", maxWidth: 700 } }}>
|
||||
<Label styles={{ root: { color: "var(--colorNeutralForeground1)" } }}>Throughput Buckets</Label>
|
||||
<Label>Throughput Buckets</Label>
|
||||
<Stack>
|
||||
{throughputBuckets?.map((bucket) => (
|
||||
<Stack key={bucket.id} horizontal tokens={{ childrenGap: 8 }} verticalAlign="center">
|
||||
@@ -77,15 +77,7 @@ export const ThroughputBucketsComponent: FC<ThroughputBucketsComponentProps> = (
|
||||
onChange={(newValue) => handleBucketChange(bucket.id, newValue)}
|
||||
showValue={false}
|
||||
label={`Bucket ${bucket.id}${bucket.id === 1 ? " (Data Explorer Query Bucket)" : ""}`}
|
||||
styles={{
|
||||
root: { flex: 2, maxWidth: 400 },
|
||||
titleLabel: {
|
||||
color:
|
||||
bucket.maxThroughputPercentage === 100
|
||||
? "var(--colorNeutralForeground4)"
|
||||
: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}}
|
||||
styles={{ root: { flex: 2, maxWidth: 400 } }}
|
||||
disabled={bucket.maxThroughputPercentage === 100}
|
||||
/>
|
||||
<TextField
|
||||
@@ -103,10 +95,7 @@ export const ThroughputBucketsComponent: FC<ThroughputBucketsComponentProps> = (
|
||||
offText="Inactive"
|
||||
checked={bucket.maxThroughputPercentage !== 100}
|
||||
onChange={(event, checked) => onToggle(bucket.id, checked)}
|
||||
styles={{
|
||||
root: { marginBottom: 0 },
|
||||
text: { fontSize: 12, color: "var(--colorNeutralForeground1)" },
|
||||
}}
|
||||
styles={{ root: { marginBottom: 0 }, text: { fontSize: 12 } }}
|
||||
></Toggle>
|
||||
</Stack>
|
||||
))}
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
ChoiceGroup,
|
||||
FontIcon,
|
||||
IChoiceGroupOption,
|
||||
IMessageBarStyles,
|
||||
IProgressIndicatorStyles,
|
||||
ISeparatorStyles,
|
||||
Label,
|
||||
@@ -38,6 +37,7 @@ import {
|
||||
getUpdateThroughputBeyondInstantLimitMessage,
|
||||
getUpdateThroughputBeyondSupportLimitMessage,
|
||||
manualToAutoscaleDisclaimerElement,
|
||||
messageBarStyles,
|
||||
noLeftPaddingCheckBoxStyle,
|
||||
relaxedSpacingStackProps,
|
||||
saveThroughputWarningMessage,
|
||||
@@ -101,13 +101,6 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{ key: "false", text: "Manual" },
|
||||
];
|
||||
|
||||
// Style constants for theme-aware colors and layout
|
||||
private static readonly TEXT_COLOR_PRIMARY = "var(--colorNeutralForeground1)";
|
||||
private static readonly TEXT_COLOR_SECONDARY = "var(--colorNeutralForeground2)";
|
||||
private static readonly TEXT_WIDTH_50 = "50%";
|
||||
private static readonly TEXT_WIDTH_33 = "33%";
|
||||
private static readonly LOCALE_EN_US = "en-US";
|
||||
|
||||
componentDidMount(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
@@ -243,24 +236,12 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
<Text style={{ fontWeight: 600, color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY }}>
|
||||
Updated cost per month
|
||||
</Text>
|
||||
<Text style={{ fontWeight: 600 }}>Updated cost per month</Text>
|
||||
<Stack horizontal style={{ marginTop: 5, marginBottom: 10 }}>
|
||||
<Text
|
||||
style={{
|
||||
width: ThroughputInputAutoPilotV3Component.TEXT_WIDTH_50,
|
||||
color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY,
|
||||
}}
|
||||
>
|
||||
<Text style={{ width: "50%" }}>
|
||||
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice / 10)} min
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
width: ThroughputInputAutoPilotV3Component.TEXT_WIDTH_50,
|
||||
color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY,
|
||||
}}
|
||||
>
|
||||
<Text style={{ width: "50%" }}>
|
||||
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice)} max
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -273,24 +254,12 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
return (
|
||||
<Stack {...checkBoxAndInputStackProps} style={{ marginTop: 15 }}>
|
||||
{newThroughput && newThroughputCostElement()}
|
||||
<Text style={{ fontWeight: 600, color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY }}>
|
||||
Current cost per month
|
||||
</Text>
|
||||
<Stack horizontal style={{ marginTop: 5, color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY }}>
|
||||
<Text
|
||||
style={{
|
||||
width: ThroughputInputAutoPilotV3Component.TEXT_WIDTH_50,
|
||||
color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY,
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontWeight: 600 }}>Current cost per month</Text>
|
||||
<Stack horizontal style={{ marginTop: 5 }}>
|
||||
<Text style={{ width: "50%" }}>
|
||||
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice / 10)} min
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
width: ThroughputInputAutoPilotV3Component.TEXT_WIDTH_50,
|
||||
color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY,
|
||||
}}
|
||||
>
|
||||
<Text style={{ width: "50%" }}>
|
||||
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice)} max
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -300,12 +269,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
|
||||
return getEstimatedSpendingElement(costElement(), newThroughput ?? throughput, numberOfRegions, prices, true);
|
||||
};
|
||||
settingsAndScaleStyle = {
|
||||
root: {
|
||||
width: ThroughputInputAutoPilotV3Component.TEXT_WIDTH_33,
|
||||
color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY,
|
||||
},
|
||||
};
|
||||
|
||||
private getEstimatedManualSpendElement = (
|
||||
throughput: number,
|
||||
serverId: string,
|
||||
@@ -325,17 +289,15 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
<Text style={{ fontWeight: 600, color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY }}>
|
||||
Updated cost per month
|
||||
</Text>
|
||||
<Text style={{ fontWeight: 600 }}>Updated cost per month</Text>
|
||||
<Stack horizontal style={{ marginTop: 5, marginBottom: 10 }}>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{newPrices.currencySign} {calculateEstimateNumber(newPrices.hourlyPrice)}/hr
|
||||
</Text>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{newPrices.currencySign} {calculateEstimateNumber(newPrices.dailyPrice)}/day
|
||||
</Text>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice)}/mo
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -348,17 +310,15 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
return (
|
||||
<Stack {...checkBoxAndInputStackProps} style={{ marginTop: 15 }}>
|
||||
{newThroughput && newThroughputCostElement()}
|
||||
<Text style={{ fontWeight: 600, color: ThroughputInputAutoPilotV3Component.TEXT_COLOR_PRIMARY }}>
|
||||
Current cost per month
|
||||
</Text>
|
||||
<Text style={{ fontWeight: 600 }}>Current cost per month</Text>
|
||||
<Stack horizontal style={{ marginTop: 5 }}>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{prices.currencySign} {calculateEstimateNumber(prices.hourlyPrice)}/hr
|
||||
</Text>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{prices.currencySign} {calculateEstimateNumber(prices.dailyPrice)}/day
|
||||
</Text>
|
||||
<Text style={this.settingsAndScaleStyle.root}>
|
||||
<Text style={{ width: "33%" }}>
|
||||
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice)}/mo
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -421,7 +381,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{this.overrideWithProvisionedThroughputSettings() && (
|
||||
<MessageBar
|
||||
messageBarIconProps={{ iconName: "InfoSolid", className: "messageBarInfoIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
styles={messageBarStyles}
|
||||
>
|
||||
{manualToAutoscaleDisclaimerElement}
|
||||
</MessageBar>
|
||||
@@ -447,8 +407,8 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
const capacity: string = this.props.isFixed ? "Fixed" : "Unlimited";
|
||||
return (
|
||||
<Stack {...titleAndInputStackProps}>
|
||||
<Label style={{ color: "var(--colorNeutralForeground1)" }}>Storage capacity</Label>
|
||||
<Text style={{ color: "var(--colorNeutralForeground1)" }}>{capacity}</Text>
|
||||
<Label>Storage capacity</Label>
|
||||
<Text>{capacity}</Text>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -458,7 +418,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{
|
||||
selectors: {
|
||||
"::before": {
|
||||
backgroundColor: "var(--colorNeutralStroke2)",
|
||||
backgroundColor: "rgb(200, 200, 200)",
|
||||
height: "3px",
|
||||
marginTop: "-1px",
|
||||
},
|
||||
@@ -497,10 +457,10 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{
|
||||
backgroundColor:
|
||||
this.getCurrentRuRange() === "instant"
|
||||
? "var(--colorBrandBackground)"
|
||||
? "rgb(0, 120, 212)"
|
||||
: this.getCurrentRuRange() === "delayed"
|
||||
? "var(--colorStatusWarningBackground1)"
|
||||
: "var(--colorStatusDangerBackground1)",
|
||||
? "rgb(255 216 109)"
|
||||
: "rgb(251, 217, 203)",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -537,17 +497,14 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
<Stack>
|
||||
<Stack horizontal>
|
||||
<Stack.Item style={{ width: "34%" }}>
|
||||
<span>{this.props.minimum.toLocaleString(ThroughputInputAutoPilotV3Component.LOCALE_EN_US)}</span>
|
||||
<span>{this.props.minimum.toLocaleString()}</span>
|
||||
</Stack.Item>
|
||||
<Stack.Item style={{ width: "66%" }}>
|
||||
<span style={{ float: "left", transform: "translateX(-50%)" }}>
|
||||
{this.props.instantMaximumThroughput.toLocaleString(ThroughputInputAutoPilotV3Component.LOCALE_EN_US)}
|
||||
</span>
|
||||
<span style={{ float: "right" }}>
|
||||
{this.props.softAllowedMaximumThroughput.toLocaleString(ThroughputInputAutoPilotV3Component.LOCALE_EN_US)}
|
||||
{this.props.instantMaximumThroughput.toLocaleString()}
|
||||
</span>
|
||||
<span style={{ float: "right" }} data-test="soft-allowed-maximum-throughput">
|
||||
{this.props.softAllowedMaximumThroughput.toLocaleString(ThroughputInputAutoPilotV3Component.LOCALE_EN_US)}
|
||||
{this.props.softAllowedMaximumThroughput.toLocaleString()}
|
||||
</span>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
@@ -590,41 +547,12 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
}
|
||||
};
|
||||
|
||||
private darkThemeMessageBarStyles: Partial<IMessageBarStyles> = {
|
||||
root: {
|
||||
marginTop: "5px",
|
||||
selectors: {
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
backgroundColor: "var(--colorStatusDangerBackground1)",
|
||||
border: "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
backgroundColor: "var(--colorStatusWarningBackground1)",
|
||||
border: "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--info": {
|
||||
backgroundColor: "var(--colorNeutralBackground3)",
|
||||
border: "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
private getThroughputWarningMessageBar = (): JSX.Element => {
|
||||
const isSevereWarning: boolean =
|
||||
this.currentThroughputValue() > this.props.softAllowedMaximumThroughput ||
|
||||
this.currentThroughputValue() < this.props.minimum;
|
||||
return (
|
||||
<MessageBar
|
||||
messageBarType={isSevereWarning ? MessageBarType.severeWarning : MessageBarType.warning}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
>
|
||||
<MessageBar messageBarType={isSevereWarning ? MessageBarType.severeWarning : MessageBarType.warning}>
|
||||
{this.getThroughputWarningMessageText()}
|
||||
</MessageBar>
|
||||
);
|
||||
@@ -637,13 +565,10 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{/* Column 1: Minimum RU/s */}
|
||||
<Stack tokens={{ childrenGap: 4 }}>
|
||||
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||
<Text
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
>
|
||||
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||
Minimum RU/s
|
||||
</Text>
|
||||
<FontIcon iconName="Info" style={{ fontSize: 12, color: "var(--colorNeutralForeground2)" }} />
|
||||
<FontIcon iconName="Info" style={{ fontSize: 12, color: "#666" }} />
|
||||
</Stack>
|
||||
<Text
|
||||
style={{
|
||||
@@ -658,7 +583,6 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
boxSizing: "border-box",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
}}
|
||||
>
|
||||
{AutoPilotUtils.getMinRUsBasedOnUserInput(this.props.maxAutoPilotThroughput)}
|
||||
@@ -672,7 +596,6 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
fontSize: 12,
|
||||
fontWeight: 400,
|
||||
paddingBottom: 6,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
}}
|
||||
>
|
||||
x 10 =
|
||||
@@ -681,13 +604,10 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{/* Column 3: Maximum RU/s */}
|
||||
<Stack tokens={{ childrenGap: 4 }}>
|
||||
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||
<Text
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
>
|
||||
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||
Maximum RU/s
|
||||
</Text>
|
||||
<FontIcon iconName="Info" style={{ fontSize: 12, color: "var(--colorNeutralForeground2)" }} />
|
||||
<FontIcon iconName="Info" style={{ fontSize: 12, color: "#666" }} />
|
||||
</Stack>
|
||||
<TextField
|
||||
required
|
||||
@@ -696,25 +616,8 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
key="auto pilot throughput input"
|
||||
styles={{
|
||||
...getTextFieldStyles(this.props.maxAutoPilotThroughput, this.props.maxAutoPilotThroughputBaseline),
|
||||
fieldGroup: {
|
||||
width: 100,
|
||||
height: 28,
|
||||
backgroundColor: "var(--colorNeutralBackground4)",
|
||||
},
|
||||
field: {
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
backgroundColor: "var(--colorNeutralBackground4)",
|
||||
},
|
||||
root: {
|
||||
selectors: {
|
||||
input: {
|
||||
backgroundColor: "var(--colorNeutralBackground4)",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
fieldGroup: { width: 100, height: 28 },
|
||||
field: { fontSize: 14, fontWeight: 400 },
|
||||
}}
|
||||
disabled={this.overrideWithProvisionedThroughputSettings()}
|
||||
step={AutoPilotUtils.autoPilotIncrementStep}
|
||||
@@ -771,7 +674,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
</Stack>
|
||||
)}
|
||||
{this.props.isAutoPilotSelected ? (
|
||||
<Text style={{ marginTop: "40px", color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text style={{ marginTop: "40px" }}>
|
||||
Based on usage, your {this.props.collectionName ? "container" : "database"} throughput will scale from{" "}
|
||||
<b>
|
||||
{AutoPilotUtils.getMinRUsBasedOnUserInput(this.props.maxAutoPilotThroughput)} RU/s (10% of max RU/s) -{" "}
|
||||
@@ -784,7 +687,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{this.state.exceedFreeTierThroughput && (
|
||||
<MessageBar
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
styles={messageBarStyles}
|
||||
style={{ marginTop: "40px" }}
|
||||
>
|
||||
{`Billing will apply if you provision more than ${SharedConstants.FreeTierLimits.RU} RU/s of manual throughput, or if the resource scales beyond ${SharedConstants.FreeTierLimits.RU} RU/s with autoscale.`}
|
||||
@@ -793,7 +696,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
</>
|
||||
)}
|
||||
{!this.overrideWithProvisionedThroughputSettings() && (
|
||||
<Text style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text>
|
||||
Estimate your required RU/s with
|
||||
<Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/">
|
||||
{` capacity calculator`} <FontIcon iconName="NavigateExternalInline" />
|
||||
@@ -834,7 +737,6 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{warningMessage && (
|
||||
<MessageBar
|
||||
messageBarIconProps={{ iconName: "WarningSolid", className: "messageBarWarningIcon" }}
|
||||
styles={this.darkThemeMessageBarStyles}
|
||||
role="alert"
|
||||
>
|
||||
{warningMessage}
|
||||
|
||||
@@ -16,35 +16,17 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
}
|
||||
}
|
||||
role="alert"
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"marginTop": "5px",
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--info": {
|
||||
"backgroundColor": "var(--colorNeutralBackground3)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"border": "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Your bill will be affected as you update your throughput settings. Please review the updated cost estimate below before saving your changes
|
||||
</Text>
|
||||
</StyledMessageBar>
|
||||
@@ -59,7 +41,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -80,27 +62,11 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "white",
|
||||
"marginTop": "5px",
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--info": {
|
||||
"backgroundColor": "var(--colorNeutralBackground3)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"border": "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
"text": {
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -110,7 +76,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -155,47 +121,15 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
".ms-ChoiceField-field.is-checked::before": {
|
||||
"borderColor": undefined,
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-wrapper label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": undefined,
|
||||
"fontSize": 14,
|
||||
"padding": "2px 5px",
|
||||
"whiteSpace": "nowrap",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -251,7 +185,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -264,7 +197,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
iconName="Info"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"color": "#666",
|
||||
"fontSize": 12,
|
||||
}
|
||||
}
|
||||
@@ -277,7 +210,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
"backgroundColor": "transparent",
|
||||
"border": "none",
|
||||
"boxSizing": "border-box",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"display": "flex",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 14,
|
||||
@@ -294,7 +226,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 12,
|
||||
"fontWeight": 400,
|
||||
@@ -323,7 +254,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -336,7 +266,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
iconName="Info"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"color": "#666",
|
||||
"fontSize": 12,
|
||||
}
|
||||
}
|
||||
@@ -355,36 +285,13 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground4)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontSize": 14,
|
||||
"fontWeight": 400,
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground4)",
|
||||
"height": 28,
|
||||
"width": 100,
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
"input": {
|
||||
"backgroundColor": "var(--colorNeutralBackground4)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"subComponentStyles": {
|
||||
"label": {
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"suffix": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
@@ -426,15 +333,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
>
|
||||
5,000
|
||||
</span>
|
||||
<span
|
||||
style={
|
||||
{
|
||||
"float": "right",
|
||||
}
|
||||
}
|
||||
>
|
||||
1,000,000
|
||||
</span>
|
||||
<span
|
||||
data-test="soft-allowed-maximum-throughput"
|
||||
style={
|
||||
@@ -454,7 +352,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
{
|
||||
"progressBar": [
|
||||
{
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"backgroundColor": "rgb(251, 217, 203)",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -478,7 +376,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -506,7 +404,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -523,39 +421,12 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
</Stack>
|
||||
<StyledMessageBar
|
||||
messageBarType={3}
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"marginTop": "5px",
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--info": {
|
||||
"backgroundColor": "var(--colorNeutralBackground3)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"border": "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -576,7 +447,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": "40px",
|
||||
}
|
||||
}
|
||||
@@ -608,22 +478,10 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase>
|
||||
Storage capacity
|
||||
</StyledLabelBase>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Unlimited
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -642,7 +500,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -665,7 +522,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -684,7 +540,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "50%",
|
||||
}
|
||||
}
|
||||
@@ -697,7 +552,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "50%",
|
||||
}
|
||||
}
|
||||
@@ -712,7 +566,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -723,7 +576,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
horizontal={true}
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 5,
|
||||
}
|
||||
}
|
||||
@@ -731,7 +583,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "50%",
|
||||
}
|
||||
}
|
||||
@@ -744,7 +595,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "50%",
|
||||
}
|
||||
}
|
||||
@@ -759,7 +609,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"marginTop": 15,
|
||||
}
|
||||
@@ -793,7 +642,6 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 15,
|
||||
}
|
||||
}
|
||||
@@ -828,7 +676,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -869,47 +717,15 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
".ms-ChoiceField-field.is-checked::before": {
|
||||
"borderColor": "",
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-wrapper label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": undefined,
|
||||
"fontSize": 14,
|
||||
"padding": "2px 5px",
|
||||
"whiteSpace": "nowrap",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -949,53 +765,17 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
step={100}
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"borderColor": "",
|
||||
"height": 25,
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
"input": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input#autopilotInput": {
|
||||
"backgroundColor": "var(--colorNeutralBackground4)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"backgroundColor": undefined,
|
||||
"borderColor": undefined,
|
||||
},
|
||||
},
|
||||
"width": 300,
|
||||
},
|
||||
"subComponentStyles": {
|
||||
"label": {
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"suffix": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
@@ -1034,15 +814,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
>
|
||||
5,000
|
||||
</span>
|
||||
<span
|
||||
style={
|
||||
{
|
||||
"float": "right",
|
||||
}
|
||||
}
|
||||
>
|
||||
1,000,000
|
||||
</span>
|
||||
<span
|
||||
data-test="soft-allowed-maximum-throughput"
|
||||
style={
|
||||
@@ -1062,7 +833,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
{
|
||||
"progressBar": [
|
||||
{
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"backgroundColor": "rgb(251, 217, 203)",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1086,7 +857,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -1114,7 +885,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -1131,39 +902,12 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
</Stack>
|
||||
<StyledMessageBar
|
||||
messageBarType={3}
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"marginTop": "5px",
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--info": {
|
||||
"backgroundColor": "var(--colorNeutralBackground3)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"border": "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -1181,13 +925,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
</Text>
|
||||
</StyledMessageBar>
|
||||
</Stack>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Estimate your required RU/s with
|
||||
<StyledLinkBase
|
||||
href="https://cosmos.azure.com/capacitycalculator/"
|
||||
@@ -1231,22 +969,10 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase>
|
||||
Storage capacity
|
||||
</StyledLabelBase>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Unlimited
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -1265,7 +991,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -1287,7 +1012,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -1305,7 +1029,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1318,7 +1041,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1331,7 +1053,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1346,7 +1067,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"marginTop": 15,
|
||||
}
|
||||
@@ -1379,7 +1099,6 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 15,
|
||||
}
|
||||
}
|
||||
@@ -1414,7 +1133,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -1455,47 +1174,15 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
".ms-ChoiceField-field.is-checked::before": {
|
||||
"borderColor": "",
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-wrapper label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": undefined,
|
||||
"fontSize": 14,
|
||||
"padding": "2px 5px",
|
||||
"whiteSpace": "nowrap",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -1535,53 +1222,17 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
step={100}
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"borderColor": "",
|
||||
"height": 25,
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
"input": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input#autopilotInput": {
|
||||
"backgroundColor": "var(--colorNeutralBackground4)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"backgroundColor": undefined,
|
||||
"borderColor": undefined,
|
||||
},
|
||||
},
|
||||
"width": 300,
|
||||
},
|
||||
"subComponentStyles": {
|
||||
"label": {
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"suffix": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
@@ -1620,15 +1271,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
>
|
||||
5,000
|
||||
</span>
|
||||
<span
|
||||
style={
|
||||
{
|
||||
"float": "right",
|
||||
}
|
||||
}
|
||||
>
|
||||
1,000,000
|
||||
</span>
|
||||
<span
|
||||
data-test="soft-allowed-maximum-throughput"
|
||||
style={
|
||||
@@ -1648,7 +1290,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
{
|
||||
"progressBar": [
|
||||
{
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"backgroundColor": "rgb(251, 217, 203)",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1672,7 +1314,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -1700,7 +1342,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
{
|
||||
"selectors": {
|
||||
"::before": {
|
||||
"backgroundColor": "var(--colorNeutralStroke2)",
|
||||
"backgroundColor": "rgb(200, 200, 200)",
|
||||
"height": "3px",
|
||||
"marginTop": "-1px",
|
||||
},
|
||||
@@ -1717,39 +1359,12 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
</Stack>
|
||||
<StyledMessageBar
|
||||
messageBarType={3}
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"marginTop": "5px",
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--info": {
|
||||
"backgroundColor": "var(--colorNeutralBackground3)",
|
||||
"border": "1px solid var(--colorNeutralStroke1)",
|
||||
},
|
||||
"&.ms-MessageBar--severeWarning": {
|
||||
"backgroundColor": "var(--colorStatusDangerBackground1)",
|
||||
"border": "1px solid var(--colorStatusDangerBorder1)",
|
||||
},
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -1767,13 +1382,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
</Text>
|
||||
</StyledMessageBar>
|
||||
</Stack>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Estimate your required RU/s with
|
||||
<StyledLinkBase
|
||||
href="https://cosmos.azure.com/capacitycalculator/"
|
||||
@@ -1800,22 +1409,10 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledLabelBase>
|
||||
Storage capacity
|
||||
</StyledLabelBase>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
Unlimited
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -1834,7 +1431,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -1856,7 +1452,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -1874,7 +1469,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1887,7 +1481,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1900,7 +1493,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"width": "33%",
|
||||
}
|
||||
}
|
||||
@@ -1915,7 +1507,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"marginTop": 15,
|
||||
}
|
||||
@@ -1948,7 +1539,6 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 15,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DirectionalHint, IIconStyles, Icon, Stack, Text, TooltipHost } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { Stack, Text, IIconStyles, Icon, TooltipHost, DirectionalHint } from "@fluentui/react";
|
||||
import { toolTipLabelStackTokens } from "../SettingsRenderUtils";
|
||||
|
||||
export interface ToolTipLabelComponentProps {
|
||||
@@ -14,9 +14,7 @@ export class ToolTipLabelComponent extends React.Component<ToolTipLabelComponent
|
||||
return (
|
||||
<>
|
||||
<Stack horizontal verticalAlign="center" tokens={toolTipLabelStackTokens}>
|
||||
{this.props.label && (
|
||||
<Text style={{ fontWeight: 600, color: "var(--colorNeutralForeground1)" }}>{this.props.label}</Text>
|
||||
)}
|
||||
{this.props.label && <Text style={{ fontWeight: 600 }}>{this.props.label}</Text>}
|
||||
{this.props.toolTipElement && (
|
||||
<TooltipHost
|
||||
content={this.props.toolTipElement}
|
||||
|
||||
@@ -11,7 +11,6 @@ exports[`ComputedPropertiesComponent renders 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginBottom": "10px",
|
||||
"marginLeft": "30px",
|
||||
}
|
||||
|
||||
@@ -37,47 +37,15 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
|
||||
".ms-ChoiceField-field.is-checked::before": {
|
||||
"borderColor": undefined,
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-wrapper label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": undefined,
|
||||
"fontSize": 14,
|
||||
"padding": "2px 5px",
|
||||
"whiteSpace": "nowrap",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -88,44 +56,17 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
|
||||
onRenderLabel={[Function]}
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"borderColor": "",
|
||||
"height": 25,
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
"input": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"backgroundColor": undefined,
|
||||
"borderColor": undefined,
|
||||
},
|
||||
},
|
||||
"width": 300,
|
||||
},
|
||||
"subComponentStyles": {
|
||||
"label": {
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
value=""
|
||||
@@ -170,47 +111,15 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
|
||||
".ms-ChoiceField-field.is-checked::before": {
|
||||
"borderColor": "",
|
||||
},
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-wrapper label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": undefined,
|
||||
"fontSize": 14,
|
||||
"padding": "2px 5px",
|
||||
"whiteSpace": "nowrap",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel:hover": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"label": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"root": {
|
||||
"selectors": {
|
||||
".ms-ChoiceField-field:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceField-innerField": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceField:hover .ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-ChoiceFieldLabel": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -221,44 +130,17 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
|
||||
onRenderLabel={[Function]}
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"fieldGroup": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"borderColor": "",
|
||||
"height": 25,
|
||||
"selectors": {
|
||||
":disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"borderColor": "var(--colorNeutralStroke1)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
},
|
||||
"input": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"input:disabled": {
|
||||
"backgroundColor": "var(--colorNeutralBackground2)",
|
||||
"color": "var(--colorNeutralForeground2)",
|
||||
"backgroundColor": undefined,
|
||||
"borderColor": undefined,
|
||||
},
|
||||
},
|
||||
"width": 300,
|
||||
},
|
||||
"subComponentStyles": {
|
||||
"label": {
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
value=""
|
||||
|
||||
@@ -26,7 +26,6 @@ exports[`PartitionKeyComponent renders default component and matches snapshot 1`
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontSize": 16,
|
||||
"fontWeight": 600,
|
||||
},
|
||||
@@ -55,7 +54,6 @@ exports[`PartitionKeyComponent renders default component and matches snapshot 1`
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
},
|
||||
}
|
||||
@@ -68,7 +66,6 @@ exports[`PartitionKeyComponent renders default component and matches snapshot 1`
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
},
|
||||
}
|
||||
@@ -78,91 +75,35 @@ exports[`PartitionKeyComponent renders default component and matches snapshot 1`
|
||||
</Text>
|
||||
</Stack>
|
||||
<Stack
|
||||
data-test="partition-key-values"
|
||||
tokens={
|
||||
{
|
||||
"childrenGap": 5,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text />
|
||||
<Text>
|
||||
Non-hierarchical
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<StyledMessageBar
|
||||
data-test="partition-key-warning"
|
||||
messageBarIconProps={
|
||||
{
|
||||
"className": "messageBarWarningIcon",
|
||||
"iconName": "WarningSolid",
|
||||
}
|
||||
}
|
||||
messageBarType={5}
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"selectors": {
|
||||
"&.ms-MessageBar--warning": {
|
||||
"backgroundColor": "var(--colorStatusWarningBackground1)",
|
||||
"border": "1px solid var(--colorStatusWarningBorder1)",
|
||||
},
|
||||
".ms-MessageBar-icon": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
".ms-MessageBar-text": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
To safeguard the integrity of the data being copied to the new container, ensure that no updates are made to the source container for the entire duration of the partition key change process.
|
||||
<StyledLinkBase
|
||||
href="https://learn.microsoft.com/azure/cosmos-db/container-copy#how-does-container-copy-work"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorBrandForeground1)",
|
||||
}
|
||||
}
|
||||
target="_blank"
|
||||
underline={true}
|
||||
>
|
||||
Learn more
|
||||
</StyledLinkBase>
|
||||
</StyledMessageBar>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
To change the partition key, a new destination container must be created or an existing destination container selected. Data will then be copied to the destination container.
|
||||
</Text>
|
||||
<CustomizedPrimaryButton
|
||||
data-test="change-partition-key-button"
|
||||
onClick={[Function]}
|
||||
styles={
|
||||
{
|
||||
@@ -217,7 +158,6 @@ exports[`PartitionKeyComponent renders read-only component and matches snapshot
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
},
|
||||
}
|
||||
@@ -230,7 +170,6 @@ exports[`PartitionKeyComponent renders read-only component and matches snapshot
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
},
|
||||
}
|
||||
@@ -240,31 +179,14 @@ exports[`PartitionKeyComponent renders read-only component and matches snapshot
|
||||
</Text>
|
||||
</Stack>
|
||||
<Stack
|
||||
data-test="partition-key-values"
|
||||
tokens={
|
||||
{
|
||||
"childrenGap": 5,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Text
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text />
|
||||
<Text>
|
||||
Non-hierarchical
|
||||
</Text>
|
||||
</Stack>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,6 @@ exports[`ToolTipLabelComponent renders 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,76 +3,13 @@
|
||||
exports[`SettingsComponent renders 1`] = `
|
||||
<div
|
||||
className="settingsV2MainContainer"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"position": "relative",
|
||||
}
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="settingsV2TabsContainer"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"padding": "20px 24px",
|
||||
"position": "relative",
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledPivot
|
||||
onLinkClick={[Function]}
|
||||
selectedKey="ScaleTab"
|
||||
styles={
|
||||
{
|
||||
"itemContainer": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"link": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
"&:active": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&[aria-selected="true"]": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
"&:active": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"&:hover": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"selectors": {
|
||||
"& .ms-Pivot-link": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
"& .ms-Pivot-link.is-selected::before": {
|
||||
"backgroundColor": "var(--colorCompoundBrandBackground)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -85,21 +22,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="ScaleTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<ScaleComponent
|
||||
collection={
|
||||
@@ -180,7 +105,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
throughputBaseline={10000}
|
||||
wasAutopilotOriginallySet={false}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -193,21 +117,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="SubSettingsTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<SubSettingsComponent
|
||||
changeFeedPolicy="Off"
|
||||
@@ -297,7 +209,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
timeToLiveSeconds={5}
|
||||
timeToLiveSecondsBaseline={5}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -310,21 +221,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="ContainerVectorPolicyTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<ContainerPolicyComponent
|
||||
fullTextPolicy={{}}
|
||||
@@ -341,7 +240,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
vectorEmbeddingPolicy={{}}
|
||||
vectorEmbeddingPolicyBaseline={{}}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -354,21 +252,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="IndexingPolicyTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<IndexingPolicyComponent
|
||||
indexingPolicyContent={
|
||||
@@ -395,7 +281,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
resetShouldDiscardIndexingPolicy={[Function]}
|
||||
shouldDiscardIndexingPolicy={false}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -408,21 +293,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="PartitionKeyTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<PartitionKeyComponent
|
||||
collection={
|
||||
@@ -520,7 +393,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
}
|
||||
isReadOnly={false}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -533,21 +405,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="ComputedPropertiesTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<ComputedPropertiesComponent
|
||||
computedPropertiesContent={
|
||||
@@ -572,7 +432,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
resetShouldDiscardComputedProperties={[Function]}
|
||||
shouldDiscardComputedProperties={false}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
<PivotItem
|
||||
headerButtonProps={
|
||||
@@ -585,21 +444,9 @@ exports[`SettingsComponent renders 1`] = `
|
||||
key="GlobalSecondaryIndexTab"
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 20,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Stack
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<GlobalSecondaryIndexComponent
|
||||
collection={
|
||||
@@ -696,7 +543,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
}
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
</StyledPivot>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,6 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
}
|
||||
}
|
||||
@@ -16,7 +15,6 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"marginTop": 15,
|
||||
}
|
||||
@@ -52,7 +50,6 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"marginTop": 15,
|
||||
}
|
||||
}
|
||||
@@ -68,7 +65,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -86,7 +83,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -107,7 +104,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -119,7 +116,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -139,7 +136,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -155,7 +152,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -170,7 +167,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -184,7 +181,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -196,7 +193,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -216,7 +213,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -224,21 +221,10 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
>
|
||||
Enable change feed log retention policy to retain last 10 minutes of history for items in the container by default. To support this, the request unit (RU) charge for this container will be multiplied by a factor of two for writes. Reads are unaffected.
|
||||
</Text>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text>
|
||||
For queries that filter on multiple properties, create multiple single field indexes instead of a compound index.
|
||||
<StyledLinkBase
|
||||
href="https://docs.microsoft.com/azure/cosmos-db/mongodb-indexing#index-types"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorBrandForeground1)",
|
||||
}
|
||||
}
|
||||
target="_blank"
|
||||
>
|
||||
Compound indexes
|
||||
@@ -270,7 +256,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -286,7 +272,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
@@ -303,7 +289,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
styles={
|
||||
{
|
||||
"root": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"color": "windowtext",
|
||||
"fontSize": 14,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ export const CostEstimateText: FunctionComponent<CostEstimateTextProps> = ({
|
||||
|
||||
if (isAutoscale) {
|
||||
return (
|
||||
<Stack style={{ marginBottom: 6, color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text variant="small" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Stack style={{ marginBottom: 6 }}>
|
||||
<Text variant="small">
|
||||
{estimatedMonthlyCost} ({currency}){iconWithEstimatedCostDisclaimer}:{" "}
|
||||
<b>
|
||||
{currencySign + calculateEstimateNumber(monthlyPrice / 10)} -{" "}
|
||||
@@ -70,7 +70,7 @@ export const CostEstimateText: FunctionComponent<CostEstimateTextProps> = ({
|
||||
|
||||
return (
|
||||
<Stack style={{ marginBottom: 8 }}>
|
||||
<Text variant="small" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text variant="small">
|
||||
Estimated cost ({currency}){iconWithEstimatedCostDisclaimer}:{" "}
|
||||
<b>
|
||||
{currencySign + calculateEstimateNumber(hourlyPrice)} hourly /{" "}
|
||||
|
||||
@@ -10,13 +10,9 @@
|
||||
font-size: @mediumFontSize;
|
||||
padding: 0 @LargeSpace 0 @SmallSpace;
|
||||
}
|
||||
// .throughputInputSpacing{
|
||||
// color: "var(--colorNeutralForeground1)";
|
||||
// }
|
||||
|
||||
.throughputInputSpacing > :not(:last-child) {
|
||||
margin-bottom: @DefaultSpace;
|
||||
color: "var(--colorNeutralForeground1)";
|
||||
}
|
||||
|
||||
.capacitycalculator-link:focus {
|
||||
@@ -32,16 +28,3 @@
|
||||
.deleteQuery:focus::after {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
// Override Fluent UI TextField focus styles
|
||||
.throughputInputContainer {
|
||||
:global {
|
||||
.ms-TextField {
|
||||
.ms-TextField-fieldGroup {
|
||||
&:focus-within {
|
||||
border-color: var(--colorCompoundBrandStroke1, @SelectionColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,11 +193,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
<div className="throughputInputContainer throughputInputSpacing">
|
||||
<Stack horizontal>
|
||||
<span className="mandatoryStar">* </span>
|
||||
<Text
|
||||
aria-label="Throughput header"
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
>
|
||||
<Text aria-label="Throughput header" variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||
{getThroughputLabelText()}
|
||||
</Text>
|
||||
<InfoTooltip>{PricingUtils.getRuToolTipText()}</InfoTooltip>
|
||||
@@ -240,17 +236,14 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
|
||||
{isAutoscaleSelected && (
|
||||
<Stack className="throughputInputSpacing">
|
||||
<Text style={{ marginTop: -2, fontSize: 12, color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text style={{ marginTop: -2, fontSize: 12 }}>
|
||||
Your container throughput will automatically scale up to the maximum value you select, from a minimum of 10%
|
||||
of that value.
|
||||
</Text>
|
||||
<Stack horizontal verticalAlign="end" tokens={{ childrenGap: 8 }}>
|
||||
<Stack tokens={{ childrenGap: 4 }}>
|
||||
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||
<Text
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
>
|
||||
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||
Minimum RU/s
|
||||
</Text>
|
||||
<InfoTooltip>The minimum RU/s your container will scale to</InfoTooltip>
|
||||
@@ -267,7 +260,6 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
}}
|
||||
>
|
||||
{Math.round(throughput / 10).toString()}
|
||||
@@ -280,7 +272,6 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
fontSize: 12,
|
||||
fontWeight: 400,
|
||||
paddingBottom: 6,
|
||||
color: "var(--colorNeutralForeground1)",
|
||||
}}
|
||||
>
|
||||
x 10 =
|
||||
@@ -288,10 +279,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
|
||||
<Stack tokens={{ childrenGap: 4 }}>
|
||||
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||
<Text
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
>
|
||||
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||
Maximum RU/s
|
||||
</Text>
|
||||
<InfoTooltip>{getAutoScaleTooltip()}</InfoTooltip>
|
||||
@@ -302,7 +290,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
type="number"
|
||||
styles={{
|
||||
fieldGroup: { width: 100, height: 27, flexShrink: 0 },
|
||||
field: { fontSize: 14, fontWeight: 400, color: "var(--colorNeutralForeground1)" },
|
||||
field: { fontSize: 14, fontWeight: 400 },
|
||||
}}
|
||||
onChange={(_event, newInput?: string) => onThroughputValueChange(newInput)}
|
||||
step={AutoPilotUtils.autoPilotIncrementStep}
|
||||
@@ -318,7 +306,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
|
||||
<CostEstimateText requestUnits={throughput} isAutoscale={isAutoscaleSelected} />
|
||||
<Stack className="throughputInputSpacing">
|
||||
<Text variant="small" aria-label="ruDescription" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text variant="small" aria-label="ruDescription">
|
||||
Estimate your required RU/s with
|
||||
<Link
|
||||
className="underlinedLink"
|
||||
@@ -337,7 +325,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
|
||||
{!isAutoscaleSelected && (
|
||||
<Stack className="throughputInputSpacing">
|
||||
<Text variant="small" aria-label="ruDescription" style={{ color: "var(--colorNeutralForeground1)" }}>
|
||||
<Text variant="small" aria-label="ruDescription">
|
||||
Estimate your required RU/s with
|
||||
<Link
|
||||
className="underlinedLink"
|
||||
@@ -350,11 +338,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
||||
.
|
||||
</Text>
|
||||
<Stack horizontal>
|
||||
<Text
|
||||
variant="small"
|
||||
style={{ lineHeight: "20px", fontWeight: 600, color: "var(--colorNeutralForeground1)" }}
|
||||
aria-label="maxRUDescription"
|
||||
>
|
||||
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }} aria-label="maxRUDescription">
|
||||
{isDatabase ? "Database" : getCollectionName()} Required RU/s
|
||||
</Text>
|
||||
<InfoTooltip>{getAutoScaleTooltip()}</InfoTooltip>
|
||||
|
||||
@@ -31,7 +31,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
key=".0:$.$.1"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -43,7 +42,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
className="css-110"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -726,7 +724,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
key=".0:$.$.0"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontSize": 12,
|
||||
"marginTop": -2,
|
||||
}
|
||||
@@ -736,7 +733,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
className="css-117"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontSize": 12,
|
||||
"marginTop": -2,
|
||||
}
|
||||
@@ -786,7 +782,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
key=".0:$.$.0"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -797,7 +792,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
className="css-110"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -1429,7 +1423,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "transparent",
|
||||
"border": "none",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"display": "flex",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 14,
|
||||
@@ -1447,7 +1440,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "transparent",
|
||||
"border": "none",
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"display": "flex",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 14,
|
||||
@@ -1467,7 +1459,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
key=".0:$.$.1"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 12,
|
||||
"fontWeight": 400,
|
||||
@@ -1479,7 +1470,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
className="css-117"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontFamily": "Segoe UI",
|
||||
"fontSize": 12,
|
||||
"fontWeight": 400,
|
||||
@@ -1518,7 +1508,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
key=".0:$.$.0"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -1529,7 +1518,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
className="css-110"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontWeight": 600,
|
||||
"lineHeight": "20px",
|
||||
}
|
||||
@@ -2168,7 +2156,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
styles={
|
||||
{
|
||||
"field": {
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
"fontSize": 14,
|
||||
"fontWeight": 400,
|
||||
},
|
||||
@@ -2522,21 +2509,11 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
||||
<Text
|
||||
aria-label="ruDescription"
|
||||
key=".0:$.$.0"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
variant="small"
|
||||
>
|
||||
<span
|
||||
aria-label="ruDescription"
|
||||
className="css-110"
|
||||
style={
|
||||
{
|
||||
"color": "var(--colorNeutralForeground1)",
|
||||
}
|
||||
}
|
||||
>
|
||||
Estimate your required RU/s with
|
||||
<StyledLinkBase
|
||||
|
||||
@@ -10,7 +10,6 @@ const actionButtonBackground = "--cosmos-Tree--actionButtonBackground" as const;
|
||||
export const useTreeStyles = makeStyles({
|
||||
treeContainer: {
|
||||
height: "100%",
|
||||
maxHeight: "100vh",
|
||||
...shorthands.overflow("auto"),
|
||||
},
|
||||
tree: {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user