From 93f82134129756946dabf90f05262cccb576d33c Mon Sep 17 00:00:00 2001 From: Daniel Vega Date: Mon, 17 Nov 2014 16:18:55 -0200 Subject: [PATCH] CLOUDSTACK-7915: Remove hard-coded values for Load Balancer algorithms in UI Signed-off-by: Rajani Karuturi (cherry picked from commit ba6dfd84702eeef0362b94068add1328db84133a) --- .../classes/resources/messages.properties | 8 +-- .../classes/resources/messages_ar.properties | 4 +- .../classes/resources/messages_es.properties | 4 +- .../resources/messages_fr_FR.properties | 6 +- .../resources/messages_it_IT.properties | 4 +- .../resources/messages_ja_JP.properties | 8 +-- .../resources/messages_ko_KR.properties | 6 +- .../resources/messages_nb_NO.properties | 6 +- .../resources/messages_nl_NL.properties | 6 +- .../classes/resources/messages_pl.properties | 2 +- .../resources/messages_pt_BR.properties | 6 +- .../resources/messages_ru_RU.properties | 6 +- .../resources/messages_zh_CN.properties | 8 +-- ui/dictionary.jsp | 5 +- ui/scripts/network.js | 65 ++++++++++++------- ui/scripts/vpc.js | 12 ++-- 16 files changed, 88 insertions(+), 68 deletions(-) diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 029ed0ad7ae..3228578ce81 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -741,8 +741,10 @@ label.latest.events=Latest events label.launch.vm=Launch VM label.launch.zone=Launch zone label.launch=Launch +label.lb.algorithm.leastconn=Least connections +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=Source label.LB.isolation=LB isolation -label.least.connections=Least connections label.level=Level label.linklocal.ip=Link Local IP Address label.load.balancer=Load Balancer @@ -1029,7 +1031,6 @@ label.role=Role label.root.certificate=Root certificate label.root.disk.controller=Root disk controller label.root.disk.offering=Root Disk Offering -label.round.robin=Round-robin label.rules=Rules label.running.vms=Running VMs label.s3.access_key=Access Key @@ -1090,7 +1091,6 @@ label.snapshot.schedule=Setup Recurring Snapshot label.snapshot=Snapshot label.snapshots=Snapshots label.source.nat=Source NAT -label.source=Source label.specify.IP.ranges=Specify IP ranges label.specify.vlan=Specify VLAN label.specify.vxlan=Specify VXLAN @@ -2075,4 +2075,4 @@ label.add.baremetal.rack.configuration=Add Baremetal Rack Configuration label.delete.baremetal.rack.configuration=Delete Baremetal Rack Configuration message.confirm.delete.baremetal.rack.configuration=Please confirm that you want to delete Baremetal Rack Configuration. message.added.new.nuage.vsp.controller=Added new Nuage Vsp Controller -message.added.vpc.offering=Added VPC offering \ No newline at end of file +message.added.vpc.offering=Added VPC offering diff --git a/client/WEB-INF/classes/resources/messages_ar.properties b/client/WEB-INF/classes/resources/messages_ar.properties index 213a2ebc51a..de90c436109 100644 --- a/client/WEB-INF/classes/resources/messages_ar.properties +++ b/client/WEB-INF/classes/resources/messages_ar.properties @@ -98,7 +98,8 @@ label.invite.to=\u062f\u0639\u0648\u0629 \u0644\u0640 label.IPsec.preshared.key=\u0645\u0641\u062a\u0627\u062d \u0623\u0645\u0646 \u0628\u0631\u0648\u062a\u0648\u0643\u0648\u0644 \u0627\u0644\u0625\u0646\u062a\u0631\u0646\u062a \u062a\u0645\u062a \u0645\u0634\u0627\u0631\u0643\u062a\u0647 \u0645\u0633\u0628\u0642\u0627 label.isolation.uri=\u0639\u0632\u0644 \u0627\u0644\u0631\u0627\u0628\u0637 label.keyboard.type=\u0646\u0648\u0639 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d -label.least.connections=\u0623\u0642\u0644 \u0627\u0644\u0625\u062a\u0635\u0627\u0644\u0627\u062a +label.lb.algorithm.leastconn=\u0623\u0642\u0644 \u0627\u0644\u0625\u062a\u0635\u0627\u0644\u0627\u062a +label.lb.algorithm.source=\u0645\u0635\u062f\u0631 label.local.storage.enabled=\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u062a\u062e\u0632\u064a\u0646 \u0627\u0644\u0645\u062d\u0644\u064a label.make.project.owner=\u062c\u0639\u0644 \u0627\u0644\u062d\u0633\u0627\u0628 \u0645\u0627\u0644\u0643 \u0644\u0644\u0645\u0634\u0631\u0648\u0639 label.max.guest.limit=\u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0627\u0621 \u0644\u0636\u064a\u0641 @@ -179,7 +180,6 @@ label.select-view=\u062d\u062f\u062f \u0637\u0631\u064a\u0642\u0629 \u0627\u0644 label.service.capabilities=\u0642\u062f\u0631\u0627\u062a \u0627\u0644\u062e\u062f\u0645\u0629 label.setup=\u0627\u0644\u062a\u062b\u0628\u064a\u062a label.site.to.site.VPN=\u0645\u0648\u0642\u0639 \u0625\u0644\u0649 \u0645\u0648\u0642\u0639-\u0627\u0644\u0634\u0628\u0643\u0629 \u0627\u0644\u0634\u062e\u0635\u064a\u0629 \u0627\u0644\u0638\u0627\u0647\u0631\u064a\u0629 VPN -label.source=\u0645\u0635\u062f\u0631 label.specify.IP.ranges=\u062a\u062d\u062f\u064a\u062f \u0646\u0637\u0627\u0642\u0627\u062a IP label.sticky.tablesize=\u062d\u062c\u0645 \u0627\u0644\u062c\u062f\u0648\u0644 label.stop=\u062a\u0648\u0642\u0641 diff --git a/client/WEB-INF/classes/resources/messages_es.properties b/client/WEB-INF/classes/resources/messages_es.properties index 2ee04e92fe4..21b1c149fd0 100644 --- a/client/WEB-INF/classes/resources/messages_es.properties +++ b/client/WEB-INF/classes/resources/messages_es.properties @@ -544,6 +544,8 @@ label.last.name=Apellido label.latest.events=\u00daltimos eventos label.launch=Lanzar label.launch.vm=Lanzar maquina virtual +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=Fuente label.level=Nivel label.load.balancer=equilibrador de carga label.load.balancing=Balanceador de Carga @@ -758,7 +760,6 @@ label.restart.vpc=Reiniciar VPC label.restore=Restaurar label.role=Papel label.root.disk.offering=Root Disco Offering -label.round.robin=Round-robin label.routing=Enrutamiento label.rules=Reglas label.running.vms=Ejecuci\u00c3\u00b3n de m\u00c3\u00a1quinas virtuales @@ -807,7 +808,6 @@ label.snapshot.schedule=Lista de instant\u00c3\u00a1neas label.snapshot.s=Instant\u00c3\u00a1nea (s) label.snapshots=instant\u00c3\u00a1neas label.sockets=Sockets -label.source=Fuente label.source.nat=NAT Fuente label.specify.vlan=Especifique VLAN label.specify.vxlan=Especifique VXLAN diff --git a/client/WEB-INF/classes/resources/messages_fr_FR.properties b/client/WEB-INF/classes/resources/messages_fr_FR.properties index d78e84e3a8e..54dc6215a83 100644 --- a/client/WEB-INF/classes/resources/messages_fr_FR.properties +++ b/client/WEB-INF/classes/resources/messages_fr_FR.properties @@ -859,11 +859,13 @@ label.latest.events=Derniers \u00e9v\u00e9nements label.launch=D\u00e9marrer label.launch.vm=D\u00e9marrer VM label.launch.zone=D\u00e9marrer la zone +label.lb.algorithm.round.robin=Al\u00e9atoire +label.lb.algorithm.leastconn=Le moins de connexions +label.lb.algorithm.source=Origine label.LB.isolation=R\u00e9partition de charge isol\u00e9e label.ldap.configuration=Configuration LDAP label.ldap.group.name=Groupe LDAP label.ldap.port=Port LDAP -label.least.connections=Le moins de connexions label.level=Niveau label.linklocal.ip=Adresse IP lien local label.load.balancer=R\u00e9partiteur de charge @@ -1227,7 +1229,6 @@ label.root.certificate=Certificat racine label.root.disk.controller=Contr\u00f4leur de disque principal label.root.disk.offering=Offre de disque racine label.root.disk.size=Taille disque principal -label.round.robin=Al\u00e9atoire label.router.vm.scaled.up=VM Routeur agrandi label.routing.host=H\u00f4te de routage label.routing=Routage @@ -1314,7 +1315,6 @@ label.sockets=Sockets label.source.ip.address=Adresse IP source label.source.nat=NAT Source label.source.nat.supported=Source NAT support\u00e9 -label.source=Origine label.source.port=Port Source label.specify.IP.ranges=Sp\u00e9cifier des plages IP label.specify.vlan=Pr\u00e9ciser le VLAN diff --git a/client/WEB-INF/classes/resources/messages_it_IT.properties b/client/WEB-INF/classes/resources/messages_it_IT.properties index 779906bb1ea..1e5641f4e4e 100644 --- a/client/WEB-INF/classes/resources/messages_it_IT.properties +++ b/client/WEB-INF/classes/resources/messages_it_IT.properties @@ -408,6 +408,8 @@ label.label=Label label.latest.events=Ultimi eventi label.launch=Avvio label.launch.vm=Avviare una VM +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=Sorgente label.LB.isolation=Isolamento di LB label.load.balancing=Bilanciamento di Carico label.load.balancing.policies=Politiche di Bilanciamento di Carico @@ -520,7 +522,6 @@ label.restore=Restore label.review=Riesaminare label.revoke.project.invite=Revocare un invit label.root.disk.controller=Controller del disco root -label.round.robin=Round-robin label.rules=Regole label.s3.access_key=Access Key label.s3.connection_timeout=Tempo di scadenza connessione @@ -553,7 +554,6 @@ label.set.up.zone.type=Configurazione del tipo di Zona label.shutdown.provider=Arresto del provider label.site.to.site.VPN=Site-to-site VPN label.skip.guide=Se si ha familiarit\u00e0 con CloudStack per utilizzi precedenti, si pu\u00f2 saltare questa guida -label.source=Sorgente label.specify.IP.ranges=Specificare intervallo di indirizzi IP label.srx=SRX label.start.IP=Indirizzo IP iniziale diff --git a/client/WEB-INF/classes/resources/messages_ja_JP.properties b/client/WEB-INF/classes/resources/messages_ja_JP.properties index f0f9c2d7aff..1962e92a4cf 100644 --- a/client/WEB-INF/classes/resources/messages_ja_JP.properties +++ b/client/WEB-INF/classes/resources/messages_ja_JP.properties @@ -859,11 +859,13 @@ label.latest.events=\u6700\u65b0\u30a4\u30d9\u30f3\u30c8 label.launch=\u8d77\u52d5 label.launch.vm=VM \u306e\u8d77\u52d5 label.launch.zone=\u30be\u30fc\u30f3\u306e\u8d77\u52d5 +label.lb.algorithm.leastconn=\u6700\u5c0f\u63a5\u7d9a +label.lb.algorithm.roundrobin=\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3 +label.lb.algorithm.source=\u9001\u4fe1\u5143 label.LB.isolation=LB \u5206\u96e2 label.ldap.configuration=LDAP \u69cb\u6210 label.ldap.group.name=LDAP \u30b0\u30eb\u30fc\u30d7 label.ldap.port=LDAP \u30dd\u30fc\u30c8 -label.least.connections=\u6700\u5c0f\u63a5\u7d9a label.level=\u30ec\u30d9\u30eb label.linklocal.ip=\u30ea\u30f3\u30af \u30ed\u30fc\u30ab\u30eb IP \u30a2\u30c9\u30ec\u30b9 label.load.balancer.type=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u7a2e\u985e @@ -1227,7 +1229,6 @@ label.root.certificate=\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8 label.root.disk.controller=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc label.root.disk.offering=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.root.disk.size=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba -label.round.robin=\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3 label.router.vm.scaled.up=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f label.routing.host=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30db\u30b9\u30c8 label.routing=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 @@ -1315,7 +1316,6 @@ label.source.ip.address=\u9001\u4fe1\u5143 IP \u30a2\u30c9\u30ec\u30b9 label.source.nat.supported=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u9001\u4fe1\u5143 NAT label.source.nat=\u9001\u4fe1\u5143 NAT label.source.port=\u9001\u4fe1\u5143\u30dd\u30fc\u30c8 -label.source=\u9001\u4fe1\u5143 label.specify.IP.ranges=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u6307\u5b9a label.specify.vlan=VLAN \u3092\u6307\u5b9a\u3059\u308b label.specify.vxlan=VXLAN \u3092\u6307\u5b9a\u3059\u308b @@ -2051,4 +2051,4 @@ state.Stopping=\u505c\u6b62\u3057\u3066\u3044\u307e\u3059 state.Suspended=\u4e00\u6642\u505c\u6b62 ui.listView.filters.all=\u3059\u3079\u3066 ui.listView.filters.mine=\u81ea\u5206\u306e\u3082\u306e -label.migrate.volume=Migrate Volume \ No newline at end of file +label.migrate.volume=Migrate Volume diff --git a/client/WEB-INF/classes/resources/messages_ko_KR.properties b/client/WEB-INF/classes/resources/messages_ko_KR.properties index 69e711a0929..ced576cb235 100644 --- a/client/WEB-INF/classes/resources/messages_ko_KR.properties +++ b/client/WEB-INF/classes/resources/messages_ko_KR.properties @@ -637,8 +637,10 @@ label.latest.events=\ucd5c\uc2e0 \uc774\ubca4\ud2b8 label.launch=\uc2dc\uc791 label.launch.vm=VM \uc2dc\uc791 label.launch.zone=Zone \uc2dc\uc791 +label.lb.algorithm.leastconn=\ucd5c\uc18c \uc811\uc18d +label.lb.algorithm.roundrobin=\ub77c\uc6b4\ub4dc \ub85c\ube48 +label.lb.algorithm.source=\uc2dc\uc791 \uc704\uce58 label.LB.isolation=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \ubd84\ub9ac -label.least.connections=\ucd5c\uc18c \uc811\uc18d label.level=\ub808\ubca8 label.load.balancer=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \uc7a5\uce58 label.load.balancing.policies=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \uc815\ucc45 @@ -899,7 +901,6 @@ label.role=\uc5ed\ud560 label.root.disk.controller=\ub8e8\ud2b8 \ub514\uc2a4\ud06c \ucf58\ud2b8\ub864\ub7ec label.root.disk.offering=\ub8e8\ud2b8 \ub514\uc2a4\ud06c\uc81c\uacf5 label.root.disk.size=\ub8e8\ud2b8 \ub514\uc2a4\ud06c -label.round.robin=\ub77c\uc6b4\ub4dc \ub85c\ube48 label.routing=\ub77c\uc6b0\ud305 label.rules=\uaddc\uce59 label.running.vms=\uc2e4\ud589\uc911 VM @@ -956,7 +957,6 @@ label.snapshot.s=\uc2a4\ub0c5\uc0f7 label.snapshots=\uc2a4\ub0c5\uc0f7 label.snapshot=\uc2a4\ub0c5\uc0f7 label.source.nat=\uc804\uc1a1\uc6d0 NAT -label.source=\uc2dc\uc791 \uc704\uce58 label.specify.IP.ranges=IP \uc8fc\uc18c \ubc94\uc704 \uc9c0\uc815 label.specify.vlan=VLAN \uc9c0\uc815 label.specify.vxlan=VXLAN \uc9c0\uc815 diff --git a/client/WEB-INF/classes/resources/messages_nb_NO.properties b/client/WEB-INF/classes/resources/messages_nb_NO.properties index 472c8987a4b..26c1424b461 100644 --- a/client/WEB-INF/classes/resources/messages_nb_NO.properties +++ b/client/WEB-INF/classes/resources/messages_nb_NO.properties @@ -541,8 +541,10 @@ label.last.name=Etternavn label.latest.events=Siste hendelser label.launch=Start label.launch.vm=Start VM +label.lb.algorithm.leastconn=F\u00e6rrest tilkoblinger +label.lb.algorithm.roundrobin=Ringdistribusjon +label.lb.algorithm.source=Kilde label.LB.isolation=LB-isolering -label.least.connections=F\u00e6rrest tilkoblinger label.load.balancer=Lastbalanserer label.load.balancing=Lastbalansering label.load.balancing.policies=Regler for lastbalansering @@ -745,7 +747,6 @@ label.review=Gjennomg\u00e5 label.revoke.project.invite=Tilbakekall invitasjonen label.role=Rolle label.root.disk.size=Rotdiskst\u00f8rrelse -label.round.robin=Ringdistribusjon label.routing=Ruting label.rules=Regler label.running.vms=Kj\u00f8rende VMer @@ -785,7 +786,6 @@ label.shared=Delt label.shutdown.provider=Steng tilbyder label.size=St\u00f8rrelse label.skip.guide=Jeg har brukt CloudStack tidligere. Hopp over denne veiviseren -label.source=Kilde label.source.nat=Kilde NAT label.specify.IP.ranges=Spesifiser IP-rekker label.specify.vlan=Spesifiser VLAN diff --git a/client/WEB-INF/classes/resources/messages_nl_NL.properties b/client/WEB-INF/classes/resources/messages_nl_NL.properties index 7f7cb9b527c..86653a5f514 100644 --- a/client/WEB-INF/classes/resources/messages_nl_NL.properties +++ b/client/WEB-INF/classes/resources/messages_nl_NL.properties @@ -808,11 +808,13 @@ label.latest.events=Laatste gebeurtenissen label.launch=Lanceer label.launch.vm=Lanceer VM label.launch.zone=Lanceer zone +label.lb.algorithm.leastconn=Minste connecties +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=Bron label.LB.isolation=LB isolatie label.ldap.configuration=LDAP Configuratie label.ldap.group.name=LDAP Groep label.ldap.port=LDAP poort -label.least.connections=Minste connecties label.level=Level label.linklocal.ip=Link Local IP Adres label.load.balancer=Load Balancer @@ -1160,7 +1162,6 @@ label.role=Rol label.root.disk.controller=Root schijf controller label.root.disk.offering=Root Schijf Aanbieding label.root.disk.size=Grootte root volume -label.round.robin=Round-robin label.router.vm.scaled.up=Router VM Omhoog Geschaald label.routing=Routing label.rule.number=Regel Nummer @@ -1241,7 +1242,6 @@ label.snapshots=Snapshots label.SNMP.community=SNMP Community label.SNMP.port=SNMP Poort label.sockets=CPU Sockets -label.source=Bron label.source.nat=Source NAT label.specify.IP.ranges=Specificeer IP ranges label.specify.vlan=Specificeer VLAN diff --git a/client/WEB-INF/classes/resources/messages_pl.properties b/client/WEB-INF/classes/resources/messages_pl.properties index b28a00c1355..a0d1b354b4d 100644 --- a/client/WEB-INF/classes/resources/messages_pl.properties +++ b/client/WEB-INF/classes/resources/messages_pl.properties @@ -284,7 +284,7 @@ label.lang.russian=Rosyjski label.lang.spanish=Hiszpia\u0144ski label.last.name=Nazwisko label.launch=Rozpocznij -label.least.connections=Ostatnie po\u0142\u0105czenie +label.lb.algorithm.leastconn=Ostatnie po\u0142\u0105czenie label.level=Poziom label.loading=Wczytywanie label.local=Lokalne diff --git a/client/WEB-INF/classes/resources/messages_pt_BR.properties b/client/WEB-INF/classes/resources/messages_pt_BR.properties index c833eeff46d..fa77633a650 100644 --- a/client/WEB-INF/classes/resources/messages_pt_BR.properties +++ b/client/WEB-INF/classes/resources/messages_pt_BR.properties @@ -710,11 +710,13 @@ label.latest.events=\u00daltimos eventos label.launch=Executar label.launch.vm=Executar VM label.launch.zone=Executar zona. +label.lb.algorithm.leastconn=Least connections +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=Origem label.LB.isolation=Isolamento de LB label.ldap.configuration=Configura\u00e7\u00e3o do LDAP label.ldap.group.name=Grupo LDAP label.ldap.port=Porta do LDAP -label.least.connections=Least connections label.level=N\u00edvel label.linklocal.ip=Endere\u00e7o IP do Link Local label.load.balancer=Load Balancer @@ -1019,7 +1021,6 @@ label.role=Fun\u00e7\u00e3o label.root.disk.controller=Controlador do disco Root label.root.disk.offering=Oferta de Disco ROOT label.root.disk.size=Tamanho do disco root -label.round.robin=Round-robin label.routing=Roteamento label.rules=Regras label.running.vms=VMs Rodando @@ -1089,7 +1090,6 @@ label.snapshot.s=Snapshot (s) label.snapshots=Snapshots label.sockets=Sockets label.source.nat=Source NAT -label.source=Origem label.specify.IP.ranges=Especifique range de IP label.specify.vlan=Especificar VLAN label.specify.vxlan=Especificar VXLAN diff --git a/client/WEB-INF/classes/resources/messages_ru_RU.properties b/client/WEB-INF/classes/resources/messages_ru_RU.properties index 8f0ba4a1ee0..7f57daa58be 100644 --- a/client/WEB-INF/classes/resources/messages_ru_RU.properties +++ b/client/WEB-INF/classes/resources/messages_ru_RU.properties @@ -674,8 +674,10 @@ label.latest.events=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0438 \u044 label.launch=\u0417\u0430\u043f\u0443\u0441\u043a label.launch.vm=\u0417\u0430\u043f\u0443\u0441\u043a \u0412\u041c label.launch.zone=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u043e\u043d\u0443 +label.lb.algorithm.leastconn=Least connections +label.lb.algorithm.roundrobin=Round-robin +label.lb.algorithm.source=\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a label.LB.isolation=\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f LB -label.least.connections=Least connections label.level=\u0423\u0440\u043e\u0432\u0435\u043d\u044c label.linklocal.ip=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 label.load.balancer=\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 @@ -957,7 +959,6 @@ label.role=\u0420\u043e\u043b\u044c label.root.disk.controller=\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 label.root.disk.offering=\u0420\u0435\u0441\u0443\u0440\u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 label.root.disk.size=\u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 -label.round.robin=Round-robin label.routing=\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f label.rules=\u041f\u0440\u0430\u0432\u0438\u043b\u0430 label.running.vms=\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0412\u041c @@ -1020,7 +1021,6 @@ label.snapshots=\u0421\u043d\u0438\u043c\u043a\u0438 label.snapshot.s=\u0421\u043d\u0438\u043c\u043e\u043a/\u0441\u043d\u0438\u043c\u043a\u0438 label.snapshot=\u0421\u043d\u0438\u043c\u043e\u043a label.source.nat=Source NAT -label.source=\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a label.specify.IP.ranges=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 label.specify.vlan=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 VLAN label.specify.vxlan=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 VXLAN diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties index e16a55b00f2..217849582b4 100644 --- a/client/WEB-INF/classes/resources/messages_zh_CN.properties +++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties @@ -859,11 +859,13 @@ label.latest.events=\u6700\u65b0\u4e8b\u4ef6 label.launch=\u542f\u52a8 label.launch.vm=\u542f\u52a8 VM label.launch.zone=\u542f\u52a8\u8d44\u6e90\u57df +label.lb.algorithm.leastconn=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5 +label.lb.algorithm.roundrobin=\u8f6e\u8be2\u7b97\u6cd5 +label.lb.algorithm.source=\u6e90\u7b97\u6cd5 label.LB.isolation=\u8d1f\u8f7d\u5e73\u8861\u5668\u9694\u79bb label.ldap.configuration=LDAP \u914d\u7f6e label.ldap.group.name=LDAP \u7ec4 label.ldap.port=LDAP \u7aef\u53e3 -label.least.connections=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5 label.level=\u7ea7\u522b label.linklocal.ip=\u94fe\u63a5\u672c\u5730 IP \u5730\u5740 label.load.balancer.type=\u8d1f\u8f7d\u5e73\u8861\u5668\u7c7b\u578b @@ -1227,7 +1229,6 @@ label.root.certificate=\u6839\u8bc1\u4e66 label.root.disk.controller=\u6839\u78c1\u76d8\u63a7\u5236\u5668 label.root.disk.offering=\u6839\u78c1\u76d8\u65b9\u6848 label.root.disk.size=\u6839\u78c1\u76d8\u5927\u5c0f -label.round.robin=\u8f6e\u5faa label.router.vm.scaled.up=\u5df2\u6269\u5c55\u8def\u7531\u5668 VM label.routing.host=\u6b63\u5728\u8def\u7531\u4e3b\u673a label.routing=\u6b63\u5728\u8def\u7531 @@ -1315,7 +1316,6 @@ label.source.ip.address=\u6e90 IP \u5730\u5740 label.source.nat.supported=\u652f\u6301 SourceNAT label.source.nat=\u6e90 NAT label.source.port=\u6e90\u7aef\u53e3 -label.source=\u6e90\u7b97\u6cd5 label.specify.IP.ranges=\u6307\u5b9a IP \u8303\u56f4 label.specify.vlan=\u6307\u5b9a VLAN label.specify.vxlan=\u6307\u5b9a VXLAN @@ -2051,4 +2051,4 @@ state.Stopping=\u6b63\u5728\u505c\u6b62 state.Suspended=\u5df2\u6682\u505c ui.listView.filters.all=\u5168\u90e8 ui.listView.filters.mine=\u672c\u7528\u6237 -label.migrate.volume=Migrate Volume \ No newline at end of file +label.migrate.volume=Migrate Volume diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp index 671f48f1cc9..e1c19f36e58 100644 --- a/ui/dictionary.jsp +++ b/ui/dictionary.jsp @@ -746,8 +746,10 @@ dictionary = { 'label.latest.events': '', 'label.launch': '', 'label.launch.vm': '', +'label.lb.algorithm.leastconn': '', +'label.lb.algorithm.roundrobin': '', +'label.lb.algorithm.source': '', 'label.LB.isolation': '', -'label.least.connections': '', 'label.level': '', 'label.linklocal.ip': '', 'label.load.balancer': '', @@ -1028,6 +1030,5 @@ dictionary = { 'label.role': '', 'label.root.disk.controller': '', 'label.root.disk.offering': '', -'label.round.robin': '', }; diff --git a/ui/scripts/network.js b/ui/scripts/network.js index c27b999a739..c31ba76bc87 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1685,17 +1685,9 @@ 'algorithm': { label: 'label.algorithm', select: function(args) { + var data = getLBAlgorithms(args.context.networks[0]); args.response.success({ - data: [{ - name: 'roundrobin', - description: _l('label.round.robin') - }, { - name: 'leastconn', - description: _l('label.least.connections') - }, { - name: 'source', - description: _l('label.source') - }] + data: data }); } }, @@ -3525,20 +3517,9 @@ label: 'label.algorithm', isEditable: true, select: function(args) { + var data = getLBAlgorithms(args.context.networks[0]); args.response.success({ - data: [{ - id: 'roundrobin', - name: 'roundrobin', - description: _l('label.round.robin') - }, { - id: 'leastconn', - name: 'leastconn', - description: _l('label.least.connections') - }, { - id: 'source', - name: 'source', - description: _l('label.source') - }] + data: data }); } }, @@ -6451,6 +6432,44 @@ }); } } + }; + + var getLBAlgorithms = function(networkObj) { + if (!networkObj || !networkObj.service) { + return []; + } + + var lbService = $.grep(networkObj.service, function(service) { + return service.name == 'Lb'; + })[0]; + + if (!lbService || !lbService.capability) { + return []; + } + + var algorithmCapabilities = $.grep( + lbService.capability, + function(capability) { + return capability.name == 'SupportedLbAlgorithms'; + } + )[0]; + + if (!algorithmCapabilities) { + return []; + } + + var algorithms = algorithmCapabilities.value.split(','); + + if (!algorithms) { + return []; + } + + var data = []; + $(algorithms).each(function() { + data.push({id: this.valueOf(), name: this.valueOf(), description: _l('label.lb.algorithm.' + this.valueOf())}); + }); + + return data; } })(cloudStack, jQuery); diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 0770cb2c07f..dc1f47cb71f 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -833,13 +833,13 @@ args.response.success({ data: [{ id: 'source', - description: 'source' + description: _l('label.lb.algorithm.source') }, { id: 'roundrobin', - description: 'roundrobin' + description: _l('label.lb.algorithm.roundrobin') }, { id: 'leastconn', - description: 'leastconn' + description: _l('label.lb.algorithm.leastconn') }] }); } @@ -3661,13 +3661,13 @@ args.response.success({ data: [{ name: 'roundrobin', - description: _l('label.round.robin') + description: _l('label.lb.algorithm.roundrobin') }, { name: 'leastconn', - description: _l('label.least.connections') + description: _l('label.lb.algorithm.leastconn') }, { name: 'source', - description: _l('label.source') + description: _l('label.lb.algorithm.source') }] }); }