Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issues described in 27469. #321

Merged
merged 1 commit into from Jan 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,7 +12,8 @@ import {Subscription} from 'rxjs';
import {
RestService,
UserService,
WebSocketService
WebSocketService,
IscsiService
} from '../../../../services/';
import {
FieldConfig
Expand All @@ -21,7 +22,7 @@ import {
@Component({
selector : 'afp-edit',
template : ` <entity-form [conf]="this"></entity-form>`,
providers : [ UserService ]
providers : [ UserService, IscsiService ]
})

export class ServiceAFPComponent {
Expand Down Expand Up @@ -56,28 +57,6 @@ export class ServiceAFPComponent {
placeholder : 'Max. Connections',
tooltip: 'Maximum number of simultaneous connections permitted\
via AFP. The default limit is 50.',
},
{
type : 'checkbox',
name : 'afp_srv_homedir_enable',
placeholder : 'Enable home directories',
tooltip: 'If checked, any user home directories located under\
<strong>Home directories</strong> will be available over the share.',
},
{
type : 'explorer',
initial: '/mnt',
name : 'afp_srv_homedir',
placeholder : 'Home Directories',
tooltip: 'Select the volume or dataset which contains user\
home directories.',
},
{
type : 'input',
name : 'afp_srv_homename',
placeholder : 'Home share name',
tooltip: 'Overrides the default home folder name with the\
specified value.',
},
{
type : 'explorer',
Expand Down Expand Up @@ -106,6 +85,7 @@ export class ServiceAFPComponent {
{
type : 'select',
name : 'afp_srv_map_acls',
placeholder : 'Map ACLs',
tooltip: 'Choose mapping of effective permissions for\
authenticated users; <b>Rights</b>\
(default, Unix-style permissions), <b>None</b>, or\
Expand All @@ -117,12 +97,14 @@ export class ServiceAFPComponent {
],
},
{
type : 'input',
type : 'select',
name : 'afp_srv_bindip',
placeholder : 'Bind Interfaces',
tooltip: 'Specify the IP addresses to listen for FTP connections.\
If none are specified, advertise the first IP address of the\
system, but to listen for any incoming request.',
options: [],
multiple: true
},
{
type : 'textarea',
Expand All @@ -133,10 +115,11 @@ export class ServiceAFPComponent {
}
];
private guest_users: any;
private afp_srv_bindip: any;
constructor(protected router: Router, protected route: ActivatedRoute,
protected rest: RestService, protected ws: WebSocketService,
protected _injector: Injector, protected _appRef: ApplicationRef,
protected userService: UserService) {}
protected userService: UserService, protected iscsiService: IscsiService,) {}

afterInit(entityEdit: any) {
let self = this;
Expand All @@ -148,5 +131,12 @@ export class ServiceAFPComponent {
);
}
});
this.iscsiService.getIpChoices().subscribe((res) => {
this.afp_srv_bindip =
_.find(this.fieldConfig, { 'name': 'afp_srv_bindip' });
res.forEach((item) => {
this.afp_srv_bindip.options.push({ label: item[0], value: item[0] });
})
});
}
}