mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-11 01:55:27 +00:00
fix: non multi pipline steps is not display
This commit is contained in:
parent
0aa66ce743
commit
87928d2600
1 changed files with 15 additions and 20 deletions
|
@ -18,7 +18,7 @@ const renderEnviron = data => {
|
||||||
class ProcListHolder extends Component {
|
class ProcListHolder extends Component {
|
||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
this.state = { open: false };
|
this.state = { open: !this.props.vars.environ };
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleOpen = () => {
|
toggleOpen = () => {
|
||||||
|
@ -30,27 +30,22 @@ class ProcListHolder extends Component {
|
||||||
const groupExpandStatus = this.state.open
|
const groupExpandStatus = this.state.open
|
||||||
? styles.collapsed
|
? styles.collapsed
|
||||||
: styles.expanded;
|
: styles.expanded;
|
||||||
|
|
||||||
|
let name = "default";
|
||||||
|
if (vars.environ) {
|
||||||
|
name = Object.entries(vars.environ).map(renderEnviron);
|
||||||
|
} else if (renderName && vars.name !== "woodpecker") {
|
||||||
|
name = vars.name;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
{renderName && vars.name !== "drone" ? (
|
|
||||||
<div
|
<div
|
||||||
onClick={this.toggleOpen}
|
onClick={this.toggleOpen}
|
||||||
className={`${styles.group} ${groupExpandStatus}`}
|
className={`${styles.group} ${groupExpandStatus}`}
|
||||||
>
|
>
|
||||||
<StatusText status={vars.state} text={vars.name} />
|
<StatusText status={vars.state} text={name} />
|
||||||
</div>
|
</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 className={!this.state.open ? styles.hide : ""}>{children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue