| Index: frontend/client/src/autotest/afe/AfeClient.java
|
| diff --git a/frontend/client/src/autotest/afe/AfeClient.java b/frontend/client/src/autotest/afe/AfeClient.java
|
| index bea64843ddbcfbfec2e8f51d842b9f526eb6a4e0..3546708155d58c9fd8ac1ecf999e5cc8a49fc35f 100644
|
| --- a/frontend/client/src/autotest/afe/AfeClient.java
|
| +++ b/frontend/client/src/autotest/afe/AfeClient.java
|
| @@ -1,13 +1,12 @@
|
| package autotest.afe;
|
|
|
| +import autotest.afe.CreateJobView.JobCreateListener;
|
| import autotest.afe.HostDetailView.HostDetailListener;
|
| import autotest.afe.HostListView.HostListListener;
|
| import autotest.afe.JobDetailView.JobDetailListener;
|
| import autotest.afe.JobListView.JobSelectListener;
|
| import autotest.afe.RecurringView.RecurringSelectListener;
|
| import autotest.afe.UserPreferencesView.UserPreferencesListener;
|
| -import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
|
| -import autotest.afe.create.CreateJobViewTab;
|
| import autotest.common.CustomHistory;
|
| import autotest.common.JsonRpcProxy;
|
| import autotest.common.SiteCommonClassFactory;
|
| @@ -25,7 +24,7 @@ public class AfeClient implements EntryPoint {
|
| private JobListView jobList;
|
| private JobDetailView jobDetail;
|
| private RecurringView recurringView;
|
| - private CreateJobViewTab createJob;
|
| + private CreateJobView createJob;
|
| private HostListView hostListView;
|
| private HostDetailView hostDetailView;
|
| private UserPreferencesView userPreferencesView;
|
| @@ -38,7 +37,7 @@ public class AfeClient implements EntryPoint {
|
| public void onModuleLoad() {
|
| JsonRpcProxy.setDefaultBaseUrl(JsonRpcProxy.AFE_BASE_URL);
|
| NotifyManager.getInstance().initialize();
|
| -
|
| +
|
| // initialize static data, and don't show main UI until that's done
|
| StaticDataRepository.getRepository().refresh(
|
| new StaticDataRepository.FinishedCallback() {
|
| @@ -47,13 +46,13 @@ public class AfeClient implements EntryPoint {
|
| }
|
| });
|
| }
|
| -
|
| +
|
| private JobCreateListener jobCreateListener = new JobCreateListener() {
|
| public void onJobCreated(int jobId) {
|
| showJob(jobId);
|
| }
|
| };
|
| -
|
| +
|
| protected void finishLoading() {
|
| SiteCommonClassFactory.globalInitialize();
|
|
|
| @@ -66,59 +65,59 @@ public class AfeClient implements EntryPoint {
|
| public void onHostSelected(String hostname) {
|
| showHost(hostname);
|
| }
|
| -
|
| +
|
| public void onCloneJob(JSONValue cloneInfo) {
|
| createJob.ensureInitialized();
|
| createJob.cloneJob(cloneInfo);
|
| mainTabPanel.selectTabView(createJob);
|
| }
|
| -
|
| +
|
| public void onCreateRecurringJob(int jobId) {
|
| recurringView.ensureInitialized();
|
| recurringView.createRecurringJob(jobId);
|
| mainTabPanel.selectTabView(recurringView);
|
| }
|
| });
|
| -
|
| - recurringView = new RecurringView(new RecurringSelectListener() {
|
| +
|
| + recurringView = new RecurringView(new RecurringSelectListener() {
|
| public void onRecurringSelected(int jobId) {
|
| showJob(jobId);
|
| }
|
| });
|
| -
|
| +
|
| createJob = AfeUtils.factory.getCreateJobView(jobCreateListener);
|
| -
|
| +
|
| hostListView = new HostListView(new HostListListener() {
|
| public void onHostSelected(String hostname) {
|
| showHost(hostname);
|
| }
|
| }, jobCreateListener);
|
| -
|
| +
|
| hostDetailView = new HostDetailView(new HostDetailListener() {
|
| public void onJobSelected(int jobId) {
|
| showJob(jobId);
|
| }
|
| }, jobCreateListener);
|
| -
|
| +
|
| userPreferencesView = new UserPreferencesView(new UserPreferencesListener() {
|
| public void onPreferencesChanged() {
|
| createJob.onPreferencesChanged();
|
| }
|
| });
|
| -
|
| - TabView[] tabViews = new TabView[] {jobList, jobDetail, recurringView, createJob,
|
| +
|
| + TabView[] tabViews = new TabView[] {jobList, jobDetail, recurringView, createJob,
|
| hostListView, hostDetailView, userPreferencesView};
|
| - for (TabView tabView : tabViews) {
|
| - mainTabPanel.addTabView(tabView);
|
| + for(int i = 0; i < tabViews.length; i++) {
|
| + mainTabPanel.addTabView(tabViews[i]);
|
| }
|
| -
|
| +
|
| final RootPanel tabsRoot = RootPanel.get("tabs");
|
| tabsRoot.add(mainTabPanel);
|
| CustomHistory.processInitialToken();
|
| mainTabPanel.initialize();
|
| tabsRoot.setStyleName("");
|
| }
|
| -
|
| +
|
| protected void showJob(int jobId) {
|
| jobDetail.ensureInitialized();
|
| jobDetail.updateObjectId(Integer.toString(jobId));
|
|
|