Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuldeep-knoldus committed Jul 16, 2024
1 parent 3143c58 commit e9cd5ce
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
if [ "$SERVICE_NAME" != "blogs-analyzer-ui" ]; then
mvn clean install -DskipTests
fi
IMAGE_NAME=blogs-analyzer/gen-lang-client-0999974873/$SERVICE_NAME:$COMMIT_SHA
IMAGE_NAME=blogs-analyzer-repo/gen-lang-client-0999974873/$SERVICE_NAME:$COMMIT_SHA
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME
cd ..
Expand All @@ -119,7 +119,7 @@ jobs:
for SERVICE_NAME in $(echo $SERVICE_NAMES | tr ',' ' '); do
echo "Deploying $SERVICE_NAME to GKE"
if [ -d "$SERVICE_NAME/k8s" ]; then
sed -i "s|blogs-analyzer/gen-lang-client-0999974873/$SERVICE_NAME:latest|blogs-analyzer/gen-lang-client-0999974873/$SERVICE_NAME:$COMMIT_SHA|g" $SERVICE_NAME/k8s/deployment.yaml
sed -i "s|blogs-analyzer-repo/gen-lang-client-0999974873/$SERVICE_NAME:latest|blogs-analyzer-repo/gen-lang-client-0999974873/$SERVICE_NAME:$COMMIT_SHA|g" $SERVICE_NAME/k8s/deployment.yaml
kubectl apply -f $SERVICE_NAME/k8s/
fi
done
2 changes: 1 addition & 1 deletion blogs-analyzer-ui/k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: blogs-analyzer-ui
image: blogs-analyzer/gen-lang-client-0999974873/blogs-analyzer-ui:latest
image: blogs-analyzer-repo/gen-lang-client-0999974873/blogs-analyzer-ui:latest
ports:
- containerPort: 80
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<label for="fileInput" class="upload-label" matTooltip="Click to upload a .doc or .docx file">
<img src="assets/images/upload_file.svg" alt="upload doc file">
</label>
<div *ngIf="errorMessage" class="file-upload" [innerHTML]="errorMessage"></div>
<div *ngIf="fileUploadErrorMessage" class="file-upload" [innerHTML]="fileUploadErrorMessage"></div>
</div>
</div>
<h2 class="mx-4">Existing Blogs</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@

.error-message {
color: red;
font-size: 12px;
font-size: 15px;
position: absolute;
bottom: 0;
bottom: 5px;
left: 10px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class HomeComponent {
blogId!: number;
authorId!: number;
errorMessage: string | null = null;
fileUploadErrorMessage: string | null = null;
errorContext: 'title' | 'author' | 'id' | null = null;
fileUrl: any

Expand Down Expand Up @@ -81,7 +82,7 @@ export class HomeComponent {
const fileType = file.name.split('.').pop()?.toLowerCase();

if (fileType === 'doc' || fileType === 'docx') {
this.errorMessage = null;
this.fileUploadErrorMessage = null;
const reader = new FileReader();

reader.onload = (e) => {
Expand All @@ -90,7 +91,7 @@ export class HomeComponent {
};
reader.readAsDataURL(file);
} else {
this.errorMessage = `Invalid file type. <br> Please upload a .doc/.docx file.`;
this.fileUploadErrorMessage = `Invalid file type. <br> Please upload a .doc/.docx file.`;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion blogs-analyzer-ui/src/app/services/blog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class BlogService {
errorMessage = `An error occurred: ${error.error.message}`;
} else {
if (error.status === 500 || !error.status) {
errorMessage = 'Something went wrong. Please try again later.';
errorMessage = 'Something went wrong.';
} else {
errorMessage = `Error: ${error.status} - ${error.error}`;
}
Expand Down
2 changes: 1 addition & 1 deletion blogs-analyzer/k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: blogs-analyzer
image: blogs-analyzer/gen-lang-client-0999974873/blogs-analyzer:latest
image: blogs-analyzer-repo/gen-lang-client-0999974873/blogs-analyzer:latest
env:
- name: GOOGLE_GEMINI_API_KEY
valueFrom:
Expand Down

0 comments on commit e9cd5ce

Please sign in to comment.