Skip to content

Commit

Permalink
fix(frontend): Use yaml mode for PipelineSpec editor view (kubeflow#7637
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zijianjoy authored and Jagadeesh J committed May 11, 2022
1 parent db1bb18 commit c520188
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit c520188

Please sign in to comment.