Skip to content

Commit 92a362b

Browse files
authored
Merge pull request #340 from KnowWhereGraph/develop
RC2
2 parents 87e0cb7 + 18a6916 commit 92a362b

File tree

8 files changed

+22
-39
lines changed

8 files changed

+22
-39
lines changed

.github/workflows/prettier-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
with:
2323
# This part is also where you can pass other options, for example:
2424
prettier_options: --check **/*.{js,md,ts}
25-
only_changed: True
25+
only_changed: True

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"tabWidth": 2,
44
"semi": false,
55
"singleQuote": true,
6-
"prettier.printWidth": 120
6+
"printWidth": 80
77
}

README.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ or
2525

2626
When building choose between the configurations specified in with the `--configuration` flag. The `production` flag should be used for production builds and `stage` for staging.
2727

28-
`ng build --configuration <production/stage>`
28+
`ng build --configuration=<production/stage>`
2929

3030
This command builds outputs the build in the `dist/` folder.
3131

@@ -39,31 +39,15 @@ There are three types of deployments:
3939

4040
#### Locally (Development Mode)
4141

42-
When working on the faceted-search, use the traditional `ng serve`. Visit the site locally at http://localhost:4200.
43-
44-
#### Docker + NGINX
45-
46-
To run the full NGINX and Angular stack, run the docker container created from the included Dockerfile.
47-
48-
```bash
49-
docker build -t faceted-search .
50-
docker run -d -p 8080:80 faceted-search
51-
```
52-
53-
Visit http://localhost:8080 for the deployment.
54-
55-
#### Staging & Production Servers
56-
57-
When deploying on the staging or production servers, first fetch the cache, then build the project, and finally copy the files to a location that is being served by NGINX.
58-
59-
For example,
42+
When working on the faceted-search, run the following
6043

6144
```bash
6245
npm run cache-prod
63-
npm run build --configuration=stage
64-
cp -r dist/faceted-search/* /var/www/html
46+
ng serve
6547
```
6648

49+
Visit the site at http://localhost:4200
50+
6751
## Troubleshooting
6852

6953
### The GNIS/Hazard/Location Tree Facets Aren't Working
@@ -134,6 +118,4 @@ The Faceted Search follows versioning conventions from [Semantic Versioning](htt
134118

135119
Contributions as issues and pull requests are welcome. New features should be made as pull requests into the `develop` branch and attached to an issue. The pull request should detail what was done, how it can be tested, and any relevant documentation updates. The project uses [prettier](https://prettier.io/) for code formatting, with line widths set to 120 characters.
136120

137-
Before creating pull requests, lint the project with
138-
139-
`ng lint`
121+
Before creating pull requests, prettify your code changes with [prettier](https://prettier.io/).

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"karma-coverage": "~2.1.0",
6464
"karma-jasmine": "~4.0.0",
6565
"karma-jasmine-html-reporter": "~1.7.0",
66-
"prettier": "^2.8.7",
66+
"prettier": "2.8.8",
6767
"typescript": "~4.8.4"
6868
}
6969
}

src/app/facets/facets.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
border-radius: 0 5px 5px 0;
3333
color: #fff;
3434
cursor: pointer;
35+
width: 30%
3536
}
3637

3738
.facet {

src/app/places-table/places-table.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export class PlacesTableComponent implements OnInit {
6666
this.placesDataSource = new MatTableDataSource(this.places)
6767
this.populateTable()
6868
this.totalSize = 0
69+
// Emit an event signaling that counting has stopped, and include the results count
6970
this.resultsCountEvent.emit(this.totalSize)
7071
}
7172

@@ -105,11 +106,10 @@ export class PlacesTableComponent implements OnInit {
105106
.then((results: any) => {
106107
this.places = []
107108
// Check to see if the query failed
108-
if (results === false) {
109+
if (results.records === undefined) {
109110
this.totalSize = 0
110111
this.resultsCountEvent.emit(this.totalSize)
111112
this.searchQueryFinishedEvent.emit(true)
112-
this.errorModal.emit()
113113
return
114114
}
115115
results.records.forEach((result) => {

src/app/services/query.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export class QueryService {
430430

431431
if (placesFacets['keyword'] && placesFacets['keyword'] != '') {
432432
placeQuery += `
433-
?search a elastic-index:kwg_fs_index;
433+
?search a elastic-index:kwg_manhattan_fs_index;
434434
elastic:query "${placesFacets['keyword']}";
435435
elastic:entities ?entity.
436436
?entity elastic:score ?score.
@@ -659,7 +659,7 @@ export class QueryService {
659659
//Keyword search
660660
if (hazardFacets['keyword'] && hazardFacets['keyword'] != '') {
661661
hazardQuery += `
662-
?search a elastic-index:kwg_fs_index;
662+
?search a elastic-index:kwg_manhattan_fs_index;
663663
elastic:query "${hazardFacets['keyword']}";
664664
elastic:entities ?entity.
665665
?entity elastic:score ?score.
@@ -871,7 +871,7 @@ export class QueryService {
871871
}
872872
let keyword_query = ``
873873
if (keyword != '') {
874-
keyword_query = `?search a elastic-index:kwg_fs_index;
874+
keyword_query = `?search a elastic-index:kwg_manhattan_fs_index;
875875
elastic:query "${keyword}";
876876
elastic:entities ?entity.
877877
?entity elastic:score ?score.`

0 commit comments

Comments
 (0)