Skip to content

Commit

Permalink
KAA-300: Integrate Avro UI forms to endpoint configuration UI: Cleanu…
Browse files Browse the repository at this point in the history
…p widgets.
  • Loading branch information
ikulikov committed Jan 28, 2015
1 parent a647118 commit 39a2af2
Show file tree
Hide file tree
Showing 93 changed files with 360 additions and 1,869 deletions.
2 changes: 1 addition & 1 deletion server/admin/pom.xml
Expand Up @@ -497,7 +497,7 @@
<exclude>**/*.html</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.avsc</exclude>
<exclude>**/gen/*.java</exclude>
<exclude>**/gen/**/*.java</exclude>
<exclude>src/main/sh/bin/jetty.sh</exclude>
<exclude>src/main/resources/jetty/**</exclude>
</excludes>
Expand Down
Expand Up @@ -65,6 +65,9 @@
<extend-property name="locale" values="en"/>

<set-property-fallback name="locale" value="en"/>

<!-- set-property name="locale" value="en"/-->

<set-configuration-property name="locale.cookie" value="KAA_ADMIN_LOCALE"/>
<set-configuration-property name="locale.useragent" value="Y"/>

Expand Down
Expand Up @@ -39,6 +39,9 @@
<extend-property name="locale" values="en"/>

<set-property-fallback name="locale" value="en"/>

<!-- set-property name="locale" value="en"/-->

<set-configuration-property name="locale.cookie" value="KAA_ADMIN_LOCALE"/>
<set-configuration-property name="locale.useragent" value="Y"/>

Expand Down
Expand Up @@ -160,13 +160,6 @@ button::-moz-focus-inner
background-color: #EFEFEF;
}

.b-app-content {
background-color: #FFFFFF;
box-shadow: 0px 0px 8px rgba(0,0,0,0.5) inset;
height: 100%;
display: flex;
}

.b-app-content-close {
background-color: #FFFFFF;
box-shadow: 0px 0px 8px rgba(0,0,0,0.5) inset;
Expand Down Expand Up @@ -253,33 +246,6 @@ button::-moz-focus-inner
font-weight: normal;
}

.LinkCell {
overflow:visible; /* Shrinkwrap the text in IE7- */
margin:0;
padding:0;
border:0;
/* color:#666666; /* Match your link colour */
background:transparent;
font:inherit; /* Inherit font settings (doesn’t work in IE7-) */
line-height:normal; /* Override line-height to avoid spacing issues */
text-decoration:none; /* Make it look linky */
cursor:pointer; /* Buttons don’t make the cursor change in all browsers */
-moz-user-select:text; /* Make button text selectable in Gecko */
text-decoration: none;
}
/* Make sure keyboard users get visual feedback */
.LinkCell:hover,
.LinkCell:focus {
text-decoration:none;
}
/* Remove mystery padding in Gecko browsers.
* See https://bugzilla.mozilla.org/show_bug.cgi?id=140562
*/
.LinkCell::-moz-focus-inner {
padding:0;
border:0;
}

.linkLabel {
overflow:visible; /* Shrinkwrap the text in IE7- */
margin:0;
Expand Down Expand Up @@ -601,87 +567,6 @@ button::-moz-focus-inner
padding: 20px;
}

.ui-message {
background: none repeat scroll 0 0 #FCFCFC;
border: 1px solid #CCCCCC;
border-radius: 5px 5px 5px 5px;
color: #333333;
margin: 10px 0 0;
padding: 10px 10px 10px 36px;
position: relative;
}

.b-app-content .ui-message {
margin: 0 35px 0;
}

.ui-message.info {
background: none repeat scroll 0 0 #FCFCFC;
border-color: #8C9FB2;
}

.ui-message.warning {
background: none repeat scroll 0 0 #FFFDF6;
border-color: #FFEAAE;
}

.ui-message.error {
background: none repeat scroll 0 0 #D04437;
border-color: #D04437;
color: #FFFFFF;
}

.ui-message.success {
background: none repeat scroll 0 0 #F3F9F4;
border-color: #91C89C;
}
.ui-message.hint {
background: none repeat scroll 0 0 #FCFCFC;
border-color: #AAB8C6;
}


.ui-message .ui-icon {
left: 10px;
position: absolute;
top: 12px;
}

