github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/controllers/allocations/allocation/fs.js (about)

     1  import Controller from '@ember/controller';
     2  import { computed } from '@ember/object';
     3  
     4  export default class FsController extends Controller {
     5    queryParams = [
     6      {
     7        sortProperty: 'sort',
     8      },
     9      {
    10        sortDescending: 'desc',
    11      },
    12    ];
    13  
    14    sortProperty = 'Name';
    15    sortDescending = false;
    16  
    17    path = null;
    18    allocation = null;
    19    directoryEntries = null;
    20    isFile = null;
    21    stat = null;
    22  
    23    @computed('path')
    24    get pathWithLeadingSlash() {
    25      const path = this.path;
    26  
    27      if (path.startsWith('/')) {
    28        return path;
    29      } else {
    30        return `/${path}`;
    31      }
    32    }
    33  }