mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 10:51:30 +00:00
Compare commits
3 Commits
fixed-pric
...
remove-jqu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41699c99e4 | ||
|
|
ee1557d643 | ||
|
|
c458bedb0c |
11
externals/jquery.typeahead.min.js
vendored
11
externals/jquery.typeahead.min.js
vendored
File diff suppressed because one or more lines are too long
34
src/Definitions/jquery-typescript.d.ts
vendored
34
src/Definitions/jquery-typescript.d.ts
vendored
@@ -1,34 +0,0 @@
|
||||
/* Type definitions for code-runner's jquery-typeahead v2.8.0
|
||||
* https://github.com/running-coder/jquery-typeahead
|
||||
*
|
||||
* There is no DefinitelyTyped support for this library, yet, so we only define here what we use.
|
||||
* https://github.com/running-coder/jquery-typeahead/issues/156
|
||||
* TODO: Replace this minimum definition by the official one when it comes out.
|
||||
*/
|
||||
/// <reference path="jquery.d.ts" />
|
||||
|
||||
interface JQueryTypeaheadParam {
|
||||
input: string;
|
||||
order?: string;
|
||||
source: any;
|
||||
callback?: any;
|
||||
minLength?: number;
|
||||
searchOnFocus?: boolean;
|
||||
template?: string | { (query: string, item: any): string };
|
||||
dynamic?: boolean;
|
||||
mustSelectItem?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* For use with: $.typeahead()
|
||||
*/
|
||||
interface JQueryStatic {
|
||||
typeahead(arg: JQueryTypeaheadParam): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* For use with $('').typehead()
|
||||
*/
|
||||
// interface JQuery {
|
||||
// typeahead(arg: JQueryTypeaheadParam): void;
|
||||
// }
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
import { InputTypeaheadComponent, InputTypeaheadComponentProps } from "./InputTypeaheadComponent";
|
||||
import "../../../../externals/jquery.typeahead.min.js";
|
||||
|
||||
describe("inputTypeahead", () => {
|
||||
it("renders <input />", () => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { mount, ReactWrapper } from "enzyme";
|
||||
import * as Q from "q";
|
||||
import React from "react";
|
||||
import * as sinon from "sinon";
|
||||
import "../../../../externals/jquery.typeahead.min";
|
||||
import { queryDocuments } from "../../../Common/dataAccess/queryDocuments";
|
||||
import { queryDocumentsPage } from "../../../Common/dataAccess/queryDocumentsPage";
|
||||
import * as DataModels from "../../../Contracts/DataModels";
|
||||
|
||||
@@ -9,7 +9,6 @@ import "../externals/jquery-ui.structure.min.css";
|
||||
import "../externals/jquery-ui.theme.min.css";
|
||||
import "../externals/jquery.dataTables.min.css";
|
||||
import "../externals/jquery.typeahead.min.css";
|
||||
import "../externals/jquery.typeahead.min.js";
|
||||
// Image Dependencies
|
||||
import "../images/CosmosDB_rgb_ui_lighttheme.ico";
|
||||
import "../images/favicon.ico";
|
||||
|
||||
@@ -75,6 +75,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
|
||||
autoscaleDefault: "true" === get("autoscaledefault"),
|
||||
partitionKeyDefault: "true" === get("partitionkeytest"),
|
||||
partitionKeyDefault2: "true" === get("pkpartitionkeytest"),
|
||||
notebooksTemporarilyDown: "true" === get("notebookstemporarilydown", "true"),
|
||||
notebooksTemporarilyDown: "true" === get("notebooksTemporarilyDown", "true"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as AutoPilotUtils from "../Utils/AutoPilotUtils";
|
||||
interface ComputeRUUsagePriceHourlyArgs {
|
||||
serverId: string;
|
||||
requestUnits: number;
|
||||
numberOfRegions?: number;
|
||||
numberOfRegions: number;
|
||||
multimasterEnabled: boolean;
|
||||
isAutoscale: boolean;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ export function getRuToolTipText(): string {
|
||||
* Otherwise, return numberOfRegions
|
||||
* @param numberOfRegions
|
||||
*/
|
||||
export function getRegionMultiplier(numberOfRegions: number | undefined, multimasterEnabled: boolean): number {
|
||||
export function getRegionMultiplier(numberOfRegions: number, multimasterEnabled: boolean): number {
|
||||
const normalizedNumberOfRegions: number = normalizeNumber(numberOfRegions);
|
||||
|
||||
if (normalizedNumberOfRegions <= 0) {
|
||||
@@ -45,10 +45,6 @@ export function getRegionMultiplier(numberOfRegions: number | undefined, multima
|
||||
return numberOfRegions;
|
||||
}
|
||||
|
||||
if (!numberOfRegions) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (multimasterEnabled) {
|
||||
return numberOfRegions + 1;
|
||||
}
|
||||
@@ -56,7 +52,7 @@ export function getRegionMultiplier(numberOfRegions: number | undefined, multima
|
||||
return numberOfRegions;
|
||||
}
|
||||
|
||||
export function getMultimasterMultiplier(numberOfRegions: number | undefined, multimasterEnabled: boolean): number {
|
||||
export function getMultimasterMultiplier(numberOfRegions: number, multimasterEnabled: boolean): number {
|
||||
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
||||
const multimasterMultiplier: number = !multimasterEnabled ? 1 : regionMultiplier > 1 ? 2 : 1;
|
||||
|
||||
@@ -122,7 +118,7 @@ export function numberWithCommasFormatter(n: number): string {
|
||||
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
export function isLargerThanDefaultMinRU(ru: number | undefined): boolean {
|
||||
export function isLargerThanDefaultMinRU(ru: number): boolean {
|
||||
if (typeof ru === "number" && ru > Constants.CollectionCreation.DefaultCollectionRUs400) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"files": [
|
||||
"./src/Utils/PricingUtils.test.ts",
|
||||
"./src/AuthType.ts",
|
||||
"./src/Bindings/ReactBindingHandler.ts",
|
||||
"./src/Common/ArrayHashMap.ts",
|
||||
@@ -166,4 +165,4 @@
|
||||
"src/Terminal/**/*",
|
||||
"src/Utils/arm/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,6 @@ module.exports = function (_env = {}, argv = {}) {
|
||||
new CleanWebpackPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
process: "process/browser",
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
new CreateFileWebpack({
|
||||
path: "./dist",
|
||||
@@ -230,7 +229,6 @@ module.exports = function (_env = {}, argv = {}) {
|
||||
alias: {
|
||||
process: "process/browser",
|
||||
},
|
||||
|
||||
fallback: {
|
||||
crypto: false,
|
||||
fs: false,
|
||||
|
||||
Reference in New Issue
Block a user