Skip to content

Commit

Permalink
MARP-1546 Handle Feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
tvtphuc-axonivy committed Dec 6, 2024
1 parent dd1c5b6 commit b9ceecd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@
<ui:define name="content">
<h:outputStylesheet name="layouts/styles/chatwithai.css" />
<h:form id="form" styleClass="form-container">
<p:dialog header="Error" widgetVar="errorDialog" modal="true"
closable="true">
<h:outputText value="#{managedBean.errorMessage}" />
<p:dialog id="errorDialog" widgetVar="errorDialog" header="Error"
showEffect="fade" hideEffect="fade" closable="true"
responsive="true">
<div class="icon-error-message">
<i class="pi pi-exclamation-triangle"
style="font-size: 24px; color: orange;"></i>
<h:outputText class="error-message"
value="#{managedBean.errorMessage}" />
</div>
<br />
<div class="cancel-error-dialog-button">
<p:commandButton value="Cancel"
onclick="PF('errorDialog').hide();" class="ui-confirmdialog-yes" />
</div>
</p:dialog>
<p:panelGrid columns="1" layout="grid">
<div id="model-option">
Expand Down
16 changes: 15 additions & 1 deletion vertexai-google-demo/webContent/layouts/styles/chatwithai.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,18 @@
display: flex;
justify-content: space-between;
margin-top: 10px;
}
}

.cancel-error-dialog-button {
display: flex;
justify-content: flex-end;
}

.icon-error-message {
display: flex;
align-items: center;
gap: 10px;
}

.error-message {
font-size: 14px;
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class GeminiDataRequestServiceUtils {

public static InputStream getInputStream(String keyFilePath) throws IOException {
if (StringUtils.isBlank(keyFilePath)) {
throw new IOException("VertexAi credential file path is empty");
throw new IOException("Vertex AI credential file path is missing. Please provide it and try again!");
}

try {
Expand Down

0 comments on commit b9ceecd

Please sign in to comment.