Skip to content

Commit 513b7d0

Browse files
New user interface and features. (GoogleCloudPlatform#287)
* New user interface and features. * ignore node modules and others * create a copy of web package and name it webv2 add a new flag 'webv2' to launch apis from the new package * session management, summary, code organization * add file path variable * add new ui codes * Squashed commit of the following changes: -Instruction display change to sidenav -remove test values from forms -Added spanner config link in session-listing * update gitignore and remove static content hosting of old ui Includes * remove config file and add to gitignore * remove hosting of static frontend directory (old ui) Co-authored-by: lyazii22 <[email protected]> * Dev schema assistant v2 (GoogleCloudPlatform#50) * update column and field CreatedOn to CreateTimestamp * update column header Created On to Created At * Dev schema assistant v2 (GoogleCloudPlatform#51) * remove console.log and commented code Co-authored-by: lyazii22 <[email protected]> * Dev schema assistant v2 (GoogleCloudPlatform#52) Summary empty messages added * Dev schema assistant v2 (GoogleCloudPlatform#53) * copyright year update * update flag in readme * correct spelling * warning msg update * remove commented code Co-authored-by: lyazii22 <[email protected]> * spelling correction, warning message update and remove unused imports * show ellipsis button only when the notes exceeds certain length * show ellipsis button only when the notes exceeds certain length * Readme update (GoogleCloudPlatform#55) * update readme * Includes changes -Rules input clear and sidenav close on adding rule -remove 'change one table data type' rule option -Sidenav rules input validation * -session file name update -link name dismiss to close -show readable error message on save session exception * Object explorer style update (GoogleCloudPlatform#56) Object explorer style update Co-authored-by: lyazii22 <[email protected]> * Code review feedback implementation * Drop button Object detail made sticky Add index style * Squashed commit of the following: Index count updated on adding index Style update * code review feedback implementation - remove unused imports correct interface names correct alert message text * code review feedback implementation update save session ui design * Squashed commit of the following: UI update - spanner setting snackbar duration added * index ui update * drop index dialog box * fix snackbar issue * file name issue with new session * show server error msg * remove unused properties and import, add comment * code review feedback implementation * make database name dynamic in obj explorer * code review feedback implement * fix comments, add copyright, update validation * Err msg update, unused imports removed * Code review feedback implement * code review comment implement * general issue fix, code refactoring, code review feedback implement. * add character counter and remove db name placeholder * update create database message * rename file, remove commented code, update test values * rename model files and update the imports * rename file * Delete Conv.ts * Delete Rule.ts * Delete Session.ts * Delete Summary.ts Co-authored-by: lyazii22 <[email protected]>
1 parent 03c7b67 commit 513b7d0

File tree

179 files changed

+34001
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+34001
-2
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,12 @@ main
33
web/harbour_bridge_output/
44
harbour_bridge_output/
55
*__debug_bin*
6-
*.code-workspace
6+
*.code-workspace
7+
8+
# angular ui development
9+
ui/.angular
10+
ui/dist
11+
ui/node_modules
12+
13+
# webv2 config
14+
webv2/config.json

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@
1616
"-v=true",
1717
"-dump-file="
1818
]
19+
},
20+
{
21+
"name": "webv1",
22+
"type": "go",
23+
"request": "launch",
24+
"mode": "debug",
25+
"program": "${workspaceRoot}/main.go",
26+
"args": [
27+
"-web",
28+
]
29+
},
30+
{
31+
"name": "webv2",
32+
"type": "go",
33+
"request": "launch",
34+
"mode": "debug",
35+
"program": "${workspaceRoot}/main.go",
36+
"args": [
37+
"-webv2",
38+
]
1939
}
2040
]
2141
}

frontend/js/services/Action.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ const Actions = (() => {
335335
let result = await res.json();
336336
Store.setGlobalDataTypeList(result)
337337
} else {
338-
showSnackbar('Not able to fetch global datatype list !')
338+
showSnackbar('Unable to fetch global datatype list !')
339339
}
340340
},
341341

main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
"github.com/cloudspannerecosystem/harbourbridge/common/utils"
3636
"github.com/cloudspannerecosystem/harbourbridge/internal"
3737
"github.com/cloudspannerecosystem/harbourbridge/web"
38+
"github.com/cloudspannerecosystem/harbourbridge/webv2"
3839
"github.com/google/subcommands"
3940
)
4041

