Skip to content

Commit

Permalink
Fix netlify es-sorter lib deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartinou committed Nov 27, 2022
1 parent be783fe commit 04cb116
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/api/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function mapComponentsToList(listFunction) {
return Object.keys(listFunction())
.map((key) => mapComponentToItem(key, listFunction()[key]))
.sort(byValues([
['type', byString()],
['name', byString()],
[(x) => x.type, byString()],
[(x) => x.name, byString()],
]));
}

Expand Down
4 changes: 3 additions & 1 deletion app/store/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function getContainers(query = {}) {
return [];
}
const containerList = containers.find(filter).map((item) => validateContainer(item.data));
return containerList.sort(byValue((container) => container.name, byString()));
return containerList.sort(
byValue((container) => container.name, byString()),
);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

# dev
- :fire: Fix netlify es-sorter lib deprecation warning

# 5.22.0
- :star: [Mqtt trigger] Add support for (m)TLS
- :star: Update all dependencies
Expand Down
17 changes: 14 additions & 3 deletions ui/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
<v-btn
small
plain
color="warning"
:color="containersToUpdateCount > 0 ? 'warning' : 'success'"
to="/containers?update-available=true"
v-if="containersToUpdateCount > 0"
>({{ containersToUpdateCount }} updates)</v-btn
:style="{
pointerEvents: containersToUpdateCount === 0 ? 'none' : 'auto',
}"
>({{ containerUpdateMessage }})</v-btn
>
</v-card>
</v-col>
Expand Down Expand Up @@ -79,6 +81,15 @@ export default {
};
},
computed: {
containerUpdateMessage() {
if (this.containersToUpdateCount > 0) {
return `${this.containersToUpdateCount} updates available`;
}
return "all containers are up-to-date";
},
},
async beforeRouteEnter(to, from, next) {
try {
const containers = await getAllContainers();
Expand Down

0 comments on commit 04cb116

Please sign in to comment.