Fix bugs
diff --git a/views/ngXosViews/vpnDashboard/src/js/main.js b/views/ngXosViews/vpnDashboard/src/js/main.js
index aee3bc7..b3b7f85 100644
--- a/views/ngXosViews/vpnDashboard/src/js/main.js
+++ b/views/ngXosViews/vpnDashboard/src/js/main.js
@@ -9,12 +9,12 @@
])
.config(($stateProvider) => {
$stateProvider
- .state('vpn-list', {
+ .state('vpnList', {
url: '/',
template: '<vpn-list></vpn-list>'
})
- .state('cleint-script', {
- url: '/client/:pk',
+ .state('clientScript', {
+ url: '/client/:tenantId',
template: '<client-script></client-script>'
});
})
@@ -33,10 +33,10 @@
return deferred.promise;
}
- this.getVpnTenants = (pk) => {
+ this.getVpnTenants = (tenantId) => {
let deferred = $q.defer();
- $http.get('/xoslib/clientscript/', {params: {pk: pk}})
+ $http.get('/xoslib/clientscript/', {params: {tenantId: tenantId}})
.then((res) => {
deferred.resolve(res.data)
})
@@ -73,14 +73,14 @@
return {
restrict: 'E',
scope: {
- pk: '=pk',
+ tenantId: '=tenantId',
},
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/client-script.tpl.html',
controller: function(Vpn){
// retrieving user list
- Vpn.getClientScript(pk)
+ Vpn.getClientScript(tenantId)
.then((script_location) => {
this.script_location = script_location;
})
diff --git a/views/ngXosViews/vpnDashboard/src/templates/client-script.tpl.html b/views/ngXosViews/vpnDashboard/src/templates/client-script.tpl.html
index 882f2eb..6810580 100644
--- a/views/ngXosViews/vpnDashboard/src/templates/client-script.tpl.html
+++ b/views/ngXosViews/vpnDashboard/src/templates/client-script.tpl.html
@@ -1,4 +1,4 @@
-<a href="/static/vpn/{{ vm.script_location }}" download id="download" hidden></a>
+<a href="/static/vpn/{{ vm.script_location }}" download id="download" hidden>{{ vm.script_location }}</a>
<script>
-document.getElementById('download').click();
+// document.getElementById('download').click();
</script>