Not rendering multipipeline controls for non multipipeline jobs

This commit is contained in:
Laszlo Fogas 2021-03-15 08:55:51 +01:00
parent 4e94ded326
commit 34c170500a
2 changed files with 3934 additions and 3866 deletions

458
web/dist/dist_gen.go vendored

File diff suppressed because one or more lines are too long

View file

@ -26,26 +26,32 @@ class ProcListHolder extends Component {
};
render() {
const { vars, children } = this.props;
const { vars, renderName, children } = this.props;
const groupExpandStatus = this.state.open
? styles.collapsed
: styles.expanded;
let name = (
<div>
<div>{vars.name === "woodpecker" ? "default" : vars.name}</div>
{vars.environ ? Object.entries(vars.environ).map(renderEnviron) : ""}
</div>
);
return (
<div className={styles.list}>
{renderName && vars.name !== "drone" ? (
<div
onClick={this.toggleOpen}
className={`${styles.group} ${groupExpandStatus}`}
>
<StatusText status={vars.state} text={name} />
<StatusText status={vars.state} text={vars.name} />
</div>
) : null}
{vars.environ ? (
<div
onClick={this.toggleOpen}
className={`${styles.group} ${groupExpandStatus}`}
>
<StatusText
status={vars.state}
text={Object.entries(vars.environ).map(renderEnviron)}
/>
</div>
) : null}
<div className={!this.state.open ? styles.hide : ""}>{children}</div>
</div>
);