mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
monaco editor implemented right
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
b41f923931
commit
92766e71e4
27 files changed
+265
-501
No files matched your search
@@ -24,7 +24,7 @@ import "./release-details.scss";
|
||||
import React, { Component } from "react";
|
||||
import groupBy from "lodash/groupBy";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import { observable, reaction, makeObservable } from "mobx";
|
||||
import { makeObservable, observable, reaction } from "mobx";
|
||||
import { Link } from "react-router-dom";
|
||||
import kebabCase from "lodash/kebabCase";
|
||||
import { getRelease, getReleaseValues, HelmRelease, IReleaseDetails } from "../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
@@ -46,8 +46,7 @@ import { secretsStore } from "../+config-secrets/secrets.store";
|
||||
import { Secret } from "../../../common/k8s-api/endpoints";
|
||||
import { getDetailsUrl } from "../kube-detail-params";
|
||||
import { Checkbox } from "../checkbox";
|
||||
import MonacoEditor from "react-monaco-editor";
|
||||
import { UserStore } from "../../../common/user-store";
|
||||
import { MonacoEditor } from "../monaco-editor";
|
||||
|
||||
interface Props {
|
||||
release: HelmRelease;
|
||||
@@ -160,14 +159,12 @@ export class ReleaseDetails extends Component<Props> {
|
||||
disabled={valuesLoading}
|
||||
/>
|
||||
<MonacoEditor
|
||||
language="yaml"
|
||||
className={cssNames({ loading: valuesLoading })}
|
||||
readOnly={valuesLoading || this.showOnlyUserSuppliedValues}
|
||||
value={values}
|
||||
onChange={text => this.values = text}
|
||||
theme={ThemeStore.getInstance().activeTheme.monacoTheme}
|
||||
className={cssNames("MonacoEditor", {loading: valuesLoading})}
|
||||
options={{readOnly: valuesLoading || this.showOnlyUserSuppliedValues, ...UserStore.getInstance().getEditorOptions()}}
|
||||
>
|
||||
{valuesLoading && <Spinner center />}
|
||||
{valuesLoading && <Spinner center/>}
|
||||
</MonacoEditor>
|
||||
<Button
|
||||
primary
|
||||
|
||||
Reference in new issue
Block a user