Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): Use yaml mode for PipelineSpec editor view #7637

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/pages/PipelineDetailsV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import jsyaml from 'js-yaml';
import React, { useState } from 'react';
import { Elements, FlowElement } from 'react-flow-renderer';
import { ApiPipeline, ApiPipelineVersion } from 'src/apis/pipeline';
Expand All @@ -26,7 +27,6 @@ import { isSafari } from 'src/lib/Utils';
import { PipelineFlowElement } from 'src/lib/v2/StaticFlow';
import { commonCss, padding } from '../Css';
import DagCanvas from './v2/DagCanvas';
import jsyaml from 'js-yaml';

const TAB_NAMES = ['Graph', 'Pipeline Spec'];

Expand Down Expand Up @@ -126,7 +126,7 @@ function PipelineDetailsV2({
value={jsyaml.safeDump(jsyaml.safeLoad(templateString || ''))} // Use safeLoad and then safeDump to make sure the Pipeline Spec is in Yaml Form.
height={editorHeightWidth}
width={editorHeightWidth}
mode='json'
mode='yaml'
theme='github'
editorProps={{ $blockScrolling: true }}
readOnly={true}
Expand Down