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

[Improvement-16920][UI] Release workflow definition process improvement #16922

Merged
merged 2 commits into from
Dec 27, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ public final class WorkflowDefinitionTab extends NavBarPage implements ProjectDe
})
private WebElement buttonConfirm;

@FindBys({
@FindBy(className = "n-dialog__action"),
@FindBy(className = "n-button--default-type"),
})
private WebElement publishSuccessButtonCancel;

@FindBy(className = "items")
private List<WebElement> workflowList;

Expand Down Expand Up @@ -98,9 +92,7 @@ public WorkflowDefinitionTab publish(String workflow) {
.orElseThrow(() -> new RuntimeException("Can not find publish button in workflow definition"))
.click();

((JavascriptExecutor) driver).executeScript("arguments[0].click();", buttonConfirm());

((JavascriptExecutor) driver).executeScript("arguments[0].click();", publishSuccessButtonCancel());
driver.executeScript("arguments[0].click();", buttonConfirm());

return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@

package org.apache.dolphinscheduler.e2e.pages.project.workflow.task;

import org.apache.dolphinscheduler.e2e.core.Constants;
import org.apache.dolphinscheduler.e2e.pages.common.CodeEditor;
import org.apache.dolphinscheduler.e2e.pages.project.workflow.WorkflowForm;

import lombok.Getter;
import lombok.SneakyThrows;

import org.openqa.selenium.WebDriver;

Expand All @@ -39,7 +41,9 @@ public ShellTaskForm(WorkflowForm parent) {
this.driver = parent.driver();
}

@SneakyThrows
public ShellTaskForm script(String script) {
Thread.sleep(Constants.DEFAULT_SLEEP_MILLISECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

Why sleep here

Copy link
Member Author

Choose a reason for hiding this comment

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

If the machine configuration of CI is too low and the speed is too fast, the dom element will not be found and an error will be reported. Monaco Editor is not good at locating elements and judging rendering completion...

codeEditor.content(script);

return this;
Expand Down
1 change: 0 additions & 1 deletion dolphinscheduler-ui/src/locales/en_US/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export default {
workflow_relation_no_data_result_desc:
'There is not any workflows. Please create a workflow, and then visit this page again.',
wait_to_run: 'Wait to run',
want_to_set_timing: 'Would you like to set the workflow timing?',
confirm_to_online: 'Confirm to make the workflow online?',
confirm_to_offline: 'Confirm to make the workflow offline?',
time_to_online: 'Confirm to make the Scheduler online?',
Expand Down
1 change: 0 additions & 1 deletion dolphinscheduler-ui/src/locales/zh_CN/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ export default {
workflow_relation_no_data_result_desc:
'目前没有任何工作流,请先创建工作流,再访问该页面',
wait_to_run: '等待执行',
want_to_set_timing: '现在想去配置该工作流定时?',
confirm_to_online: '是否确定上线该工作流?',
confirm_to_offline: '是否确定下线该工作流?',
time_to_online: '是否确定上线该定时?',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {
NPagination,
NSpace,
NTooltip,
NPopconfirm,
NModal
NPopconfirm
} from 'naive-ui'
import {
defineComponent,
Expand Down Expand Up @@ -82,10 +81,6 @@ export default defineComponent({
requestData()
}

const confirmToSetWorkflowTiming = () => {
variables.timingShowRef = true
}

const handleSearch = () => {
variables.page = 1
requestData()
Expand Down Expand Up @@ -143,7 +138,6 @@ export default defineComponent({
batchExportWorkflow,
batchCopyWorkflow,
handleCopyUpdateList,
confirmToSetWorkflowTiming,
...toRefs(variables),
uiSettingStore,
trim
Expand Down Expand Up @@ -311,16 +305,6 @@ export default defineComponent({
v-model:show={this.copyShowRef}
onUpdateList={this.handleCopyUpdateList}
/>
<NModal
v-model:show={this.setTimingDialogShowRef}
preset={'dialog'}
title={t('project.workflow.success')}
content={t('project.workflow.want_to_set_timing')}
positiveText={t('project.workflow.confirm')}
negativeText={t('project.workflow.cancel')}
maskClosable={false}
onPositiveClick={this.confirmToSetWorkflowTiming}
/>
<DependenciesModal
v-model:row={this.row}
v-model:show={this.dependenciesData.showRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@ export function useTable() {
variables.row = row
if (data.releaseState === 'ONLINE') {
release(data, variables.projectCode, row.code).then(() => {
variables.setTimingDialogShowRef = true
if (row?.schedule) {
variables.row = row.schedule
variables.timingType = 'update'
variables.timingState = row.scheduleReleaseState
}
getTableData({
pageSize: variables.pageSize,
pageNo: variables.page,
Expand Down
Loading