.ui-message .icon-hint, .ui-icon-hint, .ui-message .icon-info, .ui-icon-info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1klEQVR42qWTUQqCQBCGfdKCuogu+qBeoot0kl7TBwU9S3QLyega9ZBh1L/wLyyDLGkLHzj/vzPM7o6eXLv9IQRH0IMnuVAL7b0y0QcVeIPPFPQasJ5KPlkbW5CDFcmpGf8MfLtATeMGEqObBCuOwJV6ZYsjxVhrsoDQEuojiLRQmLa9H5d1nEIHPYOMvrMD6hm9XgcDg2BGgYDesLTAlt596RFSep3jEp0FWnqlDtTMZ4ytZ1SuQZJLDlLtGuUGpNQ3/G7kKP/5M7nbLNnqCzxAR03J/V+HSh9XtOsatQAAAABJRU5ErkJggg==");
}

.ui-message .icon-warning, .ui-icon-warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABA0lEQVR42p2QP0tCURiH7zdQRA3u4OJUiyDY4CDtTuEXuXs0JEQ4uDk5C0EuKoEu+SWcg5baLCS7tNTx98IzyMWjXoeHe95/z3vODdzi2kdTvIo30fL1+YbLIhYOfsV5GsFAOL59zsNjBRfij60lEXKbf1E5RvDExl4URYGwXJfc6JCgwqZYhBp2hs5n4odadZ9gzKYu2x1YrUPt2SeosWEtijsEBfGN5HKXYErxweKkAMk9PbOkoE5hJXI+AbUVvfVtwZzkHTECAGptel8cgisSnyJDk+8GRlZ8MdOwxITghoa9ArhlZmzB+/abDjwh+c8+LBgRnMLEBHnxKJYpBpfMFDbGjWcGPFD11gAAAABJRU5ErkJggg==");
}

.ui-message .icon-error, .ui-icon-error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAzUlEQVR42q2T3QqCQBBGvcqCehETvVBfM71QsGeJ3kIyeo260DC2b+CThoVdsFo44JzdGfZnDIwxNhE4gB4M5EIX2et1sAI1eBnH4FwLNnOeTj6phUdQgDUp6OZxlhxdoOHEDaSAnuMT78GVrhY3y4kyEekqQFK6SXJFlGrbgbcAUccpJegZ5AsK5PS9BCODcEGBkH78tsCO/u4+gp+MOd2vl1hJEC98xkQ9Y+xvJOJopMbXyi3I6Lf8bu1W/uvPZG+z4laf4AE6uthe/wbkrGRlM25n9wAAAABJRU5ErkJggg==");
}

.ui-message .icon-success, .ui-icon-success {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA9klEQVR42qWTPQrCQBSErfwBhRQewDoGFYyHtDEWCSSVR8gBRDxCGjFi4xEstFBR4jyYYnmuK5LAB/vmzexuNpuGfvrzwAcLUIIb2VPzTa8ONkEMXqCywV4KOrbw2jBmYAbaZEatIhvJmBMkbBzB2LHLITjQG5vik+Ko8eORBeh9SlaEiELmCHmgACvWGTORFCWL8Et4IGF6TtRC1qUUdxYtNiOB4wk4s18Aj3qL2v1jAiOQ28L09Khf1CuoVS1heqbs7ayHyEm2INdhdYhLKYI/P+PI+IxBnYuUuK5yCqbUuxyn+irX/Jnc21xyqw9wBTtqgfa/Af067eG0xhemAAAAAElFTkSuQmCC");
}

.ui-icon {
background-position: 0 0;
background-repeat: no-repeat;
border: medium none;
display: inline-block;
height: 16px;
margin: 0;
padding: 0;
text-align: left;
text-indent: -999em;
vertical-align: text-bottom;
width: 16px;
}

.icon-required, .ui-icon-required {
position: absolute;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXklEQVR42u3MsQ2AIBSEYZnHAVjACZzkNUxA6yCOY2HhNnoXn6EggVxjRfHnQh75pmOJX/e7JTPrxo8JRQK+SQUyugj4ZhUIaCPgG1RgRida0c63ClQpQOs4gAH8Bzy5KFqGk8PBaQAAAABJRU5ErkJggg==");
}

