Skip to content

Commit

Permalink
fix: Remove service annotations edit to avoid conflict with loadBalancer
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Jul 21, 2020
1 parent 0396f28 commit d67f453
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
22 changes: 12 additions & 10 deletions src/components/Forms/Service/AdvanceSettings/Metadata/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class Metadata extends React.Component {
}

render() {
const { kind } = this.props
const { kind, noWorkload } = this.props
return (
<>
<Form.Item
Expand All @@ -91,15 +91,17 @@ export default class Metadata extends React.Component {
onChange={this.handleLabelsChange}
/>
</Form.Item>
<Form.Item
label={`${t('Annotations')} (${t('Applied to the workload')})`}
>
<PropertiesInput
name={`${kind}.metadata.annotations`}
addText={t('Add Annotation')}
hiddenKeys={globals.config.preservedAnnotations}
/>
</Form.Item>
{!noWorkload && (
<Form.Item
label={`${t('Annotations')} (${t('Applied to the workload')})`}
>
<PropertiesInput
name={`${kind}.metadata.annotations`}
addText={t('Add Annotation')}
hiddenKeys={globals.config.preservedAnnotations}
/>
</Form.Item>
)}
</>
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Forms/Service/AdvanceSettings/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class AdvancedSettings extends React.Component {
>
<Form.Item
label={t('Maximum Session Sticky Time (s)')}
desc={'SERVICE_SESSION_STICKY_DESC'}
desc={t('SERVICE_SESSION_STICKY_DESC')}
>
<NumberInput
name={`Service.${
Expand Down Expand Up @@ -140,6 +140,7 @@ export default class AdvancedSettings extends React.Component {
formTemplate={formTemplate}
onLabelsChange={this.handleLabelsChange}
isFederated={isFederated}
noWorkload={noWorkload}
/>
</Form.Group>
</Form>
Expand Down

0 comments on commit d67f453

Please sign in to comment.