feat(ui): EE-3553 css-portainer-environmnets (#7193)

pull/7331/head
congs 2022-07-25 10:39:15 +12:00 committed by GitHub
parent 3645ff7459
commit 5f5cb36df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 55 deletions

View File

@ -2,72 +2,95 @@
<rd-widget> <rd-widget>
<rd-widget-body classes="no-padding"> <rd-widget-body classes="no-padding">
<div class="toolBar"> <div class="toolBar">
<div class="toolBarTitle"> <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px"></i> {{ $ctrl.titleText }} </div> <div class="toolBarTitle vertical-center">
</div> <pr-icon icon="$ctrl.titleIcon" feather="true" class-name="'icon-white icon-primary icon-nested-blue'"></pr-icon>
<div class="actionBar"> {{ $ctrl.titleText }}
<button </div>
type="button" <div class="searchBar vertical-center">
class="btn btn-sm btn-danger" <pr-icon icon="'search'" feather="true" class="searchIcon"></pr-icon>
ng-disabled="$ctrl.state.selectedItemCount === 0" <input
ng-click="$ctrl.removeAction($ctrl.state.selectedItems)" type="text"
data-cy="endpoint-removeEndpointButton" class="searchInput"
> auto-focus
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove placeholder="Search..."
</button> ng-model="$ctrl.state.textFilter"
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.setReferrer()" ui-sref="portainer.wizard.endpoints" data-cy="endpoint-addEndpointButton"> ng-change="$ctrl.onTextFilterChange()"
<i class="fa fa-plus-circle space-right" aria-hidden="true"></i>Add environment ng-model-options="{ debounce: 300 }"
</button> data-cy="endpoint-searchInput"
</div> />
<div class="searchBar"> </div>
<i class="fa fa-search searchIcon" aria-hidden="true"></i> <div class="actionBar">
<input <button
type="text" type="button"
class="searchInput" class="btn btn-sm btn-dangerlight vertical-center"
auto-focus ng-disabled="$ctrl.state.selectedItemCount === 0"
placeholder="Search..." ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
ng-model="$ctrl.state.textFilter" data-cy="endpoint-removeEndpointButton"
ng-change="$ctrl.onTextFilterChange()" >
ng-model-options="{ debounce: 300 }" <pr-icon icon="'trash-2'" feather="true" class-name="'icon-white'"></pr-icon>
data-cy="endpoint-searchInput" <span>Remove</span>
/> </button>
<button
type="button"
class="btn btn-sm btn-primary vertical-center"
ng-click="$ctrl.setReferrer()"
ui-sref="portainer.wizard.endpoints"
data-cy="endpoint-addEndpointButton"
>
<pr-icon icon="'plus'" feather="true" class-name="'icon-white'"></pr-icon>
<span>Add environment</span>
</button>
</div>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover nowrap-cells" data-cy="endpoint-endpointTable"> <table class="table table-hover nowrap-cells" data-cy="endpoint-endpointTable">
<thead> <thead>
<tr> <tr>
<th> <th>
<span class="md-checkbox"> <div class="vertical-center">
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" /> <span class="md-checkbox vertical-center">
<label for="select_all"></label> <input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" />
</span> <label for="select_all"></label>
<a ng-click="$ctrl.changeOrderBy('Name')"> </span>
Name <table-column-header
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Name' && !$ctrl.state.reverseOrder"></i> col-title="'Name'"
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Name' && $ctrl.state.reverseOrder"></i> can-sort="true"
</a> is-sorted="$ctrl.state.orderBy === 'Name'"
is-sorted-desc="$ctrl.state.orderBy === 'Name' && $ctrl.state.reverseOrder"
ng-click="$ctrl.changeOrderBy('Name')"
></table-column-header>
</div>
</th> </th>
<th> <th>
<a ng-click="$ctrl.changeOrderBy('Type')"> <table-column-header
Type col-title="'Type'"
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Type' && !$ctrl.state.reverseOrder"></i> can-sort="true"
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Type' && $ctrl.state.reverseOrder"></i> is-sorted="$ctrl.state.orderBy === 'Type'"
</a> is-sorted-desc="$ctrl.state.orderBy === 'Type' && $ctrl.state.reverseOrder"
ng-click="$ctrl.changeOrderBy('Type')"
></table-column-header>
</th> </th>
<th> <th>
<a ng-click="$ctrl.changeOrderBy('URL')"> <table-column-header
URL col-title="'URL'"
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'URL' && !$ctrl.state.reverseOrder"></i> can-sort="true"
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'URL' && $ctrl.state.reverseOrder"></i> is-sorted="$ctrl.state.orderBy === 'URL'"
</a> is-sorted-desc="$ctrl.state.orderBy === 'URL' && $ctrl.state.reverseOrder"
ng-click="$ctrl.changeOrderBy('URL')"
></table-column-header>
</th> </th>
<th> <th>
<a ng-click="$ctrl.changeOrderBy('GroupName')"> <table-column-header
Group col-title="'GroupName'"
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'GroupName' && !$ctrl.state.reverseOrder"></i> can-sort="true"
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'GroupName' && $ctrl.state.reverseOrder"></i> is-sorted="$ctrl.state.orderBy === 'GroupName'"
</a> is-sorted-desc="$ctrl.state.orderBy === 'GroupName' && $ctrl.state.reverseOrder"
ng-click="$ctrl.changeOrderBy('GroupName')"
></table-column-header>
</th>
<th>
<table-column-header col-title="'Actions'" can-sort="false"></table-column-header>
</th> </th>
<th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -95,7 +118,10 @@
</td> </td>
<td>{{ item.GroupName }}</td> <td>{{ item.GroupName }}</td>
<td> <td>
<a ui-sref="portainer.endpoints.endpoint.access({id: item.Id})"> <i class="fa fa-users" aria-hidden="true"></i> Manage access </a> <a ui-sref="portainer.endpoints.endpoint.access({id: item.Id})">
<pr-icon icon="'users'" feather="true"></pr-icon>
Manage access
</a>
</td> </td>
</tr> </tr>
<tr ng-if="$ctrl.state.loading"> <tr ng-if="$ctrl.state.loading">

View File

@ -6,7 +6,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<endpoints-datatable <endpoints-datatable
title-text="Environments" title-text="Environments"
title-icon="fa-plug" title-icon="hard-drive"
table-key="endpoints" table-key="endpoints"
order-by="Name" order-by="Name"
remove-action="removeAction" remove-action="removeAction"