diff --git a/public/js/gateway.js b/public/js/gateway.js
index 7e56110..08edbb6 100644
--- a/public/js/gateway.js
+++ b/public/js/gateway.js
@@ -7,14 +7,31 @@ $( document ).ready(function() {
var labels = container.Labels;
if (labels.stacktype){
if (labels.appport && container.State == 'running'){
- var iconurl = labels.stackurl.replace('.yml','.png').replace('/templates/','/icons/');
- var linkurl = window.location.href.replace('taisun-gateway', 'user:' + pass + '@' + labels.appport);
- $('#stacks').append('\
-
\
-
\
- '+ labels.stackname + '
\
-
\
- ');
+ var apport = labels.appport;
+ if (isNaN(apport)){
+ var dropdownlinks = '';
+ var ports = JSON.parse(apport);
+ $(ports).each(function( key, value ){
+ var iconurl = labels.stackurl.replace('.yml','.png').replace('/templates/','/icons/');
+ var linkurl = window.location.href.replace('taisun-gateway', 'user:' + pass + '@' + value[Object.keys(value)[0]]);
+ $('#stacks').append('\
+ \
+
\
+ '+ Object.keys(value)[0] + '
\
+
\
+ ');
+ });
+ }
+ else{
+ var iconurl = labels.stackurl.replace('.yml','.png').replace('/templates/','/icons/');
+ var linkurl = window.location.href.replace('taisun-gateway', 'user:' + pass + '@' + labels.appport);
+ $('#stacks').append('\
+ \
+
\
+ '+ labels.stackname + '
\
+
\
+ ');
+ }
}
else if (labels.devport && container.State == 'running' && labels.ide == 'VDI'){
var linkurl = window.location.href.replace('taisun-gateway', 'user:' + pass + '@' + taisunport) + '/desktop/' + container.Id;