Merge pull request #7725 from abpframework/feat/5238

Removed the connection string setting from tenant management page
pull/7742/head
Levent Arman Özak 5 years ago committed by GitHub
commit 5a90c4cff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,37 +55,6 @@
</form>
</ng-template>
<ng-template #connectionStringModalTemplate>
<form [formGroup]="defaultConnectionStringForm" (ngSubmit)="save()" validateOnSubmit>
<div class="form-group">
<div class="custom-checkbox custom-control mb-2">
<input
id="useSharedDatabase"
type="checkbox"
class="custom-control-input"
formControlName="useSharedDatabase"
autofocus
(ngModelChange)="onSharedDatabaseChange($event)"
/>
<label for="useSharedDatabase" class="custom-control-label">{{
'AbpTenantManagement::DisplayName:UseSharedDatabase' | abpLocalization
}}</label>
</div>
</div>
<div class="form-group" *ngIf="!useSharedDatabase">
<label for="defaultConnectionString">{{
'AbpTenantManagement::DisplayName:DefaultConnectionString' | abpLocalization
}}</label>
<input
type="text"
id="defaultConnectionString"
class="form-control"
formControlName="defaultConnectionString"
/>
</div>
</form>
</ng-template>
<abp-feature-management
*abpReplaceableTemplate="{
inputs: {

@ -84,9 +84,6 @@ export class TenantsComponent implements OnInit {
@ViewChild('tenantModalTemplate')
tenantModalTemplate: TemplateRef<any>;
@ViewChild('connectionStringModalTemplate')
connectionStringModalTemplate: TemplateRef<any>;
get isDisabledSaveButton(): boolean {
if (!this.selectedModalContent) return false;
@ -146,28 +143,6 @@ export class TenantsComponent implements OnInit {
this.isModalVisible = true;
}
onEditConnectionString(id: string) {
this.store
.dispatch(new GetTenantById(id))
.pipe(
pluck('TenantManagementState', 'selectedItem'),
switchMap(selected => {
this.selected = selected;
return this.tenantService.getDefaultConnectionString(id);
}),
)
.subscribe(fetchedConnectionString => {
this._useSharedDatabase = fetchedConnectionString ? false : true;
this.defaultConnectionString = fetchedConnectionString ? fetchedConnectionString : '';
this.createDefaultConnectionStringForm();
this.openModal(
'AbpTenantManagement::ConnectionStrings',
this.connectionStringModalTemplate,
'saveConnStr',
);
});
}
addTenant() {
this.selected = {} as TenantDto;
this.createTenantForm();

@ -11,14 +11,6 @@ export const DEFAULT_TENANTS_ENTITY_ACTIONS = EntityAction.createMany<TenantDto>
},
permission: 'AbpTenantManagement.Tenants.Update',
},
{
text: 'AbpTenantManagement::Permission:ManageConnectionStrings',
action: data => {
const component = data.getInjected(TenantsComponent);
component.onEditConnectionString(data.record.id);
},
permission: 'AbpTenantManagement.Tenants.ManageConnectionStrings',
},
{
text: 'AbpTenantManagement::Permission:ManageFeatures',
action: data => {

Loading…
Cancel
Save