Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions chat_ui/Dockerfile.dev

This file was deleted.

40 changes: 0 additions & 40 deletions chat_ui/chat_deployment_dev.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ spec:
name: http
selector:
app: chat-app
# type: LoadBalancer
# loadBalancerIP: "34.118.4.64"
type: NodePort
---
apiVersion: apps/v1
Expand All @@ -32,7 +30,6 @@ spec:
containers:
- name: chat
image: europe-west2-docker.pkg.dev/agentdialogue-2cd4b/task-mad-images-repository/chat:latest
#imagePullPolicy: Never
imagePullPolicy: Always
stdin: true
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
args:
- apply
- -f
- ${_ROOT_FOLDER}/${_FRONTEND_CONFIG_FILE}
- ${_ROOT_FOLDER}/${_CONFIG_PATH}/${_FRONTEND_CONFIG_FILE}
env:
- CLOUDSDK_COMPUTE_REGION=${_CLUSTER_LOCATION}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
Expand All @@ -22,7 +22,7 @@ steps:
args:
- apply
- -f
- ${_ROOT_FOLDER}/${_K8_FILE}
- ${_ROOT_FOLDER}/${_CONFIG_PATH}/${_K8_FILE}
env:
- CLOUDSDK_COMPUTE_REGION=${_CLUSTER_LOCATION}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
Expand All @@ -31,21 +31,22 @@ steps:
args:
- apply
- -f
- ${_ROOT_FOLDER}/${_INGRESS_FILE}
- ${_ROOT_FOLDER}/${_CONFIG_PATH}/${_INGRESS_FILE}
env:
- CLOUDSDK_COMPUTE_REGION=${_CLUSTER_LOCATION}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}

substitutions:
_ROOT_FOLDER: chat_ui
_ARTIFACT_REGISTRY_REPOSITORY: task-mad-images-repository
_CLUSTER_LOCATION: europe-central2-a
_CLUSTER_NAME: chat-cluster
_IMAGE_NAME: chat
_IMAGE_VERSION: latest
_ROOT_FOLDER: chat_ui
_CONFIG_PATH: deployment_config/cloud
_FRONTEND_CONFIG_FILE: frontend_config.yaml
_K8_FILE: chat_deployment_nginx.yaml
_INGRESS_FILE: chat_managed_cert_ingress.yaml
_CLUSTER_LOCATION: europe-central2-a
_CLUSTER_NAME: chat-cluster
_K8_FILE: chat_deployment.yaml


# Time out after 30 minutes
Expand Down
3 changes: 0 additions & 3 deletions chat_ui/src/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


:root{
--main-background-image: url("https://images.unsplash.com/photo-1547592180-85f173990554?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80");
--header-height: 60px;
--logo-height: 40px;
--main-title-font-size: 40px;
Expand All @@ -21,14 +20,12 @@
position: absolute;
display: flex;
flex-direction: column;
background-image: var(--main-background-image);
background-size: cover;
}

.appHeader {
background-color: var(--header-top);
height: var(--header-height);
background-color: black;
}

.appLogo {
Expand Down
50 changes: 13 additions & 37 deletions chat_ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { Component } from "react"
import css from "./App.module.css"
// import {HomePanel} from "./home/HomePanel"
// import {RatingsPanel} from "./ratings/RatingsPanel"
import logo from "./resources/img/uog_logo.png"
import { ChatConfigs } from "./common/chat_ui_configs"
import logo from "./resources/img/chat_ui_logo.png"
import { WoZPanel } from "./woz/WoZPanel"

// tslint:disable-next-line:interface-name
Expand All @@ -18,12 +17,14 @@ class App extends Component<{}, IAppState> {
super(props)

const params: StringMap = {
conversationID: "test",
url: "https://backend-server.online",
userID: "user",
isAudioRecordingEnabled: '',
isTextToSpeechEnabled: '',
isSequentialNavigationEnabled: ''
conversationID: ChatConfigs.conversation_id,
url: ChatConfigs.url,
userID: ChatConfigs.userID,
isAudioRecordingEnabled: ChatConfigs.isAudioRecordingEnabled,
isTextToSpeechEnabled: ChatConfigs.isTextToSpeechEnabled,
isSequentialNavigationEnabled: ChatConfigs.isSequentialNavigationEnabled,
isSequentialComponentFullPage: ChatConfigs.isSequentialComponentFullPage,
showSequentialPageCheckboxes: ChatConfigs.showSequentialPageCheckboxes
}
new URL(window.location.href)
.searchParams.forEach((value, key) => {
Expand All @@ -38,39 +39,14 @@ class App extends Component<{}, IAppState> {

public render() {

// const panes = [
// {
// menuItem: "Home",
// render: () => <Tab.Pane
// className={css.mainTabPane} attached><HomePanel/></Tab.Pane>,
// },
// { menuItem: "Offline MT Ratings",
// render: () => <Tab.Pane
// className={css.mainTabPane} attached><RatingsPanel/></Tab.Pane>,
// },
// { menuItem: "TaskMAD",
// render: () => <Tab.Pane
// className={css.mainTabPane} attached>
// <WoZPanel params={this.state.params}/></Tab.Pane>,
// },
// ]

return (
<div className={css.app}>
<div className={css.app} style={{ backgroundImage: `url(${ChatConfigs.chat_ui_background_image})` }}>
<div className={css.overlayLayer}>
<header className={css.appHeader}>
<header className={css.appHeader} style={{ backgroundColor: ChatConfigs.chat_ui_header_color }}>
<img src={logo} className={css.appLogo} alt="logo" />
<h1 className={css.appTitle}>TaskMAD</h1>
<h1 className={css.appTitle}>{ChatConfigs.chat_ui_title}</h1>
</header>
{/* <Tab className={css.mainTab}
menu={{
attached: true,
color: "orange",
inverted: true,
tabular: false }}
panes={panes} /> */}
<WoZPanel params={this.state.params} />
<a className={css.appFooter} href="https://www.flaticon.com/free-icons/chatbot" title="chatbot icons"></a>
</div>
</div>
)
Expand Down
15 changes: 15 additions & 0 deletions chat_ui/src/common/chat_ui_configs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export class ChatConfigs{
public static chat_ui_title:string = "TaskMAD";
public static chat_ui_background_image:string = "https://images.unsplash.com/photo-1547592180-85f173990554?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2370&q=80";
public static chat_ui_header_color:string = "rgba(0,0,0,1)";

public static conversation_id:string = "test";
public static url:string = "https://backend-server.online";
public static userID:string = "user";
public static isAudioRecordingEnabled:string = "false";
public static isTextToSpeechEnabled:string = "false";
public static isSequentialNavigationEnabled:string = "false";
public static isSequentialComponentFullPage:string = "false";
public static showSequentialPageCheckboxes:string = "false";

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
overflow-y: scroll;
padding: var(--chat-container-top);
}
.recipeCheckbox{
.sequentialCheckbox{
float: left;
}

Expand All @@ -15,11 +15,11 @@
margin-bottom: 5px;
}

.recipeSectionDiv{
.sectionDiv{
margin-bottom: 15px;
}

.recipeStepImage{
.stepImage{
height: auto;
width: 60%;
border-radius: 1em;
Expand All @@ -36,7 +36,7 @@
color: white !important;
}

.recipeComponentContainer{
.componentContainer{
background-color: var(--chat-container-background);
padding: var(--chat-container-top);
border-radius: var(--chat-container-border-radius);
Expand Down
Loading