Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Add help info #4950

Merged
merged 4 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const BasicSection = props => {
/>
<StackItem grow>
<div>
<Stack horizontal gap='s1'>
<Stack horizontal verticalAlign='baseline'>
<Label styles={basicSectionStyle.label}>{sectionLabel}</Label>
{sectionTooltip && <TooltipIcon content={sectionTooltip} />}
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,11 @@
*/

import React from 'react';
import { DirectionalHint, TooltipHost, Icon } from 'office-ui-fabric-react';
import { IconButton } from 'office-ui-fabric-react';
import PropTypes from 'prop-types';

export const TooltipIcon = ({ content }) => {
return (
<TooltipHost
calloutProps={{
isBeakVisible: false,
directionalHint: DirectionalHint.topAutoEdge,
gapSpace: 8, // spacing.s1
}}
content={content}
>
<Icon styles={{ root: { verticalAlign: 'middle' } }} iconName='Info' />
</TooltipHost>
);
return <IconButton iconProps={{ iconName: 'Info' }} href={content} />;
};

TooltipIcon.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { FormSpinButton } from './form-spin-button';
import { VirtualCluster } from './virtual-cluster';
import Card from '../../components/card';
import { JobBasicInfo } from '../models/job-basic-info';
import { PROTOCOL_TOOLTIPS } from '../utils/constants';

export const JobInformation = React.memo(
({ jobInformation, onChange, advanceFlag }) => {
Expand Down Expand Up @@ -67,7 +66,6 @@ export const JobInformation = React.memo(
<FormPage>
<FormTextField
sectionLabel={'Job name'}
sectionTooltip={PROTOCOL_TOOLTIPS.jobName}
value={name}
shortStyle
onChange={onNameChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const TabFormContent = ({
{!isSingle && (
<FormTextField
sectionLabel={'Task role name'}
sectionTooltip={PROTOCOL_TOOLTIPS.taskRoleName}
shortStyle
value={jobTaskRole.name}
onChange={value => _onValueChange('name', value)}
Expand Down
33 changes: 12 additions & 21 deletions src/webportal/src/app/job-submission/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,23 @@ export const PAI_ENV_VAR = [
},
];
export const PROTOCOL_TOOLTIPS = {
jobName:
'Name for the job, need to be unique, should be string in ^[A-Za-z0-9\\-._~]+$ format.',
taskRoleName: 'Name of the taskRole, string in ^[A-Za-z0-9\\-._~]+$ format.',
taskRoleContainerSize: [
'Resource required per container instance',
'CPU number and memory number will be auto scaled with GPU number by default.',
],
hivedSkuType: [
'SKU defines a resource unit in all resource dimensions, ',
'including GPU, CPU, and memory.',
],
taskRole: [
'Task roles are different types of task in the protocol.',
'One job may have one or more task roles, each task role has one or more instances, and each instance runs inside one container.',
],
taskRoleContainerSize:
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/quick-start.html',
hivedSkuType:
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/quick-start.html',
taskRole:
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-run-distributed-job.html#taskrole-and-instance',
parameters:
'Parameters are key-value pairs that you could save your frequently used values and reference them in command section by their keys.',
secrets: `Secrets are used to store sensitive data. The value will be masked and won't be seen by other users.`,
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/quick-start.html',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-use-advanced-job-settings.html#parameters-and-secrets

secrets: `https://openpai.readthedocs.io/en/latest/manual/cluster-user/quick-start.html`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-use-advanced-job-settings.html#parameters-and-secrets

data:
'Data section is used to generate pre-command that download/mount your data to specific path in container.',
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-manage-data.html',
tools:
'Tools section is used to configure the tools that are useful for jobs.',
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-debug-jobs.html#how-to-debug-jobs',
dockerImage:
'Please contact admin to make sure which cuda versions in docker image is supported by gpu drivers.',
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/docker-images-and-job-examples.html',
teamStorage:
"Team share storage is external storage defined by cluster admin. Select an element means the external storage will be mount to 'path' and user can treat it as local path.",
'https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-manage-data.html#use-storage-in-jobs',
};

export const COMMAND_PLACEHOLDER = `'You could define your own Parameters, Secrets or Data mount point on the right sidebar.
Expand Down