Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback 0530 #192

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions src/components/DeveloperIDE/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const Header = observer(() => {
cursor={'pointer'}
>
<Image w="30px" src="/favicon.svg" alt="logo" />
<Text ml="10px" fontWeight={600}>
w3bstream Devnet
</Text>
<Flex ml="10px" fontWeight={600} alignItems="flex-start">
w3bstream Devnet <Text mt="-2px" ml="2px" fontSize={10} color="#946FFF">{w3s.env.envs?.value?.w3bstreamVersion?.split('@')?.[1]?.split('_')?.[0]}</Text>
</Flex>
</Flex>
<Flex ml="4rem" alignItems="center">
<Tabs
Expand Down
4 changes: 2 additions & 2 deletions src/components/DeveloperIDE/Support/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ const Support = () => {
{
store.w3bstreamVersionGithubLink ? (
<Link ml="10px" href={store.w3bstreamVersionGithubLink} color="#946FFF" isExternal>
{envs.value?.w3bstreamVersion}
{envs.value?.w3bstreamVersion?.split('@')?.[1]?.split('_')?.[0]}
</Link>
) : (
<Box ml="10px">{envs.value?.w3bstreamVersion}</Box>
<Box ml="10px">{envs.value?.w3bstreamVersion?.split('@')?.[1]?.split('_')?.[0]}</Box>
)
}
</Flex>
Expand Down
5 changes: 2 additions & 3 deletions src/components/IDE/Monitor/ChainHeight/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ export const CreateChainHeightButton = observer(() => {
{...defaultButtonStyle}
onClick={async (e) => {
if (w3s.config.form.formData.accountRole === 'DEVELOPER') {
w3s.chainHeight.form.value.set({
projectName: w3s.project.curProject?.name
});
// @ts-ignore
w3s.chainHeight.form.value.set({projectName: w3s.project.curProject?.name});
w3s.chainHeight.form.uiSchema.projectName = {
'ui:widget': 'hidden'
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/JSONMetricsView/TimeRangePick/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const TimeRangePick = ({props, onChange}: TimeRangePick) => {
onChange(v);
}}
>
<option value="day">One Day</option>
<option value="week">One Week</option>
<option value="month">One Month</option>
<option value="day">Daily</option>
<option value="week">Weekly</option>
<option value="month">Monthly</option>
</Select>
);
};
15 changes: 10 additions & 5 deletions src/store/lib/w3bstream/schema/chainHeight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const schema = {
properties: {
projectName: { $ref: '#/definitions/projects', title: 'Project Name' },
eventType: { type: 'string', title: 'Event Type', description: 'Please choose a unique name for the W3bstream event that should be triggered' },
chainID: { type: 'number', title: 'Chain ID', description: 'The blockchain network that should be monitored' },
chainID: { $ref: '#/definitions/blockChains', type: 'string', title: 'Chain ID', description: 'The blockchain network that should be monitored' },
height: { type: 'number', title: 'Height', description: 'The blockchain height at which the the W3bstream event should be triggered.' }
},
required: ['projectName', 'eventType', 'chainID', 'height']
Expand All @@ -30,7 +30,8 @@ type SchemaType = FromSchema<typeof schema>;

//@ts-ignore
schema.definitions = {
projects: definitions.projectName
projects: definitions.projectName,
blockChains: definitions.blockChains
};

export default class ChainHeightModule {
Expand Down Expand Up @@ -121,19 +122,23 @@ export default class ChainHeightModule {
'ui:submitButtonOptions': {
norender: false,
submitText: 'Submit'
}
},
chainID: {
'ui:widget': 'select'
},
},
afterSubmit: async (e) => {
eventBus.emit('base.formModal.afterSubmit', e.formData);
this.form.reset();
},
value: new JSONValue<SchemaType>({
// @ts-ignore
default: {
projectName: '',
eventType: 'DEFAULT',
chainID: 4690,
chainID: '4690',
height: 0
}
},
})
});
}