Skip to content

Commit

Permalink
Added some text occurrences in UI (#4186)
Browse files Browse the repository at this point in the history
* Fixed issue with updating audit fields in recent experiment runs (#4172)

* fixed mongo schema decode issue

Signed-off-by: Saranya-jena <[email protected]>

* updated the same in other fields

Signed-off-by: Saranya-jena <[email protected]>

* fixed css

Signed-off-by: Saranya-jena <[email protected]>

---------

Signed-off-by: Saranya-jena <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>

* fix: Fixed teaming page UI Issues (#4173)

Signed-off-by: Hrishav <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>

* fix: Updated config to support favicon (#4179)

Signed-off-by: Hrishav <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>

* replace string with corresponding keys

Signed-off-by: Tanishq Jain <[email protected]>

* replace string with corresponding keys

Signed-off-by: Tanishq Jain <[email protected]>

* replaced the text string with the corresponding keys Signed-off-by:
Tanishq Jain <[email protected]>

Signed-off-by: Tanishq Jain <[email protected]>

* fix: Added experiment run operator for NewChaosExperimentService (#4184)

Signed-off-by: Amit Kumar Das <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>

* Apply suggestions from code review

Co-authored-by: Namkyu Park <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>

* updated type.ts using yarn strings

Signed-off-by: Tanishq Jain <[email protected]>

---------

Signed-off-by: Saranya-jena <[email protected]>
Signed-off-by: Tanishq Jain <[email protected]>
Signed-off-by: Hrishav <[email protected]>
Signed-off-by: Amit Kumar Das <[email protected]>
Signed-off-by: Saranya Jena <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Co-authored-by: Hrishav <[email protected]>
Co-authored-by: Amit Kumar Das <[email protected]>
Co-authored-by: Namkyu Park <[email protected]>
  • Loading branch information
5 people authored Oct 27, 2023
1 parent 50a7ae4 commit 4bdeea3
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 39 deletions.
4 changes: 2 additions & 2 deletions chaoscenter/web/src/components/InputSlider/InputSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default function InputSlider({ initialValue, name, onChange }: InputSlide
<Layout.Vertical className={cx(css.grow, css.gap1)}>
<div className={css.rangeSliderCont}>
<input
data-testid="rangeSliderInput"
type="range"
data-testid={getString('rangeSliderInput')}
type={getString("range")}
name={name}
value={value}
min={0}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
declare namespace YamlBuilderModuleScssNamespace {
export interface IYamlBuilderModuleScss {
borderWithPluginsPanel: string;
darkBg: string;
details: string;
editor: string;
entityTag: string;
errorList: string;
errorSummary: string;
filePath: string;
flexCenter: string;
header: string;
headerBorder: string;
invalidYaml: string;
item: string;
layout: string;
lightBg: string;
main: string;
pluginDecorator: string;
resizeIcon: string;
splitPanel: string;
summaryPopover: string;
validationIcon: string;
validationStatus: string;
}
}

declare const YamlBuilderModuleScssModule: YamlBuilderModuleScssNamespace.IYamlBuilderModuleScss;

export = YamlBuilderModuleScssModule;
12 changes: 11 additions & 1 deletion chaoscenter/web/src/strings/strings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ chooseAuthenticationType: Choose Authentication Type
chooseHubAccess: Choose Hub Access
chooseMembersAddTheProject: Choose members to add to the project
chooseProbeMode: Choose Mode for probe to be executed
clearSearch: Clear search
clickDownload: >-
Click on the “Download” button below to download the YML file to a machine
where you have kubectl installed and have access to your Kubernetes cluster.
Expand Down Expand Up @@ -157,6 +158,7 @@ collaborators: Collaborators
comingSoon: Coming Soon
command: Command
comparator: Comparator
comparisonCriteria: Comparison Criteria
completed: Completed
configure: Configure
configureChaosInfrastructure: Configure Chaos Infrastructure
Expand Down Expand Up @@ -206,6 +208,7 @@ createdAt: Created At
createdOn: Created On
creationTime: Creation Time
criteria: Criteria
criteriaForData: Criteria for data
cronExpression: Cron Expression
cronExpressionRequired: Cron Expression required
cronSelectOption: Cron (Recurring run)
Expand Down Expand Up @@ -277,6 +280,7 @@ downloadedSuccessfully: Downloaded successfully
duration: Duration
edit: Edit
editChaosHub: Edit ChaosHub
editEnvironment: Edit Environment
editExperiment: Edit Experiment
editExperimentCopy: Edit Copy
editExperimentOptions: Do you want to edit the same experiment or edit a copy?
Expand Down Expand Up @@ -741,6 +745,7 @@ pollingInterval: Polling Interval
preProd: Pre-Prod
predefinedExperimentsNotFound: No Predefined Experiments found in this hub
preview: Preview
previous: Previous
private: Private
probeAddedSuccessfully: Probe added successfully, please apply changes before closing
probeConfiguration: Probe Configuration
Expand Down Expand Up @@ -845,6 +850,8 @@ public: Public
query: Query
queryPath: Query path
ranAt: Ran at
range: range
rangeSliderInput: rangeSliderInput
rbacDescription: You are missing permission '{{permission}}' to perform this action.
rbacHeader: You do not have permission to perform this action
reEnterNewPassword: Re-enter new password
Expand Down Expand Up @@ -961,6 +968,7 @@ selectExperiments: Select Experiments
selectHub: Select a ChaosHub
selectHubFromList: Select a hub from the list
selectHubHeader: Create or select existing ChaosHub
selectMethod: Select Method GET / POST
selectProbe: Select Probe
selectProbes: Select Probes
selectProject: Select a Project
Expand All @@ -974,6 +982,7 @@ serviceAccount: Service Account
serviceAccountName: Service Account Name
serviceHealthScore: Service Health Score
setFaultWeights: Set fault weights
setSchedule: Set Schedule
settings: Settings
setupChaosInfrastructures: >-
Enabling Chaos on infrastructure helps to inject chaos by studying your
Expand Down Expand Up @@ -1078,10 +1087,11 @@ tuneFaultProperties: Tune fault properties
tuneFaultWeight: Tune fault weightage
tuneWeight: Tune Weight
type: Type
udpatePassword: Update Password
typeOfData: Type of data
unableToGetProbes: Unable to get probe information
unhealthy: Unhealthy
update: Update
updatePassword: Update Password
updatedAt: Updated at
updatedBy: Updated by
upgradeChaosInfrastructure: Upgrade Chaos Infrastructure
Expand Down
12 changes: 11 additions & 1 deletion chaoscenter/web/src/strings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export interface StringsMap {
'chooseHubAccess': unknown
'chooseMembersAddTheProject': unknown
'chooseProbeMode': unknown
'clearSearch': unknown
'clickDownload': unknown
'clone': unknown
'cloneExperiment': unknown
Expand All @@ -137,6 +138,7 @@ export interface StringsMap {
'comingSoon': unknown
'command': unknown
'comparator': unknown
'comparisonCriteria': unknown
'completed': unknown
'configure': unknown
'configureChaosInfrastructure': unknown
Expand Down Expand Up @@ -174,6 +176,7 @@ export interface StringsMap {
'createdOn': unknown
'creationTime': unknown
'criteria': unknown
'criteriaForData': unknown
'cronExpression': unknown
'cronExpressionRequired': unknown
'cronSelectOption': unknown
Expand Down Expand Up @@ -236,6 +239,7 @@ export interface StringsMap {
'duration': unknown
'edit': unknown
'editChaosHub': unknown
'editEnvironment': unknown
'editExperiment': unknown
'editExperimentCopy': unknown
'editExperimentOptions': unknown
Expand Down Expand Up @@ -617,6 +621,7 @@ export interface StringsMap {
'preProd': unknown
'predefinedExperimentsNotFound': unknown
'preview': unknown
'previous': unknown
'private': unknown
'probeAddedSuccessfully': unknown
'probeConfiguration': unknown
Expand Down Expand Up @@ -697,6 +702,8 @@ export interface StringsMap {
'query': unknown
'queryPath': unknown
'ranAt': unknown
'range': unknown
'rangeSliderInput': unknown
'rbacDescription': PrimitiveObject<'permission'>
'rbacHeader': unknown
'reEnterNewPassword': unknown
Expand Down Expand Up @@ -808,6 +815,7 @@ export interface StringsMap {
'selectHub': unknown
'selectHubFromList': unknown
'selectHubHeader': unknown
'selectMethod': unknown
'selectProbe': unknown
'selectProbes': unknown
'selectProject': unknown
Expand All @@ -821,6 +829,7 @@ export interface StringsMap {
'serviceAccountName': unknown
'serviceHealthScore': unknown
'setFaultWeights': unknown
'setSchedule': unknown
'settings': unknown
'setupChaosInfrastructures': unknown
'setupProbe': unknown
Expand Down Expand Up @@ -913,10 +922,11 @@ export interface StringsMap {
'tuneFaultWeight': unknown
'tuneWeight': unknown
'type': unknown
'udpatePassword': unknown
'typeOfData': unknown
'unableToGetProbes': unknown
'unhealthy': unknown
'update': unknown
'updatePassword': unknown
'updatedAt': unknown
'updatedBy': unknown
'upgradeChaosInfrastructure': unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const GitConnectionStep: React.FC<
PAT
</Text>
}
placeholder="Enter your Personal Acess Token"
placeholder={getString('accessTokenPlaceholder')}
/>
)}
{formikProps.values.isPrivate && formikProps.values.authType === AuthType.SSH && (
Expand All @@ -276,14 +276,14 @@ const GitConnectionStep: React.FC<
});
}}
variation={ButtonVariation.SECONDARY}
text="Generate New SSH Key"
text={getString('generateSSH')}
/>
<div className={css.textInputContainer}>
<Text font={{ variation: FontVariation.FORM_LABEL }} margin={{ bottom: 'xsmall' }}>
SSH Key
</Text>
<TextInput
placeholder="SSH Key"
placeholder={getString('sshKey')}
value={sshPublicKey}
onChange={(e: FormEvent<HTMLInputElement>) => {
setPublicSshKey(e.currentTarget.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ const TuneDetailsStep: React.FC<
} as SelectOption)
: undefined
}
label="Method"
placeholder="Select Method GET / POST "
label={getString('method')}
placeholder={getString('selectMethod')}
items={[
{ label: 'GET', value: 'get' },
{ label: 'POST', value: 'post' }
Expand All @@ -803,8 +803,8 @@ const TuneDetailsStep: React.FC<
<>
<FormInput.Select
name="kubernetesHTTPProperties.method.get.criteria"
label="Criteria"
placeholder="Criteria for data"
label={getString('criteria')}
placeholder={getString('criteriaForData')}
items={[
{ label: '==', value: '==' },
{ label: '!=', value: '!=' },
Expand Down Expand Up @@ -836,8 +836,8 @@ const TuneDetailsStep: React.FC<
/>
<FormInput.Select
name="kubernetesHTTPProperties.method.post.criteria"
label="Criteria"
placeholder="Criteria for data"
label={getString('criteria')}
placeholder={getString('criteriaForData')}
items={[
{ label: '==', value: '==' },
{ label: '!=', value: '!=' }
Expand Down Expand Up @@ -882,8 +882,8 @@ const TuneDetailsStep: React.FC<
</Text>
<FormInput.Select
name="kubernetesCMDProperties.comparator.type"
label="Type"
placeholder="Type of data"
label={getString('type')}
placeholder={getString('typeOfData')}
onChange={selected => (cmdComparatorType.current = selected.value as string)}
items={[
{ label: 'Int', value: 'int' },
Expand All @@ -894,10 +894,10 @@ const TuneDetailsStep: React.FC<
<Layout.Horizontal flex={{ justifyContent: 'space-between', alignItems: 'flex-start' }} spacing="small">
<FormInput.Select
name="kubernetesCMDProperties.comparator.criteria"
label="Comparison Criteria"
label={getString('comparisonCriteria')}
usePortal
style={{ width: '50%' }}
placeholder="Criteria for data"
placeholder={getString('criteriaForData')}
items={
cmdComparatorType.current === 'string'
? [
Expand Down Expand Up @@ -1006,7 +1006,7 @@ const TuneDetailsStep: React.FC<
</Text>
<FormInput.Select
name="promProperties.comparator.type"
label="Type"
label={getString('type')}
onChange={selected => (promComparatorType.current = selected.value as string)}
placeholder="Type of data"
items={[
Expand All @@ -1018,10 +1018,10 @@ const TuneDetailsStep: React.FC<
<Layout.Horizontal flex={{ justifyContent: 'space-between', alignItems: 'flex-start' }} spacing="small">
<FormInput.Select
name="promProperties.comparator.criteria"
label="Comparison Criteria"
label={getString('comparisonCriteria')}
usePortal
style={{ width: '50%' }}
placeholder="Criteria for data"
placeholder={getString('criteriaForData')}
items={
promComparatorType.current === 'string'
? [
Expand Down Expand Up @@ -1072,9 +1072,10 @@ const TuneDetailsStep: React.FC<
<FormInput.Text name="k8sProperties.labelSelector" label={'Label Selector'} placeholder={'Label Selector'} />
<FormInput.Select
name="k8sProperties.operation"
label="Operation"

label={getString('operation')}
usePortal
placeholder="Operation"
placeholder={getString('operation')}
items={[
// Create to be enabled once Engine CR is updated to include `data` inside k8s properties
// { label: 'Create', value: 'create' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const GitConnectionStep: React.FC<
});
}}
variation={ButtonVariation.SECONDARY}
text="Generate New SSH Key"
text={getString('generateSSH')}
/>
<div className={css.textInputContainer}>
<Text font={{ variation: FontVariation.FORM_LABEL }} margin={{ bottom: 'xsmall' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const MenuCell = ({
<Menu style={{ backgroundColor: 'unset' }}>
<RbacMenuItem
icon="edit"
text="Edit Environment"
text={getString('editEnvironment')}
onClick={openEditModal}
permission={PermissionGroup.EDITOR}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function ExperimentAdvancedTuningOptionsView({
isOpen={isOpen}
leftPanel={leftPanel}
handleClose={() => onClose()}
title="Advanced Options"
title={getString('advancedOptions')}
type={DrawerTypes.AdvacedOptions}
/>
);
Expand Down
Loading

0 comments on commit 4bdeea3

Please sign in to comment.