usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [17/50] [abbrv] git commit: removing uncessearcy lines
Date Mon, 07 Jul 2014 18:16:34 GMT
removing uncessearcy lines


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/06812a64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/06812a64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/06812a64

Branch: refs/heads/two-dot-o
Commit: 06812a641a12e7831a4c175b35cfaf736bda0b4a
Parents: 1d1eed1
Author: Salih Kardan <kardan38@gmail.com>
Authored: Fri Jun 27 21:00:44 2014 +0300
Committer: Salih Kardan <kardan38@gmail.com>
Committed: Fri Jun 27 21:00:44 2014 +0300

----------------------------------------------------------------------
 .../chop/webapp/view/main/MainView.java         |   2 -
 .../chop/webapp/view/module/ModuleLayout.java   |   9 --
 .../webapp/view/module/ModuleListWindow.java    | 114 -------------------
 3 files changed, 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/06812a64/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/main/MainView.java
----------------------------------------------------------------------
diff --git a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/main/MainView.java
b/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/main/MainView.java
index 0127093..ed768da 100644
--- a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/main/MainView.java
+++ b/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/main/MainView.java
@@ -31,7 +31,6 @@ import org.apache.usergrid.chop.webapp.service.shiro.ShiroRealm;
 import org.apache.usergrid.chop.webapp.view.module.ModuleLayout;
 import org.apache.usergrid.chop.webapp.view.chart.layout.OverviewChartLayout;
 import org.apache.usergrid.chop.webapp.view.log.LogLayout;
-import org.apache.usergrid.chop.webapp.view.module.ModuleListWindow;
 import org.apache.usergrid.chop.webapp.view.module.ModuleSelectListener;
 import org.apache.usergrid.chop.webapp.view.runner.RunnersLayout;
 import org.apache.usergrid.chop.webapp.view.user.UserListWindow;
@@ -72,7 +71,6 @@ public class MainView extends VerticalLayout implements ModuleSelectListener
{
         modules.addClickListener( new Button.ClickListener() {
             @Override
             public void buttonClick(Button.ClickEvent clickEvent) {
-//                UI.getCurrent().addWindow( new ModuleListWindow( MainView.this ) );
                 tabSheetManager.addTabWithVerticalLayout( new ModuleLayout( MainView.this
), "Modules" );
             }
         });

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/06812a64/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleLayout.java
----------------------------------------------------------------------
diff --git a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleLayout.java
b/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleLayout.java
index 6c6d7d0..3f3757b 100644
--- a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleLayout.java
+++ b/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleLayout.java
@@ -8,7 +8,6 @@ import com.vaadin.ui.VerticalLayout;
 import org.apache.usergrid.chop.api.Module;
 import org.apache.usergrid.chop.webapp.dao.ModuleDao;
 import org.apache.usergrid.chop.webapp.service.InjectorFactory;
-import org.apache.usergrid.chop.webapp.view.module.ModuleSelectListener;
 
 import java.util.List;
 
@@ -51,15 +50,7 @@ public class ModuleLayout extends VerticalLayout{
             Label artifactLabel = new Label( module.getArtifactId( ) );
             Label versionLabel = new Label( module.getVersion( ) );
 
-            // The Table item identifier for the row.
-            String itemId = new String( module.getId( ) );
-
-            // Create a button and handle its click. A Button does not
-            // know the item it is contained in, so we have to store the
-            // item ID as user-defined data.
             Button detailsField = new Button( "show details" );
-            detailsField.setId( itemId );
-            detailsField.setData( itemId );
             detailsField.addStyleName( "link" );
             detailsField.addClickListener( new Button.ClickListener( ) {
                 @Override

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/06812a64/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleListWindow.java
----------------------------------------------------------------------
diff --git a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleListWindow.java
b/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleListWindow.java
deleted file mode 100644
index 9d15498..0000000
--- a/chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/view/module/ModuleListWindow.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.usergrid.chop.webapp.view.module;
-
-
-import java.util.List;
-
-import org.apache.commons.lang.StringUtils;
-
-import org.apache.usergrid.chop.api.Module;
-import org.apache.usergrid.chop.webapp.dao.ModuleDao;
-import org.apache.usergrid.chop.webapp.service.InjectorFactory;
-import org.apache.usergrid.chop.webapp.view.util.PopupWindow;
-
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.ui.AbsoluteLayout;
-import com.vaadin.ui.TreeTable;
-
-
-public class ModuleListWindow extends PopupWindow {
-
-    private static final String PARENT_PREFIX = "parent:";
-
-    private final ModuleSelectListener listener;
-
-    public ModuleListWindow(ModuleSelectListener listener) {
-        super( "Modules" );
-        this.listener = listener;
-    }
-
-
-    @Override
-    protected void addItems(AbsoluteLayout mainLayout) {
-
-        TreeTable treeTable = getTree();
-        treeTable.setWidth( "100%" );
-        treeTable.setHeight( "420px" );
-
-        mainLayout.addComponent( treeTable, "left: 0px; top: 0px;" );
-    }
-
-
-    public TreeTable getTree() {
-
-        TreeTable treeTable = new TreeTable();
-        treeTable.setSelectable( true );
-        treeTable.addContainerProperty( "Group", String.class, "" );
-        treeTable.addContainerProperty( "Artifact", String.class, "" );
-        treeTable.addItemClickListener( getItemClickListener() );
-
-        addTreeItems( treeTable );
-
-        return treeTable;
-    }
-
-
-    private ItemClickEvent.ItemClickListener getItemClickListener() {
-        return new ItemClickEvent.ItemClickListener() {
-            @Override
-            public void itemClick(ItemClickEvent event) {
-                onItemClick(event);
-            }
-        };
-    }
-
-
-    private void onItemClick(ItemClickEvent event) {
-
-        String id = (String) event.getItemId();
-        boolean isModuleVersion = !StringUtils.startsWith( id, PARENT_PREFIX );
-
-        if (isModuleVersion) {
-            close();
-            listener.onModuleSelect(id);
-        }
-    }
-
-
-    private static void addTreeItems( TreeTable treeTable ) {
-
-        ModuleDao moduleDao = InjectorFactory.getInstance( ModuleDao.class );
-        List<Module> modules = moduleDao.getAll();
-
-        for (Module module : modules) {
-            addTreeItem( treeTable, module );
-        }
-    }
-
-
-    private static void addTreeItem( TreeTable treeTable, Module module ) {
-
-        String parentId = String.format( PARENT_PREFIX + "%s-%s", module.getGroupId(), module.getArtifactId()
);
-        treeTable.addItem( new Object[] { module.getGroupId(), module.getArtifactId() },
parentId );
-        treeTable.addItem( new Object[] { module.getVersion(), "" }, module.getId() );
-
-        treeTable.setParent( module.getId(), parentId );
-    }
-}


Mime
View raw message