mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
This commit is contained in:
commit
5c58a45f02
|
|
@ -185,7 +185,7 @@ public class CreateNetworkCmd extends BaseCmd {
|
|||
if (zoneId == null) {
|
||||
throw new InvalidParameterValueException("ZoneId is required as physicalNetworkId is null");
|
||||
}
|
||||
return _networkService.findPhysicalNetworkId(zoneId, offering.getTags());
|
||||
return _networkService.findPhysicalNetworkId(zoneId, offering.getTags(), offering.getTrafficType());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,5 +169,9 @@ public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd {
|
|||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create physical network entity");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetwork;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.SuccessResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
|
@ -91,4 +92,9 @@ public class DeletePhysicalNetworkCmd extends BaseAsyncCmd {
|
|||
public String getEventType() {
|
||||
return EventTypes.EVENT_PHYSICAL_NETWORK_DELETE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetwork;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.PhysicalNetworkResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.network.PhysicalNetwork;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -118,4 +119,9 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd {
|
|||
public String getEventType() {
|
||||
return EventTypes.EVENT_PHYSICAL_NETWORK_UPDATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetwork;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public interface NetworkService {
|
|||
|
||||
PhysicalNetworkServiceProvider getCreatedPhysicalNetworkServiceProvider(Long providerId);
|
||||
|
||||
long findPhysicalNetworkId(long zoneId, String tag);
|
||||
long findPhysicalNetworkId(long zoneId, String tag, TrafficType trafficType);
|
||||
|
||||
PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalNetworkId, String trafficType, String xenLabel, String kvmLabel, String vmwareLabel, String simulatorLabel, String vlan);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
state.Allocated=Allocated
|
||||
changed.item.properties=Changed item properties
|
||||
label.apply=Apply
|
||||
label.default=Default
|
||||
label.viewing=Viewing
|
||||
label.move.to.top=Move to top
|
||||
label.move.up.row=Move up one row
|
||||
label.move.down.row=Move down one row
|
||||
label.drag.new.position=Drag to new position
|
||||
label.order=Order
|
||||
label.no.data=No data to show
|
||||
label.change.value=Change value
|
||||
label.clear.list=Clear list
|
||||
label.full.path=Full path
|
||||
message.add.domain=Please specify the subdomain you want to create under this domain
|
||||
message.delete.user=Please confirm that you would like to delete this user.
|
||||
|
|
@ -50,7 +63,6 @@ label.clean.up=Clean up
|
|||
message.restart.network=Please confirm that you want to restart network
|
||||
label.restart.network=Restart network
|
||||
label.edit.network.details=Edit network details
|
||||
message.add.guest.network=Please specify name and zone for this network; note that network will be isolated and source NAT-enabled.
|
||||
label.add.guest.network=Add guest network
|
||||
label.guest.networks=Guest networks
|
||||
message.ip.address.changed=Your IP addresses may have changed; would you like to refresh the listing? Note that in this case the details pane will close.
|
||||
|
|
@ -64,6 +76,7 @@ message.create.template=Are you sure you want to create template?
|
|||
label.create.template=Create template
|
||||
message.download.volume.confirm=Please confirm that you want to download this volume
|
||||
message.detach.disk=Are you sure you want to detach this disk?
|
||||
state.ready=Ready
|
||||
state.Ready=Ready
|
||||
label.vm.display.name=VM display name
|
||||
label.select-view=Select view
|
||||
|
|
@ -1019,4 +1032,24 @@ supported.source.NAT.type=Supported Source NAT type
|
|||
elastic.LB=Elastic LB
|
||||
LB.isolation=LB isolation
|
||||
elastic.IP=Elastic IP
|
||||
|
||||
network.label.display.for.blank.value=Use default gateway
|
||||
Xen.traffic.label=XenServer traffic label
|
||||
KVM.traffic.label=KVM traffic label
|
||||
VMware.traffic.label=VMware traffic label
|
||||
start.IP=Start IP range
|
||||
end.IP=End IP range
|
||||
IP.range.is.added=IP range is added
|
||||
remove.IP.range=Remove IP range
|
||||
storage.traffic.type.is.updated=Storage traffic type is updated
|
||||
management.traffic.type.is.updated=Management traffic type is updated
|
||||
public.traffic.type.is.updated=Public traffic type is updated
|
||||
guest.traffic.type.is.updated=Guest traffic type is updated
|
||||
IP.ranges=IP Ranges
|
||||
start.Vlan=Start Vlan
|
||||
end.Vlan=End Vlan
|
||||
broadcast.domain.range=Broadcast domain range
|
||||
label.compute=Compute
|
||||
message.add.guest.network=Please confirm that you would like to add a guest network
|
||||
subdomain.access=Subdomain Access
|
||||
guest.start.IP=Guest start IP
|
||||
guest.end.IP=Guest end IP
|
||||
|
|
|
|||
|
|
@ -1,8 +1,157 @@
|
|||
#cloudstack 3.0 (begin) ********************************************************************************************
|
||||
create.template.confirm=は、テンプレートを作成することを確認してください
|
||||
create.template.success=新しいテンプレートが作成されている
|
||||
state.Allocated=割り当てられた
|
||||
changed.item.properties=変更された項目のプロパティ
|
||||
label.apply=適用される
|
||||
label.default=デフォルト
|
||||
label.viewing=表示
|
||||
label.move.to.top=トップに移動
|
||||
label.move.up.row=1行上に移動
|
||||
label.move.down.row=1行下に移動
|
||||
label.drag.new.position=新しい位置にドラッグ
|
||||
label.order=オーダー
|
||||
label.no.data=表示するデータがありません
|
||||
label.change.value=値を変更する
|
||||
label.clear.list=一覧をクリアする
|
||||
label.full.path=フルパス
|
||||
message.add.domain=このドメインの下に作成するサブドメインを指定してください
|
||||
message.delete.user=このユーザーを削除したいことを確認してください。
|
||||
message.enable.user=このユーザーを有効にしたいことを確認してください。
|
||||
message.disable.user=このユーザーを無効にしたいことを確認してください。
|
||||
message.generate.keys=このユーザーの新しい鍵を生成したいことを確認してください。
|
||||
message.update.resource.count=このアカウントのリソースカウントを更新することを確認してください。
|
||||
message.edit.account=編集( "-1"リソース作成の量に制限がないことを示します)
|
||||
label.total.of.vm=VMの合計
|
||||
label.total.of.ip=IPアドレスの合計
|
||||
state.enabled=使用可能
|
||||
message.action.download.iso=このISOイメージをダウンロードすることを確認してください。
|
||||
message.action.download.template=このテンプレートをダウンロードすることを確認してください。
|
||||
label.destination.zone=宛先ゾーン
|
||||
label.keyboard.type=キーボードの種類
|
||||
label.nic.adapter.type=NICアダプタの種類
|
||||
label.root.disk.controller=ルート·ディスク·コントローラ
|
||||
label.community=コミュニティ
|
||||
label.remove.egress.rule=出力ルールを削除する
|
||||
label.add.egress.rule=出力ルールを追加
|
||||
label.egress.rule=出力ルール
|
||||
label.remove.ingress.rule=入力規則を削除する
|
||||
label.delete.vpn.user=VPNユーザを削除します。
|
||||
label.add.vpn.user=VPNユーザを追加します。
|
||||
label.remove.pf=ポートフォワーディングルールを削除する
|
||||
label.remove.vm.from.lb=ロード·バランサのルールからVMを削除します。
|
||||
label.add.vms.to.lb=バランサのルールをロードするためにVM(s)を追加する
|
||||
label.add.vm=VMを追加します。
|
||||
label.remove.static.nat.rule=スタティックNATルールを削除します。
|
||||
label.remove.rule=ルールを削除する
|
||||
label.add.static.nat.rule=スタティックNATルールを追加します。
|
||||
label.add.rule=ルールを追加します。
|
||||
label.configuration=設定
|
||||
message.disable.vpn=あなたは、VPNを無効にしてもよろしいですか?
|
||||
label.disable.vpn=VPNを無効にします。
|
||||
message.enable.vpn=あなたがこのIPアドレスに対して有効になってVPNアクセスが必要であることを確認してください。
|
||||
label.enable.vpn=VPNを有効にする
|
||||
message.acquire.new.ip=あなたはこのネットワークのネットのIPアドレスを取得したいことを確認してください。
|
||||
label.elastic=エラスティック
|
||||
label.my.network=私のネットワーク
|
||||
label.add.vms=VMを追加する
|
||||
label.configure=設定する
|
||||
label.stickiness=粘り
|
||||
label.source=ソース
|
||||
label.least.connections=最小接続
|
||||
label.round.robin=ラウンドロビン
|
||||
label.network.domain.text=ネットワーク·ドメインのテキスト
|
||||
label.restart.required=必要な再起動
|
||||
label.clean.up=クリーンアップ
|
||||
message.restart.network=あなたは、ネットワークを再起動することを確認してください
|
||||
label.restart.network=ネットワークを再起動します
|
||||
label.edit.network.details=ネットワークの詳細を編集
|
||||
label.add.guest.network=ゲストネットワークを追加します。
|
||||
label.guest.networks=ゲストネットワーク
|
||||
message.ip.address.changed=あなたのIPアドレスが変更されている場合があります。あなたは、リストをリフレッシュしたいですか?このケースでは、詳細ペインを閉じることに注意してください。
|
||||
state.BackingUp=バックアップ
|
||||
state.BackedUp=バックアップ
|
||||
label.done=行われ
|
||||
label.vm.name=VMの名前
|
||||
message.migrate.volume=別のプライマリ·ストレージにボリュームを移行することを確認してください。
|
||||
label.migrate.volume=別のプライマリ·ストレージへのボリュームの移行
|
||||
message.create.template=あなたがテンプレートを作成してもよろしいですか?
|
||||
label.create.template=テンプレートを作成する
|
||||
message.download.volume.confirm=あなたはこのボリュームをダウンロードすることを確認してください。
|
||||
message.detach.disk=あなたは、このディスクをデタッチしてもよろしいですか?
|
||||
state.ready=レディ
|
||||
state.Ready=レディ
|
||||
label.vm.display.name=VMの表示名
|
||||
label.select-view=ビューを選択します。
|
||||
label.local.storage=ローカルストレージ
|
||||
label.direct.ips=直接IPアドレス
|
||||
label.view.all=すべてを見る
|
||||
label.zone.details=ゾーンの詳細
|
||||
message.alert.state.detected=アラート状態が検出されました
|
||||
state.Starting=出発
|
||||
state.Expunging=抹消
|
||||
state.Creating=作成
|
||||
message.decline.invitation=このプロジェクトに招待を辞退してもよろしいですか?
|
||||
label.decline.invitation=衰退への招待
|
||||
message.confirm.join.project=あなたはこのプロジェクトに参加したい確認してください。
|
||||
message.join.project=これで、プロジェクトに参加しています。プロジェクトを参照するビューをプロジェクトに切り替えてください。
|
||||
label.accept.project.invitation=プロジェクトへの招待を受け入れる
|
||||
label.token=トークン
|
||||
label.project.id=プロジェクトID
|
||||
message.enter.token=あなたがあなたの招待状を電子メールで与えられているトークンを入力してください。
|
||||
label.enter.token=トークンを入力します。
|
||||
state.Accepted=受け入れ
|
||||
state.Pending=ペンディング
|
||||
state.Completed=完了する
|
||||
state.Declined=減少しました
|
||||
label.project=プロジェクト
|
||||
label.invitations=招待状
|
||||
label.delete.project=プロジェクトを削除します。
|
||||
message.delete.project=このプロジェクトを削除してもよろしいですか?
|
||||
message.activate.project=あなたはこのプロジェクトをアクティブにしてもよろしいですか?
|
||||
label.activate.project=プロジェクトをアクティブにする
|
||||
label.suspend.project=プロジェクトを一時停止
|
||||
message.suspend.project=あなたはこのプロジェクトを中断してもよろしいですか?
|
||||
state.Suspended=サスペンド
|
||||
label.edit.project.details=プロジェクトの詳細を編集します。
|
||||
label.new.project=新規プロジェクト
|
||||
state.Active=アクティブ
|
||||
state.Disabled=無効にする
|
||||
label.projects=プロジェクト
|
||||
label.make.project.owner=アカウントのプロジェクトの所有者を作る
|
||||
label.remove.project.account=プロジェクトからアカウントを削除する
|
||||
message.project.invite.sent=ユーザーに送信される招待し、彼らが招待を受け入れた後、彼らがプロジェクトに追加されます
|
||||
label.add.account.to.project=プロジェクトにアカウントを追加する
|
||||
label.revoke.project.invite=招待を取り消す
|
||||
label.project.invite=プロジェクトへの招待
|
||||
label.select.project=プロジェクトを選択します。
|
||||
message.no.projects=任意のプロジェクトを持っていません。<br/>プロジェクトセクションから新しいものを作成してください。
|
||||
message.no.projects.adminOnly=任意のプロジェクトを持っていません。<br/>新しいプロジェクトを作成するには、管理者にお問い合わせください。
|
||||
message.pending.projects.1=あなたは、プロジェクトへの招待を保留されている。
|
||||
message.pending.projects.2=表示するには、プロジェクトの項を参照してくださいし、ドロップダウンからの招待を選択します。
|
||||
message.instanceWizard.noTemplates=使用可能な任意のテンプレートを持っていません。インスタンスウィザードを互換性のあるテンプレートを追加してください、再起動します。
|
||||
label.view=ビュー
|
||||
create.template.complete=テンプレートが正常に作成された
|
||||
create.template.confirm=テンプレートを作成することを確認してください。
|
||||
create.template.notification=新しいテンプレートを作成する
|
||||
create.template.complete=テンプレートは正常に作成された
|
||||
create.template.success=新しいテンプレートが作成されています
|
||||
instances.actions.reboot.label=再起動のインスタンス
|
||||
label.filterBy=によるフィルタ
|
||||
label.ok=[OK]
|
||||
notification.reboot.instance=再起動のインスタンス
|
||||
notification.start.instance=インスタンスを起動します。
|
||||
notification.stop.instance=インスタンスを停止します。
|
||||
label.display.name=表示名
|
||||
label.zone.name=ゾーン名
|
||||
ui.listView.filters.all=すべて
|
||||
ui.listView.filters.mine=鉱山
|
||||
state.Running=ランニング
|
||||
state.Stopped=停止
|
||||
state.Destroyed=破壊された
|
||||
state.Error=エラー
|
||||
message.reset.password.warning.notPasswordEnabled=このインスタンスが作成されたテンプレートには、パスワードは有効ではありません
|
||||
message.reset.password.warning.notStopped=インスタンスは、その現在のパスワードを変更しようとする前に停止する必要があります。
|
||||
label.notifications=通知
|
||||
label.default.view=デフォルトのビュー
|
||||
label.project.view=プロジェクトビュー
|
||||
#cloudstack 3.0 (end) **********************************************************************************************
|
||||
|
||||
|
||||
|
|
@ -887,4 +1036,24 @@ supported.source.NAT.type=Supported Source NAT type
|
|||
elastic.LB=Elastic LB
|
||||
LB.isolation=LB isolation
|
||||
elastic.IP=Elastic IP
|
||||
|
||||
network.label.display.for.blank.value=デフォルトゲートウェイを使用する
|
||||
Xen.traffic.label=XenServerのトラフィックのラベル
|
||||
KVM.traffic.label=KVMトラフィックのラベル
|
||||
VMware.traffic.label=VMwareのトラフィックのラベル
|
||||
start.IP=IPアドレスの範囲を起動します。
|
||||
end.IP=終了IPアドレスの範囲
|
||||
IP.range.is.added=IPアドレスの範囲が追加されました
|
||||
remove.IP.range=IPアドレス範囲を削除します。
|
||||
storage.traffic.type.is.updated=ストレージ·トラフィック·タイプが更新されます。
|
||||
management.traffic.type.is.updated=管理トラフィックタイプが更新されます。
|
||||
public.traffic.type.is.updated=公共交通の種類が更新されます。
|
||||
guest.traffic.type.is.updated=ゲストのトラフィック·タイプが更新されます。
|
||||
IP.ranges=IP範囲
|
||||
start.Vlan=スタートVLAN
|
||||
end.Vlan=エンドVLAN
|
||||
broadcast.domain.range=ドメインの範囲をブロードキャスト
|
||||
label.compute=計算
|
||||
message.add.guest.network=あなたがゲストネットワークを追加したいことを確認してください
|
||||
subdomain.access=サブドメインアクセス
|
||||
guest.start.IP=ゲストの開始IP
|
||||
guest.end.IP=ゲストの終了IP
|
||||
|
|
|
|||
|
|
@ -560,12 +560,15 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
|||
}
|
||||
|
||||
// untar OVA file at template directory
|
||||
command = new Script("tar", 0, s_logger);
|
||||
command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner");
|
||||
command.add("-xf", installFullName);
|
||||
command.setWorkDir(installFullPath);
|
||||
result = command.execute();
|
||||
s_logger.info("Executing command: " + command.toString());
|
||||
result = command.execute();
|
||||
if(result != null) {
|
||||
String msg = "unable to copy snapshot " + snapshotFullName + " to " + installFullPath;
|
||||
String msg = "unable to untar snapshot " + snapshotFullName + " to "
|
||||
+ installFullPath;
|
||||
s_logger.error(msg);
|
||||
throw new Exception(msg);
|
||||
}
|
||||
|
|
@ -643,8 +646,10 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
|||
String srcFileName = getOVFFilePath(srcOVAFileName);
|
||||
if(srcFileName == null) {
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner");
|
||||
command.add("-xf", srcOVAFileName);
|
||||
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
|
||||
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
|
||||
s_logger.info("Executing command: " + command.toString());
|
||||
String result = command.execute();
|
||||
if(result != null) {
|
||||
String msg = "Unable to unpack snapshot OVA file at: " + srcOVAFileName;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public class VmdkProcessor implements Processor {
|
|||
String templateFileFullPath = templatePath + templateName + "." + ImageFormat.OVA.getFileExtension();
|
||||
File templateFile = new File(templateFileFullPath);
|
||||
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner", templateFileFullPath);
|
||||
command.add("-xf", templateFileFullPath);
|
||||
command.setWorkDir(templateFile.getParent());
|
||||
String result = command.execute();
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ tcp_or_udp_entry() {
|
|||
--destination-port $port -j DNAT \
|
||||
--to-destination $instIp:$dport &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t mangle $op PREROUTING --proto $proto -i $dev -d $publicIp \
|
||||
--destination-port $port -j MARK --set-mark $tableNo) &&
|
||||
--destination-port $port -j MARK --set-mark $tableNo &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t mangle $op PREROUTING --proto $proto -i $dev -d $publicIp \
|
||||
--destination-port $port -m state --state NEW -j CONNMARK --save-mark) &&
|
||||
--destination-port $port -m state --state NEW -j CONNMARK --save-mark &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t nat $op OUTPUT --proto $proto -d $publicIp \
|
||||
--destination-port $port -j DNAT \
|
||||
--to-destination $instIp:$dport &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
|
|
@ -190,13 +190,13 @@ static_nat() {
|
|||
# shortcircuit the process if error and it is an append operation
|
||||
# continue if it is delete
|
||||
(sudo iptables -t mangle $op PREROUTING -i $dev -d $publicIp \
|
||||
-j MARK -m state --state NEW --set-mark $tableNo) &&
|
||||
-j MARK -m state --state NEW --set-mark $tableNo &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t mangle $op PREROUTING -i $dev -d $publicIp \
|
||||
-m state --state NEW -j CONNMARK --save-mark) &&
|
||||
-m state --state NEW -j CONNMARK --save-mark &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t mangle $op PREROUTING -s $instIp -i eth0 \
|
||||
-j MARK -m state --state NEW --set-mark $tableNo) &&
|
||||
-j MARK -m state --state NEW --set-mark $tableNo &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t mangle $op PREROUTING -s $instIp -i eth0 \
|
||||
-m state --state NEW -j CONNMARK --save-mark) &&
|
||||
-m state --state NEW -j CONNMARK --save-mark &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables -t nat $op PREROUTING -i $dev -d $publicIp -j DNAT \
|
||||
--to-destination $instIp &>> $OUTFILE || [ "$op" == "-D" ]) &&
|
||||
(sudo iptables $op FORWARD -i $dev -o eth0 -d $instIp -m state \
|
||||
|
|
|
|||
|
|
@ -17,9 +17,12 @@
|
|||
*/
|
||||
package com.cloud.agent.manager;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
|
@ -676,6 +679,74 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
}
|
||||
}
|
||||
|
||||
private ServerResource loadResourcesWithoutHypervisor(HostVO host){
|
||||
String resourceName = host.getResource();
|
||||
ServerResource resource = null;
|
||||
try {
|
||||
Class<?> clazz = Class.forName(resourceName);
|
||||
Constructor constructor = clazz.getConstructor();
|
||||
resource = (ServerResource) constructor.newInstance();
|
||||
} catch (ClassNotFoundException e) {
|
||||
s_logger.warn("Unable to find class " + host.getResource(), e);
|
||||
} catch (InstantiationException e) {
|
||||
s_logger.warn("Unablet to instantiate class " + host.getResource(), e);
|
||||
} catch (IllegalAccessException e) {
|
||||
s_logger.warn("Illegal access " + host.getResource(), e);
|
||||
} catch (SecurityException e) {
|
||||
s_logger.warn("Security error on " + host.getResource(), e);
|
||||
} catch (NoSuchMethodException e) {
|
||||
s_logger.warn("NoSuchMethodException error on " + host.getResource(), e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
s_logger.warn("IllegalArgumentException error on " + host.getResource(), e);
|
||||
} catch (InvocationTargetException e) {
|
||||
s_logger.warn("InvocationTargetException error on " + host.getResource(), e);
|
||||
}
|
||||
|
||||
if(resource != null){
|
||||
_hostDao.loadDetails(host);
|
||||
|
||||
HashMap<String, Object> params = new HashMap<String, Object>(host.getDetails().size() + 5);
|
||||
params.putAll(host.getDetails());
|
||||
|
||||
params.put("guid", host.getGuid());
|
||||
params.put("zone", Long.toString(host.getDataCenterId()));
|
||||
if (host.getPodId() != null) {
|
||||
params.put("pod", Long.toString(host.getPodId()));
|
||||
}
|
||||
if (host.getClusterId() != null) {
|
||||
params.put("cluster", Long.toString(host.getClusterId()));
|
||||
String guid = null;
|
||||
ClusterVO cluster = _clusterDao.findById(host.getClusterId());
|
||||
if (cluster.getGuid() == null) {
|
||||
guid = host.getDetail("pool");
|
||||
} else {
|
||||
guid = cluster.getGuid();
|
||||
}
|
||||
if (guid != null && !guid.isEmpty()) {
|
||||
params.put("pool", guid);
|
||||
}
|
||||
}
|
||||
|
||||
params.put("ipaddress", host.getPrivateIpAddress());
|
||||
params.put("secondary.storage.vm", "false");
|
||||
params.put("max.template.iso.size", _configDao.getValue(Config.MaxTemplateAndIsoSize.toString()));
|
||||
params.put("migratewait", _configDao.getValue(Config.MigrateWait.toString()));
|
||||
|
||||
try {
|
||||
resource.configure(host.getName(), params);
|
||||
} catch (ConfigurationException e) {
|
||||
s_logger.warn("Unable to configure resource due to " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!resource.start()) {
|
||||
s_logger.warn("Unable to start the resource");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected boolean loadDirectlyConnectedHost(HostVO host, boolean forRebalance) {
|
||||
|
|
@ -685,14 +756,14 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
//load the respective discoverer
|
||||
Discoverer discoverer = _resourceMgr.getMatchingDiscover(host.getHypervisorType());
|
||||
if(discoverer == null){
|
||||
s_logger.warn("Unable to find a Discoverer to load the resource: "+ host.getId() +" for hypervisor type: "+host.getHypervisorType());
|
||||
return false;
|
||||
s_logger.info("Could not to find a Discoverer to load the resource: "+ host.getId() +" for hypervisor type: "+host.getHypervisorType());
|
||||
resource = loadResourcesWithoutHypervisor(host);
|
||||
}else{
|
||||
resource = discoverer.reloadResource(host);
|
||||
}
|
||||
|
||||
resource = discoverer.reloadResource(host);
|
||||
|
||||
if(resource == null){
|
||||
s_logger.warn("Discoverer is unable to load the resource: "+ host.getId());
|
||||
s_logger.warn("Unable to load the resource: "+ host.getId());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1633,6 +1633,11 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
|||
try {
|
||||
long proxyVmId = startupCmd.getProxyVmId();
|
||||
ConsoleProxyVO consoleProxy = _consoleProxyDao.findById(proxyVmId);
|
||||
if(consoleProxy == null) {
|
||||
s_logger.info("Proxy " + proxyVmId + " is no longer in DB, skip sending startup command");
|
||||
return;
|
||||
}
|
||||
|
||||
assert (consoleProxy != null);
|
||||
HostVO consoleProxyHost = findConsoleProxyHostByName(consoleProxy.getHostName());
|
||||
|
||||
|
|
|
|||
|
|
@ -5068,8 +5068,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
}
|
||||
|
||||
@Override
|
||||
public long findPhysicalNetworkId(long zoneId, String tag) {
|
||||
List<PhysicalNetworkVO> pNtwks = _physicalNetworkDao.listByZone(zoneId);
|
||||
public long findPhysicalNetworkId(long zoneId, String tag, TrafficType trafficType) {
|
||||
List<PhysicalNetworkVO> pNtwks = new ArrayList<PhysicalNetworkVO>();
|
||||
if (trafficType != null) {
|
||||
pNtwks = _physicalNetworkDao.listByZoneAndTrafficType(zoneId, trafficType);
|
||||
} else {
|
||||
pNtwks = _physicalNetworkDao.listByZone(zoneId);
|
||||
}
|
||||
|
||||
if (pNtwks.isEmpty()) {
|
||||
throw new InvalidParameterValueException("Unable to find physical network in zone id=" + zoneId);
|
||||
}
|
||||
|
|
@ -5330,7 +5336,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
// physical network id can be null in Guest Network in Basic zone, so locate the physical network
|
||||
if (physicalNetworkId == null) {
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), null);
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), null, null);
|
||||
}
|
||||
|
||||
return isServiceEnabledInNetwork(physicalNetworkId, network.getId(), Service.SecurityGroup);
|
||||
|
|
@ -5754,7 +5760,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
physicalNetworkId = getNonGuestNetworkPhysicalNetworkId(network);
|
||||
} else {
|
||||
NetworkOffering offering = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), offering.getTags());
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), offering.getTags(), offering.getTrafficType());
|
||||
}
|
||||
|
||||
if (physicalNetworkId == null) {
|
||||
|
|
@ -5896,7 +5902,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
Long physicalNetworkId = network.getPhysicalNetworkId();
|
||||
NetworkOffering offering = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
|
||||
if (physicalNetworkId == null) {
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), offering.getTags());
|
||||
physicalNetworkId = findPhysicalNetworkId(network.getDataCenterId(), offering.getTags(), offering.getTrafficType());
|
||||
}
|
||||
return physicalNetworkId;
|
||||
}
|
||||
|
|
@ -6007,7 +6013,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
@Override
|
||||
public boolean areServicesEnabledInZone(long zoneId, long networkOfferingId, String tags, List<Service> services) {
|
||||
long physicalNtwkId = findPhysicalNetworkId(zoneId, tags);
|
||||
long physicalNtwkId = findPhysicalNetworkId(zoneId, tags, null);
|
||||
boolean result = true;
|
||||
List<String> checkedProvider = new ArrayList<String>();
|
||||
for (Service service : services) {
|
||||
|
|
|
|||
|
|
@ -66,17 +66,14 @@ public class PhysicalNetworkDaoImpl extends GenericDaoBase<PhysicalNetworkVO, Lo
|
|||
PhysicalNetworkTrafficTypeVO trafficTypeEntity = trafficTypeSearch.entity();
|
||||
trafficTypeSearch.and("trafficType", trafficTypeSearch.entity().getTrafficType(), SearchCriteria.Op.EQ);
|
||||
|
||||
SearchBuilder<PhysicalNetworkVO> dcSearch = createSearchBuilder();
|
||||
dcSearch.and("dataCenterId", dcSearch.entity().getDataCenterId(), Op.EQ);
|
||||
dcSearch.join("trafficTypeSearch", trafficTypeSearch, dcSearch.entity().getId(), trafficTypeEntity.getPhysicalNetworkId(), JoinBuilder.JoinType.INNER);
|
||||
SearchBuilder<PhysicalNetworkVO> pnSearch = createSearchBuilder();
|
||||
pnSearch.and("dataCenterId", pnSearch.entity().getDataCenterId(), Op.EQ);
|
||||
pnSearch.join("trafficTypeSearch", trafficTypeSearch, pnSearch.entity().getId(), trafficTypeEntity.getPhysicalNetworkId(), JoinBuilder.JoinType.INNER);
|
||||
|
||||
SearchCriteria<PhysicalNetworkVO> sc = dcSearch.create();
|
||||
SearchCriteria<PhysicalNetworkVO> sc = pnSearch.create();
|
||||
sc.setJoinParameters("trafficTypeSearch", "trafficType", trafficType);
|
||||
sc.setParameters("dataCenterId", dataCenterId);
|
||||
|
||||
return listBy(sc);
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ public class GuestNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
long dcId = dest.getDataCenter().getId();
|
||||
|
||||
//get physical network id
|
||||
long physicalNetworkId = _networkMgr.findPhysicalNetworkId(dcId, offering.getTags());
|
||||
long physicalNetworkId = _networkMgr.findPhysicalNetworkId(dcId, offering.getTags(), offering.getTrafficType());
|
||||
|
||||
NetworkVO implemented = new NetworkVO(network.getTrafficType(), network.getMode(), network.getBroadcastDomainType(), network.getNetworkOfferingId(), State.Allocated,
|
||||
network.getDataCenterId(), physicalNetworkId);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ public interface ProjectAccountDao extends GenericDao<ProjectAccountVO, Long> {
|
|||
|
||||
List<Long> listPermittedAccountIds(long accountId);
|
||||
|
||||
List<Long> listAdministratedProjects(long adminAccountId);
|
||||
List<Long> listAdministratedProjectIds(long adminAccountId);
|
||||
|
||||
Long countByAccountIdAndRole(long accountId, ProjectAccount.Role role);
|
||||
|
||||
void removeAccountFromProjects(long accountId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import java.util.List;
|
|||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.projects.ProjectAccount;
|
||||
import com.cloud.projects.ProjectAccountVO;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
|
@ -36,6 +38,7 @@ public class ProjectAccountDaoImpl extends GenericDaoBase<ProjectAccountVO, Long
|
|||
final GenericSearchBuilder<ProjectAccountVO, Long> AdminSearch;
|
||||
final GenericSearchBuilder<ProjectAccountVO, Long> ProjectAccountSearch;
|
||||
final GenericSearchBuilder<ProjectAccountVO, Long> CountByRoleSearch;
|
||||
public static final Logger s_logger = Logger.getLogger(ProjectAccountDaoImpl.class.getName());
|
||||
|
||||
protected ProjectAccountDaoImpl() {
|
||||
AllFieldsSearch = createSearchBuilder();
|
||||
|
|
@ -124,7 +127,7 @@ public class ProjectAccountDaoImpl extends GenericDaoBase<ProjectAccountVO, Long
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Long> listAdministratedProjects(long adminAccountId) {
|
||||
public List<Long> listAdministratedProjectIds(long adminAccountId) {
|
||||
SearchCriteria<Long> sc = AdminSearch.create();
|
||||
sc.setParameters("role", ProjectAccount.Role.Admin);
|
||||
sc.setParameters("accountId", adminAccountId);
|
||||
|
|
@ -138,5 +141,16 @@ public class ProjectAccountDaoImpl extends GenericDaoBase<ProjectAccountVO, Long
|
|||
sc.setParameters("role", role);
|
||||
return customSearch(sc, null).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAccountFromProjects(long accountId) {
|
||||
SearchCriteria<ProjectAccountVO> sc = AllFieldsSearch.create();
|
||||
sc.setParameters("accountId", accountId);
|
||||
|
||||
int rowsRemoved = remove(sc);
|
||||
if (rowsRemoved > 0) {
|
||||
s_logger.debug("Removed account id=" + accountId + " from " + rowsRemoved + " projects");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -706,7 +706,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
|
||||
}
|
||||
|
||||
private List<ServiceOfferingVO> searchServiceOfferingsInternal(Account account, Object name, Object id, Long vmId, Object keyword, Filter searchFilter) {
|
||||
private List<ServiceOfferingVO> searchServiceOfferingsInternal(Account caller, Object name, Object id, Long vmId, Object keyword, Filter searchFilter) {
|
||||
|
||||
// it was decided to return all offerings for the user's domain, and everything above till root (for normal user
|
||||
// or
|
||||
|
|
@ -714,7 +714,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
// list all offerings belonging to this domain, and all of its parents
|
||||
// check the parent, if not null, add offerings for that parent to list
|
||||
List<ServiceOfferingVO> sol = new ArrayList<ServiceOfferingVO>();
|
||||
DomainVO domainRecord = _domainDao.findById(account.getDomainId());
|
||||
DomainVO domainRecord = _domainDao.findById(caller.getDomainId());
|
||||
boolean includePublicOfferings = true;
|
||||
if (domainRecord != null) {
|
||||
while (true) {
|
||||
|
|
@ -740,11 +740,8 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
if ((vmInstance == null) || (vmInstance.getRemoved() != null)) {
|
||||
throw new InvalidParameterValueException("unable to find a virtual machine with id " + vmId);
|
||||
}
|
||||
if ((account != null) && !isAdmin(account.getType())) {
|
||||
if (account.getId() != vmInstance.getAccountId()) {
|
||||
throw new PermissionDeniedException("unable to find a virtual machine with id " + vmId + " for this account");
|
||||
}
|
||||
}
|
||||
|
||||
_accountMgr.checkAccess(caller, null, false, vmInstance);
|
||||
|
||||
ServiceOfferingVO offering = _offeringsDao.findById(vmInstance.getServiceOfferingId());
|
||||
sc.addAnd("id", SearchCriteria.Op.NEQ, offering.getId());
|
||||
|
|
@ -752,11 +749,6 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
sc.addAnd("useLocalStorage", SearchCriteria.Op.EQ, offering.getUseLocalStorage());
|
||||
}
|
||||
|
||||
// if (id != null) {
|
||||
// includePublicOfferings = false;
|
||||
// sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
||||
// }
|
||||
|
||||
if (name != null) {
|
||||
includePublicOfferings = false;
|
||||
sc.addAnd("name", SearchCriteria.Op.LIKE, "%" + name + "%");
|
||||
|
|
@ -780,8 +772,8 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
s_logger.error("Could not find the domainId for account:" + account.getAccountName());
|
||||
throw new CloudAuthenticationException("Could not find the domainId for account:" + account.getAccountName());
|
||||
s_logger.error("Could not find the domainId for account:" + caller.getAccountName());
|
||||
throw new CloudAuthenticationException("Could not find the domainId for account:" + caller.getAccountName());
|
||||
}
|
||||
|
||||
// add all the public offerings to the sol list before returning
|
||||
|
|
|
|||
|
|
@ -445,20 +445,15 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
@Override
|
||||
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
|
||||
long accountId = account.getId();
|
||||
|
||||
|
||||
//delete the account record
|
||||
if (!_accountDao.remove(accountId)) {
|
||||
s_logger.error("Unable to delete account " + accountId);
|
||||
return false;
|
||||
}
|
||||
|
||||
List<UserVO> users = _userDao.listByAccount(accountId);
|
||||
|
||||
for (UserVO user : users) {
|
||||
_userDao.remove(user.getId());
|
||||
}
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Remove account " + accountId);
|
||||
s_logger.debug("Removed account " + accountId);
|
||||
}
|
||||
|
||||
return cleanupAccount(account, callerUserId, caller);
|
||||
|
|
@ -468,8 +463,20 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
public boolean cleanupAccount(AccountVO account, long callerUserId, Account caller) {
|
||||
long accountId = account.getId();
|
||||
boolean accountCleanupNeeded = false;
|
||||
|
||||
|
||||
try {
|
||||
//cleanup the users from the account
|
||||
List<UserVO> users = _userDao.listByAccount(accountId);
|
||||
for (UserVO user : users) {
|
||||
if (!_userDao.remove(user.getId())) {
|
||||
s_logger.error("Unable to delete user: " + user + " as a part of account " + account + " cleanup");
|
||||
accountCleanupNeeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
//delete the account from project accounts
|
||||
_projectAccountDao.removeAccountFromProjects(accountId);
|
||||
|
||||
// delete all vm groups belonging to accont
|
||||
List<InstanceGroupVO> groups = _vmGroupDao.listByAccountId(accountId);
|
||||
for (InstanceGroupVO group : groups) {
|
||||
|
|
@ -582,7 +589,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
}
|
||||
|
||||
// delete account specific Virtual vlans (belong to system Public Network) - only when networks are cleaned
|
||||
// up
|
||||
// up
|
||||
// successfully
|
||||
if (networksDeleted) {
|
||||
if (!_configMgr.deleteAccountSpecificVirtualRanges(accountId)) {
|
||||
|
|
@ -1010,7 +1017,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
}
|
||||
|
||||
// Account that manages project(s) can't be removed
|
||||
List<Long> managedProjectIds = _projectAccountDao.listAdministratedProjects(accountId);
|
||||
List<Long> managedProjectIds = _projectAccountDao.listAdministratedProjectIds(accountId);
|
||||
if (!managedProjectIds.isEmpty()) {
|
||||
StringBuilder projectIds = new StringBuilder();
|
||||
for (Long projectId : managedProjectIds) {
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
}
|
||||
|
||||
@Override
|
||||
public long findPhysicalNetworkId(long zoneId, String tag) {
|
||||
public long findPhysicalNetworkId(long zoneId, String tag, TrafficType trafficType) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
41
ui/index.jsp
41
ui/index.jsp
|
|
@ -627,8 +627,8 @@
|
|||
</ul>
|
||||
|
||||
<div class="info-desc">
|
||||
Enter the first and last IP addresses that define a range that CloudStack can assign to guest VMs. We strongly recommend the use of multiple NICs. If multiple NICs are used, the guest IPs may be in a separate subnet. If one NIC is used, the guest IPs should be in the same CIDR as the pod's CIDR, but not within the reserved system IP range.
|
||||
</div>
|
||||
Guest network traffic is communication between end-user virtual machines.
|
||||
</div>
|
||||
<div class="content input-area">
|
||||
<div class="select-container"></div>
|
||||
</div>
|
||||
|
|
@ -1599,6 +1599,19 @@
|
|||
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'state.Allocated': '<fmt:message key="state.Allocated"/>',
|
||||
'changed.item.properties': '<fmt:message key="changed.item.properties"/>',
|
||||
'label.apply': '<fmt:message key="label.apply"/>',
|
||||
'label.default': '<fmt:message key="label.default"/>',
|
||||
'label.viewing': '<fmt:message key="label.viewing"/>',
|
||||
'label.drag.new.position': '<fmt:message key="label.drag.new.position"/>',
|
||||
'label.move.down.row': '<fmt:message key="label.move.down.row"/>',
|
||||
'label.move.up.row': '<fmt:message key="label.move.up.row"/>',
|
||||
'label.move.to.top': '<fmt:message key="label.move.to.top"/>',
|
||||
'label.order': '<fmt:message key="label.order"/>',
|
||||
'label.no.data': '<fmt:message key="label.no.data"/>',
|
||||
'label.change.value': '<fmt:message key="label.change.value"/>',
|
||||
'label.clear.list': '<fmt:message key="label.clear.list"/>',
|
||||
'label.add.vm': '<fmt:message key="label.add.vm"/>',
|
||||
'label.full.path': '<fmt:message key="label.full.path"/>',
|
||||
'message.add.domain': '<fmt:message key="message.add.domain"/>',
|
||||
|
|
@ -1665,6 +1678,7 @@ dictionary = {
|
|||
'label.create.template': '<fmt:message key="label.create.template" />',
|
||||
'message.download.volume.confirm': '<fmt:message key="message.download.volume.confirm" />',
|
||||
'message.detach.disk': '<fmt:message key="message.detach.disk" />',
|
||||
'state.ready': '<fmt:message key="state.ready" />',
|
||||
'state.Ready': '<fmt:message key="state.Ready" />',
|
||||
'label.vm.display.name': '<fmt:message key="label.vm.display.name" />',
|
||||
'label.select-view': '<fmt:message key="label.select-view" />',
|
||||
|
|
@ -2578,6 +2592,27 @@ dictionary = {
|
|||
'supported.source.NAT.type': '<fmt:message key="supported.source.NAT.type" />',
|
||||
'elastic.LB': '<fmt:message key="elastic.LB" />',
|
||||
'LB.isolation': '<fmt:message key="LB.isolation" />',
|
||||
'elastic.IP': '<fmt:message key="elastic.IP" />'
|
||||
'elastic.IP': '<fmt:message key="elastic.IP" />',
|
||||
'network.label.display.for.blank.value': '<fmt:message key="network.label.display.for.blank.value" />',
|
||||
'Xen.traffic.label': '<fmt:message key="Xen.traffic.label" />',
|
||||
'KVM.traffic.label': '<fmt:message key="KVM.traffic.label" />',
|
||||
'VMware.traffic.label': '<fmt:message key="VMware.traffic.label" />',
|
||||
'start.IP': '<fmt:message key="start.IP" />',
|
||||
'end.IP': '<fmt:message key="end.IP" />',
|
||||
'IP.range.is.added': '<fmt:message key="IP.range.is.added" />',
|
||||
'remove.IP.range': '<fmt:message key="remove.IP.range" />',
|
||||
'storage.traffic.type.is.updated': '<fmt:message key="storage.traffic.type.is.updated" />',
|
||||
'management.traffic.type.is.updated': '<fmt:message key="management.traffic.type.is.updated" />',
|
||||
'public.traffic.type.is.updated': '<fmt:message key="public.traffic.type.is.updated" />',
|
||||
'guest.traffic.type.is.updated': '<fmt:message key="guest.traffic.type.is.updated" />',
|
||||
'IP.ranges': '<fmt:message key="IP.ranges" />',
|
||||
'start.Vlan': '<fmt:message key="start.Vlan" />',
|
||||
'end.Vlan': '<fmt:message key="end.Vlan" />',
|
||||
'broadcast.domain.range': '<fmt:message key="broadcast.domain.range" />',
|
||||
'label.compute': '<fmt:message key="label.compute" />',
|
||||
'message.add.guest.network': '<fmt:message key="message.add.guest.network" />',
|
||||
'subdomain.access': '<fmt:message key="subdomain.access" />',
|
||||
'guest.start.IP': '<fmt:message key="guest.start.IP" />',
|
||||
'guest.end.IP': '<fmt:message key="guest.end.IP" />'
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,8 @@
|
|||
$serviceOfferingId.css('display', 'inline-block');
|
||||
else
|
||||
$serviceOfferingId.hide();
|
||||
|
||||
|
||||
$(':ui-dialog').dialog('option', 'position', 'center');
|
||||
});
|
||||
},
|
||||
fields: {
|
||||
|
|
|
|||
|
|
@ -236,13 +236,15 @@
|
|||
complete($.extend(data, {
|
||||
zoneCapacities: $.map(capacities, function(capacity) {
|
||||
if (capacity.podname) {
|
||||
capacity.zonename = capacity.zonename.concat('<br/>Pod: ' + capacity.podname);
|
||||
capacity.zonename = capacity.zonename.concat('<br/>' + _l('label.pod') + ': ' + capacity.podname);
|
||||
}
|
||||
|
||||
if (capacity.clustername) {
|
||||
capacity.zonename = capacity.zonename.concat('<br/>Cluster: ' + capacity.clustername);
|
||||
capacity.zonename = capacity.zonename.concat('<br/>' + _l('label.cluster') + ': ' + capacity.clustername);
|
||||
}
|
||||
|
||||
capacity.zonename.replace('Zone:', _l('label.zone') + ':');
|
||||
|
||||
return {
|
||||
zoneID: capacity.zoneid, // Temporary fix for dashboard
|
||||
zoneName: capacity.zonename,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
(function(cloudStack) {
|
||||
cloudStack.sections['global-settings'] = {
|
||||
title: 'Global Settings',
|
||||
title: 'label.menu.global.settings',
|
||||
id: 'global-settings',
|
||||
listView: {
|
||||
label: 'Global Settings',
|
||||
label: 'label.menu.global.settings',
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'Change value',
|
||||
label: 'label.change.value',
|
||||
action: function(args) {
|
||||
var name = args.data.jsonObj.name;
|
||||
var value = args.data.value;
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
async: true,
|
||||
success: function(json) {
|
||||
var item = json.updateconfigurationresponse.configuration;
|
||||
cloudStack.dialog.notice({ message: 'Please restart your management server for your change to take effect.' });
|
||||
cloudStack.dialog.notice({ message: _l('message.restart.mgmt.server') });
|
||||
args.response.success({data: item});
|
||||
},
|
||||
error: function(json) {
|
||||
|
|
@ -30,9 +30,9 @@
|
|||
}
|
||||
},
|
||||
fields: {
|
||||
name: { label: 'Name', id: true },
|
||||
description: { label: 'Description' },
|
||||
value: { label: 'Value', editable: true }
|
||||
name: { label: 'label.name', id: true },
|
||||
description: { label: 'label.description' },
|
||||
value: { label: 'label.value', editable: true }
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
var data = {
|
||||
|
|
|
|||
|
|
@ -1016,10 +1016,10 @@
|
|||
},
|
||||
|
||||
attachISO: {
|
||||
label: 'label.attach.iso',
|
||||
label: 'label.action.attach.iso',
|
||||
createForm: {
|
||||
title: 'label.attach.iso',
|
||||
desc: 'label.attach.iso',
|
||||
title: 'label.action.attach.iso',
|
||||
desc: 'label.action.attach.iso',
|
||||
fields: {
|
||||
iso: {
|
||||
label: 'ISO',
|
||||
|
|
@ -1077,13 +1077,13 @@
|
|||
},
|
||||
|
||||
detachISO: {
|
||||
label: 'label.detach.iso',
|
||||
label: 'label.action.detach.iso',
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'message.detach.iso.confirm';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'label.detach.iso';
|
||||
return 'label.action.detach.iso';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
|
|
@ -1569,7 +1569,7 @@
|
|||
isdefault: {
|
||||
label: 'label.is.default',
|
||||
converter: function(data) {
|
||||
return data ? 'label.yes' : 'label.no';
|
||||
return data ? _l('label.yes') : _l('label.no');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1579,7 +1579,7 @@
|
|||
var name = 'NIC ' + (index + 1);
|
||||
|
||||
if (nic.isdefault) {
|
||||
name += ' (Default)';
|
||||
name += ' (' + _l('label.default') + ')';
|
||||
}
|
||||
return $.extend(nic, {
|
||||
name: name
|
||||
|
|
@ -1610,12 +1610,12 @@
|
|||
* Statistics tab
|
||||
*/
|
||||
stats: {
|
||||
title: 'Statistics',
|
||||
title: 'label.statistics',
|
||||
fields: {
|
||||
totalCPU: { label: 'Total CPU' },
|
||||
cpuused: { label: 'CPU Utilized' },
|
||||
networkkbsread: { label: 'Network Read' },
|
||||
networkkbswrite: { label: 'Network Write' }
|
||||
totalCPU: { label: 'label.total.cpu' },
|
||||
cpuused: { label: 'label.cpu.utilized' },
|
||||
networkkbsread: { label: 'label.network.read' },
|
||||
networkkbswrite: { label: 'label.network.write' }
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
var jsonObj = args.context.instances[0];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
var selectedClusterObj, selectedZoneObj, selectedPublicNetworkObj, selectedManagementNetworkObj, selectedPhysicalNetworkObj, selectedGuestNetworkObj;
|
||||
var naasStatusMap = {};
|
||||
var nspMap = {};
|
||||
var networklabelDisplayForBlankValue = "Use default gateway";
|
||||
|
||||
var getTrafficType = function(physicalNetwork, typeID) {
|
||||
var trafficType = {};
|
||||
|
|
@ -26,22 +25,22 @@
|
|||
});
|
||||
|
||||
if(trafficType.xennetworklabel == null || trafficType.xennetworklabel == 0)
|
||||
trafficType.xennetworklabel = networklabelDisplayForBlankValue;
|
||||
trafficType.xennetworklabel = dictionary['network.label.display.for.blank.value'];
|
||||
if(trafficType.kvmnetworklabel == null || trafficType.kvmnetworklabel == 0)
|
||||
trafficType.kvmnetworklabel = networklabelDisplayForBlankValue;
|
||||
trafficType.kvmnetworklabel = dictionary['network.label.display.for.blank.value'];
|
||||
if(trafficType.vmwarenetworklabel == null || trafficType.vmwarenetworklabel == 0)
|
||||
trafficType.vmwarenetworklabel = networklabelDisplayForBlankValue;
|
||||
trafficType.vmwarenetworklabel = dictionary['network.label.display.for.blank.value'];
|
||||
|
||||
return trafficType;
|
||||
};
|
||||
|
||||
var updateTrafficLabels = function(trafficType, labels, complete) {
|
||||
var array1 = [];
|
||||
if(labels.xennetworklabel != networklabelDisplayForBlankValue)
|
||||
if(labels.xennetworklabel != dictionary['network.label.display.for.blank.value'])
|
||||
array1.push("&xennetworklabel=" + labels.xennetworklabel);
|
||||
if(labels.kvmnetworklabel != networklabelDisplayForBlankValue)
|
||||
if(labels.kvmnetworklabel != dictionary['network.label.display.for.blank.value'])
|
||||
array1.push("&kvmnetworklabel=" + labels.kvmnetworklabel);
|
||||
if(labels.vmwarenetworklabel != networklabelDisplayForBlankValue)
|
||||
if(labels.vmwarenetworklabel != dictionary['network.label.display.for.blank.value'])
|
||||
array1.push("&vmwarenetworklabel=" + labels.vmwarenetworklabel);
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -80,7 +79,7 @@
|
|||
};
|
||||
|
||||
cloudStack.sections.system = {
|
||||
title: 'System',
|
||||
title: 'label.menu.system',
|
||||
id: 'system',
|
||||
|
||||
// System dashboard
|
||||
|
|
@ -289,7 +288,7 @@
|
|||
});
|
||||
},
|
||||
messages: {
|
||||
notification: 'Updated public traffic type'
|
||||
notification: 'public.traffic.type.is.updated'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -299,12 +298,12 @@
|
|||
fields: [
|
||||
{
|
||||
traffictype: { label: 'label.traffic.type' },
|
||||
broadcastdomaintype: { label: 'Broadcast domain type' }
|
||||
broadcastdomaintype: { label: 'label.broadcast.domain.type' }
|
||||
},
|
||||
{
|
||||
xennetworklabel: { label: 'Xen traffic label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM traffic label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware traffic label', isEditable: true }
|
||||
xennetworklabel: { label: 'Xen.traffic.label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM.traffic.label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware.traffic.label', isEditable: true }
|
||||
}
|
||||
],
|
||||
|
||||
|
|
@ -331,21 +330,21 @@
|
|||
},
|
||||
|
||||
ipAddresses: {
|
||||
title: 'IP Ranges',
|
||||
title: 'IP.ranges',
|
||||
custom: function(args) {
|
||||
return $('<div></div>').multiEdit({
|
||||
context: args.context,
|
||||
noSelect: true,
|
||||
fields: {
|
||||
'gateway': { edit: true, label: 'Gateway' },
|
||||
'netmask': { edit: true, label: 'Netmask' },
|
||||
'vlan': { edit: true, label: 'VLAN', isOptional: true },
|
||||
'startip': { edit: true, label: 'Start IP' },
|
||||
'endip': { edit: true, label: 'End IP' },
|
||||
'add-rule': { label: 'Add', addButton: true }
|
||||
'gateway': { edit: true, label: 'label.gateway' },
|
||||
'netmask': { edit: true, label: 'label.netmask' },
|
||||
'vlan': { edit: true, label: 'label.vlan', isOptional: true },
|
||||
'startip': { edit: true, label: 'start.IP' },
|
||||
'endip': { edit: true, label: 'end.IP' },
|
||||
'add-rule': { label: 'label.add', addButton: true }
|
||||
},
|
||||
add: {
|
||||
label: 'Add',
|
||||
label: 'label.add',
|
||||
action: function(args) {
|
||||
var array1 = [];
|
||||
array1.push("&zoneId=" + args.context.zones[0].id);
|
||||
|
|
@ -371,7 +370,7 @@
|
|||
args.response.success({
|
||||
data: item,
|
||||
notification: {
|
||||
label: 'IP range is added',
|
||||
label: 'IP.range.is.added',
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
|
|
@ -387,7 +386,7 @@
|
|||
},
|
||||
actions: {
|
||||
destroy: {
|
||||
label: 'Delete',
|
||||
label: 'remove.IP.range',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('deleteVlanIpRange&id=' + args.context.multiRule[0].id),
|
||||
|
|
@ -396,7 +395,7 @@
|
|||
success: function(json) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Remove IP range ' + args.context.multiRule[0].id,
|
||||
label: 'remove.IP.range',
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
|
|
@ -437,7 +436,7 @@
|
|||
});
|
||||
},
|
||||
messages: {
|
||||
notification: 'Updated storage traffic type'
|
||||
notification: 'storage.traffic.type.is.updated'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -447,12 +446,12 @@
|
|||
fields: [
|
||||
{
|
||||
traffictype: { label: 'label.traffic.type' },
|
||||
broadcastdomaintype: { label: 'Broadcast domain type' }
|
||||
broadcastdomaintype: { label: 'label.broadcast.domain.type' }
|
||||
},
|
||||
{
|
||||
xennetworklabel: { label: 'Xen traffic label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM traffic label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware traffic label', isEditable: true }
|
||||
xennetworklabel: { label: 'Xen.traffic.label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM.traffic.label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware.traffic.label', isEditable: true }
|
||||
}
|
||||
],
|
||||
|
||||
|
|
@ -477,7 +476,7 @@
|
|||
},
|
||||
|
||||
ipAddresses: {
|
||||
title: 'IP Ranges',
|
||||
title: 'IP.ranges',
|
||||
custom: function(args) {
|
||||
return $('<div></div>').multiEdit({
|
||||
context: args.context,
|
||||
|
|
@ -500,14 +499,14 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
'netmask': { edit: true, label: 'Netmask' },
|
||||
'vlan': { edit: true, label: 'VLAN', isOptional: true },
|
||||
'startip': { edit: true, label: 'Start IP' },
|
||||
'endip': { edit: true, label: 'End IP' },
|
||||
'add-rule': { label: 'Add', addButton: true }
|
||||
'netmask': { edit: true, label: 'label.netmask' },
|
||||
'vlan': { edit: true, label: 'label.vlan', isOptional: true },
|
||||
'startip': { edit: true, label: 'start.IP' },
|
||||
'endip': { edit: true, label: 'end.IP' },
|
||||
'add-rule': { label: 'label.add', addButton: true }
|
||||
},
|
||||
add: {
|
||||
label: 'Add',
|
||||
label: 'label.add',
|
||||
action: function(args) {
|
||||
var array1 = [];
|
||||
array1.push("&zoneId=" + args.context.zones[0].id);
|
||||
|
|
@ -530,7 +529,7 @@
|
|||
jobId: json.createstoragenetworkiprangeresponse.jobid
|
||||
},
|
||||
notification: {
|
||||
label: 'Added IP range',
|
||||
label: 'IP.range.is.added',
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
});
|
||||
|
|
@ -544,7 +543,7 @@
|
|||
},
|
||||
actions: {
|
||||
destroy: {
|
||||
label: 'Delete',
|
||||
label: 'label.delete',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('deleteStorageNetworkIpRange&id=' + args.context.multiRule[0].id),
|
||||
|
|
@ -553,7 +552,7 @@
|
|||
success: function(json) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Remove IP range ' + args.context.multiRule[0].id,
|
||||
label: 'remove.IP.range',
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
|
|
@ -594,7 +593,7 @@
|
|||
});
|
||||
},
|
||||
messages: {
|
||||
notification: 'Updated management traffic type'
|
||||
notification: 'management.traffic.type.is.updated'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -604,12 +603,12 @@
|
|||
fields: [
|
||||
{
|
||||
traffictype: { label: 'label.traffic.type' },
|
||||
broadcastdomaintype: { label: 'Broadcast domain type' }
|
||||
broadcastdomaintype: { label: 'label.broadcast.domain.type' }
|
||||
},
|
||||
{
|
||||
xennetworklabel: { label: 'Xen traffic label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM traffic label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware traffic label', isEditable: true }
|
||||
xennetworklabel: { label: 'Xen.traffic.label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM.traffic.label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware.traffic.label', isEditable: true }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -631,14 +630,14 @@
|
|||
}
|
||||
},
|
||||
ipAddresses: { //read-only listView (no actions) filled with pod info (not VlanIpRange info)
|
||||
title: 'IP Ranges',
|
||||
title: 'IP.ranges',
|
||||
listView: {
|
||||
fields: {
|
||||
name: { label: 'Pod name' },
|
||||
gateway: { label: 'Gateway' }, //'Reserved system gateway' is too long and causes a visual format bug (2 lines overlay)
|
||||
netmask: { label: 'Netmask' }, //'Reserved system netmask' is too long and causes a visual format bug (2 lines overlay)
|
||||
startip: { label: 'Start IP' }, //'Reserved system start IP' is too long and causes a visual format bug (2 lines overlay)
|
||||
endip: { label: 'End IP' } //'Reserved system end IP' is too long and causes a visual format bug (2 lines overlay)
|
||||
name: { label: 'label.pod' }, //pod name
|
||||
gateway: { label: 'label.gateway' }, //'Reserved system gateway' is too long and causes a visual format bug (2 lines overlay)
|
||||
netmask: { label: 'label.netmask' }, //'Reserved system netmask' is too long and causes a visual format bug (2 lines overlay)
|
||||
startip: { label: 'start.IP' }, //'Reserved system start IP' is too long and causes a visual format bug (2 lines overlay)
|
||||
endip: { label: 'end.IP' } //'Reserved system end IP' is too long and causes a visual format bug (2 lines overlay)
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
var array1 = [];
|
||||
|
|
@ -725,19 +724,19 @@
|
|||
{
|
||||
state: { label: 'label.state' },
|
||||
startVlan: {
|
||||
label: 'Start Vlan',
|
||||
label: 'start.Vlan',
|
||||
isEditable: true
|
||||
},
|
||||
endVlan: {
|
||||
label: 'End Vlan',
|
||||
label: 'end.Vlan',
|
||||
isEditable: true
|
||||
},
|
||||
broadcastdomainrange: { label: 'Broadcast domain range' }
|
||||
broadcastdomainrange: { label: 'broadcast.domain.range' }
|
||||
},
|
||||
{
|
||||
xennetworklabel: { label: 'Xen traffic label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM traffic label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware traffic label', isEditable: true }
|
||||
xennetworklabel: { label: 'Xen.traffic.label', isEditable: true },
|
||||
kvmnetworklabel: { label: 'KVM.traffic.label', isEditable: true },
|
||||
vmwarenetworklabel: { label: 'VMware.traffic.label', isEditable: true }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -777,14 +776,14 @@
|
|||
},
|
||||
|
||||
ipAddresses: {
|
||||
title: 'IP Ranges',
|
||||
title: 'IP.ranges',
|
||||
custom: function(args) {
|
||||
return $('<div></div>').multiEdit({
|
||||
context: args.context,
|
||||
noSelect: true,
|
||||
fields: {
|
||||
'podid': {
|
||||
label: 'Pod',
|
||||
label: 'label.pod',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listPods&zoneid=" + selectedZoneObj.id),
|
||||
|
|
@ -800,14 +799,14 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
'gateway': { edit: true, label: 'Gateway' },
|
||||
'netmask': { edit: true, label: 'Netmask' },
|
||||
'startip': { edit: true, label: 'Start IP' },
|
||||
'endip': { edit: true, label: 'End IP' },
|
||||
'add-rule': { label: 'Add', addButton: true }
|
||||
'gateway': { edit: true, label: 'label.gateway' },
|
||||
'netmask': { edit: true, label: 'label.netmask' },
|
||||
'startip': { edit: true, label: 'start.IP' },
|
||||
'endip': { edit: true, label: 'end.IP' },
|
||||
'add-rule': { label: 'label.add', addButton: true }
|
||||
},
|
||||
add: {
|
||||
label: 'Add',
|
||||
label: 'label.add',
|
||||
action: function(args) {
|
||||
var array1 = [];
|
||||
array1.push("&podid=" + args.data.podid);
|
||||
|
|
@ -827,7 +826,7 @@
|
|||
args.response.success({
|
||||
data: item,
|
||||
notification: {
|
||||
label: 'IP range is added',
|
||||
label: 'IP.range.is.added',
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
|
|
@ -843,7 +842,7 @@
|
|||
},
|
||||
actions: {
|
||||
destroy: {
|
||||
label: 'Delete',
|
||||
label: 'remove.IP.range',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('deleteVlanIpRange&id=' + args.context.multiRule[0].id),
|
||||
|
|
@ -852,7 +851,7 @@
|
|||
success: function(json) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Remove IP range ' + args.context.multiRule[0].id,
|
||||
label: 'remove.IP.range',
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
|
|
@ -892,32 +891,32 @@
|
|||
},
|
||||
|
||||
network: {
|
||||
title: 'Network',
|
||||
title: 'label.network',
|
||||
listView: {
|
||||
section: 'networks',
|
||||
id: 'networks',
|
||||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
type: { label: 'Type' },
|
||||
vlan: { label: 'VLAN ID' },
|
||||
cidr: { label: 'CIDR' },
|
||||
scope: { label: 'Scope' }
|
||||
type: { label: 'label.type' },
|
||||
vlan: { label: 'label.vlan.id' },
|
||||
cidr: { label: 'label.cidr' },
|
||||
scope: { label: 'label.scope' }
|
||||
},
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Add guest network',
|
||||
label: 'label.add.guest.network',
|
||||
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to add a guest network';
|
||||
return 'message.add.guest.network';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'Adding guest network';
|
||||
return 'label.add.guest.network';
|
||||
}
|
||||
},
|
||||
|
||||
createForm: {
|
||||
title: 'Add guest network', //Add guest network in advanced zone
|
||||
title: 'label.add.guest.network', //Add guest network in advanced zone
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
|
|
@ -925,15 +924,15 @@
|
|||
validation: { required: true }
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
label: 'label.description',
|
||||
validation: { required: true }
|
||||
},
|
||||
vlanId: {
|
||||
label: "VLAN ID"
|
||||
label: 'label.vlan.id'
|
||||
},
|
||||
|
||||
scope: {
|
||||
label: 'Scope',
|
||||
label: 'label.scope',
|
||||
select: function(args) {
|
||||
var array1 = [];
|
||||
array1.push({id: 'zone-wide', description: 'All'});
|
||||
|
|
@ -973,7 +972,7 @@
|
|||
}
|
||||
},
|
||||
domainId: {
|
||||
label: 'Domain',
|
||||
label: 'label.domain',
|
||||
validation: { required: true },
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
|
|
@ -1017,11 +1016,11 @@
|
|||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
subdomainaccess: { label: 'Subdomain Access', isBoolean: true, isHidden: true },
|
||||
account: { label: 'Account' },
|
||||
subdomainaccess: { label: 'subdomain.access', isBoolean: true, isHidden: true },
|
||||
account: { label: 'label.account' },
|
||||
|
||||
projectId: {
|
||||
label: 'Project',
|
||||
label: 'label.project',
|
||||
validation: { required: true },
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
|
|
@ -1040,8 +1039,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
networkOfferingId: {
|
||||
label: 'Network offering',
|
||||
networkOfferingId: {
|
||||
label: 'label.network.offering',
|
||||
dependsOn: 'scope',
|
||||
select: function(args) {
|
||||
var array1 = [];
|
||||
|
|
@ -1132,11 +1131,11 @@
|
|||
}
|
||||
},
|
||||
|
||||
guestGateway: { label: 'Guest gateway' },
|
||||
guestNetmask: { label: 'Guest netmask' },
|
||||
guestStartIp: { label: 'Guest start IP' },
|
||||
guestEndIp: { label: 'Guest end IP' },
|
||||
networkdomain: { label: 'Network domain' }
|
||||
guestGateway: { label: 'label.guest.gateway' },
|
||||
guestNetmask: { label: 'label.guest.netmask' },
|
||||
guestStartIp: { label: 'guest.start.IP' },
|
||||
guestEndIp: { label: 'guest.end.IP' },
|
||||
networkdomain: { label: 'label.network.domain' }
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -1193,109 +1192,13 @@
|
|||
success: function(json) {
|
||||
var item = json.createnetworkresponse.network;
|
||||
args.response.success({data:item});
|
||||
|
||||
if(selectedZoneObj.networktype == "Basic") {
|
||||
var array2 = [];
|
||||
|
||||
var podId;
|
||||
if(args.data.podId != "0") {
|
||||
podId = args.data.podId;
|
||||
}
|
||||
else { //args.data.podId==0, create pod first
|
||||
var array1 = [];
|
||||
array1.push("&zoneId=" + selectedZoneObj.id);
|
||||
array1.push("&name=" + todb(args.data.podname));
|
||||
array1.push("&gateway=" + todb(args.data.reservedSystemGateway));
|
||||
array1.push("&netmask=" + todb(args.data.reservedSystemNetmask));
|
||||
array1.push("&startIp=" + todb(args.data.reservedSystemStartIp));
|
||||
|
||||
var endip = args.data.reservedSystemEndIp; //optional
|
||||
if (endip != null && endip.length > 0)
|
||||
array1.push("&endIp=" + todb(endip));
|
||||
|
||||
$.ajax({
|
||||
url: createURL("createPod" + array1.join("")),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var item = json.createpodresponse.pod;
|
||||
podId = item.id;
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
//var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
//args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(podId == null) {
|
||||
alert("podId is null, so unable to create IP range on pod level");
|
||||
return;
|
||||
}
|
||||
array2.push("&podId=" + podId);
|
||||
array2.push("&vlan=untagged");
|
||||
array2.push("&zoneid=" + selectedZoneObj.id);
|
||||
array2.push("&forVirtualNetwork=false"); //direct VLAN
|
||||
array2.push("&gateway=" + todb(args.data.guestGateway));
|
||||
array2.push("&netmask=" + todb(args.data.guestNetmask));
|
||||
array2.push("&startip=" + todb(args.data.guestStartIp));
|
||||
var endip = args.data.guestEndIp;
|
||||
if(endip != null && endip.length > 0)
|
||||
array2.push("&endip=" + todb(endip));
|
||||
$.ajax({
|
||||
url: createURL("createVlanIpRange" + array2.join("")),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
//var item = json.createvlaniprangeresponse.vlan;
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
//var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
//args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
preAction: function(args) {
|
||||
//var zone = $('.detail-view:last').data('view-args').context.zones[0]; //this line causes a bug when going back and forth between listView and detailView: "$(".detail-view:last").data("view-args").context.zones is undefined"
|
||||
var zone = selectedZoneObj;
|
||||
|
||||
var networksPresent = false;
|
||||
|
||||
// Only 1 guest network is allowed per basic zone,
|
||||
// so don't show the dialog in this case
|
||||
$.ajax({
|
||||
url: createURL('listNetworks&listAll=true'),
|
||||
data: {
|
||||
trafficType: 'guest',
|
||||
zoneId: zone.id
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
if (json.listnetworksresponse.network) {
|
||||
networksPresent = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (zone.networktype == 'Basic' && networksPresent) {
|
||||
cloudStack.dialog.notice({
|
||||
message: 'Sorry, you can only have one guest network for a basic zone.'
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
|
|
@ -1304,7 +1207,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
dataProvider: function(args) {
|
||||
dataProvider: function(args) { //Jes
|
||||
var array1 = [];
|
||||
if(args.filterBy != null) {
|
||||
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
||||
|
|
@ -1374,7 +1277,7 @@
|
|||
name: 'Guest network details',
|
||||
viewAll: {
|
||||
path: '_zone.guestIpRanges',
|
||||
label: 'IP ranges',
|
||||
label: 'IP.ranges',
|
||||
preFilter: function(args) {
|
||||
if(selectedGuestNetworkObj.type == "Isolated") {
|
||||
var services = selectedGuestNetworkObj.service;
|
||||
|
|
@ -1607,7 +1510,7 @@
|
|||
isEditable: true
|
||||
},
|
||||
type: {
|
||||
label: 'Type'
|
||||
label: 'label.type'
|
||||
},
|
||||
state: {
|
||||
label: 'label.state'
|
||||
|
|
@ -1621,11 +1524,11 @@
|
|||
return "No";
|
||||
}
|
||||
},
|
||||
vlan: { label: 'VLAN ID' },
|
||||
scope: { label: 'Scope' },
|
||||
networkofferingdisplaytext: { label: 'Network offering' },
|
||||
vlan: { label: 'label.vlan.id' },
|
||||
scope: { label: 'label.scope' },
|
||||
networkofferingdisplaytext: { label: 'label.network.offering' },
|
||||
networkofferingid: {
|
||||
label: 'Network offering',
|
||||
label: 'label.network.offering',
|
||||
isEditable: true,
|
||||
select: function(args){
|
||||
var items = [];
|
||||
|
|
@ -1659,14 +1562,14 @@
|
|||
label: 'Network offering ID'
|
||||
},
|
||||
|
||||
gateway: { label: 'Gateway' },
|
||||
//netmask: { label: 'Netmask' },
|
||||
cidr: { label: 'CIDR' },
|
||||
gateway: { label: 'label.gateway' },
|
||||
//netmask: { label: 'label.netmask' },
|
||||
cidr: { label: 'label.cidr' },
|
||||
networkdomaintext: {
|
||||
label: 'Network domain'
|
||||
label: 'label.network.domain'
|
||||
},
|
||||
networkdomain: {
|
||||
label: 'Network domain',
|
||||
label: 'label.network.domain',
|
||||
isEditable: true
|
||||
},
|
||||
|
||||
|
|
@ -1674,8 +1577,8 @@
|
|||
subdomainaccess: { label: 'Subdomain Access?', converter: function(data) {
|
||||
return data ? 'Yes' : 'No';
|
||||
} },
|
||||
account: { label: 'Account' },
|
||||
project: { label: 'Project' }
|
||||
account: { label: 'label.account' },
|
||||
project: { label: 'label.project' }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -1894,7 +1797,7 @@
|
|||
},
|
||||
tabs: {
|
||||
network: {
|
||||
title: 'Network',
|
||||
title: 'label.network',
|
||||
fields: [
|
||||
{
|
||||
name: { label: 'label.name' }
|
||||
|
|
@ -1909,7 +1812,7 @@
|
|||
Vpn: { label: 'VPN' },
|
||||
Dhcp: { label: 'DHCP' },
|
||||
Dns: { label: 'DNS' },
|
||||
Gateway: { label: 'Gateway' },
|
||||
Gateway: { label: 'label.gateway' },
|
||||
Firewall: { label: 'Firewall' },
|
||||
Lb: { label: 'Load Balancer' },
|
||||
UserData: { label: 'UserData' },
|
||||
|
|
@ -2280,9 +2183,9 @@
|
|||
linklocalip: { label: 'Link local IP' },
|
||||
hostname: { label: 'Host' },
|
||||
serviceofferingname: { label: 'label.service.offering' },
|
||||
networkdomain: { label: 'Network domain' },
|
||||
networkdomain: { label: 'label.network.domain' },
|
||||
domain: { label: 'Domain' },
|
||||
account: { label: 'Account' },
|
||||
account: { label: 'label.account' },
|
||||
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
|
||||
isredundantrouter: {
|
||||
label: 'Redundant router',
|
||||
|
|
@ -2404,7 +2307,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "NetscalerMPXLoadBalancer", description: "NetScaler MPX LoadBalancer"});
|
||||
|
|
@ -2613,7 +2516,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "F5BigIpLoadBalancer", description: "F5 Big Ip Load Balancer"});
|
||||
|
|
@ -2821,7 +2724,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "JuniperSRXFirewall", description: "Juniper SRX Firewall"});
|
||||
|
|
@ -3193,7 +3096,7 @@
|
|||
desc: 'Please fill in the following information to enable support for Swift',
|
||||
fields: {
|
||||
url: { label: 'URL', validation: { required: true } },
|
||||
account: { label: 'Account' },
|
||||
account: { label: 'label.account' },
|
||||
username: { label: 'Username' },
|
||||
key: { label: 'Key' }
|
||||
}
|
||||
|
|
@ -3297,7 +3200,7 @@
|
|||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'label.delete' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this zone.';
|
||||
|
|
@ -3410,7 +3313,7 @@
|
|||
networktype: { label: 'Network Type' },
|
||||
guestcidraddress : { label: 'Guest CIDR' },
|
||||
domain: {
|
||||
label: 'Network domain',
|
||||
label: 'label.network.domain',
|
||||
isEditable: true
|
||||
}
|
||||
}
|
||||
|
|
@ -3430,27 +3333,27 @@
|
|||
},
|
||||
|
||||
compute: {
|
||||
title: 'Compute',
|
||||
title: 'label.compute',
|
||||
custom: cloudStack.uiCustom.systemChart('compute')
|
||||
},
|
||||
network: {
|
||||
title: 'Network',
|
||||
title: 'label.network',
|
||||
custom: cloudStack.uiCustom.systemChart('network')
|
||||
},
|
||||
resources: {
|
||||
title: 'Resources',
|
||||
title: 'label.resources',
|
||||
custom: cloudStack.uiCustom.systemChart('resources')
|
||||
},
|
||||
|
||||
systemVMs: {
|
||||
title: 'System VMs',
|
||||
title: 'label.system.vms',
|
||||
listView: {
|
||||
label: 'System VMs',
|
||||
label: 'label.system.vms',
|
||||
id: 'systemVMs',
|
||||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
systemvmtype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
converter: function(args) {
|
||||
if(args == "consoleproxy")
|
||||
return "Console Proxy VM";
|
||||
|
|
@ -3757,7 +3660,7 @@
|
|||
id: { label: 'label.id' },
|
||||
state: { label: 'label.state' },
|
||||
systemvmtype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
converter: function(args) {
|
||||
if(args == "consoleproxy")
|
||||
return "Console Proxy VM";
|
||||
|
|
@ -3772,7 +3675,7 @@
|
|||
privateip: { label: 'Private IP' },
|
||||
linklocalip: { label: 'Link local IP' },
|
||||
hostname: { label: 'Host' },
|
||||
gateway: { label: 'Gateway' },
|
||||
gateway: { label: 'label.gateway' },
|
||||
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
|
||||
activeviewersessions: { label: 'Active sessions' }
|
||||
}
|
||||
|
|
@ -3839,7 +3742,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "NetscalerMPXLoadBalancer", description: "NetScaler MPX LoadBalancer"});
|
||||
|
|
@ -3981,7 +3884,7 @@
|
|||
lbdeviceid: { label: 'label.id' },
|
||||
ipaddress: { label: 'IP Address' },
|
||||
lbdevicestate: { label: 'Status' },
|
||||
lbdevicename: { label: 'Type' },
|
||||
lbdevicename: { label: 'label.type' },
|
||||
lbdevicecapacity: { label: 'Capacity' },
|
||||
lbdevicededicated: {
|
||||
label: 'Dedicated',
|
||||
|
|
@ -4039,7 +3942,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "F5BigIpLoadBalancer", description: "F5 Big Ip Load Balancer"});
|
||||
|
|
@ -4186,7 +4089,7 @@
|
|||
lbdeviceid: { label: 'label.id' },
|
||||
ipaddress: { label: 'IP Address' },
|
||||
lbdevicestate: { label: 'Status' },
|
||||
lbdevicename: { label: 'Type' },
|
||||
lbdevicename: { label: 'label.type' },
|
||||
lbdevicecapacity: { label: 'Capacity' },
|
||||
lbdevicededicated: {
|
||||
label: 'Dedicated',
|
||||
|
|
@ -4244,7 +4147,7 @@
|
|||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Type',
|
||||
label: 'label.type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "JuniperSRXFirewall", description: "Juniper SRX Firewall"});
|
||||
|
|
@ -4406,7 +4309,7 @@
|
|||
fwdeviceid: { label: 'label.id' },
|
||||
ipaddress: { label: 'IP Address' },
|
||||
fwdevicestate: { label: 'Status' },
|
||||
fwdevicename: { label: 'Type' },
|
||||
fwdevicename: { label: 'label.type' },
|
||||
fwdevicecapacity: { label: 'Capacity' },
|
||||
timeout: { label: 'Timeout' }
|
||||
}
|
||||
|
|
@ -4427,8 +4330,8 @@
|
|||
section: 'pods',
|
||||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
gateway: { label: 'Gateway' },
|
||||
netmask: { label: 'Netmask' },
|
||||
gateway: { label: 'label.gateway' },
|
||||
netmask: { label: 'label.netmask' },
|
||||
allocationstate: {
|
||||
converter: function(str) {
|
||||
// For localization
|
||||
|
|
@ -4655,7 +4558,7 @@
|
|||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'label.delete' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this pod.';
|
||||
|
|
@ -4694,10 +4597,10 @@
|
|||
},
|
||||
{
|
||||
id: { label: 'label.id' },
|
||||
netmask: { label: 'Netmask', isEditable: true },
|
||||
netmask: { label: 'label.netmask', isEditable: true },
|
||||
startip: { label: 'Start IP Range', isEditable: true },
|
||||
endip: { label: 'End IP Range', isEditable: true },
|
||||
gateway: { label: 'Gateway', isEditable: true },
|
||||
gateway: { label: 'label.gateway', isEditable: true },
|
||||
allocationstate: {
|
||||
converter: function(str) {
|
||||
// For localization
|
||||
|
|
@ -4722,8 +4625,8 @@
|
|||
fields: [
|
||||
{
|
||||
id: { label: 'label.id' },
|
||||
gateway: { label: 'Gateway' },
|
||||
netmask: { label: 'Netmask' },
|
||||
gateway: { label: 'label.gateway' },
|
||||
netmask: { label: 'label.netmask' },
|
||||
startip: { label: 'Start IP range' },
|
||||
endip: { label: 'End IP range' }
|
||||
}
|
||||
|
|
@ -5128,7 +5031,7 @@
|
|||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'label.delete' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this cluster.';
|
||||
|
|
@ -5762,7 +5665,7 @@
|
|||
id: { label: 'label.id' },
|
||||
resourcestate: { label: 'Resource state' },
|
||||
state: { label: 'label.state' },
|
||||
type: { label: 'Type' },
|
||||
type: { label: 'label.type' },
|
||||
zonename: { label: 'Zone' },
|
||||
podname: { label: 'Pod' },
|
||||
clustername: { label: 'Cluster' },
|
||||
|
|
@ -6401,7 +6304,7 @@
|
|||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'label.delete' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this primary storage.';
|
||||
|
|
@ -6449,7 +6352,7 @@
|
|||
},
|
||||
podname: { label: 'Pod' },
|
||||
clustername: { label: 'Cluster' },
|
||||
type: { label: 'Type' },
|
||||
type: { label: 'label.type' },
|
||||
ipaddress: { label: 'IP Address' },
|
||||
path: { label: 'Path' },
|
||||
disksizetotal: {
|
||||
|
|
@ -6585,7 +6488,7 @@
|
|||
name: 'Secondary storage details',
|
||||
actions: {
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'label.delete' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this secondary storage.';
|
||||
|
|
@ -6649,9 +6552,9 @@
|
|||
fields: {
|
||||
//id: { label: 'label.id' },
|
||||
//podname: { label: 'Pod' },
|
||||
//vlan: { label: 'VLAN' },
|
||||
startip: { label: 'Start IP' },
|
||||
endip: { label: 'End IP' }
|
||||
//vlan: { label: 'label.vlan' },
|
||||
startip: { label: 'start.IP' },
|
||||
endip: { label: 'end.IP' }
|
||||
},
|
||||
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -6751,10 +6654,10 @@
|
|||
},
|
||||
//create new pod fields ends here
|
||||
|
||||
guestGateway: { label: 'Guest gateway' },
|
||||
guestNetmask: { label: 'Guest netmask' },
|
||||
guestStartIp: { label: 'Guest start IP' },
|
||||
guestEndIp: { label: 'Guest end IP' }
|
||||
guestGateway: { label: 'label.guest.gateway' },
|
||||
guestNetmask: { label: 'label.guest.netmask' },
|
||||
guestStartIp: { label: 'guest.start.IP' },
|
||||
guestEndIp: { label: 'guest.end.IP' }
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -6792,19 +6695,19 @@
|
|||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete' ,
|
||||
label: 'remove.IP.range' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to delete this IP range.';
|
||||
},
|
||||
success: function(args) {
|
||||
return 'IP range is being deleted.';
|
||||
return 'remove.IP.range';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'Deleting IP range';
|
||||
return 'remove.IP.range';
|
||||
},
|
||||
complete: function(args) {
|
||||
return 'IP range has been deleted.';
|
||||
return 'remove.IP.range';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
|
|
|
|||
|
|
@ -246,13 +246,13 @@
|
|||
// User options
|
||||
var $options = $('<div>').attr({ id: 'user-options' })
|
||||
.appendTo($('#header'));
|
||||
$(['Logout', 'Help']).each(function() {
|
||||
$(['label.logout', 'label.help']).each(function() {
|
||||
var $link = $('<a>')
|
||||
.attr({ href: '#' })
|
||||
.html(_l(this.toString()))
|
||||
.appendTo($options);
|
||||
|
||||
if (this == 'Help') {
|
||||
if (this == 'label.help') {
|
||||
$link.click(function() {
|
||||
var helpURL = 'http://docs.cloud.com/CloudStack_Documentation';
|
||||
|
||||
|
|
|
|||
|
|
@ -366,12 +366,12 @@
|
|||
_l(args.message)
|
||||
)
|
||||
).dialog({
|
||||
title: 'Confirm',
|
||||
title: _l('label.confirmation'),
|
||||
dialogClass: 'confirm',
|
||||
zIndex: 5000,
|
||||
buttons: [
|
||||
{
|
||||
text: 'Cancel',
|
||||
text: _l('label.cancel'),
|
||||
'class': 'cancel',
|
||||
click: function() {
|
||||
$(this).dialog('destroy');
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
text: 'Yes',
|
||||
text: _l('label.yes'),
|
||||
'class': 'ok',
|
||||
click: function() {
|
||||
args.action();
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
_l(args.message)
|
||||
)
|
||||
).dialog({
|
||||
title: 'Status',
|
||||
title: _l('label.status'),
|
||||
dialogClass: 'notice',
|
||||
zIndex: 5000,
|
||||
buttons: [
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
var $inputs = $detailView.find('input, select');
|
||||
var action = args.actions[args.actionName];
|
||||
var id = $detailView.data('view-args').id;
|
||||
var $editButton = $('<div>').addClass('button done').html(_l('Apply')).hide()
|
||||
var $editButton = $('<div>').addClass('button done').html(_l('label.apply')).hide()
|
||||
.appendTo(
|
||||
$detailView.find('.ui-tabs-panel .detail-group.actions')
|
||||
).fadeIn();
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
var val = $input.is(':checked');
|
||||
|
||||
$value.data('detail-view-boolean-value', val);
|
||||
$value.html(val ? _l('Yes') : _l('No'));
|
||||
$value.html(val ? _l('label.yes') : _l('label.no'));
|
||||
}
|
||||
else if ($input.is('select')) {
|
||||
$value.html(
|
||||
|
|
@ -316,7 +316,7 @@
|
|||
success: function(args) {
|
||||
var notificationArgs = {
|
||||
section: id,
|
||||
desc: 'Changed item properties',
|
||||
desc: _l('changed.item.properties'),
|
||||
_custom: args ? args._custom : null
|
||||
};
|
||||
|
||||
|
|
@ -880,7 +880,7 @@
|
|||
$('<div>')
|
||||
.addClass('button refresh')
|
||||
.append(
|
||||
$('<span>').html(_l('Refresh'))
|
||||
$('<span>').html(_l('label.refresh'))
|
||||
)
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@
|
|||
|
||||
if (reorder) {
|
||||
$thead.find('tr').append(
|
||||
$('<th>').html(_l('Order')).addClass('reorder-actions reduced-hide')
|
||||
$('<th>').html(_l('label.order')).addClass('reorder-actions reduced-hide')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -711,7 +711,7 @@
|
|||
if (!$tbody.find('tr').size()) {
|
||||
return [
|
||||
$('<tr>').addClass('empty').append(
|
||||
$('<td>').html(_l('No data to show'))
|
||||
$('<td>').html(_l('label.no.data'))
|
||||
).appendTo($tbody)
|
||||
];
|
||||
}
|
||||
|
|
@ -800,10 +800,10 @@
|
|||
|
||||
$.each(reorder, function(actionName, action) {
|
||||
var fnLabel = {
|
||||
moveTop: 'Move to top',
|
||||
moveUp: 'Move up one row',
|
||||
moveDown: 'Move down one row',
|
||||
moveDrag: 'Drag to new position'
|
||||
moveTop: _l('label.move.to.top'),
|
||||
moveUp: _l('label.move.up.row'),
|
||||
moveDown: _l('label.move.down.row'),
|
||||
moveDrag: _l('label.drag.new.position')
|
||||
};
|
||||
|
||||
$('<div>')
|
||||
|
|
@ -997,7 +997,7 @@
|
|||
if (sectionPreFilter && sectionPreFilter.length == 1) {
|
||||
$switcher.find('select').hide();
|
||||
$switcher.find('label').html(
|
||||
_l('Viewing') + ' ' + _l(sections[sectionPreFilter[0]].title)
|
||||
_l('label.viewing') + ' ' + _l(sections[sectionPreFilter[0]].title)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
.addClass('notification-box')
|
||||
.append(
|
||||
// Header
|
||||
$('<h3>').html(_l('Notifications'))
|
||||
$('<h3>').html(_l('label.notifications'))
|
||||
)
|
||||
.append(
|
||||
// Container
|
||||
|
|
@ -176,13 +176,13 @@
|
|||
// Clear list
|
||||
$('<div>').addClass('button clear-list')
|
||||
.append(
|
||||
$('<span>').html(_l('Clear List'))
|
||||
$('<span>').html(_l('label.clear.list'))
|
||||
)
|
||||
)
|
||||
.append(
|
||||
$('<div>').addClass('button close')
|
||||
.append(
|
||||
$('<span>').html(_l('Close'))
|
||||
$('<span>').html(_l('label.close'))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue