fix sorting by cpu/memory in job list
@@ -64,7 +64,19 @@ export default {
computed: {
joblist: function () {
let a = _.sortBy(this.jobs, (j) => {
- if (this.field === 'cluster') {
+ if (this.field === 'cpu') {
+ if (j.definition) {
+ return j.definition.resources.limits.cpu
+ } else {
+ return null
+ }
+ } else if (this.field === 'memory') {
+ if (j.definition) {
+ return j.definition.resources.limits.memory
+ } else {
+ return null
+ }
+ } else if (this.field === 'cluster') {
if (j.definition) {
return j.definition.cluster.name
} else {
@@ -99,4 +111,3 @@ export default {
<style scoped>
</style>
-
