Dave Chen has uploaded a new change for review. Change subject: wedadmin: Trusted Compute Pools - Open Attestation integration with oVirt engine proposal ......................................................................
wedadmin: Trusted Compute Pools - Open Attestation integration with oVirt engine proposal Divide "cluster policy" side tab into two sections, "scheduling policy" and "additional properties" with an "Enable Trusted Service" checkbox. Change-Id: I59396a68708797b868bcd871abb08b3dd514f757 Signed-off-by: Dave Chen <[email protected]> Signed-off-by: Jimmy <[email protected]> Signed-off-by: Zhang Lijuan <[email protected]> Signed-off-by: Quan Xu <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterPolicyModel.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml 5 files changed, 57 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/11/14611/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java index 5437415..f8179eb 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java @@ -359,6 +359,7 @@ clusterModel.setEntity(cluster); clusterModel.Init(true); clusterModel.getClusterPolicyModel().setEditClusterPolicyFirst(clusterPolicyFirst); + clusterModel.getClusterPolicyModel().getEnableTrustedService().setEntity(cluster.supportsTrustedService()); setWindow(clusterModel); clusterModel.setTitle(ConstantsManager.getInstance().getConstants().editClusterTitle()); clusterModel.setHashName("edit_cluster"); //$NON-NLS-1$ @@ -624,6 +625,7 @@ cluster.setVirtService((Boolean) model.getEnableOvirtService().getEntity()); cluster.setGlusterService((Boolean) model.getEnableGlusterService().getEntity()); cluster.setselection_algorithm(model.getClusterPolicyModel().getSelectionAlgorithm()); + cluster.setTrustedService((Boolean) model.getClusterPolicyModel().getEnableTrustedService().getEntity()); if (model.getClusterPolicyModel().getOverCommitTime().getIsAvailable()) { cluster.setcpu_over_commit_duration_minutes(Integer.parseInt(model.getClusterPolicyModel().getOverCommitTime() diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterPolicyModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterPolicyModel.java index a4cecb3..38a84e1 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterPolicyModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterPolicyModel.java @@ -113,6 +113,16 @@ } } + private EntityModel privateEnableTrustedService; + + public EntityModel getEnableTrustedService() { + return privateEnableTrustedService; + } + + public void setEnableTrustedService(EntityModel value) { + this.privateEnableTrustedService = value; + } + public void SaveDefaultValues() { if (getSelectionAlgorithm() == VdsSelectionAlgorithm.EvenlyDistribute) @@ -159,7 +169,7 @@ } setOverCommitTime(new EntityModel()); - + setEnableTrustedService(new EntityModel()); // Set all properties according to default selected algorithm: SelectionAlgorithmChanged(); } diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java index 7ae679e..064cc7d 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java @@ -124,6 +124,15 @@ @DefaultStringValue("Description") String clusterNewNetworkDescriptionLabel(); + @DefaultStringValue("Scheduling Policy") + String clusterPolicySchedulePolicyPanelTitle(); + + @DefaultStringValue("Additional Properties") + String clusterPolicyAdditionalPropsPanelTitle(); + + @DefaultStringValue("Enable Trusted Service") + String clusterPolicyEnableTrustedServiceLabel(); + @DefaultStringValue("VM network") String clusterNewNetworkPopupVmNetworkLabel(); diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java index 5ead769..0627ccf 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java @@ -255,6 +255,10 @@ @Ignore SimplePanel rightDummySlider; + @UiField + @Ignore + Label schedulePolicyPanelTitle; + @UiField(provided = true) @Ignore RadioButton policyRadioButton_none; @@ -282,6 +286,15 @@ @UiField @Ignore Label minTimeLabel; + + @UiField + @Ignore + Label additionPropsPanelTitle; + + @UiField(provided = true) + @Path(value = "clusterPolicyModel.enableTrustedService.entity") + @WithElementId + EntityModelCheckBoxEditor enableTrustedServiceEditor; private final Driver driver = GWT.create(Driver.class); @@ -322,6 +335,7 @@ optimizationCustomEditor.setContentWidgetStyleName(style.fullWidth()); countThreadsAsCoresEditor.setContentWidgetStyleName(style.fullWidth()); + enableTrustedServiceEditor.setContentWidgetStyleName(style.fullWidth()); overCommitTimeEditor.addContentWidgetStyleName(style.timeTextBoxEditorWidget()); } @@ -361,6 +375,7 @@ clusterPolicyTab.setLabel(constants.clusterPopupClusterPolicyTabLabel()); + schedulePolicyPanelTitle.setText(constants.clusterPolicySchedulePolicyPanelTitle()); policyRadioButton_none.setText(constants.clusterPolicyNoneLabel()); policyRadioButton_evenDist.setText(constants.clusterPolicyEvenDistLabel()); policyRadioButton_powerSave.setText(constants.clusterPolicyPowSaveLabel()); @@ -368,6 +383,9 @@ minServiceLevelLabel.setText(constants.clusterPolicyMinServiceLevelLabel()); forTimeLabel.setText(constants.clusterPolicyForTimeLabel()); minTimeLabel.setText(constants.clusterPolicyMinTimeLabel()); + + additionPropsPanelTitle.setText(constants.clusterPolicyAdditionalPropsPanelTitle()); + enableTrustedServiceEditor.setLabel(constants.clusterPolicyEnableTrustedServiceLabel()); } private void initRadioButtonEditors() { @@ -413,6 +431,8 @@ importGlusterConfigurationEditor = new EntityModelCheckBoxEditor(Align.RIGHT); countThreadsAsCoresEditor = new EntityModelCheckBoxEditor(Align.RIGHT); + + enableTrustedServiceEditor = new EntityModelCheckBoxEditor(Align.RIGHT); } private void initInfoIcons(ApplicationResources resources, ApplicationConstants constants, ApplicationTemplates templates) diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml index 9e50cab..7e8ba32 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml @@ -91,17 +91,19 @@ .minLabel { height: 10px; width: 10px; - margin: 3px; + margin-top: 3px; + margin-left: 6px; background-color: #AFBF27; } .maxLabel { height: 10px; width: 10px; - margin: 3px; + margin-top: 3px; + margin-left: 6px; background-color: #4E9FDD; } .marginPanel { - margin: 5px; + margin: 6px; } .topMarginPanel { margin-top: 10px; @@ -120,7 +122,7 @@ } .labelStyle { margin-top: 3px; - margin-left: 5px; + margin-left: 6px; } .gerySplitPanel { background-color: grey; @@ -196,8 +198,9 @@ <t:tab> <t:DialogTab ui:field="clusterPolicyTab"> <t:content> - <g:VerticalPanel> - <g:FlowPanel width="300px"> + <g:FlowPanel> + <g:FlowPanel addStyleNames="{style.radioButtonsTabContent}"> + <g:Label ui:field="schedulePolicyPanelTitle" addStyleNames="{style.panelTitle}" /> <g:HorizontalPanel addStyleNames="{style.marginPanel}"> <g:RadioButton ui:field="policyRadioButton_none"/> <g:RadioButton ui:field="policyRadioButton_evenDist"/> @@ -214,7 +217,7 @@ addStyleNames="{style.geryPanel}" /> </g:HorizontalPanel> </g:FlowPanel> - <g:HorizontalPanel ui:field="timeHorizontalPanel" height="20px"> + <g:HorizontalPanel ui:field="timeHorizontalPanel" width="70px" height="20px"> <g:Label ui:field="forTimeLabel" addStyleNames="{style.labelStyle}"/> <e:EntityModelTextBoxEditor ui:field="overCommitTimeEditor" width="40px" height="20px" addStyleNames="{style.timeTextBoxEditorWidget}"/> <g:Label ui:field="minTimeLabel" addStyleNames="{style.labelStyle}"/> @@ -230,7 +233,11 @@ <g:Label ui:field="minServiceLevelLabel"/> </g:HorizontalPanel> </g:FlowPanel> - </g:VerticalPanel> + <g:FlowPanel ui:field="additionPropsPanel" addStyleNames="{style.nestedSubsequentPanel}"> + <g:Label ui:field="additionPropsPanelTitle" addStyleNames="{style.panelTitle}" /> + <e:EntityModelCheckBoxEditor ui:field="enableTrustedServiceEditor" /> + </g:FlowPanel> + </g:FlowPanel> </t:content> </t:DialogTab> </t:tab> -- To view, visit http://gerrit.ovirt.org/14611 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59396a68708797b868bcd871abb08b3dd514f757 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dave Chen <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
