-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
existdb-local-packages.html
61 lines (47 loc) · 1.53 KB
/
existdb-local-packages.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!--
`existdb-local-packages`
@demo local.html
-->
<dom-module id="existdb-local-packages">
<template>
<style>
:host {
display: block;
}
</style>
<iron-ajax id="loadLocal"
verbose with-credentials
method="get" handle-as="text"
on-response="handlePackages"
url="/exist/apps/dashboard/apps/local"
on-error="handlePackagesError" auto></iron-ajax>
<slot></slot>
</template>
<script>
class ExistdbLocalPackages extends Polymer.Element {
static get is() {
return 'existdb-local-packages';
}
static get properties() {
return {
};
}
constructor() {
console.log('ExistdbLocalPackages constructor')
super();
}
connectedCallback() {
super.connectedCallback();
console.log('ExistdbLocalPackages connected')
}
handlePackages(){
this.innerHTML = this.$.loadLocal.lastResponse
}
handlePackagesError(){
// console.log('ExistdbPackageservice._handlePackagesError ', this.$.loadLocal.lastError)
console.log('ExistdbLocalPackages._handlePackagesError ')
}
}
window.customElements.define(ExistdbLocalPackages.is, ExistdbLocalPackages);
</script>
</dom-module>