From 9ef38b1b00fcf7bf58cd078ee0b86d9ea85e23a2 Mon Sep 17 00:00:00 2001 From: bozanfaruk Date: Tue, 8 Jan 2019 09:32:09 +0300 Subject: [PATCH] #22 --- .../ui/components/AbstractManagerPanel.java | 93 ++++++++++++ .../ui/components/TedamJobGroupPanel.java | 141 ++++++++++++++++++ .../tedam/ui/components/TedamJobPanel.java | 81 +--------- .../TedamManagerJobGroupDataProvider.java | 53 +++++++ .../jobmanager/TedamManagerPresenter.java | 115 +++++++++++++- 5 files changed, 406 insertions(+), 77 deletions(-) create mode 100644 src/main/java/com/lbs/tedam/ui/components/AbstractManagerPanel.java create mode 100644 src/main/java/com/lbs/tedam/ui/components/TedamJobGroupPanel.java create mode 100644 src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerJobGroupDataProvider.java diff --git a/src/main/java/com/lbs/tedam/ui/components/AbstractManagerPanel.java b/src/main/java/com/lbs/tedam/ui/components/AbstractManagerPanel.java new file mode 100644 index 0000000..fe9e7ce --- /dev/null +++ b/src/main/java/com/lbs/tedam/ui/components/AbstractManagerPanel.java @@ -0,0 +1,93 @@ +/* + * Copyright 2014-2019 Logo Business Solutions + * (a.k.a. LOGO YAZILIM SAN. VE TIC. A.S) + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.lbs.tedam.ui.components; + +import com.lbs.tedam.localization.TedamLocalizerWrapper; +import com.lbs.tedam.ui.components.basic.TedamButton; +import com.lbs.tedam.ui.components.basic.TedamLabel; +import com.lbs.tedam.ui.components.basic.TedamPanel; +import com.lbs.tedam.ui.util.DateTimeFormatter; +import com.lbs.tedam.util.EnumsV2.JobStatus; +import com.vaadin.server.Resource; +import com.vaadin.ui.ProgressBar; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.ValoTheme; + +public class AbstractManagerPanel extends TedamPanel implements TedamLocalizerWrapper { + + private static final long serialVersionUID = 1L; + + protected final String PANEL_STYLE = ValoTheme.PANEL_WELL + " jobpanel"; + + protected TedamButton btnStart; + protected TedamButton btnStop; + protected TedamButton btnUnfollow; + protected TedamButton btnReset; + protected DateTimeFormatter dateTimeFormetter; + protected VerticalLayout mainLayout; + + protected void initUI() { + setSizeUndefined(); + mainLayout = new VerticalLayout(); + setContent(mainLayout); + } + + protected void buildButtons(JobStatus jobStatus) { + if (JobStatus.getInActiveJobStatus().contains(jobStatus)) { + getBtnStart().setEnabled(true); + getBtnStop().setEnabled(false); + } else { + getBtnStart().setEnabled(false); + getBtnStop().setEnabled(true); + } + } + + protected TedamLabel buildLabel(String parameter) { + TedamLabel label = new TedamLabel(parameter); + label.setStyleName(ValoTheme.LABEL_TINY); + return label; + } + + protected ProgressBar buildProgressBar(int completedJobDetailSize, int allJobDetailSize) { + ProgressBar progressBar = new ProgressBar(); + progressBar.setValue(((float) completedJobDetailSize / allJobDetailSize)); + progressBar.setDescription(completedJobDetailSize + "/" + allJobDetailSize); + return progressBar; + } + + protected TedamButton buildButton(String id, String jobId, Resource icon) { + TedamButton button = new TedamButton(id, icon); + button.setId(button.getId() + jobId); + button.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); + button.setWidthUndefined(); + button.setCaption(""); + return button; + } + + protected TedamButton getBtnStart() { + return btnStart; + } + + protected TedamButton getBtnStop() { + return btnStop; + } + + protected TedamButton getBtnUnfollow() { + return btnUnfollow; + } +} diff --git a/src/main/java/com/lbs/tedam/ui/components/TedamJobGroupPanel.java b/src/main/java/com/lbs/tedam/ui/components/TedamJobGroupPanel.java new file mode 100644 index 0000000..f58184f --- /dev/null +++ b/src/main/java/com/lbs/tedam/ui/components/TedamJobGroupPanel.java @@ -0,0 +1,141 @@ +/* + * Copyright 2014-2019 Logo Business Solutions + * (a.k.a. LOGO YAZILIM SAN. VE TIC. A.S) + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.lbs.tedam.ui.components; + +import javax.annotation.PostConstruct; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import com.lbs.tedam.localization.LocaleConstants; +import com.lbs.tedam.localization.TedamLocalizerWrapper; +import com.lbs.tedam.model.Job; +import com.lbs.tedam.model.JobDetail; +import com.lbs.tedam.model.JobGroup; +import com.lbs.tedam.ui.components.basic.TedamLabel; +import com.lbs.tedam.ui.components.layout.TedamHorizontalLayout; +import com.lbs.tedam.ui.util.DateTimeFormatter; +import com.lbs.tedam.ui.util.TedamStatic; +import com.lbs.tedam.util.EnumsV2.CommandStatus; +import com.vaadin.icons.VaadinIcons; +import com.vaadin.ui.ProgressBar; + +@Component +@Scope("prototype") +public class TedamJobGroupPanel extends AbstractManagerPanel implements TedamLocalizerWrapper { + + private static final long serialVersionUID = 1L; + + private JobGroup jobGroup; + private JobGroupPanelButtonClickListener clickListener; + + @Autowired + public TedamJobGroupPanel(DateTimeFormatter dateTimeFormetter) { + this.dateTimeFormetter = dateTimeFormetter; + } + + @PostConstruct + public void init() { + initUI(); + } + + private void build() { + setStyleName(PANEL_STYLE); + addStyleName(TedamStatic.getJobStatusColorMap().get(jobGroup.getStatus()).toString().toLowerCase()); + setCaption(jobGroup.getId() + " - " + jobGroup.getName()); + setIcon(VaadinIcons.FILE_TREE); + buildVerticalLayout(jobGroup); + buildButtons(jobGroup.getStatus()); + } + + private void buildVerticalLayout(JobGroup jobGroup) { + mainLayout.removeAllComponents(); + if (jobGroup.getLastExecutedStartDate() != null) { + TedamLabel startDate = buildLabel( + dateTimeFormetter.format(jobGroup.getLastExecutedStartDate(), LocaleConstants.LOCALE_TRTR)); + mainLayout.addComponent(startDate); + } + TedamLabel environment = buildLabel(""); + TedamLabel lastExecutingUser = buildLabel(getLocaleValue("view.jobmanager.lastexecutingusertitle")); + if (jobGroup.getLastExecutingUser() != null) { + lastExecutingUser.setValue(lastExecutingUser.getValue() + jobGroup.getLastExecutingUser().getUserName()); + } + int[] countJobDetailSize = countJobDetailSize(); + ProgressBar progressBar = buildProgressBar(countJobDetailSize[0], countJobDetailSize[1]); + TedamHorizontalLayout footer = buildFooter(jobGroup); + mainLayout.addComponents(environment, lastExecutingUser, progressBar, footer); + } + + private int[] countJobDetailSize() { + int[] countJobDetailSize = new int[2]; + countJobDetailSize[0] = 0; + countJobDetailSize[1] = 0; + for (Job job : jobGroup.getJobs()) { + for (JobDetail jobDetail : job.getJobDetails()) { + if (CommandStatus.COMPLETED.equals(jobDetail.getStatus())) { + countJobDetailSize[0]++; + } + countJobDetailSize[1]++; + } + } + return countJobDetailSize; + } + + private TedamHorizontalLayout buildFooter(JobGroup jobGroup) { + TedamHorizontalLayout footer = new TedamHorizontalLayout(); + footer.setStyleName("v-window-bottom-toolbar"); + btnStart = buildButton("view.tedammanager.button.startjob", jobGroup.getId().toString(), VaadinIcons.PLAY); + btnStart.setDisableOnClick(true); + btnStart.addClickListener(e -> clickListener.startButtonClickOperations(jobGroup)); + btnStop = buildButton("view.tedammanager.button.stopjob", jobGroup.getId().toString(), VaadinIcons.STOP); + btnStop.setDisableOnClick(true); + btnStop.addClickListener(e -> clickListener.stopButtonClickOperations(jobGroup)); + btnUnfollow = buildButton("view.tedammanager.button.unfollowJob", jobGroup.getId().toString(), + VaadinIcons.EYE_SLASH); + btnUnfollow.addClickListener(e -> clickListener.unfollowButtonClickOperations(jobGroup)); + btnReset = buildButton("view.tedammanager.button.resetJob", jobGroup.getId().toString(), VaadinIcons.REFRESH); + btnReset.addClickListener(e -> clickListener.resetButtonClickOperations(jobGroup)); + footer.addComponents(btnStart, btnStop, btnUnfollow, btnReset); + return footer; + } + + public JobGroup getJobGroup() { + return jobGroup; + } + + public void setJobGroup(JobGroup jobGroup) { + this.jobGroup = jobGroup; + build(); + } + + public void setClickListener(JobGroupPanelButtonClickListener clickListener) { + this.clickListener = clickListener; + } + + public interface JobGroupPanelButtonClickListener { + + public void stopButtonClickOperations(JobGroup jobGroup); + + public void unfollowButtonClickOperations(JobGroup jobGroup); + + public void startButtonClickOperations(JobGroup jobGroup); + + public void resetButtonClickOperations(JobGroup jobGroup); + } +} diff --git a/src/main/java/com/lbs/tedam/ui/components/TedamJobPanel.java b/src/main/java/com/lbs/tedam/ui/components/TedamJobPanel.java index 516066e..5b9c558 100644 --- a/src/main/java/com/lbs/tedam/ui/components/TedamJobPanel.java +++ b/src/main/java/com/lbs/tedam/ui/components/TedamJobPanel.java @@ -26,40 +26,21 @@ import com.lbs.tedam.localization.LocaleConstants; import com.lbs.tedam.localization.TedamLocalizerWrapper; import com.lbs.tedam.model.Job; -import com.lbs.tedam.ui.components.basic.TedamButton; import com.lbs.tedam.ui.components.basic.TedamLabel; -import com.lbs.tedam.ui.components.basic.TedamPanel; import com.lbs.tedam.ui.components.layout.TedamHorizontalLayout; import com.lbs.tedam.ui.util.DateTimeFormatter; import com.lbs.tedam.ui.util.TedamStatic; import com.lbs.tedam.util.EnumsV2.CommandStatus; -import com.lbs.tedam.util.EnumsV2.JobStatus; import com.vaadin.icons.VaadinIcons; -import com.vaadin.server.Resource; import com.vaadin.ui.ProgressBar; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.ui.themes.ValoTheme; @Component @Scope("prototype") -public class TedamJobPanel extends TedamPanel implements TedamLocalizerWrapper { +public class TedamJobPanel extends AbstractManagerPanel implements TedamLocalizerWrapper { - /** - * long serialVersionUID - */ private static final long serialVersionUID = 1L; - private final String JOB_PANEL_STYLE = ValoTheme.PANEL_WELL + " jobpanel"; - - private final DateTimeFormatter dateTimeFormetter; private Job job; - - private VerticalLayout mainLayout; - private TedamButton btnStart; - private TedamButton btnStop; - private TedamButton btnUnfollow; - private TedamButton btnReset; - private JobPanelButtonClickListener clickListener; @Autowired @@ -72,30 +53,13 @@ public void init() { initUI(); } - private void initUI() { - setSizeUndefined(); - - mainLayout = new VerticalLayout(); - setContent(mainLayout); - } - - public void build() { - setStyleName(JOB_PANEL_STYLE); + private void build() { + setStyleName(PANEL_STYLE); addStyleName(TedamStatic.getJobStatusColorMap().get(job.getStatus()).toString().toLowerCase()); setCaption(job.getId() + " - " + job.getName()); + setIcon(VaadinIcons.FILE); buildVerticalLayout(job); - buildButtons(job); - - } - - private void buildButtons(Job job) { - if (JobStatus.getInActiveJobStatus().contains(job.getStatus())) { - getBtnStart().setEnabled(true); - getBtnStop().setEnabled(false); - } else { - getBtnStart().setEnabled(false); - getBtnStop().setEnabled(true); - } + buildButtons(job.getStatus()); } private void buildVerticalLayout(Job job) { @@ -112,23 +76,9 @@ private void buildVerticalLayout(Job job) { int completedJobDetailSize = (int) job.getJobDetails().stream().filter(jobDetail -> CommandStatus.COMPLETED.equals(jobDetail.getStatus())).count(); ProgressBar progressBar = buildProgressBar(completedJobDetailSize, job.getJobDetails().size()); TedamHorizontalLayout footer = buildFooter(job); - mainLayout.addComponents(environment, lastExecutingUser, progressBar, footer); } - private ProgressBar buildProgressBar(int completedJobDetailSize, int allJobDetailSize) { - ProgressBar progressBar = new ProgressBar(); - progressBar.setValue(((float) completedJobDetailSize / allJobDetailSize)); - progressBar.setDescription(completedJobDetailSize + "/" + allJobDetailSize); - return progressBar; - } - - private TedamLabel buildLabel(String parameter) { - TedamLabel label = new TedamLabel(parameter); - label.setStyleName(ValoTheme.LABEL_TINY); - return label; - } - private TedamHorizontalLayout buildFooter(Job job) { TedamHorizontalLayout footer = new TedamHorizontalLayout(); footer.setStyleName("v-window-bottom-toolbar"); @@ -146,27 +96,6 @@ private TedamHorizontalLayout buildFooter(Job job) { return footer; } - private TedamButton buildButton(String id, String jobId, Resource icon) { - TedamButton button = new TedamButton(id, icon); - button.setId(button.getId() + jobId); - button.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); - button.setWidthUndefined(); - button.setCaption(""); - return button; - } - - public TedamButton getBtnStart() { - return btnStart; - } - - public TedamButton getBtnStop() { - return btnStop; - } - - public TedamButton getBtnUnfollow() { - return btnUnfollow; - } - public Job getJob() { return job; } diff --git a/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerJobGroupDataProvider.java b/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerJobGroupDataProvider.java new file mode 100644 index 0000000..ce67a1a --- /dev/null +++ b/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerJobGroupDataProvider.java @@ -0,0 +1,53 @@ +/* + * Copyright 2014-2019 Logo Business Solutions + * (a.k.a. LOGO YAZILIM SAN. VE TIC. A.S) + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.lbs.tedam.ui.view.jobmanager; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.vaadin.spring.annotation.PrototypeScope; + +import com.lbs.tedam.app.security.SecurityUtils; +import com.lbs.tedam.data.service.JobGroupService; +import com.lbs.tedam.exception.localized.LocalizedException; +import com.lbs.tedam.model.JobGroup; +import com.lbs.tedam.ui.view.AbstractDataProvider; +import com.vaadin.spring.annotation.SpringComponent; + +@SpringComponent +@PrototypeScope +public class TedamManagerJobGroupDataProvider extends AbstractDataProvider { + + private static final long serialVersionUID = 1L; + + private final JobGroupService jobGroupService; + + @Autowired + public TedamManagerJobGroupDataProvider(JobGroupService jobGroupService) throws LocalizedException { + this.jobGroupService = jobGroupService; + buildListDataProvider(getJobGroups()); + } + + public void refresh() throws LocalizedException { + refreshDataProviderByItems(getJobGroups()); + } + + public List getJobGroups() throws LocalizedException { + return jobGroupService.getRunnableJobGroupListByProject(SecurityUtils.getUserSessionProject()); + } +} diff --git a/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerPresenter.java b/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerPresenter.java index de94048..0308ff1 100644 --- a/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerPresenter.java +++ b/src/main/java/com/lbs/tedam/ui/view/jobmanager/TedamManagerPresenter.java @@ -35,6 +35,7 @@ import com.lbs.tedam.app.TedamRestTemplate; import com.lbs.tedam.app.security.SecurityUtils; import com.lbs.tedam.data.service.JobDetailService; +import com.lbs.tedam.data.service.JobGroupService; import com.lbs.tedam.data.service.JobService; import com.lbs.tedam.data.service.PropertyService; import com.lbs.tedam.data.service.TedamUserService; @@ -44,11 +45,14 @@ import com.lbs.tedam.model.Client; import com.lbs.tedam.model.Job; import com.lbs.tedam.model.JobDetail; +import com.lbs.tedam.model.JobGroup; import com.lbs.tedam.model.Project; import com.lbs.tedam.model.TedamUser; import com.lbs.tedam.model.DTO.ClientDTO; import com.lbs.tedam.ui.AppUI; import com.lbs.tedam.ui.TedamFaceEvents.JobEditedEvent; +import com.lbs.tedam.ui.components.TedamJobGroupPanel; +import com.lbs.tedam.ui.components.TedamJobGroupPanel.JobGroupPanelButtonClickListener; import com.lbs.tedam.ui.components.TedamJobPanel; import com.lbs.tedam.ui.components.TedamJobPanel.JobPanelButtonClickListener; import com.lbs.tedam.ui.dialog.ConfirmationListener; @@ -78,11 +82,15 @@ public class TedamManagerPresenter implements HasLogger, Serializable, TedamLoca public static final String START_JOB = "startJob"; private final String STOP_JOB = "stopJob"; + public static final String START_JOB_GROUP = "startJobGroup"; + private final String STOP_JOB_GROUP = "stopJobGroup"; private final String GET_CLIENT_MAP = "getClientMap"; private final BeanFactory beanFactory; private final TedamManagerJobDataProvider tedamManagerJobDataProvider; + private final TedamManagerJobGroupDataProvider tedamManagerJobGroupDataProvider; private final JobService jobService; + private final JobGroupService jobGroupService; private final JobDetailService jobDetailService; private final TestSetService testSetService; private final PropertyService propertyService; @@ -98,7 +106,8 @@ public class TedamManagerPresenter implements HasLogger, Serializable, TedamLoca @Autowired public TedamManagerPresenter(PropertyService propertyService, JobService jobService, ViewEventBus viewEventBus, BeanFactory beanFactory, TedamManagerJobDataProvider tedamManagerJobDataProvider, - TedamUserService userService, JobDetailService jobDetailService, TestSetService testSetService) { + TedamUserService userService, JobDetailService jobDetailService, TestSetService testSetService, + TedamManagerJobGroupDataProvider tedamManagerJobGroupDataProvider, JobGroupService jobGroupService) { this.propertyService = propertyService; this.jobService = jobService; this.viewEventBus = viewEventBus; @@ -107,6 +116,8 @@ public TedamManagerPresenter(PropertyService propertyService, JobService jobServ this.userService = userService; this.jobDetailService = jobDetailService; this.testSetService = testSetService; + this.tedamManagerJobGroupDataProvider = tedamManagerJobGroupDataProvider; + this.jobGroupService = jobGroupService; } @PostConstruct @@ -129,6 +140,108 @@ public void build() { } } }); + + List runnableJobGroupList = (List) tedamManagerJobGroupDataProvider.getListDataProvider() + .getItems(); + runnableJobGroupList.forEach(jobGroup -> { + TedamJobGroupPanel panel = buildJobGroupPanel(jobGroup); + tedamManagerView.addComponent(panel); + }); + } + + private TedamJobGroupPanel buildJobGroupPanel(JobGroup jobGroup) { + TedamJobGroupPanel panel = beanFactory.getBean(TedamJobGroupPanel.class); + panel.setClickListener(new JobGroupPanelButtonClickListener() { + + @Override + public void stopButtonClickOperations(JobGroup jobGroup) { + try { + doStopJobGroupButtonClickOperations(jobGroup); + } catch (LocalizedException e) { + getLogger().error(e.getMessage(), e); + } + } + + @Override + public void startButtonClickOperations(JobGroup jobGroup) { + try { + doStartJobGroupButtonClickOperations(jobGroup); + } catch (LocalizedException e) { + tedamManagerView.showExceptionMessage(e); + } + } + + @Override + public void unfollowButtonClickOperations(JobGroup jobGroup) { + try { + doUnfollowJobGroupButtonClickOperations(jobGroup); + } catch (LocalizedException e) { + getLogger().error(e.getMessage(), e); + } + } + + @Override + public void resetButtonClickOperations(JobGroup jobGroup) { + try { + doResetJobGroupButtonClickOperations(jobGroup); + } catch (LocalizedException e) { + getLogger().error(e.getMessage(), e); + } + } + }); + panel.setJobGroup(jobGroup); + return panel; + } + + private void doStopJobGroupButtonClickOperations(JobGroup jobGroup) throws LocalizedException { + String responseString = restTemplate + .postForObject( + propertyService.getPropertyByNameAndParameter(Constants.PROPERTY_CONFIG, + Constants.PROPERTY_JOBRUNNER_REST_URL).getValue() + STOP_JOB_GROUP, + jobGroup.getId(), String.class); +// tedamManagerView.showJobMessage(job, responseString); +// rebuildTedamJobPanel(job); + } + + private void doStartJobGroupButtonClickOperations(JobGroup jobGroup) throws LocalizedException { + String responseString = restTemplate + .postForObject( + propertyService.getPropertyByNameAndParameter(Constants.PROPERTY_CONFIG, + Constants.PROPERTY_JOBRUNNER_REST_URL).getValue() + START_JOB_GROUP, + jobGroup.getId(), String.class); +// tedamManagerView.showJobMessage(job, responseString); +// rebuildTedamJobPanel(job); + } + + private void doUnfollowJobGroupButtonClickOperations(JobGroup jobGroup) throws LocalizedException { + jobGroup.setActive(false); + jobGroup = jobGroupService.save(jobGroup); +// TedamJobPanel tedamJobPanel = getTedamJobPanel(job); +// tedamManagerView.removeComponent(tedamJobPanel); + } + + private void doResetJobGroupButtonClickOperations(JobGroup jobGroup) throws LocalizedException { + TedamDialog.confirm(AppUI.getCurrent(), new ConfirmationListener() { + + @Override + public void onConfirm() { + Integer jobId = jobGroup.getId(); + try { + jobService.resetJob(jobId); + jobDetailService.resetJobDetail(jobId); + testSetService.resetTestSet(jobId); + jobGroup.setStatus(JobStatus.NOT_STARTED); +// rebuildTedamJobPanel(jobGroup); + } catch (LocalizedException e) { + getLogger().error(e.getMessage(), e); + } + } + + @Override + public void onCancel() { + } + }, getLocaleValue("confirm.message.resetJob"), getLocaleValue("general.button.ok"), + getLocaleValue("general.button.cancel")); } private TedamJobPanel buildPanel(Job job) {