-
Notifications
You must be signed in to change notification settings - Fork 6
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
Major Refactor #180
base: v2.x/staging
Are you sure you want to change the base?
Major Refactor #180
Conversation
…s UI properly Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
…e editor was making things too tedious given the deadline Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
…, and installation args are now set on the Home component. Wrap naked component global vars in useState calls. Fix auto scrolling when a stage has been complete Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
…perly, remove unneeded ipcRenderer hooks Signed-off-by: Timothy Gerstel <[email protected]>
…ve refs properly Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
…mode Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Does not work for me: Local pax file uploading fails While downloading pax fails on schema parsing
For the last one i have created the PR 179 to replace cat command output parsing with files downloading. |
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Hi @timgerstel is this PR ready for review/merge or would you like to add more changes? |
Signed-off-by: Leanid Astrakou <[email protected]>
Created PR: #194 |
Signed-off-by: Leanid Astrakou <[email protected]>
Revert create recursive dirs + add edgecase
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
…t longer attempt to create these Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Leanid Astrakou <[email protected]>
Signed-off-by: Leanid Astrakou <[email protected]>
Reset counter properly + don't forget the current char
Signed-off-by: Leanid Astrakou <[email protected]>
Another small edgecase
Signed-off-by: Timothy Gerstel <[email protected]>
ipcMain.handle('download-unpax', async (event, connectionArgs, installationArgs, version, zoweConfig) => { | ||
const res = await installActions.downloadUnpax(connectionArgs, installationArgs, version, zoweConfig); | ||
ipcMain.handle('get-yaml-schema', async (event, connectionArgs, installationArgs) => { | ||
const res = await installActions.smpeGetExampleYamlAndSchemas(connectionArgs, installationArgs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be called "getExampleYamlAndSchemas"
I only see this used in 2 places, 1 in Stepper which is conditional to not SMPE and 2 in
Unpax step which is also not SMPE
<Card id={`card-${id}`} square={true} > | ||
<Link key={`link-${id}`} to={link} > | ||
<Box sx={{ width: '40vw', height: '40vh'}} onClick={(e) => { | ||
const flattenedData = flatten(lastActiveState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastActiveState
is already a flat object with no nested properties, at a quick glance, don't see it set anywhere. Is this essential?
@@ -109,6 +116,42 @@ const Home = () => { | |||
eventDispatcher.on('saveAndCloseEvent', () => setShowWizard(false)); | |||
|
|||
|
|||
|
|||
//Home is the first screen the user will always see 100% of the time. Therefore, we will call the loading of the configs, schemas, and installation args here and set them to the redux memory states |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Home.tsx change is v satisfying
// To validate the javascript object against the schema | ||
const isValid = validate(jsonData); | ||
setIsSchemaValid(isValid); | ||
setIsSchemaValid(!schemaValidate.errors); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N i c e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that all that adjv stuff worked
const STAGE_ID = getStageDetails(stageLabel).id; | ||
const SUB_STAGES = !!getStageDetails(stageLabel).subStages; | ||
const SUB_STAGE_ID = SUB_STAGES ? getSubStageDetails(STAGE_ID, subStageLabel).id : 0; | ||
const [STAGE_ID] = useState(getStageDetails(INIT_STAGE_LABEL).id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it, but I think @timgerstel might be right here. Not that you're wrong @skurnevich , I think both things are true: using const with useState introduces a small overhead. So it would be like:
For constants and simple values that do not involve expensive computation, use them directly without useState.
For values that involve expensive computation or need to persist across renders, use useState.
So something like this might be max/minning:
const Certificates = () => {
const theme = useState(createTheme())[0]; // Expensive
const stageLabel = 'Initialization';
const STAGE_ID = useState(getStageDetails(INIT_STAGE_LABEL).id)[0]; // Potentially expensive?
};
"minimum": 0, | ||
"maximum": 65535, | ||
"description": "Port number of how you access Zowe APIML Gateway from your local computer." | ||
const schema: any = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if BASE_SCHEMA is AJV "fixed", can't we remove the schemas in Networking + Launch Config and use BASE_SCHEMA? Or lmk I might be missing something
} | ||
return null; | ||
})} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole chunk is difficult to rea dfor me, but it looks mostly like a "code move" so it seems alright
} else { | ||
console.warn('zwe init security failed', err?.toString()); // toString() throws run-time error on undefined or null | ||
} | ||
window.electron.ipcRenderer.setStandardOutput(`zwe init security failed: ${typeof err === "string" ? err : err.toString()}`).then((res: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was tested, then you want to add:
alertEmitter.emit('showAlert', 'Please view Job Output for more details', 'error');
// Some parts of Zen pass the response as a string directly into the object | ||
if (res.status == false && typeof res.details == "string") { | ||
res.details = { 3: res.details }; | ||
} | ||
if (res?.details && res.details[3] && res.details[3].indexOf(JCL_UNIX_SCRIPT_OK) == -1) { // This check means we got an error during zwe install | ||
if (!res.status && res?.details && res.details[3] && res.details[3].indexOf(JCL_UNIX_SCRIPT_OK) == -1) { // This check means we got an error during zwe install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good addition. I remember cases where res.status = 0, yet the command failed. That was the whole point of using 'JCL_UNIX_SCRIPT_OK' as a better source of truth over status
setDownloadUnpaxProgress(downloadUnpaxStatus); | ||
dispatch(setNextStepEnabled(false)); | ||
window.electron.ipcRenderer.fetchExampleYamlBtnOnClick(connectionArgs, installationArgs).then((res: IResponse) => { | ||
if(!res.status){ //errors during runInstallation() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same point here about unreliability of res.status
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Signed-off-by: Timothy Gerstel <[email protected]>
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
Further comments