1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

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

7766
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}>
<div
onClick={this.toggleOpen}
className={`${styles.group} ${groupExpandStatus}`}
>
<StatusText status={vars.state} text={name} />
</div>
{renderName && vars.name !== "drone" ? (
<div
onClick={this.toggleOpen}
className={`${styles.group} ${groupExpandStatus}`}
>
<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>
);