Skip to content

Commit

Permalink
#7326 connection progress basic styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Jurowicz committed May 24, 2018
1 parent 629af48 commit c390d88
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/notebook/src/SparkUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class SparkUIView extends widgets.VBoxView {
public render() {
super.render();

this.el.classList.add('bx-spark-status-panel');

this.processConnectionWidget();
this.updateLabels();
}

public update() {
super.update();

this.processConnectionWidget();
this.updateLabels();
}

Expand Down Expand Up @@ -79,7 +79,11 @@ class SparkUIView extends widgets.VBoxView {
private processConnectionWidget() {
this.children_views.update(this.model.get('children')).then((views) => {
views.forEach((view) => {
debugger;
if (view instanceof widgets.LabelView) {
this.connectionStatus = view.pWidget;
this.connectionStatus.el.classList.add('bx-spark-connectionProgressBar');
this.connectionStatus.el.classList.add('progress');
}
});
});
}
Expand Down
17 changes: 17 additions & 0 deletions js/notebook/src/shared/style/spark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

$colorSuccess: #4CAF50;
$colorWhite: #ffffff;
$colorBorder: #cfcfcf;

.foldout-preview {
& > .bx-spark-stagePanel {
padding: 0 15px;
Expand All @@ -26,6 +30,7 @@
max-width: 600px;
}

.bx-spark-connectionProgressBar,
.bx-spark-stageProgressBar {
margin: 0 10px;
}
Expand All @@ -42,3 +47,15 @@
line-height: 150%;
}
}

.bx-spark-connectionProgressBar {
background-color: transparent;
border: 1px solid $colorBorder;
height: 20px;
margin: 6px;
line-height: 18px;

&.connected {
background-color: $colorSuccess;
}
}

0 comments on commit c390d88

Please sign in to comment.