Browse Source

ui++

master
Coin de Gamma 6 years ago
parent
commit
42fd749b1b
  1. 18
      src/datasource/module.ts
  2. 2
      src/datasource/partials/config.html

18
src/datasource/module.ts

@ -10,24 +10,24 @@ class HasticConfigCtrl {
public static template = configTemplate;
public accessOptions: any[];
public current: any;
private showAccessHelp: boolean = false;
constructor() {
constructor($scope) {
console.log(this);
this.accessOptions = [
{ key: 'proxy', value: 'Server (Default)' },
{ key: 'direct', value: 'Browser'}
];
//this.current.access = 'proxy';
// if(this.appModel.jsonData === undefined) {
// this.appModel.jsonData = {};
// }
// this.appEditCtrl.setPreUpdateHook(this.preUpdate.bind(this));
// this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this));
this.current.access = 'proxy';
}
normalizeUrl() {
// this.appModel.jsonData.hasticServerUrl = normalizeUrl(this.appModel.jsonData.hasticServerUrl);
this.current.url = normalizeUrl(this.current.url);
}
toggleAccessHelp() {
console.log('hey');
this.showAccessHelp = !this.showAccessHelp;
}
}

2
src/datasource/partials/config.html

@ -8,10 +8,10 @@
class="gf-form-input" type="text"
placeholder="http://localhost:8000"
ng-model='current.url'
bs-typeahead="getSuggestUrls"
min-length="0"
ng-pattern="/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/"
required
ng-blur="ctrl.normalizeUrl"
/>
<info-popover mode="right-absolute">
<p>Specify a complete Hastic Server HTTP URL (for example http://your_hastic_server:8080)</p>

Loading…
Cancel
Save