Skip to content

Commit

Permalink
Revert "Wire up some of the log and add some sample data"
Browse files Browse the repository at this point in the history
This reverts commit 7a0febf.
  • Loading branch information
siggisim committed Feb 18, 2020
1 parent 7a0febf commit 9e698fc
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 204 deletions.
6 changes: 1 addition & 5 deletions app/invocation/BUILD → app/home/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ load("@npm_bazel_typescript//:index.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])

ts_library(
name = "invocation",
name = "home",
srcs = glob(["*.tsx"]),
deps = [
"//app/service",
"//proto:build_event_stream_ts_proto",
"//proto:invocation_ts_proto",
"@npm//@types/long",
"@npm//@types/moment",
"@npm//@types/react",
"@npm//long",
"@npm//moment",
"@npm//protobufjs",
"@npm//react",
],
Expand Down
98 changes: 98 additions & 0 deletions app/home/home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import React from 'react';
import rpcService from 'buildbuddy/app/service/rpc_service'
import { invocation } from 'buildbuddy/proto/invocation_ts_proto';
import { build_event_stream } from 'buildbuddy/proto/build_event_stream_ts_proto';

interface State {
progress: build_event_stream.Progress[]
}

export default class HomeComponent extends React.Component {
state: State = {
progress: []
};

componentWillMount() {
let request = new invocation.GetInvocationRequest()
rpcService.service.getInvocation(request).then((response) => {
for (let invocation of response.invocation) {
for (let buildEvent of invocation.buildEvent) {
if (buildEvent.progress) this.state.progress.push(buildEvent.progress as build_event_stream.Progress);
}
}
this.setState(this.state);
});
}

render() {
return (
<div>
<div className="shelf">
<div className="container">
<div className="titles">
<div className="title">Siggi's build</div>
<div className="subtitle"><b>February 16, 2019</b> at <b>10:33 am</b></div>
</div>
<div className="details">
<b>Failed</b> in <b>40 minutes</b> and <b>0 seconds</b><br />
<b>329</b> targets &middot; <b>317</b> passed &middot; <b>12</b> failed <br />
</div>
</div>
</div>
<div className="container">

<div className="card">
<img className="icon" src="/image/log-circle.svg" />
<div className="content">
<div className="title">Build log</div>
<div className="details">
{this.state.progress}
</div>
<div className="more">See more</div>
</div>
</div>

<div className="card">
<img className="icon" src="/image/x-circle.svg" />
<div className="content">
<div className="title">12 targets failed</div>
<div className="details">
</div>
<div className="more">See more</div>
</div>
</div>

<div className="card">
<img className="icon" src="/image/check-circle.svg" />
<div className="content">
<div className="title">317 targets passed</div>
<div className="details">
</div>
<div className="more">See more</div>
</div>
</div>

<div className="card">
<img className="icon" src="/image/info.svg" />
<div className="content">
<div className="title">Invocation details</div>
<div className="details">
</div>
<div className="more">See more</div>
</div>
</div>

<div className="card">
<img className="icon" src="/image/arrow-down-circle.svg" />
<div className="content">
<div className="title">Artifacts</div>
<div className="details">
</div>
<div className="more">See more</div>
</div>
</div>
</div>
</div>
);
}
}
189 changes: 0 additions & 189 deletions app/invocation/invocation.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/root/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ts_library(
name = "root",
srcs = glob(["*.tsx"]),
deps = [
"//app/invocation",
"//app/home",
"//app/menu",
"//app/service",
"@npm//@types/react",
Expand Down
8 changes: 2 additions & 6 deletions app/root/root.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import MenuComponent from 'buildbuddy/app/menu/menu';
import InvocationComponent from 'buildbuddy/app/invocation/invocation';
import HomeComponent from 'buildbuddy/app/home/home';

interface State {
hash: string;
Expand All @@ -25,15 +25,11 @@ export default class RootComponent extends React.Component {
});
}

getCurrentInvocationId() {
return this.state.hash.replace("#/invocation/", "");
}

render() {
return (
<div>
<MenuComponent />
<InvocationComponent invocationId={this.getCurrentInvocationId()} />
<HomeComponent />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ go_binary(
],
deps = [
":build_event_server",
# ":buildbuddy_server",
":buildbuddy_server",
":static",
"//proto:build_go_proto",
"//proto:buildbuddy_service_go_proto",
Expand Down
2 changes: 0 additions & 2 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ a {
}

.shelf .subtitle {
font-weight: 700;
margin-left: 8px;
color: #888;
}
Expand Down Expand Up @@ -143,7 +142,6 @@ a {
line-height: 1.6em;
margin-top: 16px;
word-break: break-word;
white-space: pre-wrap;
}

.card .more {
Expand Down

0 comments on commit 9e698fc

Please sign in to comment.