open-nomad/ui/app/controllers/allocations/allocation/task/fs.js

34 lines
578 B
JavaScript
Raw Normal View History

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;
taskState = null;
directoryEntries = null;
isFile = null;
stat = null;
@computed('path')
get pathWithLeadingSlash() {
const path = this.path;
if (path.startsWith('/')) {
return path;
} else {
return `/${path}`;
}
}
}