mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
When viewing a specific release, select its namespace (#3440)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
bf4e039743
commit
686ae32dcb
@ -55,12 +55,16 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
|
|||||||
this.loadFromContextNamespaces();
|
this.loadFromContextNamespaces();
|
||||||
}
|
}
|
||||||
this.releaseSecrets.replace(newSecrets);
|
this.releaseSecrets.replace(newSecrets);
|
||||||
|
}, {
|
||||||
|
fireImmediately: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
watchSelectedNamespaces(): (() => void) {
|
watchSelectedNamespaces(): (() => void) {
|
||||||
return reaction(() => namespaceStore.context.contextNamespaces, namespaces => {
|
return reaction(() => namespaceStore.context.contextNamespaces, namespaces => {
|
||||||
this.loadAll(namespaces);
|
this.loadAll(namespaces);
|
||||||
|
}, {
|
||||||
|
fireImmediately: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,7 @@ import { secretsStore } from "../+config-secrets/secrets.store";
|
|||||||
import { NamespaceSelectFilter } from "../+namespaces/namespace-select-filter";
|
import { NamespaceSelectFilter } from "../+namespaces/namespace-select-filter";
|
||||||
import type { ReleaseRouteParams } from "../../../common/routes";
|
import type { ReleaseRouteParams } from "../../../common/routes";
|
||||||
import { releaseURL } from "../../../common/routes";
|
import { releaseURL } from "../../../common/routes";
|
||||||
|
import { namespaceStore } from "../+namespaces/namespace.store";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
@ -54,6 +55,12 @@ interface Props extends RouteComponentProps<ReleaseRouteParams> {
|
|||||||
@observer
|
@observer
|
||||||
export class HelmReleases extends Component<Props> {
|
export class HelmReleases extends Component<Props> {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const { match: { params: { namespace } } } = this.props;
|
||||||
|
|
||||||
|
if (namespace) {
|
||||||
|
namespaceStore.selectNamespaces(namespace);
|
||||||
|
}
|
||||||
|
|
||||||
disposeOnUnmount(this, [
|
disposeOnUnmount(this, [
|
||||||
releaseStore.watchAssociatedSecrets(),
|
releaseStore.watchAssociatedSecrets(),
|
||||||
releaseStore.watchSelectedNamespaces(),
|
releaseStore.watchSelectedNamespaces(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user