Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Show progress in the notification area when download codegen cli #894

Merged
merged 5 commits into from
Dec 31, 2019

Conversation

dooriya
Copy link
Member

@dooriya dooriya commented Dec 30, 2019

No description provided.

const tempPath = path.join(os.tmpdir(), FileNames.iotworkbenchTempFolder);
const filePath = path.join(tempPath, `${md5value}.zip`);
fs.writeFileSync(filePath, zipData);
// clearInterval(loading);
Copy link
Contributor

@eriolchan eriolchan Dec 30, 2019

Choose a reason for hiding this comment

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

better to remove unused code here #Pending

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Will remove it in next iteration


In reply to: 361902534 [](ancestors = 361902534)

progress.report({increment: 10, message: `still going...`});
}, 1000);

setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

why need to report 40%?

Copy link
Member Author

@dooriya dooriya Dec 30, 2019

Choose a reason for hiding this comment

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

Show the progress of the download progress of the CodeGen CLI, Similar to https://github.com/microsoft/vscode-extension-samples/tree/master/progress-sample


In reply to: 361902619 [](ancestors = 361902619)

if (hashvalue !== md5value) {
`the downloaded ${DigitalTwinConstants.codeGenCli} v${
newVersion} package has been corrupted.`);
if (installOrUpgrade === 1) {
Copy link
Contributor

@dilin-MS dilin-MS Dec 30, 2019

Choose a reason for hiding this comment

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

What does number 1 means here? Please use CodeGenCliOperation enum value to better illustrate the meaning.

@dooriya dooriya merged commit db348b9 into develop Dec 31, 2019
@dooriya dooriya deleted the install-codegen-progress branch January 2, 2020 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants