mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-28 13:21:42 +00:00
Compare commits
11 Commits
e2e-test-d
...
v-yiqcao/t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
417a6151be | ||
|
|
cc63cdc1fd | ||
|
|
3c25788e72 | ||
|
|
1c8deb1fcc | ||
|
|
4664038df0 | ||
|
|
c3058ee5a9 | ||
|
|
b000631a0c | ||
|
|
e8f4c8f93c | ||
|
|
16bde97e47 | ||
|
|
6da43ee27b | ||
|
|
ebae484b8f |
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
@@ -101,6 +101,7 @@ jobs:
|
|||||||
PLATFORM: "Emulator"
|
PLATFORM: "Emulator"
|
||||||
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: screenshots
|
name: screenshots
|
||||||
path: failed-*
|
path: failed-*
|
||||||
@@ -159,13 +160,14 @@ jobs:
|
|||||||
TABLES_CONNECTION_STRING: ${{ secrets.CONNECTION_STRING_TABLE }}
|
TABLES_CONNECTION_STRING: ${{ secrets.CONNECTION_STRING_TABLE }}
|
||||||
DATA_EXPLORER_ENDPOINT: "https://localhost:1234/hostedExplorer.html"
|
DATA_EXPLORER_ENDPOINT: "https://localhost:1234/hostedExplorer.html"
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: screenshots
|
name: screenshots
|
||||||
path: failed-*
|
path: failed-*
|
||||||
nuget:
|
nuget:
|
||||||
name: Publish Nuget
|
name: Publish Nuget
|
||||||
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
||||||
needs: [lint, format, compile, build, unittest, endtoendemulator, endtoendhosted]
|
needs: [lint, format, compile, build, unittest, endtoendemulator, endtoendhosted, accessibility]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
|
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
|
||||||
@@ -189,7 +191,7 @@ jobs:
|
|||||||
nugetmpac:
|
nugetmpac:
|
||||||
name: Publish Nuget MPAC
|
name: Publish Nuget MPAC
|
||||||
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
||||||
needs: [lint, format, compile, build, unittest, endtoendemulator, endtoendhosted]
|
needs: [lint, format, compile, build, unittest, endtoendemulator, endtoendhosted, accessibility]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
|
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
|
||||||
@@ -211,3 +213,28 @@ jobs:
|
|||||||
name: packages
|
name: packages
|
||||||
with:
|
with:
|
||||||
path: "*.nupkg"
|
path: "*.nupkg"
|
||||||
|
nugetie:
|
||||||
|
name: Publish Nuget IE
|
||||||
|
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
||||||
|
needs: [lint, format, compile, build, unittest, endtoendemulator, endtoendhosted, accessibility]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
|
||||||
|
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
|
||||||
|
steps:
|
||||||
|
- uses: nuget/setup-nuget@v1
|
||||||
|
with:
|
||||||
|
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
|
||||||
|
- name: Download Dist Folder
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
- run: cp ./configs/prod.json config.json
|
||||||
|
- run: sed -i 's/Azure.Cosmos.DB.Data.Explorer/Azure.Cosmos.DB.Data.Explorer.IE/g' DataExplorer.nuspec
|
||||||
|
- run: nuget sources add -Name "ADO" -Source "$NUGET_SOURCE" -UserName "GitHub" -Password "$AZURE_DEVOPS_PAT"
|
||||||
|
- run: nuget pack -Version "2.0.0-github-${GITHUB_SHA}"
|
||||||
|
- run: nuget push -Source "$NUGET_SOURCE" -ApiKey Az *.nupkg
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
name: packages
|
||||||
|
with:
|
||||||
|
path: "*.nupkg"
|
||||||
|
|||||||
BIN
.vs/slnx.sqlite
Normal file
BIN
.vs/slnx.sqlite
Normal file
Binary file not shown.
7
canvas/README.md
Normal file
7
canvas/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Why?
|
||||||
|
|
||||||
|
This adds a mock module for `canvas`. Nteract has a ignored require and undeclared dependency on this module. `cavnas` is a server side node module and is not used in browser side code for nteract.
|
||||||
|
|
||||||
|
Installing it locally (`npm install canvas`) will resolve the problem, but it is a native module so it is flaky depending on the system, node version, processor arch, etc. This module provides a simpler, more robust solution.
|
||||||
|
|
||||||
|
Remove this workaround if [this bug](https://github.com/nteract/any-vega/issues/2) ever gets resolved
|
||||||
1
canvas/index.js
Normal file
1
canvas/index.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = {}
|
||||||
11
canvas/package.json
Normal file
11
canvas/package.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "canvas",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC"
|
||||||
|
}
|
||||||
220
package-lock.json
generated
220
package-lock.json
generated
@@ -5393,11 +5393,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
|
||||||
"integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
|
"integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
|
||||||
},
|
},
|
||||||
"abbrev": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
|
||||||
},
|
|
||||||
"abort-controller": {
|
"abort-controller": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||||
@@ -5641,6 +5636,7 @@
|
|||||||
"version": "1.1.5",
|
"version": "1.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"delegates": "^1.0.0",
|
"delegates": "^1.0.0",
|
||||||
"readable-stream": "^2.0.6"
|
"readable-stream": "^2.0.6"
|
||||||
@@ -6883,14 +6879,7 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"canvas": {
|
"canvas": {
|
||||||
"version": "2.6.1",
|
"version": "file:canvas"
|
||||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.1.tgz",
|
|
||||||
"integrity": "sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA==",
|
|
||||||
"requires": {
|
|
||||||
"nan": "^2.14.0",
|
|
||||||
"node-pre-gyp": "^0.11.0",
|
|
||||||
"simple-get": "^3.0.3"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"capture-exit": {
|
"capture-exit": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@@ -7454,7 +7443,8 @@
|
|||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"constants-browserify": {
|
"constants-browserify": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@@ -8435,6 +8425,7 @@
|
|||||||
"version": "4.2.1",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
|
||||||
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mimic-response": "^2.0.0"
|
"mimic-response": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -8460,7 +8451,8 @@
|
|||||||
"deep-extend": {
|
"deep-extend": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"deep-is": {
|
"deep-is": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
@@ -8652,7 +8644,8 @@
|
|||||||
"delegates": {
|
"delegates": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
|
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"depd": {
|
"depd": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
@@ -8688,7 +8681,8 @@
|
|||||||
"detect-libc": {
|
"detect-libc": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
|
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"detect-newline": {
|
"detect-newline": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@@ -10674,14 +10668,6 @@
|
|||||||
"universalify": "^0.1.0"
|
"universalify": "^0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fs-minipass": {
|
|
||||||
"version": "1.2.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
|
|
||||||
"integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
|
|
||||||
"requires": {
|
|
||||||
"minipass": "^2.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fs-observable": {
|
"fs-observable": {
|
||||||
"version": "4.1.14",
|
"version": "4.1.14",
|
||||||
"resolved": "https://registry.npmjs.org/fs-observable/-/fs-observable-4.1.14.tgz",
|
"resolved": "https://registry.npmjs.org/fs-observable/-/fs-observable-4.1.14.tgz",
|
||||||
@@ -10823,6 +10809,7 @@
|
|||||||
"version": "2.7.4",
|
"version": "2.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"aproba": "^1.0.3",
|
"aproba": "^1.0.3",
|
||||||
"console-control-strings": "^1.0.0",
|
"console-control-strings": "^1.0.0",
|
||||||
@@ -10837,12 +10824,14 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -10851,6 +10840,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -10861,6 +10851,7 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -11350,7 +11341,8 @@
|
|||||||
"has-unicode": {
|
"has-unicode": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"has-value": {
|
"has-value": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@@ -11832,14 +11824,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
|
||||||
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw=="
|
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw=="
|
||||||
},
|
},
|
||||||
"ignore-walk": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
|
|
||||||
"integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
|
|
||||||
"requires": {
|
|
||||||
"minimatch": "^3.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"image-size": {
|
"image-size": {
|
||||||
"version": "0.5.5",
|
"version": "0.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
|
||||||
@@ -15544,7 +15528,8 @@
|
|||||||
"mimic-response": {
|
"mimic-response": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
||||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"min-document": {
|
"min-document": {
|
||||||
"version": "2.19.0",
|
"version": "2.19.0",
|
||||||
@@ -15601,15 +15586,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||||
},
|
},
|
||||||
"minipass": {
|
|
||||||
"version": "2.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
|
|
||||||
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
|
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "^5.1.2",
|
|
||||||
"yallist": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minipass-collect": {
|
"minipass-collect": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
|
||||||
@@ -15679,14 +15655,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minizlib": {
|
|
||||||
"version": "1.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
|
|
||||||
"integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
|
|
||||||
"requires": {
|
|
||||||
"minipass": "^2.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mississippi": {
|
"mississippi": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
|
||||||
@@ -15861,7 +15829,8 @@
|
|||||||
"nan": {
|
"nan": {
|
||||||
"version": "2.14.2",
|
"version": "2.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
|
||||||
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
|
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
@@ -15911,26 +15880,6 @@
|
|||||||
"semver": "^5.4.1"
|
"semver": "^5.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"needle": {
|
|
||||||
"version": "2.5.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz",
|
|
||||||
"integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==",
|
|
||||||
"requires": {
|
|
||||||
"debug": "^3.2.6",
|
|
||||||
"iconv-lite": "^0.4.4",
|
|
||||||
"sax": "^1.2.4"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"debug": {
|
|
||||||
"version": "3.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
|
||||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
|
||||||
"requires": {
|
|
||||||
"ms": "^2.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"negotiator": {
|
"negotiator": {
|
||||||
"version": "0.6.2",
|
"version": "0.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||||
@@ -16099,41 +16048,6 @@
|
|||||||
"which": "^1.3.0"
|
"which": "^1.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-pre-gyp": {
|
|
||||||
"version": "0.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
|
|
||||||
"integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==",
|
|
||||||
"requires": {
|
|
||||||
"detect-libc": "^1.0.2",
|
|
||||||
"mkdirp": "^0.5.1",
|
|
||||||
"needle": "^2.2.1",
|
|
||||||
"nopt": "^4.0.1",
|
|
||||||
"npm-packlist": "^1.1.6",
|
|
||||||
"npmlog": "^4.0.2",
|
|
||||||
"rc": "^1.2.7",
|
|
||||||
"rimraf": "^2.6.1",
|
|
||||||
"semver": "^5.3.0",
|
|
||||||
"tar": "^4"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"mkdirp": {
|
|
||||||
"version": "0.5.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
|
||||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
|
||||||
"requires": {
|
|
||||||
"minimist": "^1.2.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rimraf": {
|
|
||||||
"version": "2.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
|
||||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
|
||||||
"requires": {
|
|
||||||
"glob": "^7.1.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node-releases": {
|
"node-releases": {
|
||||||
"version": "1.1.66",
|
"version": "1.1.66",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz",
|
||||||
@@ -16146,15 +16060,6 @@
|
|||||||
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=",
|
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"nopt": {
|
|
||||||
"version": "4.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
|
|
||||||
"integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
|
|
||||||
"requires": {
|
|
||||||
"abbrev": "1",
|
|
||||||
"osenv": "^0.1.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"normalize-package-data": {
|
"normalize-package-data": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
||||||
@@ -16179,29 +16084,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
|
||||||
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
|
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
|
||||||
},
|
},
|
||||||
"npm-bundled": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
|
|
||||||
"requires": {
|
|
||||||
"npm-normalize-package-bin": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npm-normalize-package-bin": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
|
|
||||||
},
|
|
||||||
"npm-packlist": {
|
|
||||||
"version": "1.4.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
|
|
||||||
"integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
|
|
||||||
"requires": {
|
|
||||||
"ignore-walk": "^3.0.1",
|
|
||||||
"npm-bundled": "^1.0.1",
|
|
||||||
"npm-normalize-package-bin": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npm-run-path": {
|
"npm-run-path": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||||
@@ -16214,6 +16096,7 @@
|
|||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"are-we-there-yet": "~1.1.2",
|
"are-we-there-yet": "~1.1.2",
|
||||||
"console-control-strings": "~1.1.0",
|
"console-control-strings": "~1.1.0",
|
||||||
@@ -16605,7 +16488,8 @@
|
|||||||
"os-homedir": {
|
"os-homedir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"os-locale": {
|
"os-locale": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
@@ -16624,20 +16508,6 @@
|
|||||||
"windows-release": "^3.1.0"
|
"windows-release": "^3.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os-tmpdir": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
|
||||||
},
|
|
||||||
"osenv": {
|
|
||||||
"version": "0.1.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
|
||||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
|
||||||
"requires": {
|
|
||||||
"os-homedir": "^1.0.0",
|
|
||||||
"os-tmpdir": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"p-defer": {
|
"p-defer": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||||
@@ -17690,6 +17560,7 @@
|
|||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"deep-extend": "^0.6.0",
|
"deep-extend": "^0.6.0",
|
||||||
"ini": "~1.3.0",
|
"ini": "~1.3.0",
|
||||||
@@ -19116,12 +18987,14 @@
|
|||||||
"simple-concat": {
|
"simple-concat": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
||||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"simple-get": {
|
"simple-get": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
|
||||||
"integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
|
"integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"decompress-response": "^4.2.0",
|
"decompress-response": "^4.2.0",
|
||||||
"once": "^1.3.1",
|
"once": "^1.3.1",
|
||||||
@@ -20113,30 +19986,6 @@
|
|||||||
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
|
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tar": {
|
|
||||||
"version": "4.4.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
|
|
||||||
"integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
|
|
||||||
"requires": {
|
|
||||||
"chownr": "^1.1.1",
|
|
||||||
"fs-minipass": "^1.2.5",
|
|
||||||
"minipass": "^2.8.6",
|
|
||||||
"minizlib": "^1.2.1",
|
|
||||||
"mkdirp": "^0.5.0",
|
|
||||||
"safe-buffer": "^5.1.2",
|
|
||||||
"yallist": "^3.0.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"mkdirp": {
|
|
||||||
"version": "0.5.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
|
||||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
|
||||||
"requires": {
|
|
||||||
"minimist": "^1.2.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tar-fs": {
|
"tar-fs": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
|
||||||
@@ -22192,6 +22041,7 @@
|
|||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"string-width": "^1.0.2 || 2"
|
"string-width": "^1.0.2 || 2"
|
||||||
},
|
},
|
||||||
@@ -22199,12 +22049,14 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-fullwidth-code-point": "^2.0.0",
|
"is-fullwidth-code-point": "^2.0.0",
|
||||||
"strip-ansi": "^4.0.0"
|
"strip-ansi": "^4.0.0"
|
||||||
@@ -22214,6 +22066,7 @@
|
|||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^3.0.0"
|
"ansi-regex": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -22383,7 +22236,8 @@
|
|||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "13.3.2",
|
"version": "13.3.2",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
"applicationinsights": "1.8.0",
|
"applicationinsights": "1.8.0",
|
||||||
"babel-polyfill": "6.26.0",
|
"babel-polyfill": "6.26.0",
|
||||||
"bootstrap": "3.4.1",
|
"bootstrap": "3.4.1",
|
||||||
"canvas": "2.6.1",
|
"canvas": "file:./canvas",
|
||||||
"clean-webpack-plugin": "0.1.19",
|
"clean-webpack-plugin": "0.1.19",
|
||||||
"copy-webpack-plugin": "6.0.2",
|
"copy-webpack-plugin": "6.0.2",
|
||||||
"crossroads": "0.12.2",
|
"crossroads": "0.12.2",
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ export enum CollectionTabKind {
|
|||||||
Gallery = 17,
|
Gallery = 17,
|
||||||
NotebookViewer = 18,
|
NotebookViewer = 18,
|
||||||
Schema = 19,
|
Schema = 19,
|
||||||
SettingsV2 = 19
|
SettingsV2 = 20
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TerminalKind {
|
export enum TerminalKind {
|
||||||
|
|||||||
@@ -801,7 +801,12 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
private onMaxAutoPilotThroughputChange = (newThroughput: number): void =>
|
private onMaxAutoPilotThroughputChange = (newThroughput: number): void =>
|
||||||
this.setState({ autoPilotThroughput: newThroughput });
|
this.setState({ autoPilotThroughput: newThroughput });
|
||||||
|
|
||||||
private onThroughputChange = (newThroughput: number): void => this.setState({ throughput: newThroughput });
|
private onThroughputChange = (newThroughput: number): void => {
|
||||||
|
if (newThroughput < 400) {
|
||||||
|
return alert("The value should not small than 400");
|
||||||
|
}
|
||||||
|
this.setState({ throughput: newThroughput });
|
||||||
|
};
|
||||||
|
|
||||||
private onAutoPilotSelected = (isAutoPilotSelected: boolean): void =>
|
private onAutoPilotSelected = (isAutoPilotSelected: boolean): void =>
|
||||||
this.setState({ isAutoPilotSelected: isAutoPilotSelected });
|
this.setState({ isAutoPilotSelected: isAutoPilotSelected });
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { shallow } from "enzyme";
|
import { shallow } from "enzyme";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { IColumn, Text } from "office-ui-fabric-react";
|
||||||
import {
|
import {
|
||||||
getAutoPilotV3SpendElement,
|
getAutoPilotV3SpendElement,
|
||||||
getEstimatedSpendElement,
|
getEstimatedSpendingElement,
|
||||||
getEstimatedAutoscaleSpendElement,
|
|
||||||
manualToAutoscaleDisclaimerElement,
|
manualToAutoscaleDisclaimerElement,
|
||||||
ttlWarning,
|
ttlWarning,
|
||||||
indexingPolicynUnsavedWarningMessage,
|
indexingPolicynUnsavedWarningMessage,
|
||||||
@@ -19,11 +19,37 @@ import {
|
|||||||
mongoIndexingPolicyDisclaimer,
|
mongoIndexingPolicyDisclaimer,
|
||||||
mongoIndexingPolicyAADError,
|
mongoIndexingPolicyAADError,
|
||||||
mongoIndexTransformationRefreshingMessage,
|
mongoIndexTransformationRefreshingMessage,
|
||||||
renderMongoIndexTransformationRefreshMessage
|
renderMongoIndexTransformationRefreshMessage,
|
||||||
|
ManualEstimatedSpendingDisplayProps,
|
||||||
|
PriceBreakdown,
|
||||||
|
getRuPriceBreakdown
|
||||||
} from "./SettingsRenderUtils";
|
} from "./SettingsRenderUtils";
|
||||||
|
|
||||||
class SettingsRenderUtilsTestComponent extends React.Component {
|
class SettingsRenderUtilsTestComponent extends React.Component {
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
|
const estimatedSpendingColumns: IColumn[] = [
|
||||||
|
{ key: "costType", name: "", fieldName: "costType", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||||
|
{ key: "hourly", name: "Hourly", fieldName: "hourly", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||||
|
{ key: "daily", name: "Daily", fieldName: "daily", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||||
|
{ key: "monthly", name: "Monthly", fieldName: "monthly", minWidth: 100, maxWidth: 200, isResizable: true }
|
||||||
|
];
|
||||||
|
const estimatedSpendingItems: ManualEstimatedSpendingDisplayProps[] = [
|
||||||
|
{
|
||||||
|
costType: <Text>Current Cost</Text>,
|
||||||
|
hourly: <Text>$ 1.02</Text>,
|
||||||
|
daily: <Text>$ 24.48</Text>,
|
||||||
|
monthly: <Text>$ 744.6</Text>
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const priceBreakdown: PriceBreakdown = {
|
||||||
|
hourlyPrice: 1.02,
|
||||||
|
dailyPrice: 24.48,
|
||||||
|
monthlyPrice: 744.6,
|
||||||
|
pricePerRu: 0.00051,
|
||||||
|
currency: "RMB",
|
||||||
|
currencySign: "¥"
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{getAutoPilotV3SpendElement(1000, false)}
|
{getAutoPilotV3SpendElement(1000, false)}
|
||||||
@@ -31,9 +57,7 @@ class SettingsRenderUtilsTestComponent extends React.Component {
|
|||||||
{getAutoPilotV3SpendElement(1000, true)}
|
{getAutoPilotV3SpendElement(1000, true)}
|
||||||
{getAutoPilotV3SpendElement(undefined, true)}
|
{getAutoPilotV3SpendElement(undefined, true)}
|
||||||
|
|
||||||
{getEstimatedSpendElement(1000, "mooncake", 2, false)}
|
{getEstimatedSpendingElement(estimatedSpendingColumns, estimatedSpendingItems, 1000, 2, priceBreakdown, false)}
|
||||||
|
|
||||||
{getEstimatedAutoscaleSpendElement(1000, "mooncake", 2, false)}
|
|
||||||
|
|
||||||
{manualToAutoscaleDisclaimerElement}
|
{manualToAutoscaleDisclaimerElement}
|
||||||
{ttlWarning}
|
{ttlWarning}
|
||||||
@@ -69,4 +93,14 @@ describe("SettingsUtils functions", () => {
|
|||||||
const wrapper = shallow(<SettingsRenderUtilsTestComponent />);
|
const wrapper = shallow(<SettingsRenderUtilsTestComponent />);
|
||||||
expect(wrapper).toMatchSnapshot();
|
expect(wrapper).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should return correct price breakdown for a manual RU setting of 500, 1 region, multimaster disabled", () => {
|
||||||
|
const prices = getRuPriceBreakdown(500, "", 1, false, false);
|
||||||
|
expect(prices.hourlyPrice).toBe(0.04);
|
||||||
|
expect(prices.dailyPrice).toBe(0.96);
|
||||||
|
expect(prices.monthlyPrice).toBe(29.2);
|
||||||
|
expect(prices.pricePerRu).toBe(0.00008);
|
||||||
|
expect(prices.currency).toBe("USD");
|
||||||
|
expect(prices.currencySign).toBe("$");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ import * as AutoPilotUtils from "../../../Utils/AutoPilotUtils";
|
|||||||
import { AutopilotDocumentation, hoursInAMonth } from "../../../Shared/Constants";
|
import { AutopilotDocumentation, hoursInAMonth } from "../../../Shared/Constants";
|
||||||
import { Urls, StyleConstants } from "../../../Common/Constants";
|
import { Urls, StyleConstants } from "../../../Common/Constants";
|
||||||
import {
|
import {
|
||||||
computeAutoscaleUsagePriceHourly,
|
|
||||||
getPriceCurrency,
|
getPriceCurrency,
|
||||||
getCurrencySign,
|
getCurrencySign,
|
||||||
getAutoscalePricePerRu,
|
getAutoscalePricePerRu,
|
||||||
getMultimasterMultiplier,
|
getMultimasterMultiplier,
|
||||||
computeRUUsagePriceHourly,
|
computeRUUsagePriceHourly,
|
||||||
getPricePerRu,
|
getPricePerRu,
|
||||||
calculateEstimateNumber
|
estimatedCostDisclaimer
|
||||||
} from "../../../Utils/PricingUtils";
|
} from "../../../Utils/PricingUtils";
|
||||||
import {
|
import {
|
||||||
ITextFieldStyles,
|
ITextFieldStyles,
|
||||||
@@ -32,10 +31,41 @@ import {
|
|||||||
MessageBarType,
|
MessageBarType,
|
||||||
Stack,
|
Stack,
|
||||||
Spinner,
|
Spinner,
|
||||||
SpinnerSize
|
SpinnerSize,
|
||||||
|
DetailsList,
|
||||||
|
IColumn,
|
||||||
|
SelectionMode,
|
||||||
|
DetailsListLayoutMode,
|
||||||
|
IDetailsRowProps,
|
||||||
|
DetailsRow,
|
||||||
|
IDetailsColumnStyles
|
||||||
} from "office-ui-fabric-react";
|
} from "office-ui-fabric-react";
|
||||||
import { isDirtyTypes, isDirty } from "./SettingsUtils";
|
import { isDirtyTypes, isDirty } from "./SettingsUtils";
|
||||||
|
|
||||||
|
export interface EstimatedSpendingDisplayProps {
|
||||||
|
costType: JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ManualEstimatedSpendingDisplayProps extends EstimatedSpendingDisplayProps {
|
||||||
|
hourly: JSX.Element;
|
||||||
|
daily: JSX.Element;
|
||||||
|
monthly: JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AutoscaleEstimatedSpendingDisplayProps extends EstimatedSpendingDisplayProps {
|
||||||
|
minPerMonth: JSX.Element;
|
||||||
|
maxPerMonth: JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PriceBreakdown {
|
||||||
|
hourlyPrice: number;
|
||||||
|
dailyPrice: number;
|
||||||
|
monthlyPrice: number;
|
||||||
|
pricePerRu: number;
|
||||||
|
currency: string;
|
||||||
|
currencySign: string;
|
||||||
|
}
|
||||||
|
|
||||||
export const infoAndToolTipTextStyle: ITextStyles = { root: { fontSize: 12 } };
|
export const infoAndToolTipTextStyle: ITextStyles = { root: { fontSize: 12 } };
|
||||||
|
|
||||||
export const noLeftPaddingCheckBoxStyle: ICheckboxStyles = {
|
export const noLeftPaddingCheckBoxStyle: ICheckboxStyles = {
|
||||||
@@ -104,6 +134,16 @@ export const transparentDetailsRowStyles: Partial<IDetailsRowStyles> = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const transparentDetailsHeaderStyle: Partial<IDetailsColumnStyles> = {
|
||||||
|
root: {
|
||||||
|
selectors: {
|
||||||
|
":hover": {
|
||||||
|
background: "transparent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const customDetailsListStyles: Partial<IDetailsListStyles> = {
|
export const customDetailsListStyles: Partial<IDetailsListStyles> = {
|
||||||
root: {
|
root: {
|
||||||
selectors: {
|
selectors: {
|
||||||
@@ -130,6 +170,10 @@ export const messageBarStyles: Partial<IMessageBarStyles> = { root: { marginTop:
|
|||||||
|
|
||||||
export const throughputUnit = "RU/s";
|
export const throughputUnit = "RU/s";
|
||||||
|
|
||||||
|
export function onRenderRow(props: IDetailsRowProps): JSX.Element {
|
||||||
|
return <DetailsRow {...props} styles={transparentDetailsRowStyles} />;
|
||||||
|
}
|
||||||
|
|
||||||
export const getAutoPilotV3SpendElement = (
|
export const getAutoPilotV3SpendElement = (
|
||||||
maxAutoPilotThroughputSet: number,
|
maxAutoPilotThroughputSet: number,
|
||||||
isDatabaseThroughput: boolean,
|
isDatabaseThroughput: boolean,
|
||||||
@@ -165,63 +209,61 @@ export const getAutoPilotV3SpendElement = (
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getEstimatedAutoscaleSpendElement = (
|
export const getRuPriceBreakdown = (
|
||||||
throughput: number,
|
throughput: number,
|
||||||
serverId: string,
|
serverId: string,
|
||||||
regions: number,
|
numberOfRegions: number,
|
||||||
multimaster: boolean
|
isMultimaster: boolean,
|
||||||
): JSX.Element => {
|
isAutoscale: boolean
|
||||||
const hourlyPrice: number = computeAutoscaleUsagePriceHourly(serverId, throughput, regions, multimaster);
|
): PriceBreakdown => {
|
||||||
const monthlyPrice: number = hourlyPrice * hoursInAMonth;
|
const hourlyPrice: number = computeRUUsagePriceHourly({
|
||||||
const currency: string = getPriceCurrency(serverId);
|
serverId: serverId,
|
||||||
const currencySign: string = getCurrencySign(serverId);
|
requestUnits: throughput,
|
||||||
const pricePerRu =
|
numberOfRegions: numberOfRegions,
|
||||||
getAutoscalePricePerRu(serverId, getMultimasterMultiplier(regions, multimaster)) *
|
multimasterEnabled: isMultimaster,
|
||||||
getMultimasterMultiplier(regions, multimaster);
|
isAutoscale: isAutoscale
|
||||||
|
});
|
||||||
return (
|
const basePricePerRu: number = isAutoscale
|
||||||
<Text id="autoscaleSpendElement">
|
? getAutoscalePricePerRu(serverId, getMultimasterMultiplier(numberOfRegions, isMultimaster))
|
||||||
Estimated monthly cost ({currency}) is{" "}
|
: getPricePerRu(serverId);
|
||||||
<b>
|
return {
|
||||||
{currencySign}
|
hourlyPrice: hourlyPrice,
|
||||||
{calculateEstimateNumber(monthlyPrice / 10)}
|
dailyPrice: hourlyPrice * 24,
|
||||||
{` - `}
|
monthlyPrice: hourlyPrice * hoursInAMonth,
|
||||||
{currencySign}
|
pricePerRu: basePricePerRu * getMultimasterMultiplier(numberOfRegions, isMultimaster),
|
||||||
{calculateEstimateNumber(monthlyPrice)}{" "}
|
currency: getPriceCurrency(serverId),
|
||||||
</b>
|
currencySign: getCurrencySign(serverId)
|
||||||
({"regions: "} {regions}, {throughput / 10} - {throughput} RU/s, {currencySign}
|
};
|
||||||
{pricePerRu}/RU)
|
|
||||||
</Text>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getEstimatedSpendElement = (
|
export const getEstimatedSpendingElement = (
|
||||||
|
estimatedSpendingColumns: IColumn[],
|
||||||
|
estimatedSpendingItems: EstimatedSpendingDisplayProps[],
|
||||||
throughput: number,
|
throughput: number,
|
||||||
serverId: string,
|
numberOfRegions: number,
|
||||||
regions: number,
|
priceBreakdown: PriceBreakdown,
|
||||||
multimaster: boolean
|
isAutoscale: boolean
|
||||||
): JSX.Element => {
|
): JSX.Element => {
|
||||||
const hourlyPrice: number = computeRUUsagePriceHourly(serverId, throughput, regions, multimaster);
|
const ruRange: string = isAutoscale ? throughput / 10 + " RU/s - " : "";
|
||||||
const dailyPrice: number = hourlyPrice * 24;
|
|
||||||
const monthlyPrice: number = hourlyPrice * hoursInAMonth;
|
|
||||||
const currency: string = getPriceCurrency(serverId);
|
|
||||||
const currencySign: string = getCurrencySign(serverId);
|
|
||||||
const pricePerRu = getPricePerRu(serverId) * getMultimasterMultiplier(regions, multimaster);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text id="throughputSpendElement">
|
<Stack {...addMongoIndexStackProps} styles={mediumWidthStackStyles}>
|
||||||
Estimated cost ({currency}):{" "}
|
<DetailsList
|
||||||
<b>
|
disableSelectionZone
|
||||||
{currencySign}
|
items={estimatedSpendingItems}
|
||||||
{calculateEstimateNumber(hourlyPrice)} hourly {` / `}
|
columns={estimatedSpendingColumns}
|
||||||
{currencySign}
|
selectionMode={SelectionMode.none}
|
||||||
{calculateEstimateNumber(dailyPrice)} daily {` / `}
|
layoutMode={DetailsListLayoutMode.justified}
|
||||||
{currencySign}
|
onRenderRow={onRenderRow}
|
||||||
{calculateEstimateNumber(monthlyPrice)} monthly{" "}
|
/>
|
||||||
</b>
|
<Text id="throughputSpendElement">
|
||||||
({"regions: "} {regions}, {throughput}RU/s, {currencySign}
|
({"regions: "} {numberOfRegions}, {ruRange}
|
||||||
{pricePerRu}/RU)
|
{throughput} RU/s, {priceBreakdown.currencySign}
|
||||||
</Text>
|
{priceBreakdown.pricePerRu}/RU)
|
||||||
|
</Text>
|
||||||
|
<Text>
|
||||||
|
<em>{estimatedCostDisclaimer}</em>
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -265,6 +307,13 @@ export const updateThroughputDelayedApplyWarningMessage: JSX.Element = (
|
|||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const saveThroughputWarningMessage: JSX.Element = (
|
||||||
|
<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>
|
||||||
|
);
|
||||||
|
|
||||||
const getCurrentThroughput = (
|
const getCurrentThroughput = (
|
||||||
isAutoscale: boolean,
|
isAutoscale: boolean,
|
||||||
throughput: number,
|
throughput: number,
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
Text,
|
Text,
|
||||||
SelectionMode,
|
SelectionMode,
|
||||||
IDetailsRowProps,
|
|
||||||
DetailsRow,
|
|
||||||
IColumn,
|
IColumn,
|
||||||
MessageBar,
|
MessageBar,
|
||||||
MessageBarType,
|
MessageBarType,
|
||||||
@@ -21,11 +19,11 @@ import {
|
|||||||
mongoIndexingPolicyDisclaimer,
|
mongoIndexingPolicyDisclaimer,
|
||||||
mediumWidthStackStyles,
|
mediumWidthStackStyles,
|
||||||
subComponentStackProps,
|
subComponentStackProps,
|
||||||
transparentDetailsRowStyles,
|
|
||||||
createAndAddMongoIndexStackProps,
|
createAndAddMongoIndexStackProps,
|
||||||
separatorStyles,
|
separatorStyles,
|
||||||
indexingPolicynUnsavedWarningMessage,
|
indexingPolicynUnsavedWarningMessage,
|
||||||
infoAndToolTipTextStyle
|
infoAndToolTipTextStyle,
|
||||||
|
onRenderRow
|
||||||
} from "../../SettingsRenderUtils";
|
} from "../../SettingsRenderUtils";
|
||||||
import { MongoIndex } from "../../../../../Utils/arm/generatedClients/2020-04-01/types";
|
import { MongoIndex } from "../../../../../Utils/arm/generatedClients/2020-04-01/types";
|
||||||
import {
|
import {
|
||||||
@@ -140,10 +138,6 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
|||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
private onRenderRow = (props: IDetailsRowProps): JSX.Element => {
|
|
||||||
return <DetailsRow {...props} styles={transparentDetailsRowStyles} />;
|
|
||||||
};
|
|
||||||
|
|
||||||
private getActionButton = (arrayPosition: number, isCurrentIndex: boolean): JSX.Element => {
|
private getActionButton = (arrayPosition: number, isCurrentIndex: boolean): JSX.Element => {
|
||||||
return isCurrentIndex ? (
|
return isCurrentIndex ? (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -253,7 +247,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
|||||||
items={initialIndexes}
|
items={initialIndexes}
|
||||||
columns={this.initialIndexesColumns}
|
columns={this.initialIndexesColumns}
|
||||||
selectionMode={SelectionMode.none}
|
selectionMode={SelectionMode.none}
|
||||||
onRenderRow={this.onRenderRow}
|
onRenderRow={onRenderRow}
|
||||||
layoutMode={DetailsListLayoutMode.justified}
|
layoutMode={DetailsListLayoutMode.justified}
|
||||||
/>
|
/>
|
||||||
{this.renderIndexesToBeAdded()}
|
{this.renderIndexesToBeAdded()}
|
||||||
@@ -279,7 +273,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
|||||||
items={indexesToBeDropped}
|
items={indexesToBeDropped}
|
||||||
columns={this.indexesToBeDroppedColumns}
|
columns={this.indexesToBeDroppedColumns}
|
||||||
selectionMode={SelectionMode.none}
|
selectionMode={SelectionMode.none}
|
||||||
onRenderRow={this.onRenderRow}
|
onRenderRow={onRenderRow}
|
||||||
layoutMode={DetailsListLayoutMode.justified}
|
layoutMode={DetailsListLayoutMode.justified}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ describe("ThroughputInputAutoPilotV3Component", () => {
|
|||||||
expect(wrapper.exists("#throughputInput")).toEqual(true);
|
expect(wrapper.exists("#throughputInput")).toEqual(true);
|
||||||
expect(wrapper.exists("#autopilotInput")).toEqual(false);
|
expect(wrapper.exists("#autopilotInput")).toEqual(false);
|
||||||
expect(wrapper.exists("#throughputSpendElement")).toEqual(true);
|
expect(wrapper.exists("#throughputSpendElement")).toEqual(true);
|
||||||
expect(wrapper.exists("#autoscaleSpendElement")).toEqual(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("autopilot input visible", () => {
|
it("autopilot input visible", () => {
|
||||||
@@ -72,8 +71,7 @@ describe("ThroughputInputAutoPilotV3Component", () => {
|
|||||||
|
|
||||||
wrapper.setProps({ wasAutopilotOriginallySet: true });
|
wrapper.setProps({ wasAutopilotOriginallySet: true });
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.exists("#autoscaleSpendElement")).toEqual(true);
|
expect(wrapper.exists("#throughputSpendElement")).toEqual(true);
|
||||||
expect(wrapper.exists("#throughputSpendElement")).toEqual(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("spendAck checkbox visible", () => {
|
it("spendAck checkbox visible", () => {
|
||||||
|
|||||||
@@ -8,10 +8,15 @@ import {
|
|||||||
checkBoxAndInputStackProps,
|
checkBoxAndInputStackProps,
|
||||||
getChoiceGroupStyles,
|
getChoiceGroupStyles,
|
||||||
messageBarStyles,
|
messageBarStyles,
|
||||||
getEstimatedSpendElement,
|
getEstimatedSpendingElement,
|
||||||
getEstimatedAutoscaleSpendElement,
|
|
||||||
getAutoPilotV3SpendElement,
|
getAutoPilotV3SpendElement,
|
||||||
manualToAutoscaleDisclaimerElement
|
manualToAutoscaleDisclaimerElement,
|
||||||
|
saveThroughputWarningMessage,
|
||||||
|
ManualEstimatedSpendingDisplayProps,
|
||||||
|
AutoscaleEstimatedSpendingDisplayProps,
|
||||||
|
PriceBreakdown,
|
||||||
|
getRuPriceBreakdown,
|
||||||
|
transparentDetailsHeaderStyle
|
||||||
} from "../../SettingsRenderUtils";
|
} from "../../SettingsRenderUtils";
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
@@ -23,7 +28,9 @@ import {
|
|||||||
Label,
|
Label,
|
||||||
Link,
|
Link,
|
||||||
MessageBar,
|
MessageBar,
|
||||||
MessageBarType
|
MessageBarType,
|
||||||
|
FontIcon,
|
||||||
|
IColumn
|
||||||
} from "office-ui-fabric-react";
|
} from "office-ui-fabric-react";
|
||||||
import { ToolTipLabelComponent } from "../ToolTipLabelComponent";
|
import { ToolTipLabelComponent } from "../ToolTipLabelComponent";
|
||||||
import { getSanitizedInputValue, IsComponentDirtyResult, isDirty } from "../../SettingsUtils";
|
import { getSanitizedInputValue, IsComponentDirtyResult, isDirty } from "../../SettingsUtils";
|
||||||
@@ -32,7 +39,7 @@ import * as DataModels from "../../../../../Contracts/DataModels";
|
|||||||
import { Int32 } from "../../../../Panes/Tables/Validators/EntityPropertyValidationCommon";
|
import { Int32 } from "../../../../Panes/Tables/Validators/EntityPropertyValidationCommon";
|
||||||
import { userContext } from "../../../../../UserContext";
|
import { userContext } from "../../../../../UserContext";
|
||||||
import { SubscriptionType } from "../../../../../Contracts/SubscriptionType";
|
import { SubscriptionType } from "../../../../../Contracts/SubscriptionType";
|
||||||
import { usageInGB } from "../../../../../Utils/PricingUtils";
|
import { usageInGB, calculateEstimateNumber } from "../../../../../Utils/PricingUtils";
|
||||||
import { Features } from "../../../../../Common/Constants";
|
import { Features } from "../../../../../Common/Constants";
|
||||||
|
|
||||||
export interface ThroughputInputAutoPilotV3Props {
|
export interface ThroughputInputAutoPilotV3Props {
|
||||||
@@ -165,33 +172,243 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
|||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isDirty: boolean = this.IsComponentDirty().isDiscardable;
|
||||||
const serverId: string = this.props.serverId;
|
const serverId: string = this.props.serverId;
|
||||||
const offerThroughput: number = this.props.throughput;
|
|
||||||
|
|
||||||
const regions = account?.properties?.readLocations?.length || 1;
|
const regions = account?.properties?.readLocations?.length || 1;
|
||||||
const multimaster = account?.properties?.enableMultipleWriteLocations || false;
|
const multimaster = account?.properties?.enableMultipleWriteLocations || false;
|
||||||
|
|
||||||
let estimatedSpend: JSX.Element;
|
let estimatedSpend: JSX.Element;
|
||||||
|
|
||||||
if (!this.props.isAutoPilotSelected) {
|
if (!this.props.isAutoPilotSelected) {
|
||||||
estimatedSpend = getEstimatedSpendElement(
|
estimatedSpend = this.getEstimatedManualSpendElement(
|
||||||
// if migrating from autoscale to manual, we use the autoscale RUs value as that is what will be set...
|
// if migrating from autoscale to manual, we use the autoscale RUs value as that is what will be set...
|
||||||
this.overrideWithAutoPilotSettings() ? this.props.maxAutoPilotThroughput : offerThroughput,
|
this.overrideWithAutoPilotSettings() ? this.props.maxAutoPilotThroughput : this.props.throughputBaseline,
|
||||||
serverId,
|
serverId,
|
||||||
regions,
|
regions,
|
||||||
multimaster
|
multimaster,
|
||||||
|
isDirty ? this.props.throughput : undefined
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
estimatedSpend = getEstimatedAutoscaleSpendElement(
|
estimatedSpend = this.getEstimatedAutoscaleSpendElement(
|
||||||
this.props.maxAutoPilotThroughput,
|
this.props.maxAutoPilotThroughputBaseline,
|
||||||
serverId,
|
serverId,
|
||||||
regions,
|
regions,
|
||||||
multimaster
|
multimaster,
|
||||||
|
isDirty ? this.props.maxAutoPilotThroughput : undefined
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return estimatedSpend;
|
return estimatedSpend;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private getEstimatedAutoscaleSpendElement = (
|
||||||
|
throughput: number,
|
||||||
|
serverId: string,
|
||||||
|
numberOfRegions: number,
|
||||||
|
isMultimaster: boolean,
|
||||||
|
newThroughput?: number
|
||||||
|
): JSX.Element => {
|
||||||
|
const prices: PriceBreakdown = getRuPriceBreakdown(throughput, serverId, numberOfRegions, isMultimaster, true);
|
||||||
|
const estimatedSpendingColumns: IColumn[] = [
|
||||||
|
{
|
||||||
|
key: "costType",
|
||||||
|
name: "",
|
||||||
|
fieldName: "costType",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "minPerMonth",
|
||||||
|
name: "Min Per Month",
|
||||||
|
fieldName: "minPerMonth",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "maxPerMonth",
|
||||||
|
name: "Max Per Month",
|
||||||
|
fieldName: "maxPerMonth",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const estimatedSpendingItems: AutoscaleEstimatedSpendingDisplayProps[] = [
|
||||||
|
{
|
||||||
|
costType: <Text>Current Cost</Text>,
|
||||||
|
minPerMonth: (
|
||||||
|
<Text>
|
||||||
|
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice / 10)}
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
maxPerMonth: (
|
||||||
|
<Text>
|
||||||
|
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice)}
|
||||||
|
</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
if (newThroughput) {
|
||||||
|
const newPrices: PriceBreakdown = getRuPriceBreakdown(
|
||||||
|
newThroughput,
|
||||||
|
serverId,
|
||||||
|
numberOfRegions,
|
||||||
|
isMultimaster,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
estimatedSpendingItems.unshift({
|
||||||
|
costType: (
|
||||||
|
<Text>
|
||||||
|
<b>Updated Cost</b>
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
minPerMonth: (
|
||||||
|
<Text>
|
||||||
|
<b>
|
||||||
|
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice / 10)}
|
||||||
|
</b>
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
maxPerMonth: (
|
||||||
|
<Text>
|
||||||
|
<b>
|
||||||
|
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice)}
|
||||||
|
</b>
|
||||||
|
</Text>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return getEstimatedSpendingElement(
|
||||||
|
estimatedSpendingColumns,
|
||||||
|
estimatedSpendingItems,
|
||||||
|
newThroughput ?? throughput,
|
||||||
|
numberOfRegions,
|
||||||
|
prices,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
private getEstimatedManualSpendElement = (
|
||||||
|
throughput: number,
|
||||||
|
serverId: string,
|
||||||
|
numberOfRegions: number,
|
||||||
|
isMultimaster: boolean,
|
||||||
|
newThroughput?: number
|
||||||
|
): JSX.Element => {
|
||||||
|
const prices: PriceBreakdown = getRuPriceBreakdown(throughput, serverId, numberOfRegions, isMultimaster, false);
|
||||||
|
const estimatedSpendingColumns: IColumn[] = [
|
||||||
|
{
|
||||||
|
key: "costType",
|
||||||
|
name: "",
|
||||||
|
fieldName: "costType",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "hourly",
|
||||||
|
name: "Hourly",
|
||||||
|
fieldName: "hourly",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "daily",
|
||||||
|
name: "Daily",
|
||||||
|
fieldName: "daily",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "monthly",
|
||||||
|
name: "Monthly",
|
||||||
|
fieldName: "monthly",
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
isResizable: true,
|
||||||
|
styles: transparentDetailsHeaderStyle
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const estimatedSpendingItems: ManualEstimatedSpendingDisplayProps[] = [
|
||||||
|
{
|
||||||
|
costType: <Text>Current Cost</Text>,
|
||||||
|
hourly: (
|
||||||
|
<Text>
|
||||||
|
{prices.currencySign} {calculateEstimateNumber(prices.hourlyPrice)}
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
daily: (
|
||||||
|
<Text>
|
||||||
|
{prices.currencySign} {calculateEstimateNumber(prices.dailyPrice)}
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
monthly: (
|
||||||
|
<Text>
|
||||||
|
{prices.currencySign} {calculateEstimateNumber(prices.monthlyPrice)}
|
||||||
|
</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
if (newThroughput) {
|
||||||
|
const newPrices: PriceBreakdown = getRuPriceBreakdown(
|
||||||
|
newThroughput,
|
||||||
|
serverId,
|
||||||
|
numberOfRegions,
|
||||||
|
isMultimaster,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
estimatedSpendingItems.unshift({
|
||||||
|
costType: (
|
||||||
|
<Text>
|
||||||
|
<b>Updated Cost</b>
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
hourly: (
|
||||||
|
<Text>
|
||||||
|
<b>
|
||||||
|
{newPrices.currencySign} {calculateEstimateNumber(newPrices.hourlyPrice)}
|
||||||
|
</b>
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
daily: (
|
||||||
|
<Text>
|
||||||
|
<b>
|
||||||
|
{newPrices.currencySign} {calculateEstimateNumber(newPrices.dailyPrice)}
|
||||||
|
</b>
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
monthly: (
|
||||||
|
<Text>
|
||||||
|
<b>
|
||||||
|
{newPrices.currencySign} {calculateEstimateNumber(newPrices.monthlyPrice)}
|
||||||
|
</b>
|
||||||
|
</Text>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return getEstimatedSpendingElement(
|
||||||
|
estimatedSpendingColumns,
|
||||||
|
estimatedSpendingItems,
|
||||||
|
newThroughput ?? throughput,
|
||||||
|
numberOfRegions,
|
||||||
|
prices,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
private getAutoPilotUsageCost = (): JSX.Element => {
|
private getAutoPilotUsageCost = (): JSX.Element => {
|
||||||
if (!this.props.maxAutoPilotThroughput) {
|
if (!this.props.maxAutoPilotThroughput) {
|
||||||
return <></>;
|
return <></>;
|
||||||
@@ -318,6 +535,12 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
|||||||
|
|
||||||
private renderThroughputInput = (): JSX.Element => (
|
private renderThroughputInput = (): JSX.Element => (
|
||||||
<Stack {...titleAndInputStackProps}>
|
<Stack {...titleAndInputStackProps}>
|
||||||
|
<Text>
|
||||||
|
Estimate your required throughput with
|
||||||
|
<Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/">
|
||||||
|
{` capacity calculator`} <FontIcon iconName="NavigateExternalInline" />
|
||||||
|
</Link>
|
||||||
|
</Text>
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
type="number"
|
type="number"
|
||||||
@@ -349,13 +572,24 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
|||||||
onChange={this.onSpendAckChecked}
|
onChange={this.onSpendAckChecked}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
<br />
|
||||||
{this.props.isFixed && <p>When using a collection with fixed storage capacity, you can set up to 10,000 RU/s.</p>}
|
{this.props.isFixed && <p>When using a collection with fixed storage capacity, you can set up to 10,000 RU/s.</p>}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private renderWarningMessage = (): JSX.Element => {
|
||||||
|
let warningMessage: JSX.Element;
|
||||||
|
if (this.IsComponentDirty().isDiscardable) {
|
||||||
|
warningMessage = saveThroughputWarningMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <>{warningMessage && <MessageBar messageBarType={MessageBarType.warning}>{warningMessage}</MessageBar>}</>;
|
||||||
|
};
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<Stack {...checkBoxAndInputStackProps}>
|
<Stack {...checkBoxAndInputStackProps}>
|
||||||
|
{this.renderWarningMessage()}
|
||||||
{this.renderThroughputModeChoices()}
|
{this.renderThroughputModeChoices()}
|
||||||
|
|
||||||
{this.props.isAutoPilotSelected ? this.renderAutoPilotInput() : this.renderThroughputInput()}
|
{this.props.isAutoPilotSelected ? this.renderAutoPilotInput() : this.renderThroughputInput()}
|
||||||
|
|||||||
@@ -8,6 +8,21 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<StyledMessageBarBase
|
||||||
|
messageBarType={5}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
styles={
|
||||||
|
Object {
|
||||||
|
"root": Object {
|
||||||
|
"fontSize": 12,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Your bill will be affected as you update your throughput settings. Please review the updated cost estimate below before saving your changes
|
||||||
|
</Text>
|
||||||
|
</StyledMessageBarBase>
|
||||||
<Stack>
|
<Stack>
|
||||||
<StyledLabelBase
|
<StyledLabelBase
|
||||||
id="settingsV2RadioButtonLabelId"
|
id="settingsV2RadioButtonLabelId"
|
||||||
@@ -214,6 +229,19 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<Text>
|
||||||
|
Estimate your required throughput with
|
||||||
|
<StyledLinkBase
|
||||||
|
href="https://cosmos.azure.com/capacitycalculator/"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
capacity calculator
|
||||||
|
|
||||||
|
<Component
|
||||||
|
iconName="NavigateExternalInline"
|
||||||
|
/>
|
||||||
|
</StyledLinkBase>
|
||||||
|
</Text>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="throughputInput"
|
id="throughputInput"
|
||||||
@@ -239,38 +267,142 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
|||||||
type="number"
|
type="number"
|
||||||
value="100"
|
value="100"
|
||||||
/>
|
/>
|
||||||
<Text
|
<Stack
|
||||||
id="throughputSpendElement"
|
styles={
|
||||||
|
Object {
|
||||||
|
"root": Object {
|
||||||
|
"width": 600,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tokens={
|
||||||
|
Object {
|
||||||
|
"childrenGap": 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Estimated cost (
|
<StyledWithViewportComponent
|
||||||
USD
|
columns={
|
||||||
):
|
Array [
|
||||||
|
Object {
|
||||||
<b>
|
"fieldName": "costType",
|
||||||
$
|
"isResizable": true,
|
||||||
0.0080
|
"key": "costType",
|
||||||
hourly
|
"maxWidth": 200,
|
||||||
/
|
"minWidth": 100,
|
||||||
$
|
"name": "",
|
||||||
0.19
|
"styles": Object {
|
||||||
daily
|
"root": Object {
|
||||||
/
|
"selectors": Object {
|
||||||
$
|
":hover": Object {
|
||||||
5.84
|
"background": "transparent",
|
||||||
monthly
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "hourly",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "hourly",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Hourly",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "daily",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "daily",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Daily",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "monthly",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "monthly",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Monthly",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
disableSelectionZone={true}
|
||||||
|
items={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"costType": <Text>
|
||||||
|
Current Cost
|
||||||
|
</Text>,
|
||||||
|
"daily": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
0.19
|
||||||
|
</Text>,
|
||||||
|
"hourly": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
0.0080
|
||||||
|
</Text>,
|
||||||
|
"monthly": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
5.84
|
||||||
|
</Text>,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
layoutMode={1}
|
||||||
|
onRenderRow={[Function]}
|
||||||
|
selectionMode={0}
|
||||||
|
/>
|
||||||
|
<Text
|
||||||
|
id="throughputSpendElement"
|
||||||
|
>
|
||||||
|
(
|
||||||
|
regions:
|
||||||
|
|
||||||
</b>
|
1
|
||||||
(
|
,
|
||||||
regions:
|
100
|
||||||
|
RU/s,
|
||||||
1
|
$
|
||||||
,
|
0.00008
|
||||||
100
|
/RU)
|
||||||
RU/s,
|
</Text>
|
||||||
$
|
<Text>
|
||||||
0.00008
|
<em>
|
||||||
/RU)
|
*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account
|
||||||
</Text>
|
</em>
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
<StyledCheckboxBase
|
<StyledCheckboxBase
|
||||||
checked={false}
|
checked={false}
|
||||||
id="spendAckCheckBox"
|
id="spendAckCheckBox"
|
||||||
@@ -288,6 +420,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<br />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
`;
|
`;
|
||||||
@@ -369,6 +502,19 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<Text>
|
||||||
|
Estimate your required throughput with
|
||||||
|
<StyledLinkBase
|
||||||
|
href="https://cosmos.azure.com/capacitycalculator/"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
capacity calculator
|
||||||
|
|
||||||
|
<Component
|
||||||
|
iconName="NavigateExternalInline"
|
||||||
|
/>
|
||||||
|
</StyledLinkBase>
|
||||||
|
</Text>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="throughputInput"
|
id="throughputInput"
|
||||||
@@ -394,38 +540,143 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
|||||||
type="number"
|
type="number"
|
||||||
value="100"
|
value="100"
|
||||||
/>
|
/>
|
||||||
<Text
|
<Stack
|
||||||
id="throughputSpendElement"
|
styles={
|
||||||
|
Object {
|
||||||
|
"root": Object {
|
||||||
|
"width": 600,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tokens={
|
||||||
|
Object {
|
||||||
|
"childrenGap": 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Estimated cost (
|
<StyledWithViewportComponent
|
||||||
USD
|
columns={
|
||||||
):
|
Array [
|
||||||
|
Object {
|
||||||
<b>
|
"fieldName": "costType",
|
||||||
$
|
"isResizable": true,
|
||||||
0.0080
|
"key": "costType",
|
||||||
hourly
|
"maxWidth": 200,
|
||||||
/
|
"minWidth": 100,
|
||||||
$
|
"name": "",
|
||||||
0.19
|
"styles": Object {
|
||||||
daily
|
"root": Object {
|
||||||
/
|
"selectors": Object {
|
||||||
$
|
":hover": Object {
|
||||||
5.84
|
"background": "transparent",
|
||||||
monthly
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "hourly",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "hourly",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Hourly",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "daily",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "daily",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Daily",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "monthly",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "monthly",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Monthly",
|
||||||
|
"styles": Object {
|
||||||
|
"root": Object {
|
||||||
|
"selectors": Object {
|
||||||
|
":hover": Object {
|
||||||
|
"background": "transparent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
disableSelectionZone={true}
|
||||||
|
items={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"costType": <Text>
|
||||||
|
Current Cost
|
||||||
|
</Text>,
|
||||||
|
"daily": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
0.19
|
||||||
|
</Text>,
|
||||||
|
"hourly": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
0.0080
|
||||||
|
</Text>,
|
||||||
|
"monthly": <Text>
|
||||||
|
$
|
||||||
|
|
||||||
|
5.84
|
||||||
|
</Text>,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
layoutMode={1}
|
||||||
|
onRenderRow={[Function]}
|
||||||
|
selectionMode={0}
|
||||||
|
/>
|
||||||
|
<Text
|
||||||
|
id="throughputSpendElement"
|
||||||
|
>
|
||||||
|
(
|
||||||
|
regions:
|
||||||
|
|
||||||
</b>
|
1
|
||||||
(
|
,
|
||||||
regions:
|
100
|
||||||
|
RU/s,
|
||||||
1
|
$
|
||||||
,
|
0.00008
|
||||||
100
|
/RU)
|
||||||
RU/s,
|
</Text>
|
||||||
$
|
<Text>
|
||||||
0.00008
|
<em>
|
||||||
/RU)
|
*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account
|
||||||
</Text>
|
</em>
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
<br />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -60,66 +60,100 @@ exports[`SettingsUtils functions render 1`] = `
|
|||||||
</StyledLinkBase>
|
</StyledLinkBase>
|
||||||
.
|
.
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Stack
|
||||||
id="throughputSpendElement"
|
styles={
|
||||||
|
Object {
|
||||||
|
"root": Object {
|
||||||
|
"width": 600,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tokens={
|
||||||
|
Object {
|
||||||
|
"childrenGap": 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Estimated cost (
|
<StyledWithViewportComponent
|
||||||
RMB
|
columns={
|
||||||
):
|
Array [
|
||||||
|
Object {
|
||||||
<b>
|
"fieldName": "costType",
|
||||||
¥
|
"isResizable": true,
|
||||||
1.02
|
"key": "costType",
|
||||||
hourly
|
"maxWidth": 200,
|
||||||
/
|
"minWidth": 100,
|
||||||
¥
|
"name": "",
|
||||||
24.48
|
},
|
||||||
daily
|
Object {
|
||||||
/
|
"fieldName": "hourly",
|
||||||
¥
|
"isResizable": true,
|
||||||
744.60
|
"key": "hourly",
|
||||||
monthly
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Hourly",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "daily",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "daily",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Daily",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"fieldName": "monthly",
|
||||||
|
"isResizable": true,
|
||||||
|
"key": "monthly",
|
||||||
|
"maxWidth": 200,
|
||||||
|
"minWidth": 100,
|
||||||
|
"name": "Monthly",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
disableSelectionZone={true}
|
||||||
|
items={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"costType": <Text>
|
||||||
|
Current Cost
|
||||||
|
</Text>,
|
||||||
|
"daily": <Text>
|
||||||
|
$ 24.48
|
||||||
|
</Text>,
|
||||||
|
"hourly": <Text>
|
||||||
|
$ 1.02
|
||||||
|
</Text>,
|
||||||
|
"monthly": <Text>
|
||||||
|
$ 744.6
|
||||||
|
</Text>,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
layoutMode={1}
|
||||||
|
onRenderRow={[Function]}
|
||||||
|
selectionMode={0}
|
||||||
|
/>
|
||||||
|
<Text
|
||||||
|
id="throughputSpendElement"
|
||||||
|
>
|
||||||
|
(
|
||||||
|
regions:
|
||||||
|
|
||||||
</b>
|
2
|
||||||
(
|
,
|
||||||
regions:
|
1000
|
||||||
|
RU/s,
|
||||||
2
|
|
||||||
,
|
|
||||||
1000
|
|
||||||
RU/s,
|
|
||||||
¥
|
|
||||||
0.00051
|
|
||||||
/RU)
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
id="autoscaleSpendElement"
|
|
||||||
>
|
|
||||||
Estimated monthly cost (
|
|
||||||
RMB
|
|
||||||
) is
|
|
||||||
|
|
||||||
<b>
|
|
||||||
¥
|
¥
|
||||||
111.69
|
0.00051
|
||||||
-
|
/RU)
|
||||||
¥
|
</Text>
|
||||||
1116.90
|
<Text>
|
||||||
|
<em>
|
||||||
</b>
|
*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account
|
||||||
(
|
</em>
|
||||||
regions:
|
</Text>
|
||||||
|
</Stack>
|
||||||
2
|
|
||||||
,
|
|
||||||
100
|
|
||||||
-
|
|
||||||
1000
|
|
||||||
RU/s,
|
|
||||||
¥
|
|
||||||
0.000765
|
|
||||||
/RU)
|
|
||||||
</Text>
|
|
||||||
<Text
|
<Text
|
||||||
id="manualToAutoscaleDisclaimerElement"
|
id="manualToAutoscaleDisclaimerElement"
|
||||||
styles={
|
styles={
|
||||||
|
|||||||
@@ -267,6 +267,12 @@ export class ThroughputInputViewModel extends WaitsForTemplateViewModel {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public onThroughputCheck = (event: any) => {
|
||||||
|
if (event.value() < 400) {
|
||||||
|
window.alert("The value should not small than 400");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private _getSanitizedValue(): number {
|
private _getSanitizedValue(): number {
|
||||||
let throughput = this.value();
|
let throughput = this.value();
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,9 @@
|
|||||||
'aria-label': ariaLabel,
|
'aria-label': ariaLabel,
|
||||||
disabled: overrideWithAutoPilotSettings(),
|
disabled: overrideWithAutoPilotSettings(),
|
||||||
required: isManualThroughputInputFieldRequired()
|
required: isManualThroughputInputFieldRequired()
|
||||||
|
},
|
||||||
|
event:{
|
||||||
|
change: onThroughputCheck
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<json-editor
|
<json-editor
|
||||||
params="{ content: queryResults, isReadOnly: true, ariaLabel: 'Query results' }"
|
params="{ content: queryResults, isReadOnly: true, ariaLabel: 'Query results' }"
|
||||||
data-bind="visible: queryResults().length > 0 && isResultToggled() && allResultsMetadata().length > 0 && !error()"
|
data-bind="visible: queryResults() && queryResults().length > 0 && isResultToggled() && allResultsMetadata().length > 0 && !error()"
|
||||||
>
|
>
|
||||||
</json-editor>
|
</json-editor>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
<notebook-viewer-tab params="{data: $data}"></notebook-viewer-tab>
|
<notebook-viewer-tab params="{data: $data}"></notebook-viewer-tab>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
|
|
||||||
<!-- ko if: $data.tabKind === 19 -->
|
<!-- ko if: $data.tabKind === 20 -->
|
||||||
<settings-tab-v2 params="{data: $data}"></settings-tab-v2>
|
<settings-tab-v2 params="{data: $data}"></settings-tab-v2>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ export default class Collection implements ViewModels.Collection {
|
|||||||
|
|
||||||
const tabTitle = !this.offer() ? "Settings" : "Scale & Settings";
|
const tabTitle = !this.offer() ? "Settings" : "Scale & Settings";
|
||||||
const pendingNotificationsPromise: Q.Promise<DataModels.Notification> = this._getPendingThroughputSplitNotification();
|
const pendingNotificationsPromise: Q.Promise<DataModels.Notification> = this._getPendingThroughputSplitNotification();
|
||||||
const matchingTabs = this.container.tabsManager.getTabs(ViewModels.CollectionTabKind.Settings, tab => {
|
const matchingTabs = this.container.tabsManager.getTabs(ViewModels.CollectionTabKind.SettingsV2, tab => {
|
||||||
return tab.collection && tab.collection.databaseId === this.databaseId && tab.collection.id() === this.id();
|
return tab.collection && tab.collection.databaseId === this.databaseId && tab.collection.id() === this.id();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ export class TabRouteHandler {
|
|||||||
): void {
|
): void {
|
||||||
this._initRouter();
|
this._initRouter();
|
||||||
const parseHash = (newHash: string, oldHash: string) => this._tabRouter.parse(newHash);
|
const parseHash = (newHash: string, oldHash: string) => this._tabRouter.parse(newHash);
|
||||||
const defaultRoutedCallback = (request: string, data: { route: any; params: string[]; isFirst: boolean }) => {
|
const defaultRoutedCallback = (request: string, data: { route: any; params: string[]; isFirst: boolean }) => {};
|
||||||
console.log(request);
|
|
||||||
};
|
|
||||||
this._tabRouter.routed.add(onMatch || defaultRoutedCallback);
|
this._tabRouter.routed.add(onMatch || defaultRoutedCallback);
|
||||||
hasher.initialized.add(parseHash);
|
hasher.initialized.add(parseHash);
|
||||||
hasher.changed.add(parseHash);
|
hasher.changed.add(parseHash);
|
||||||
|
|||||||
@@ -25,39 +25,151 @@ describe("PricingUtils Tests", () => {
|
|||||||
|
|
||||||
describe("computeRUUsagePriceHourly()", () => {
|
describe("computeRUUsagePriceHourly()", () => {
|
||||||
it("should return 0 for NaN regions default cloud", () => {
|
it("should return 0 for NaN regions default cloud", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, null, false);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: null,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
|
expect(value).toBe(0);
|
||||||
|
});
|
||||||
|
it("should return 0 for NaN regions default cloud, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: null,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
expect(value).toBe(0);
|
expect(value).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return 0 for -1 regions", () => {
|
it("should return 0 for -1 regions", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, -1, false);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: -1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
|
expect(value).toBe(0);
|
||||||
|
});
|
||||||
|
it("should return 0 for -1 regions, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: -1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
expect(value).toBe(0);
|
expect(value).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster disabled", () => {
|
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster disabled", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, 1, false);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
expect(value).toBe(0.00008);
|
expect(value).toBe(0.00008);
|
||||||
});
|
});
|
||||||
|
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster disabled, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
|
expect(value).toBe(0.00012);
|
||||||
|
});
|
||||||
|
|
||||||
it("should return 0.00051 for Mooncake cloud, 1RU, 1 region, multimaster disabled", () => {
|
it("should return 0.00051 for Mooncake cloud, 1RU, 1 region, multimaster disabled", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("mooncake", 1, 1, false);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "mooncake",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
expect(value).toBe(0.00051);
|
expect(value).toBe(0.00051);
|
||||||
});
|
});
|
||||||
|
it("should return 0.00051 for Mooncake cloud, 1RU, 1 region, multimaster disabled, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "mooncake",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
|
expect(value).toBe(0.00076);
|
||||||
|
});
|
||||||
|
|
||||||
it("should return 0.00016 for default cloud, 1RU, 2 regions, multimaster disabled", () => {
|
it("should return 0.00016 for default cloud, 1RU, 2 regions, multimaster disabled", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, 2, false);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 2,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
expect(value).toBe(0.00016);
|
expect(value).toBe(0.00016);
|
||||||
});
|
});
|
||||||
|
it("should return 0.00016 for default cloud, 1RU, 2 regions, multimaster disabled, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 2,
|
||||||
|
multimasterEnabled: false,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
|
expect(value).toBe(0.00024);
|
||||||
|
});
|
||||||
|
|
||||||
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster enabled", () => {
|
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster enabled", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, 1, true);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: true,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
expect(value).toBe(0.00008);
|
expect(value).toBe(0.00008);
|
||||||
});
|
});
|
||||||
|
it("should return 0.00008 for default cloud, 1RU, 1 region, multimaster enabled, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 1,
|
||||||
|
multimasterEnabled: true,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
|
expect(value).toBe(0.00012);
|
||||||
|
});
|
||||||
|
|
||||||
it("should return 0.00048 for default cloud, 1RU, 2 region, multimaster enabled", () => {
|
it("should return 0.00048 for default cloud, 1RU, 2 region, multimaster enabled", () => {
|
||||||
const value = PricingUtils.computeRUUsagePriceHourly("default", 1, 2, true);
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 2,
|
||||||
|
multimasterEnabled: true,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
expect(value).toBe(0.00048);
|
expect(value).toBe(0.00048);
|
||||||
});
|
});
|
||||||
|
it("should return 0.00048 for default cloud, 1RU, 2 region, multimaster enabled, autoscale", () => {
|
||||||
|
const value = PricingUtils.computeRUUsagePriceHourly({
|
||||||
|
serverId: "default",
|
||||||
|
requestUnits: 1,
|
||||||
|
numberOfRegions: 2,
|
||||||
|
multimasterEnabled: true,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
|
expect(value).toBe(0.00096);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("getPriceCurrency()", () => {
|
describe("getPriceCurrency()", () => {
|
||||||
|
|||||||
@@ -1,6 +1,17 @@
|
|||||||
import * as AutoPilotUtils from "../Utils/AutoPilotUtils";
|
import * as AutoPilotUtils from "../Utils/AutoPilotUtils";
|
||||||
import * as Constants from "../Shared/Constants";
|
import * as Constants from "../Shared/Constants";
|
||||||
|
|
||||||
|
interface ComputeRUUsagePriceHourlyArgs {
|
||||||
|
serverId: string;
|
||||||
|
requestUnits: number;
|
||||||
|
numberOfRegions: number;
|
||||||
|
multimasterEnabled: boolean;
|
||||||
|
isAutoscale: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const estimatedCostDisclaimer =
|
||||||
|
"*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Anything that is not a number should return 0
|
* Anything that is not a number should return 0
|
||||||
* Otherwise, return numberOfRegions
|
* Otherwise, return numberOfRegions
|
||||||
@@ -47,15 +58,16 @@ export function getMultimasterMultiplier(numberOfRegions: number, multimasterEna
|
|||||||
return multimasterMultiplier;
|
return multimasterMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function computeRUUsagePriceHourly(
|
export function computeRUUsagePriceHourly({
|
||||||
serverId: string,
|
serverId,
|
||||||
requestUnits: number,
|
requestUnits,
|
||||||
numberOfRegions: number,
|
numberOfRegions,
|
||||||
multimasterEnabled: boolean
|
multimasterEnabled,
|
||||||
): number {
|
isAutoscale
|
||||||
|
}: ComputeRUUsagePriceHourlyArgs): number {
|
||||||
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
||||||
const multimasterMultiplier: number = getMultimasterMultiplier(numberOfRegions, multimasterEnabled);
|
const multimasterMultiplier: number = getMultimasterMultiplier(numberOfRegions, multimasterEnabled);
|
||||||
const pricePerRu = getPricePerRu(serverId);
|
const pricePerRu = isAutoscale ? getAutoscalePricePerRu(serverId, multimasterMultiplier) : getPricePerRu(serverId);
|
||||||
const ruCharge = requestUnits * pricePerRu * multimasterMultiplier * regionMultiplier;
|
const ruCharge = requestUnits * pricePerRu * multimasterMultiplier * regionMultiplier;
|
||||||
|
|
||||||
return Number(ruCharge.toFixed(5));
|
return Number(ruCharge.toFixed(5));
|
||||||
@@ -159,28 +171,19 @@ export function getAutoPilotV3SpendHtml(maxAutoPilotThroughputSet: number, isDat
|
|||||||
}' target='_blank' aria-label='Learn more about autoscale throughput'>Learn more</a>.`;
|
}' target='_blank' aria-label='Learn more about autoscale throughput'>Learn more</a>.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function computeAutoscaleUsagePriceHourly(
|
|
||||||
serverId: string,
|
|
||||||
requestUnits: number,
|
|
||||||
numberOfRegions: number,
|
|
||||||
multimasterEnabled: boolean
|
|
||||||
): number {
|
|
||||||
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
|
||||||
const multimasterMultiplier: number = getMultimasterMultiplier(numberOfRegions, multimasterEnabled);
|
|
||||||
|
|
||||||
const pricePerRu = getAutoscalePricePerRu(serverId, multimasterMultiplier);
|
|
||||||
const ruCharge = requestUnits * pricePerRu * multimasterMultiplier * regionMultiplier;
|
|
||||||
|
|
||||||
return Number(ruCharge.toFixed(5));
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getEstimatedAutoscaleSpendHtml(
|
export function getEstimatedAutoscaleSpendHtml(
|
||||||
throughput: number,
|
throughput: number,
|
||||||
serverId: string,
|
serverId: string,
|
||||||
regions: number,
|
regions: number,
|
||||||
multimaster: boolean
|
multimaster: boolean
|
||||||
): string {
|
): string {
|
||||||
const hourlyPrice: number = computeAutoscaleUsagePriceHourly(serverId, throughput, regions, multimaster);
|
const hourlyPrice: number = computeRUUsagePriceHourly({
|
||||||
|
serverId: serverId,
|
||||||
|
requestUnits: throughput,
|
||||||
|
numberOfRegions: regions,
|
||||||
|
multimasterEnabled: multimaster,
|
||||||
|
isAutoscale: true
|
||||||
|
});
|
||||||
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
||||||
const currency: string = getPriceCurrency(serverId);
|
const currency: string = getPriceCurrency(serverId);
|
||||||
const currencySign: string = getCurrencySign(serverId);
|
const currencySign: string = getCurrencySign(serverId);
|
||||||
@@ -203,7 +206,13 @@ export function getEstimatedSpendHtml(
|
|||||||
regions: number,
|
regions: number,
|
||||||
multimaster: boolean
|
multimaster: boolean
|
||||||
): string {
|
): string {
|
||||||
const hourlyPrice: number = computeRUUsagePriceHourly(serverId, throughput, regions, multimaster);
|
const hourlyPrice: number = computeRUUsagePriceHourly({
|
||||||
|
serverId: serverId,
|
||||||
|
requestUnits: throughput,
|
||||||
|
numberOfRegions: regions,
|
||||||
|
multimasterEnabled: multimaster,
|
||||||
|
isAutoscale: false
|
||||||
|
});
|
||||||
const dailyPrice: number = hourlyPrice * 24;
|
const dailyPrice: number = hourlyPrice * 24;
|
||||||
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
||||||
const currency: string = getPriceCurrency(serverId);
|
const currency: string = getPriceCurrency(serverId);
|
||||||
@@ -217,7 +226,7 @@ export function getEstimatedSpendHtml(
|
|||||||
`${currencySign}${calculateEstimateNumber(monthlyPrice)} monthly </b> ` +
|
`${currencySign}${calculateEstimateNumber(monthlyPrice)} monthly </b> ` +
|
||||||
`(${regions} ${regions === 1 ? "region" : "regions"}, ${throughput}RU/s, ${currencySign}${pricePerRu}/RU)` +
|
`(${regions} ${regions === 1 ? "region" : "regions"}, ${throughput}RU/s, ${currencySign}${pricePerRu}/RU)` +
|
||||||
`<p style='padding: 10px 0px 0px 0px;'>` +
|
`<p style='padding: 10px 0px 0px 0px;'>` +
|
||||||
`<em>*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account</em></p>`
|
`<em>${estimatedCostDisclaimer}</em></p>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,9 +237,13 @@ export function getEstimatedSpendAcknowledgeString(
|
|||||||
multimaster: boolean,
|
multimaster: boolean,
|
||||||
isAutoscale: boolean
|
isAutoscale: boolean
|
||||||
): string {
|
): string {
|
||||||
const hourlyPrice: number = isAutoscale
|
const hourlyPrice: number = computeRUUsagePriceHourly({
|
||||||
? computeAutoscaleUsagePriceHourly(serverId, throughput, regions, multimaster)
|
serverId: serverId,
|
||||||
: computeRUUsagePriceHourly(serverId, throughput, regions, multimaster);
|
requestUnits: throughput,
|
||||||
|
numberOfRegions: regions,
|
||||||
|
multimasterEnabled: multimaster,
|
||||||
|
isAutoscale: isAutoscale
|
||||||
|
});
|
||||||
const dailyPrice: number = hourlyPrice * 24;
|
const dailyPrice: number = hourlyPrice * 24;
|
||||||
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
const monthlyPrice: number = hourlyPrice * Constants.hoursInAMonth;
|
||||||
const currencySign: string = getCurrencySign(serverId);
|
const currencySign: string = getCurrencySign(serverId);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe("Collection Add and Delete SQL spec", () => {
|
|||||||
// validate created
|
// validate created
|
||||||
// open database menu
|
// open database menu
|
||||||
await frame.waitForSelector('div[class="splashScreen"] > div[class="title"]', { visible: true });
|
await frame.waitForSelector('div[class="splashScreen"] > div[class="title"]', { visible: true });
|
||||||
await frame.waitFor(LOADING_STATE_DELAY);
|
await frame.waitFor(CREATE_DELAY);
|
||||||
await frame.waitForSelector('div[class="splashScreen"] > div[class="title"]', { visible: true });
|
await frame.waitForSelector('div[class="splashScreen"] > div[class="title"]', { visible: true });
|
||||||
const databases = await frame.$$(`div[class="databaseHeader main1 nodeItem "] > div[class="treeNodeHeader "]`);
|
const databases = await frame.$$(`div[class="databaseHeader main1 nodeItem "] > div[class="treeNodeHeader "]`);
|
||||||
const selectedDbId = await frame.evaluate(element => {
|
const selectedDbId = await frame.evaluate(element => {
|
||||||
|
|||||||
Reference in New Issue
Block a user