Package org.apache.oodt.pcs.opsui

Source Code of org.apache.oodt.pcs.opsui.HomePage

/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.apache.oodt.pcs.opsui;

//Wicket imports
import org.apache.oodt.pcs.opsui.config.ConfigPage;
import org.apache.oodt.pcs.opsui.status.StatusPage;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.Link;

/**
*
* Main home page of the web app.
*
* @author mattmann
* @version $Revision$
*
*/
public class HomePage extends OPSUIWebPage {

  protected OpsuiApp app;
 
  public HomePage(PageParameters parameters){
    this.app = (OpsuiApp)getApplication();
   
    add(new Link("fmbrowser_link"){
      /* (non-Javadoc)
       * @see org.apache.wicket.markup.html.link.Link#onClick()
       */
      @Override
      public void onClick() {
       setResponsePage(TypesPage.class);
      }
    });
   
    add(new Link("pcsstatus_link"){
     
    /* (non-Javadoc)
       * @see org.apache.wicket.markup.html.link.Link#onClick()
       */
      @Override
      public void onClick() {
        setResponsePage(StatusPage.class);
       
      }
    });
   
    add(new Link("wmonitor_link"){
       /* (non-Javadoc)
       * @see org.apache.wicket.markup.html.link.Link#onClick()
       */
      @Override
      public void onClick() {
        PageParameters params = new PageParameters();
        params.add("status", "ALL");
        params.add("pageNum", "1");
        setResponsePage(WorkflowInstanceViewerPage.class, params);
       
      }
    });
   
    add(new ExternalLink("ganglia_link", app.getGangliaUrl()));
   
    add(new Link("config_link"){
      /* (non-Javadoc)
       * @see org.apache.wicket.markup.html.link.Link#onClick()
       */
      @Override
      public void onClick() {
        PageParameters params = new PageParameters();
        params.add("tab", "File Manager");
        setResponsePage(ConfigPage.class, params)
      }
  });   
  }
}
TOP

Related Classes of org.apache.oodt.pcs.opsui.HomePage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.