Skip to content

Commit 3d147b3

Browse files
committed
Fixing bugs.
1 parent e31fdc3 commit 3d147b3

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed

src/components/Pipelines/PipelineExercisesList/PipelineExercisesList.js

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,30 @@ const PipelineExercisesList = ({
6262
fullView || pipelineExercises.size < COLLAPSE_LIMIT ? 1000000 : PREVIEW_SIZE
6363
);
6464
return (
65-
<Table hover className="mb-1" size="xs">
66-
<thead>
67-
<tr>
68-
<th className="pl-4">
69-
<FormattedMessage id="generic.name" defaultMessage="Name" />
70-
</th>
71-
<th>
72-
<FormattedMessage id="generic.author" defaultMessage="Author" />
73-
</th>
74-
<th className="shrink-col text-nowrap">
75-
{pipelineExercises.size > 5 && (
76-
<small className="text-muted">
77-
<FormattedMessage
78-
id="app.pipelineExercisessList.totalCount"
79-
defaultMessage="Total exercises: {count}"
80-
values={{ count: pipelineExercises.size }}
81-
/>
82-
</small>
83-
)}
84-
</th>
85-
</tr>
86-
</thead>
65+
<Table hover={pipelineExercises.size > 0} className="mb-1" size="xs">
66+
{pipelineExercises.size > 0 && (
67+
<thead>
68+
<tr>
69+
<th className="pl-4">
70+
<FormattedMessage id="generic.name" defaultMessage="Name" />
71+
</th>
72+
<th>
73+
<FormattedMessage id="generic.author" defaultMessage="Author" />
74+
</th>
75+
<th className="shrink-col text-nowrap">
76+
{pipelineExercises.size > 5 && (
77+
<small className="text-muted">
78+
<FormattedMessage
79+
id="app.pipelineExercisessList.totalCount"
80+
defaultMessage="Total exercises: {count}"
81+
values={{ count: pipelineExercises.size }}
82+
/>
83+
</small>
84+
)}
85+
</th>
86+
</tr>
87+
</thead>
88+
)}
8789

8890
<tbody>
8991
{exercises.map(exercise => (
@@ -133,12 +135,12 @@ const PipelineExercisesList = ({
133135
</tr>
134136
))}
135137

136-
{exercises.length === 0 && (
138+
{pipelineExercises.size === 0 && (
137139
<tr>
138-
<td className="text-center" colSpan={3}>
140+
<td className="text-center text-muted" colSpan={3}>
139141
<FormattedMessage
140142
id="app.pipelineExercisessList.empty"
141-
defaultMessage="There are no exercises using this pipelines at the moment."
143+
defaultMessage="There are no exercises using this pipeline at the moment."
142144
/>
143145
</td>
144146
</tr>

src/helpers/pipelines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const getVariablesUtilization = defaultMemoize(boxes => {
8181
boxes.forEach(box =>
8282
['portsIn', 'portsOut'].forEach(ports =>
8383
Object.keys(box[ports])
84-
.filter(port => box[ports][port])
84+
.filter(port => box[ports][port] && box[ports][port].value)
8585
.forEach(port => {
8686
const { value } = box[ports][port];
8787
if (!utils[value]) {

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@
11371137
"app.pipelineEditContainer.versionChanged": "The pipeline structure was updated whilst you were editing it. If you load the new pipeline, it will be pushed as a new state in editor (you can use undo button to revert it).",
11381138
"app.pipelineEditContainer.versionChangedTitle": "The pipeline was updated",
11391139
"app.pipelineExercisessList.collapse": "Collapse the list and show only short preview.",
1140-
"app.pipelineExercisessList.empty": "There are no exercises using this pipelines at the moment.",
1140+
"app.pipelineExercisessList.empty": "There are no exercises using this pipeline at the moment.",
11411141
"app.pipelineExercisessList.expand": "Expand the list and show all {count} exercises.",
11421142
"app.pipelineExercisessList.totalCount": "Total exercises: {count}",
11431143
"app.pipelineFilesTable.description": "Supplementary files are files which can be referenced as remote file in pipeline configuration.",

src/pages/Pipeline/Pipeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class Pipeline extends Component {
140140
/>
141141
</p>
142142
<TheButtonGroup>
143-
<Button variant="success" onClick={this.acknowledgeFork}>
143+
<Button variant="success" onClick={() => this.acknowledgeFork()}>
144144
<Icon icon={['far', 'smile']} gapRight />
145145
<FormattedMessage id="generic.acknowledge" defaultMessage="Acknowledge" />
146146
</Button>

0 commit comments

Comments
 (0)