.loginPanel {
/*background-color: #e7eef9;*/

Expand Down
Expand Up @@ -48,9 +48,6 @@ public interface KaaAdminStyle extends CssResource {
@ClassName("b-app-cell-button-small")
String bAppCellButtonSmall();

@ClassName("b-app-content")
String bAppContent();

@ClassName("b-app-content-close")
String bAppContentClose();

Expand Down Expand Up @@ -116,33 +113,6 @@ public interface KaaAdminStyle extends CssResource {

String caret();

String error();

String hint();

@ClassName("icon-error")
String iconError();

@ClassName("icon-hint")
String iconHint();

@ClassName("icon-info")
String iconInfo();

@ClassName("icon-required")
String iconRequired();

@ClassName("icon-success")
String iconSuccess();

@ClassName("icon-warning")
String iconWarning();

String info();

@ClassName("LinkCell")
String linkCell();

String linkLabel();

String loginButton();
Expand All @@ -151,34 +121,6 @@ public interface KaaAdminStyle extends CssResource {

String secondary();

String success();

@ClassName("ui-icon")
String uiIcon();

@ClassName("ui-icon-error")
String uiIconError();

@ClassName("ui-icon-hint")
String uiIconHint();

@ClassName("ui-icon-info")
String uiIconInfo();

@ClassName("ui-icon-required")
String uiIconRequired();

@ClassName("ui-icon-success")
String uiIconSuccess();

@ClassName("ui-icon-warning")
String uiIconWarning();

@ClassName("ui-message")
String uiMessage();

String warning();

}

@NotStrict
Expand Down
Expand Up @@ -13,6 +13,7 @@

package org.kaaproject.kaa.server.admin.client.layout;

import org.kaaproject.avro.ui.gwt.client.AvroUiResources.AvroUiStyle;
import org.kaaproject.kaa.server.admin.client.KaaAdminResources.KaaAdminStyle;
import org.kaaproject.kaa.server.admin.client.util.Utils;

Expand Down Expand Up @@ -53,9 +54,12 @@ interface AppLayoutUiBinder extends UiBinder<Widget, AppLayout> {
CustomDeckLayoutPanel navContent;
@UiField(provided=true)
final KaaAdminStyle kaaAdminStyle;
@UiField(provided=true)
final AvroUiStyle avroUiStyle;

public AppLayout() {
kaaAdminStyle = Utils.kaaAdminStyle;
avroUiStyle = Utils.avroUiStyle;
initWidget(uiBinder.createAndBindUi(this));
init();
}
Expand Down Expand Up @@ -92,7 +96,7 @@ private void init() {
navPanel.add(back);
appHeader.setSize("100%", "60px");

appContent.setStyleName(kaaAdminStyle.bAppContent());
appContent.setStyleName(avroUiStyle.bAppContent());
navPanel.setStyleName(kaaAdminStyle.bNavPanel());

back.addClickHandler(new ClickHandler() {
Expand Down
Expand Up @@ -20,12 +20,13 @@
xmlns:kaa="urn:import:org.kaaproject.kaa.server.admin.client">

<ui:with field='kaaAdminStyle' type='org.kaaproject.kaa.server.admin.client.KaaAdminResources.KaaAdminStyle'/>

<ui:with field='avroUiStyle' type='org.kaaproject.avro.ui.gwt.client.AvroUiResources.AvroUiStyle'/>

<gwt:FlowPanel ui:field="mainLayoutPanel">
<gwt:SimplePanel ui:field="appHeader" />
<gwt:FlowPanel ui:field="navPanel">
</gwt:FlowPanel>
<kaa:layout.SimpleWidgetPanel styleName="{kaaAdminStyle.bAppContent}" ui:field="appContent" />
<kaa:layout.SimpleWidgetPanel styleName="{avroUiStyle.bAppContent}" ui:field="appContent" />
</gwt:FlowPanel>

</ui:UiBinder>
Expand Up @@ -16,9 +16,9 @@

package org.kaaproject.kaa.server.admin.client.login;

import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel;
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type;
import org.kaaproject.kaa.server.admin.client.KaaAdminResources.KaaAdminStyle;
import org.kaaproject.kaa.server.admin.client.mvp.view.widget.AlertPanel;
import org.kaaproject.kaa.server.admin.client.mvp.view.widget.AlertPanel.Type;
import org.kaaproject.kaa.server.admin.client.util.Utils;

import com.google.gwt.core.client.GWT;
Expand Down
Expand Up @@ -17,7 +17,8 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:gwt="urn:import:com.google.gwt.user.client.ui"
xmlns:kaa="urn:import:org.kaaproject.kaa.server.admin.client.mvp.view.widget">
xmlns:kaa="urn:import:org.kaaproject.kaa.server.admin.client.mvp.view.widget"
xmlns:avroUi="urn:import:org.kaaproject.avro.ui.gwt.client.widget">

<ui:with field='kaaAdminStyle' type='org.kaaproject.kaa.server.admin.client.KaaAdminResources.KaaAdminStyle'/>

Expand All @@ -35,8 +36,8 @@
</gwt:cell>
</gwt:HorizontalPanel>
<gwt:VerticalPanel width="100%" height="100%" addStyleNames="{style.formStyle}">
<kaa:AlertPanel ui:field="errorPanel"/>
<kaa:AlertPanel ui:field="infoPanel"/>
<avroUi:AlertPanel ui:field="errorPanel"/>
<avroUi:AlertPanel ui:field="infoPanel"/>
<gwt:FormPanel ui:field="loginForm">
<gwt:FlexTable ui:field="loginTable" cellSpacing="8"/>
</gwt:FormPanel>
Expand Down
Expand Up @@ -19,14 +19,14 @@
import java.util.ArrayList;
import java.util.List;

import org.kaaproject.avro.ui.gwt.client.widget.grid.event.RowAction;
import org.kaaproject.avro.ui.gwt.client.widget.grid.event.RowActionEvent;
import org.kaaproject.avro.ui.gwt.client.widget.grid.event.RowActionEventHandler;
import org.kaaproject.kaa.common.dto.HasId;
import org.kaaproject.kaa.server.admin.client.mvp.ClientFactory;
import org.kaaproject.kaa.server.admin.client.mvp.activity.grid.AbstractDataProvider;
import org.kaaproject.kaa.server.admin.client.mvp.event.data.DataEvent;
import org.kaaproject.kaa.server.admin.client.mvp.event.data.DataEventHandler;
import org.kaaproject.kaa.server.admin.client.mvp.event.grid.RowAction;
import org.kaaproject.kaa.server.admin.client.mvp.event.grid.RowActionEvent;
import org.kaaproject.kaa.server.admin.client.mvp.event.grid.RowActionEventHandler;
import org.kaaproject.kaa.server.admin.client.mvp.place.TreePlace;
import org.kaaproject.kaa.server.admin.client.mvp.view.BaseListView;
import org.kaaproject.kaa.server.admin.client.util.Utils;
Expand Down
Expand Up @@ -83,6 +83,8 @@ public AbstractRecordActivity(P place, ClientFactory clientFactory) {
protected abstract void deactivateStruct(String id, AsyncCallback<T> callback);

protected abstract P getRecordPlaceImpl(String applicationId, String schemaId, String endpointGroupId, boolean create, boolean showActive, double random);

protected void schemaSelected(SchemaDto schema) {}

@Override
public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
Expand Down Expand Up @@ -185,9 +187,11 @@ public void onFailure(Throwable caught) {

@Override
public void onSuccess(List<SchemaDto> result) {
recordView.getSchema().setValue(Utils.getMaxSchemaVersions(result));
SchemaDto schema = Utils.getMaxSchemaVersions(result);
recordView.getSchema().setValue(schema);
recordView.getSchema().setAcceptableValues(result);
recordView.getRecordPanel().setData(record);
schemaSelected(schema);
recordView.getRecordPanel().openDraft();
}
});
Expand Down
Expand Up @@ -18,6 +18,7 @@

import java.util.List;

import org.kaaproject.avro.ui.gwt.client.widget.grid.AbstractGrid;
import org.kaaproject.kaa.common.dto.event.ApplicationEventFamilyMapDto;
import org.kaaproject.kaa.common.dto.event.ApplicationEventMapDto;
import org.kaaproject.kaa.common.dto.event.EcfInfoDto;
Expand All @@ -26,7 +27,6 @@
import org.kaaproject.kaa.server.admin.client.mvp.data.EventMapDataProvider;
import org.kaaproject.kaa.server.admin.client.mvp.place.AefMapPlace;
import org.kaaproject.kaa.server.admin.client.mvp.view.AefMapView;
import org.kaaproject.kaa.server.admin.client.mvp.view.grid.AbstractGrid;
import org.kaaproject.kaa.server.admin.client.util.Utils;

import com.google.gwt.event.logical.shared.ValueChangeEvent;
Expand Down

0 comments on commit 39a2af2

Please sign in to comment.