2018-07-23 05:01:03 +00:00
|
|
|
<div class="datatable">
|
|
|
|
<rd-widget>
|
2020-04-10 21:54:53 +00:00
|
|
|
<rd-widget-header icon="{{ $ctrl.titleIcon }}" title-text="{{ $ctrl.titleText }}">
|
|
|
|
<file-uploader authorization="DockerAgentBrowsePut" ng-if="$ctrl.isUploadAllowed" on-file-selected="($ctrl.onFileSelectedForUpload)"> </file-uploader>
|
2018-10-11 22:32:17 +00:00
|
|
|
</rd-widget-header>
|
2018-07-23 05:01:03 +00:00
|
|
|
<rd-widget-body classes="no-padding">
|
|
|
|
<div class="searchBar">
|
|
|
|
<i class="fa fa-search searchIcon" aria-hidden="true"></i>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="searchInput"
|
|
|
|
ng-model="$ctrl.state.textFilter"
|
|
|
|
ng-model-options="{ debounce: 300 }"
|
|
|
|
ng-change="$ctrl.onTextFilterChange()"
|
|
|
|
placeholder="Search..."
|
|
|
|
auto-focus
|
|
|
|
/>
|
2018-07-23 05:01:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<a ng-click="$ctrl.changeOrderBy('Name')">
|
|
|
|
Name
|
|
|
|
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Name' && !$ctrl.state.reverseOrder"></i>
|
|
|
|
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Name' && $ctrl.state.reverseOrder"></i>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<a ng-click="$ctrl.changeOrderBy('Size')">
|
|
|
|
Size
|
|
|
|
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Size' && !$ctrl.state.reverseOrder"></i>
|
|
|
|
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Size' && $ctrl.state.reverseOrder"></i>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<a ng-click="$ctrl.changeOrderBy('ModTime')">
|
|
|
|
Last modification
|
|
|
|
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ModTime' && !$ctrl.state.reverseOrder"></i>
|
|
|
|
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ModTime' && $ctrl.state.reverseOrder"></i>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Actions
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2018-10-11 22:32:17 +00:00
|
|
|
<tr ng-if="!$ctrl.isRoot">
|
2018-07-23 05:01:03 +00:00
|
|
|
<td colspan="4">
|
2020-04-10 21:54:53 +00:00
|
|
|
<a ng-click="$ctrl.goToParent()"><i class="fa fa-level-up-alt space-right"></i>Go to parent</a>
|
2018-07-23 05:01:03 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-repeat="item in ($ctrl.state.filteredDataSet = ($ctrl.dataset | filter:$ctrl.state.textFilter | orderBy:$ctrl.state.orderBy:$ctrl.state.reverseOrder))">
|
|
|
|
<td>
|
|
|
|
<span ng-if="item.edit">
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
class="input-sm"
|
|
|
|
type="text"
|
|
|
|
ng-model="item.newName"
|
|
|
|
on-enter-key="$ctrl.rename({ name: item.Name, newName: item.newName }); item.edit = false"
|
|
|
|
auto-focus
|
|
|
|
/>
|
2018-07-23 05:01:03 +00:00
|
|
|
<a class="interactive" ng-click="item.edit = false;"><i class="fa fa-times"></i></a>
|
2020-04-10 21:54:53 +00:00
|
|
|
<a class="interactive" ng-click="$ctrl.rename({name: item.Name, newName: item.newName}); item.edit = false;"><i class="fa fa-check-square"></i></a>
|
2018-07-23 05:01:03 +00:00
|
|
|
</span>
|
|
|
|
<span ng-if="!item.edit && item.Dir">
|
2020-04-10 21:54:53 +00:00
|
|
|
<a ng-click="$ctrl.browse({name: item.Name})"><i class="fa fa-folder space-right" aria-hidden="true"></i>{{ item.Name }}</a>
|
2018-07-23 05:01:03 +00:00
|
|
|
</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<span ng-if="!item.edit && !item.Dir"> <i class="fa fa-file space-right" aria-hidden="true"></i>{{ item.Name }} </span>
|
2018-07-23 05:01:03 +00:00
|
|
|
</td>
|
|
|
|
<td>{{ item.Size | humansize }}</td>
|
|
|
|
<td>
|
|
|
|
{{ item.ModTime | getisodatefromtimestamp }}
|
|
|
|
</td>
|
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<btn authorization="DockerAgentBrowseGet" class="btn btn-xs btn-primary space-right" ng-click="$ctrl.download({ name: item.Name })" ng-if="!item.Dir">
|
2018-07-23 05:01:03 +00:00
|
|
|
<i class="fa fa-download" aria-hidden="true"></i> Download
|
|
|
|
</btn>
|
2019-05-24 06:04:58 +00:00
|
|
|
<btn authorization="DockerAgentBrowseRename" class="btn btn-xs btn-primary space-right" ng-click="item.newName = item.Name; item.edit = true">
|
2018-07-23 05:01:03 +00:00
|
|
|
<i class="fa fa-edit" aria-hidden="true"></i> Rename
|
|
|
|
</btn>
|
2019-05-24 06:04:58 +00:00
|
|
|
<btn authorization="DockerAgentBrowseDelete" class="btn btn-xs btn-danger" ng-click="$ctrl.delete({ name: item.Name })">
|
2018-07-23 05:01:03 +00:00
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> Delete
|
|
|
|
</btn>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="!$ctrl.dataset">
|
|
|
|
<td colspan="5" class="text-center text-muted">Loading...</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="$ctrl.state.filteredDataSet.length === 0">
|
|
|
|
<td colspan="5" class="text-center text-muted">No files found.</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
2020-04-10 21:54:53 +00:00
|
|
|
</div>
|