<ng-container *ngIf="smbClusters$ | async as smbClusters">
<cd-table
+ headerTitle="Clusters"
+ headerDescription="Logical management units that may map to one or more managed Samba service"
[data]="smbClusters"
columnMode="flex"
[columns]="columns"
<ng-container *ngIf="selection">
- <cds-tabs
- type="contained"
- followFocus="true"
- isNavigation="true"
- cacheActive="true">
- <cds-tab
- heading="Shares"
- i18n-heading>
- <cd-smb-share-list
- [clusterId]="selection.cluster_id"
- ></cd-smb-share-list>
- </cds-tab>
- </cds-tabs>
+ <cd-smb-share-list
+ [clusterId]="selection.cluster_id"
+ ></cd-smb-share-list>
</ng-container>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SmbClusterTabsComponent } from './smb-cluster-tabs.component';
-import { CLUSTER_RESOURCE, SMBCluster } from '../smb.model';
-import { By } from '@angular/platform-browser';
describe('SmbClusterTabsComponent', () => {
let component: SmbClusterTabsComponent;
it('should create', () => {
expect(component).toBeTruthy();
});
-
- it('should not render anything if selection is falsy', () => {
- component.selection = null;
- fixture.detectChanges();
-
- const tabsElement = fixture.debugElement.query(By.css('cds-tabs'));
- expect(tabsElement).toBeNull();
- });
-
- const selectedSmbCluster = (clusterId: string) => {
- const smbCluster: SMBCluster = {
- resource_type: CLUSTER_RESOURCE,
- cluster_id: clusterId,
- auth_mode: 'user'
- };
- return smbCluster;
- };
-
- it('should render cds-tabs if selection is truthy', () => {
- component.selection = selectedSmbCluster('fooBar');
- fixture.detectChanges();
-
- const tabsElement = fixture.debugElement.query(By.css('cds-tabs'));
- expect(tabsElement).toBeTruthy();
- });
});
<cd-table
+ headerTitle="Active directory access resources"
+ headerDescription="Logical management units for authorization on active directory (AD) servers"
[data]="joinAuth$ | async"
columnMode="flex"
[columns]="columns"
<ng-container *ngIf="smbShares$ | async as smbShares">
<cd-table
+ headerTitle="Shares"
+ headerDescription="Logical unit hosted by the cluster that maps to the given CephFS volume and path"
[data]="smbShares"
columnMode="flex"
[columns]="columns"
-<legend
- *ngIf="selectedTab == Tabs.clusters"
- i18n
->
- Clusters
- <cd-help-text>
- Logical management units that may map to one or more managed Samba service
- </cd-help-text>
-</legend>
-
-<legend
- *ngIf="selectedTab == Tabs.joinAuths"
- i18n
->
- Active directory access resources
- <cd-help-text>
- Logical management units for authorization on active directory (AD) servers
- </cd-help-text>
-</legend>
-
-<legend
- *ngIf="selectedTab == Tabs.usersgroups"
- i18n
->
- Standalone access resources
- <cd-help-text>
- Logical management units for authorization on Standalone servers
- </cd-help-text>
-</legend>
-
<cds-tabs
type="contained"
followFocus="true"
<ng-container *ngIf="usersGroups$ | async as usersGroups">
<cd-table
+ headerTitle="Standalone access resoruces"
+ headerDescription="Logical management units for authorization on Standalone servers"
[data]="usersGroups"
columnMode="flex"
[columns]="columns"
<cds-table-container [cdsLayer]="layer"
[cdsTheme]="theme"
class="content-theme">
+ <cds-table-header *ngIf="headerTitle">
+ <h4 cdsTableHeaderTitle
+ i18n>
+ {{headerTitle}}
+ </h4>
+ <p cdsTableHeaderDescription
+ i18n
+ *ngIf="headerDescription">
+ {{headerDescription}}
+ </p>
+ </cds-table-header>
<cds-table-toolbar #toolbar
*ngIf="toolHeader"
(cancel)="onBatchActionsCancel()"
@ContentChild(TableDetailDirective) rowDetail!: TableDetailDirective;
@ContentChild(TableActionsComponent) tableActions!: TableActionsComponent;
+ @Input()
+ headerTitle: string;
+ @Input()
+ headerDescription: string;
// This is the array with the items to be shown.
@Input()
data: any[];
.cds--tooltip-content {
background-color: theme.$layer-02;
}
+
/******************************************
Carbon Popover
******************************************/
max-height: layout.$spacing-13;
overflow: auto;
}
+
+/******************************************
+Tabs
+******************************************/
+.cds--tab-content {
+ background: var(--cds-layer-01);
+}