1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Merge remote-tracking branch 'origin/master' into mobx-6.2

This commit is contained in:
Roman 2021-04-22 15:57:40 +03:00
commit f620c09095
6 changed files with 32 additions and 31 deletions

View File

@ -67,9 +67,9 @@ integration-win: binaries/client build-extension-types build-extensions
build: node_modules binaries/client build-extensions build: node_modules binaries/client build-extensions
yarn run compile yarn run compile
ifeq "$(DETECTED_OS)" "Windows" ifeq "$(DETECTED_OS)" "Windows"
./node_modules/.bin/electron-builder --publish onTag --x64 --ia32 yarn run electron-builder --publish onTag --x64 --ia32
else else
./node_modules/.bin/electron-builder --publish onTag yarn run electron-builder --publish onTag
endif endif
$(extension_node_modules): $(extension_node_modules):

View File

@ -10,7 +10,7 @@
"name": "OpenLens Authors" "name": "OpenLens Authors"
}, },
"scripts": { "scripts": {
"dev": "concurrently -k \"yarn run dev-run -C\" yarn:dev:*", "dev": "concurrently -i -k \"yarn run dev-run -C\" yarn:dev:*",
"dev-build": "concurrently yarn:compile:*", "dev-build": "concurrently yarn:compile:*",
"debug-build": "concurrently yarn:compile:main yarn:compile:extension-types", "debug-build": "concurrently yarn:compile:main yarn:compile:extension-types",
"dev-run": "nodemon --watch static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"", "dev-run": "nodemon --watch static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"",
@ -247,7 +247,7 @@
"@types/hapi": "^18.0.5", "@types/hapi": "^18.0.5",
"@types/hoist-non-react-statics": "^3.3.1", "@types/hoist-non-react-statics": "^3.3.1",
"@types/html-webpack-plugin": "^3.2.3", "@types/html-webpack-plugin": "^3.2.3",
"@types/http-proxy": "^1.17.4", "@types/http-proxy": "^1.17.5",
"@types/jest": "^25.2.3", "@types/jest": "^25.2.3",
"@types/js-yaml": "^3.12.4", "@types/js-yaml": "^3.12.4",
"@types/jsdom": "^16.2.4", "@types/jsdom": "^16.2.4",

View File

@ -15,7 +15,8 @@ export interface AddRemoveButtonsProps extends React.HTMLAttributes<any> {
export class AddRemoveButtons extends React.PureComponent<AddRemoveButtonsProps> { export class AddRemoveButtons extends React.PureComponent<AddRemoveButtonsProps> {
renderButtons() { renderButtons() {
const { onRemove, onAdd, addTooltip, removeTooltip } = this.props; const { onRemove, onAdd, addTooltip, removeTooltip } = this.props;
const buttons = [
return [
{ {
onClick: onRemove, onClick: onRemove,
className: "remove-button", className: "remove-button",
@ -28,20 +29,13 @@ export class AddRemoveButtons extends React.PureComponent<AddRemoveButtonsProps>
icon: "add", icon: "add",
tooltip: addTooltip, tooltip: addTooltip,
}, },
]; ]
.filter(button => button.onClick)
return buttons.map(button => { .map(({ icon, ...props }) => (
if (!button.onClick) { <Button key={icon} big round primary {...props}>
return null; <Icon material={icon} />
}
const { onClick, className, icon, tooltip } = button;
return (
<Button key={icon} big round primary onClick={onClick} className={className} tooltip={tooltip}>
<Icon material={icon}/>
</Button> </Button>
); ));
});
} }
render() { render() {

View File

@ -42,9 +42,18 @@ export abstract class ItemStore<T extends ItemObject = ItemObject> {
return this.items.findIndex(item => item.getId() === id); return this.items.findIndex(item => item.getId() === id);
} }
/**
* Return `items` sorted by the given ordering functions. If two elements of
* `items` are sorted to the same "index" then the next sorting function is used
* to determine where to place them relative to each other. Once the `sorting`
* functions have been all exhausted then the order is unchanged (ie a stable sort).
* @param items the items to be sorted (default: the current items in this store)
* @param sorting list of functions to determine sort order (default: sorting by name)
* @param order whether to sort from least to greatest (`"asc"` (default)) or vice-versa (`"desc"`)
*/
@action @action
protected sortItems(items: T[] = this.items, sorting?: ((item: T) => any)[], order?: "asc" | "desc"): T[] { protected sortItems(items: T[] = this.items, sorting: ((item: T) => any)[] = [this.defaultSorting], order?: "asc" | "desc"): T[] {
return orderBy(items, sorting || this.defaultSorting, order); return orderBy(items, sorting, order);
} }
protected async createItem(...args: any[]): Promise<any>; protected async createItem(...args: any[]): Promise<any>;

View File

@ -2,9 +2,12 @@
Here you can find description of changes we've built into each release. While we try our best to make each upgrade automatic and as smooth as possible, there may be some cases where you might need to do something to ensure the application works smoothly. So please read through the release highlights! Here you can find description of changes we've built into each release. While we try our best to make each upgrade automatic and as smooth as possible, there may be some cases where you might need to do something to ensure the application works smoothly. So please read through the release highlights!
## 5.0.0-alpha.1 (current version) ## 5.0.0-alpha.2 (current version)
- Workspaces are replaced by Catalog & Hotbar - Workspaces are replaced by Catalog & Hotbar
- YAML Templates in Create Resource dock tab
- Add support for viewing 'User-supplied values' of helm release
- Add ability to configure the locale timezone
## 4.2.1 ## 4.2.1

View File

@ -1314,10 +1314,10 @@
"@types/http-proxy" "*" "@types/http-proxy" "*"
"@types/node" "*" "@types/node" "*"
"@types/http-proxy@*", "@types/http-proxy@^1.17.4": "@types/http-proxy@*", "@types/http-proxy@^1.17.5":
version "1.17.4" version "1.17.5"
resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.4.tgz#e7c92e3dbe3e13aa799440ff42e6d3a17a9d045b" resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.5.tgz#c203c5e6e9dc6820d27a40eb1e511c70a220423d"
integrity sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q== integrity sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
@ -9545,7 +9545,7 @@ moment-timezone@^0.5.33:
dependencies: dependencies:
moment ">= 2.9.0" moment ">= 2.9.0"
"moment@>= 2.9.0": "moment@>= 2.9.0", moment@^2.14.1, moment@^2.22.1:
version "2.29.1" version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
@ -9555,11 +9555,6 @@ moment@^2.10.2, moment@^2.26.0:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a" resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw== integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==
moment@^2.14.1, moment@^2.22.1:
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
moo-color@^1.0.2: moo-color@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/moo-color/-/moo-color-1.0.2.tgz#837c40758d2d58763825d1359a84e330531eca64" resolved "https://registry.yarnpkg.com/moo-color/-/moo-color-1.0.2.tgz#837c40758d2d58763825d1359a84e330531eca64"