open-nomad/ui/app/controllers/allocations/allocation/fs.js
Buck Doyle 577e85b007 Fix query parameters structures
I’d think the codemod would handle this if it’s a requirement
but apparently not, is it a bug?
2020-06-15 09:52:31 -05:00

34 lines
579 B
JavaScript

import Controller from '@ember/controller';
import { computed } from '@ember/object';
export default class FsController extends Controller {
queryParams = [
{
sortProperty: 'sort',
},
{
sortDescending: 'desc',
},
];
sortProperty = 'Name';
sortDescending = false;
path = null;
allocation = null;
directoryEntries = null;
isFile = null;
stat = null;
@computed('path')
get pathWithLeadingSlash() {
const path = this.path;
if (path.startsWith('/')) {
return path;
} else {
return `/${path}`;
}
}
}