Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Webportal] Fix job clone bug #2836

Merged
merged 3 commits into from
May 28, 2019
Merged

[Webportal] Fix job clone bug #2836

merged 3 commits into from
May 28, 2019

Conversation

abuccts
Copy link
Member

@abuccts abuccts commented May 28, 2019

Fix job clone bug.

Fix job clone bug.
@abuccts abuccts added the bug label May 28, 2019
@abuccts abuccts added this to the End May Release milestone May 28, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 53.345% when pulling a40fd0a on xiongyf/fix-job-clone into ef6a46c on master.

@coveralls
Copy link

coveralls commented May 28, 2019

Coverage Status

Coverage increased (+0.01%) to 53.356% when pulling 3b12b40 on xiongyf/fix-job-clone into ef6a46c on master.

Copy link
Contributor

@Binyang2014 Binyang2014 left a comment

Choose a reason for hiding this comment

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

Looks good to me.
But how about quick return when pluginId is Nil. More easy to understand?

if (isNil(pluginId)) {
  window.location.href = `/submit.html?${qs.stringify(query)}`;
  return;
}

const plugins = window.PAI_PLUGINS;
const pluginIndex = plugins.findIndex((x) => x.id === pluginId);
if (pluginIndex === -1) {
    alert(`Clone job failed. The job was submitted by ${pluginId}, but it is not installed.`);
    return;
}
window.location.href = `/plugin.html?${qs.stringify({...query, index: pluginIndex})}`;

Update.
Update.
@abuccts abuccts requested a review from Binyang2014 May 28, 2019 10:51
@abuccts abuccts merged commit 1ef4e12 into master May 28, 2019
@abuccts abuccts deleted the xiongyf/fix-job-clone branch May 28, 2019 11:42
abuccts added a commit that referenced this pull request May 29, 2019
abuccts added a commit that referenced this pull request May 29, 2019
* [Webportal] Fix job clone bug (#2836)
* Check duplicate job in submission v2 (#2837)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants