You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
833 B
39 lines
833 B
import { HasticDatasource } from './datasource'; |
|
import { HasticQueryCtrl } from './query_ctrl'; |
|
|
|
import { normalizeUrl } from '../utlis'; |
|
|
|
import configTemplate from './partials/config.html'; |
|
|
|
|
|
class HasticConfigCtrl { |
|
public static template = configTemplate; |
|
public ACCESS_OPTIONS = [ |
|
{ key: 'proxy', value: 'Server (Default)' }, |
|
{ key: 'direct', value: 'Browser'} |
|
]; |
|
|
|
public current: any; |
|
private showAccessHelp: boolean = false; |
|
|
|
constructor(private $scope) { |
|
} |
|
|
|
normalizeUrl() { |
|
if(this.$scope.current.url === "") { |
|
return; |
|
} |
|
this.$scope.current.url = normalizeUrl(this.$scope.current.url); |
|
} |
|
|
|
toggleAccessHelp() { |
|
this.showAccessHelp = !this.showAccessHelp; |
|
} |
|
|
|
} |
|
|
|
export { |
|
HasticDatasource as Datasource, |
|
HasticConfigCtrl as ConfigCtrl, |
|
HasticQueryCtrl as QueryCtrl |
|
};
|
|
|