mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Extension support page (#1112)
Signed-off-by: Roman <ixrock@gmail.com> Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
This commit is contained in:
1 parent
ce995f3deb
commit
f3a0059355
67 files changed
+4511
-553
No files matched your search
@@ -1,87 +1,51 @@
|
||||
.ClusterSettings {
|
||||
.WizardLayout {
|
||||
grid-template-columns: unset;
|
||||
grid-template-rows: 76px 1fr;
|
||||
padding: 0;
|
||||
$spacing: $padding * 3;
|
||||
|
||||
.head-col {
|
||||
justify-content: space-between;
|
||||
> .content-wrapper {
|
||||
--flex-gap: #{$spacing};
|
||||
}
|
||||
|
||||
:nth-child(2) {
|
||||
flex: 1 0 0;
|
||||
}
|
||||
}
|
||||
// TODO: move sub-component styles to separate files
|
||||
.admin-note {
|
||||
font-size: small;
|
||||
opacity: 0.5;
|
||||
margin-left: $margin;
|
||||
}
|
||||
|
||||
.content-col {
|
||||
margin: 0;
|
||||
padding-top: $padding * 3;
|
||||
background-color: $clusterSettingsBackground;
|
||||
.button-area {
|
||||
margin-top: $margin * 2;
|
||||
}
|
||||
|
||||
.SubTitle {
|
||||
text-transform: none;
|
||||
}
|
||||
.file-loader {
|
||||
margin-top: $margin * 2;
|
||||
}
|
||||
|
||||
> div {
|
||||
margin-top: $margin * 5;
|
||||
}
|
||||
.status-table {
|
||||
margin: $spacing 0;
|
||||
|
||||
.admin-note {
|
||||
font-size: small;
|
||||
opacity: 0.5;
|
||||
margin-left: $margin;
|
||||
}
|
||||
.Table {
|
||||
border: 1px solid var(--drawerSubtitleBackground);
|
||||
border-radius: $radius;
|
||||
|
||||
.button-area {
|
||||
margin-top: $margin * 2;
|
||||
}
|
||||
.TableRow {
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--drawerSubtitleBackground);
|
||||
}
|
||||
|
||||
.file-loader {
|
||||
margin-top: $margin * 2;
|
||||
}
|
||||
.value {
|
||||
flex-grow: 2;
|
||||
word-break: break-word;
|
||||
color: var(--textColorSecondary);
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: smaller;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
p + p, .hint + p {
|
||||
padding-top: $padding;
|
||||
}
|
||||
}
|
||||
|
||||
.status-table {
|
||||
margin: $margin * 3 0;
|
||||
|
||||
.Table {
|
||||
border: 1px solid var(--drawerSubtitleBackground);
|
||||
border-radius: $radius;
|
||||
|
||||
.TableRow {
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--drawerSubtitleBackground);
|
||||
}
|
||||
|
||||
.value {
|
||||
flex-grow: 2;
|
||||
word-break: break-word;
|
||||
color: var(--textColorSecondary);
|
||||
}
|
||||
|
||||
.link {
|
||||
@include pseudo-link;
|
||||
}
|
||||
.link {
|
||||
@include pseudo-link;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Input, .Select {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.Select {
|
||||
&__control {
|
||||
box-shadow: 0 0 0 1px $borderFaintColor;
|
||||
}
|
||||
}
|
||||
.Input, .Select {
|
||||
margin-top: $padding;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,19 @@
|
||||
import "./cluster-settings.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer, disposeOnUnmount } from "mobx-react";
|
||||
import { autorun } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { Features } from "./features";
|
||||
import { Removal } from "./removal";
|
||||
import { Status } from "./status";
|
||||
import { General } from "./general";
|
||||
import { Cluster } from "../../../main/cluster";
|
||||
import { WizardLayout } from "../layout/wizard-layout";
|
||||
import { ClusterIcon } from "../cluster-icon";
|
||||
import { Icon } from "../icon";
|
||||
import { navigate } from "../../navigation";
|
||||
import { IClusterSettingsRouteParams } from "./cluster-settings.route";
|
||||
import { clusterStore } from "../../../common/cluster-store";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { clusterIpc } from "../../../common/cluster-ipc";
|
||||
import { autorun } from "mobx";
|
||||
import { PageLayout } from "../layout/page-layout";
|
||||
|
||||
interface Props extends RouteComponentProps<IClusterSettingsRouteParams> {
|
||||
}
|
||||
@@ -27,7 +25,6 @@ export class ClusterSettings extends React.Component<Props> {
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
window.addEventListener('keydown', this.onEscapeKey);
|
||||
disposeOnUnmount(this,
|
||||
autorun(() => {
|
||||
this.refreshCluster();
|
||||
@@ -35,51 +32,29 @@ export class ClusterSettings extends React.Component<Props> {
|
||||
)
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.onEscapeKey);
|
||||
}
|
||||
|
||||
onEscapeKey = (evt: KeyboardEvent) => {
|
||||
if (evt.code === "Escape") {
|
||||
evt.stopPropagation();
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
|
||||
refreshCluster = async () => {
|
||||
if(this.cluster) {
|
||||
if (this.cluster) {
|
||||
await clusterIpc.activate.invokeFromRenderer(this.cluster.id);
|
||||
await clusterIpc.refresh.invokeFromRenderer(this.cluster.id);
|
||||
}
|
||||
}
|
||||
|
||||
close() {
|
||||
navigate("/");
|
||||
}
|
||||
|
||||
render() {
|
||||
const cluster = this.cluster
|
||||
if (!cluster) return null;
|
||||
const header = (
|
||||
<>
|
||||
<ClusterIcon
|
||||
cluster={cluster}
|
||||
showErrors={false}
|
||||
showTooltip={false}
|
||||
/>
|
||||
<ClusterIcon cluster={cluster} showErrors={false} showTooltip={false}/>
|
||||
<h2>{cluster.preferences.clusterName}</h2>
|
||||
<Icon material="close" onClick={this.close} big/>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<div className="ClusterSettings">
|
||||
<WizardLayout header={header} centered>
|
||||
<Status cluster={cluster}></Status>
|
||||
<General cluster={cluster}></General>
|
||||
<Features cluster={cluster}></Features>
|
||||
<Removal cluster={cluster}></Removal>
|
||||
</WizardLayout>
|
||||
</div>
|
||||
<PageLayout className="ClusterSettings" header={header}>
|
||||
<Status cluster={cluster}></Status>
|
||||
<General cluster={cluster}></General>
|
||||
<Features cluster={cluster}></Features>
|
||||
<Removal cluster={cluster}></Removal>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -41,10 +41,10 @@ export class ClusterHomeDirSetting extends React.Component<Props> {
|
||||
onBlur={this.save}
|
||||
placeholder="$HOME"
|
||||
/>
|
||||
<span className="hint">
|
||||
<small className="hint">
|
||||
An explicit start path where the terminal will be launched,{" "}
|
||||
this is used as the current working directory (cwd) for the shell process.
|
||||
</span>
|
||||
</small>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class ClusterPrometheusSetting extends React.Component<Props> {
|
||||
}}
|
||||
options={options}
|
||||
/>
|
||||
<span className="hint">What query format is used to fetch metrics from Prometheus</span>
|
||||
<small className="hint">What query format is used to fetch metrics from Prometheus</small>
|
||||
{this.canEditPrometheusPath && (
|
||||
<>
|
||||
<p>Prometheus service address.</p>
|
||||
@@ -101,10 +101,10 @@ export class ClusterPrometheusSetting extends React.Component<Props> {
|
||||
onBlur={this.onSavePath}
|
||||
placeholder="<namespace>/<service>:<port>"
|
||||
/>
|
||||
<span className="hint">
|
||||
<small className="hint">
|
||||
An address to an existing Prometheus installation{" "}
|
||||
({'<namespace>/<service>:<port>'}). Lens tries to auto-detect address if left empty.
|
||||
</span>
|
||||
</small>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user