ByronHsu commented on a change in pull request #494: URL: https://github.com/apache/submarine/pull/494#discussion_r563762893
########## File path: submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.scss ########## @@ -0,0 +1,24 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + .form-btn{ + margin: 10px; + width:140px; + height:50px Review comment: keep format consistent ########## File path: submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-list/notebook-list.component.html ########## @@ -0,0 +1,75 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <nz-table Review comment: I suggest that you can set autoformatted=true in vscode. Therefore, it will automatically format your code when you save the file. ########## File path: submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-home.component.ts ########## @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Subscription } from 'rxjs'; +import { ExponentialBackoff } from '@submarine/services/notebook-services/polling'; +import { NotebookService } from '@submarine/services/notebook-services/notebook.service'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { UserService } from '@submarine/services/user.service'; +import { isEqual } from "lodash"; +import { NzNotificationService } from 'ng-zorro-antd/notification'; +import { NotebookFormComponent } from './notebook-form/notebook-form.component'; + +@Component({ + selector: 'submarine-notebook-home', + templateUrl: './notebook-home.component.html', + styleUrls: ['./notebook-home.component.scss'] + }) + +export class NotebookHomeComponent implements OnInit { + + // User Information + userId; + + // Notebook list + notebookList; + + // Sync // + // Subscription + subscriptions = new Subscription(); + // Poller + poller: ExponentialBackoff; + + @ViewChild('form', {static: true}) form: NotebookFormComponent; + +constructor( + private notebookService: NotebookService, + private nzMessageService: NzMessageService, + private userService: UserService, +){} + +ngOnInit() { + this.poller = new ExponentialBackoff({ interval: 1000, retries: 3 }); Review comment: what is the advantage of exponetialbackoff compared with a pure interval? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
