Skip to content

Commit

Permalink
modify job builder & shell (bytedance#147)
Browse files Browse the repository at this point in the history
Co-authored-by: shilei <[email protected]>
  • Loading branch information
nervouself and shilei authored Jul 16, 2020
1 parent be303d6 commit 9ac227a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions web_console/components/JobCommonInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ import { Table, Link, Text, Card, Description, Popover, useTheme } from '@zeit-u
import useSWR from 'swr';

import { fetcher } from '../libs/http';
import { getStatusColor, handleStatus } from '../utils/job';
import { getStatusColor, handleStatus, FLAppStatus } from '../utils/job';
import Layout from './Layout';
import Dot from './Dot';
import Empty from './Empty';

const podStatus = {
active: 'active',
succeeded: 'succeeded',
failed: 'failed',
};

const parsePods = (PodStatus) => {
const list = [];
Object.keys(PodStatus).forEach((type) => {
['active', 'succeeded', 'failed'].forEach((status) => {
Object.values(podStatus).forEach((status) => {
const pods = PodStatus[type][status];
Object.keys(pods).forEach((name) => {
list.push({
Expand Down Expand Up @@ -109,7 +115,7 @@ export default function JobCommonInfo(props) {
link: (
<>
{
item.status === 'active'
job.status?.appState === FLAppStatus.Running && item.status === podStatus.active
? (
<Link
color
Expand Down
2 changes: 1 addition & 1 deletion web_console/utils/job_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function portalGenerateYaml(federation, raw_data) {
{ name: 'DATA_PORTAL_NAME', value: raw_data.name },
{ name: 'OUTPUT_PARTITION_NUM', value: String(raw_data.output_partition_num) },
{ name: 'INPUT_BASE_DIR', value: raw_data.input },
{ name: 'OUTPUT_BASE_DIR', value: joinPath(k8s_settings.storage_root_path, 'data_portal_output', raw_data.name) },
{ name: 'OUTPUT_BASE_DIR', value: joinPath(k8s_settings.storage_root_path, 'data_portal_output') },
{ name: 'RAW_DATA_PUBLISH_DIR', value: joinPath('portal_publish_dir', raw_data.name) },
{ name: 'DATA_PORTAL_TYPE', value: raw_data.data_portal_type },
{ name: 'FILE_WILDCARD', value: raw_data.context.file_wildcard },
Expand Down

0 comments on commit 9ac227a

Please sign in to comment.