mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
39 lines
658 B
JavaScript
39 lines
658 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
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}`;
|
|
}
|
|
}
|
|
}
|