@@ -50,6 +51,7 @@ var (
5051
skipForeignKeys bool
5152
sessionJSON string
5253
webapi bool
54+
webapiv2 bool
5355
dumpFilePath string
5456
targetDb = constants.TargetSpanner
5557
)
@@ -67,6 +69,7 @@ func setupGlobalFlags() {
6769
flag.BoolVar(&skipForeignKeys, "skip-foreign-keys", false, "skip-foreign-keys: if true, skip creating foreign keys after data migration is complete (ddl statements for foreign keys can still be found in the downloaded schema.ddl.txt file and the same can be applied separately)")
6870
flag.StringVar(&sessionJSON, "session", "", "session: specifies the file we restore session state from (used in data-only to provide schema and data mapping)")
6971
flag.BoolVar(&webapi, "web", false, "web: run the web interface (experimental)")
72+
flag.BoolVar(&webapiv2, "webv2", false, "web: run the web interface (experimental)")
7073
flag.StringVar(&dumpFilePath, "dump-file", "", "dump-file: location of dump file to process")
7174
flag.StringVar(&targetDb, "target-db", constants.TargetSpanner, "target-db: Specifies the target DB. Defaults to spanner")
7275
}
@@ -127,6 +130,12 @@ func main() {
127130
return
128131
}
129132

133+
// Note: the web interface does not use any commandline flags.
134+
if webapiv2 {
135+
webv2.App()
136+
return
137+
}
138+
130139
if didSetVerboseTwice() {
131140
panic(fmt.Errorf("cannot set both -v and -verbose flags"))
132141
}

ui/.browserslistrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR

ui/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

ui/.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

ui/.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"semi": false,
5+
"singleQuote": true,
6+
"printWidth": 100,
7+
"arrayExpand": true
8+
}

ui/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Ui
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.3.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

ui/angular.json

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
6+
"version": 1,
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"ui": {
10+
"projectType": "application",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"style": "scss"
14+
},
15+
"@schematics/angular:application": {
16+
"strict": true
17+
}
18+
},
19+
"root": "",
20+
"sourceRoot": "src",
21+
"prefix": "app",
22+
"architect": {
23+
"build": {
24+
"builder": "@angular-devkit/build-angular:browser",
25+
"options": {
26+
"outputPath": "dist/ui",
27+
"index": "src/index.html",
28+
"main": "src/main.ts",
29+
"polyfills": "src/polyfills.ts",
30+
"tsConfig": "tsconfig.app.json",
31+
"inlineStyleLanguage": "scss",
32+
"assets": [
33+
"src/favicon.ico",
34+
"src/assets"
35+
],
36+
"styles": [
37+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
38+
"src/styles.scss"
39+
],
40+
"scripts": []
41+
},
42+
"configurations": {
43+
"production": {
44+
"budgets": [
45+
{
46+
"type": "initial",
47+
"maximumWarning": "500kb",
48+
"maximumError": "1mb"
49+
},
50+
{
51+
"type": "anyComponentStyle",
52+
"maximumWarning": "2kb",
53+
"maximumError": "4kb"
54+
}
55+
],
56+
"fileReplacements": [
57+
{
58+
"replace": "src/environments/environment.ts",
59+
"with": "src/environments/environment.prod.ts"
60+
}
61+
],
62+
"outputHashing": "all"
63+
},
64+
"development": {
65+
"buildOptimizer": false,
66+
"optimization": false,
67+
"vendorChunk": true,
68+
"extractLicenses": false,
69+
"sourceMap": true,
70+
"namedChunks": true
71+
}
72+
},
73+
"defaultConfiguration": "production"
74+
},
75+
"serve": {
76+
"builder": "@angular-devkit/build-angular:dev-server",
77+
"configurations": {
78+
"production": {
79+
"browserTarget": "ui:build:production"
80+
},
81+
"development": {
82+
"browserTarget": "ui:build:development"
83+
}
84+
},
85+
"defaultConfiguration": "development"
86+
},
87+
"extract-i18n": {
88+
"builder": "@angular-devkit/build-angular:extract-i18n",
89+
"options": {
90+
"browserTarget": "ui:build"
91+
}
92+
},
93+
"test": {
94+
"builder": "@angular-devkit/build-angular:karma",
95+
"options": {
96+
"main": "src/test.ts",
97+
"polyfills": "src/polyfills.ts",
98+
"tsConfig": "tsconfig.spec.json",
99+
"karmaConfig": "karma.conf.js",
100+
"inlineStyleLanguage": "scss",
101+
"assets": [
102+
"src/favicon.ico",
103+
"src/assets"
104+
],
105+
"styles": [
106+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
107+
"src/styles.scss"
108+
],
109+
"scripts": []
110+
}
111+
}
112+
}
113+
}
114+
},
115+
"defaultProject": "ui"
116+
}

0 commit comments

Comments
 (0)