Skip to content

Commit 7d6edee

Browse files
authored
fix(frontend): Use yaml mode for PipelineSpec editor view (#7637)
1 parent d1a12cb commit 7d6edee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/pages/PipelineDetailsV2.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import jsyaml from 'js-yaml';
1617
import React, { useState } from 'react';
1718
import { Elements, FlowElement } from 'react-flow-renderer';
1819
import { ApiPipeline, ApiPipelineVersion } from 'src/apis/pipeline';
@@ -26,7 +27,6 @@ import { isSafari } from 'src/lib/Utils';
2627
import { PipelineFlowElement } from 'src/lib/v2/StaticFlow';
2728
import { commonCss, padding } from '../Css';
2829
import DagCanvas from './v2/DagCanvas';
29-
import jsyaml from 'js-yaml';
3030

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

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

0 commit comments

Comments
 (0)