|
5525 | 5525 | } |
5526 | 5526 |
|
5527 | 5527 | }, |
5528 | | - tabs: { //Jes |
| 5528 | + tabs: { |
5529 | 5529 | details: { |
5530 | 5530 | title: 'label.details', |
5531 | 5531 | fields: [ |
|
5581 | 5581 | } |
5582 | 5582 | } |
5583 | 5583 | }, |
5584 | | - 'primary-storage': { //Jes |
5585 | | - title: 'Primary Storage', |
| 5584 | + 'primary-storage': { |
| 5585 | + title: 'label.primary.storage', |
5586 | 5586 | id: 'primarystorages', |
5587 | 5587 | listView: { |
5588 | 5588 | id: 'primarystorages', |
5589 | 5589 | section: 'primary-storage', |
5590 | 5590 | fields: { |
5591 | 5591 | name: { label: 'label.name' }, |
5592 | | - ipaddress: { label: 'Server' }, |
5593 | | - path: { label: 'Path' } |
| 5592 | + ipaddress: { label: 'label.server' }, |
| 5593 | + path: { label: 'label.path' } |
5594 | 5594 | }, |
5595 | 5595 |
|
5596 | 5596 | dataProvider: function(args) { |
|
5626 | 5626 |
|
5627 | 5627 | actions: { |
5628 | 5628 | add: { |
5629 | | - label: 'Add primary storage', |
| 5629 | + label: 'label.add.primary.storage', |
5630 | 5630 |
|
5631 | 5631 | createForm: { |
5632 | | - title: 'Add new primary storage', |
5633 | | - desc: 'Please fill in the following information to add a new primary storage', |
| 5632 | + title: 'label.add.primary.storage', |
5634 | 5633 | fields: { |
5635 | 5634 | //always appear (begin) |
5636 | 5635 | podId: { |
|
5683 | 5682 | }, |
5684 | 5683 |
|
5685 | 5684 | protocol: { |
5686 | | - label: 'Protocol', |
| 5685 | + label: 'label.protocol', |
5687 | 5686 | validation: { required: true }, |
5688 | 5687 | dependsOn: 'clusterId', |
5689 | 5688 | select: function(args) { |
|
5909 | 5908 | //always appear (end) |
5910 | 5909 |
|
5911 | 5910 | server: { |
5912 | | - label: 'Server', |
| 5911 | + label: 'label.server', |
5913 | 5912 | validation: { required: true }, |
5914 | 5913 | isHidden: true |
5915 | 5914 | }, |
5916 | 5915 |
|
5917 | 5916 | //nfs |
5918 | 5917 | path: { |
5919 | | - label: 'Path', |
| 5918 | + label: 'label.path', |
5920 | 5919 | validation: { required: true }, |
5921 | 5920 | isHidden: true |
5922 | 5921 | }, |
5923 | 5922 |
|
5924 | 5923 | //iscsi |
5925 | 5924 | iqn: { |
5926 | | - label: 'Target IQN', |
| 5925 | + label: 'label.target.iqn', |
5927 | 5926 | validation: { required: true }, |
5928 | 5927 | isHidden: true |
5929 | 5928 | }, |
5930 | 5929 | lun: { |
5931 | | - label: 'LUN #', |
| 5930 | + label: 'LUN.number', |
5932 | 5931 | validation: { required: true }, |
5933 | 5932 | isHidden: true |
5934 | 5933 | }, |
5935 | 5934 |
|
5936 | 5935 | //clvm |
5937 | 5936 | volumegroup: { |
5938 | | - label: 'Volume Group', |
| 5937 | + label: 'label.volgroup', |
5939 | 5938 | validation: { required: true }, |
5940 | 5939 | isHidden: true |
5941 | 5940 | }, |
5942 | 5941 |
|
5943 | 5942 | //vmfs |
5944 | 5943 | vCenterDataCenter: { |
5945 | | - label: 'vCenter Datacenter', |
| 5944 | + label: 'label.vcenter.datacenter', |
5946 | 5945 | validation: { required: true }, |
5947 | 5946 | isHidden: true |
5948 | 5947 | }, |
5949 | 5948 | vCenterDataStore: { |
5950 | | - label: 'vCenter Datastore', |
| 5949 | + label: 'label.vcenter.datastore', |
5951 | 5950 | validation: { required: true }, |
5952 | 5951 | isHidden: true |
5953 | 5952 | }, |
|
6059 | 6058 |
|
6060 | 6059 | messages: { |
6061 | 6060 | notification: function(args) { |
6062 | | - return 'Added new primary storage'; |
| 6061 | + return 'label.add.primary.storage'; |
6063 | 6062 | } |
6064 | 6063 | } |
6065 | 6064 | } |
6066 | 6065 | }, |
6067 | 6066 |
|
6068 | 6067 | detailView: { |
6069 | | - name: "Primary storage details", |
| 6068 | + name: "Primary storage details", //Jes |
6070 | 6069 | actions: { |
6071 | 6070 | edit: { |
6072 | 6071 | label: 'label.edit', |
|
6089 | 6088 | }, |
6090 | 6089 |
|
6091 | 6090 | enableMaintenanceMode: { |
6092 | | - label: 'Enable Maintenace' , |
| 6091 | + label: 'label.action.enable.maintenance.mode' , |
6093 | 6092 | action: function(args) { |
6094 | 6093 | $.ajax({ |
6095 | 6094 | url: createURL("enableStorageMaintenance&id=" + args.context.primarystorages[0].id), |
|
6114 | 6113 | }, |
6115 | 6114 | messages: { |
6116 | 6115 | confirm: function(args) { |
6117 | | - return 'Warning: placing the primary storage into maintenance mode will cause all VMs using volumes from it to be stopped. Do you want to continue?'; |
6118 | | - }, |
6119 | | - success: function(args) { |
6120 | | - return 'Maintenance is being enabled.'; |
6121 | | - }, |
| 6116 | + return 'message.action.primarystorage.enable.maintenance.mode'; |
| 6117 | + }, |
6122 | 6118 | notification: function(args) { |
6123 | | - return 'Enabling maintenance'; |
6124 | | - }, |
6125 | | - complete: function(args) { |
6126 | | - return 'Maintenance has been enabled.'; |
| 6119 | + return 'label.action.enable.maintenance.mode'; |
6127 | 6120 | } |
6128 | 6121 | }, |
6129 | 6122 | notification: { |
|
6132 | 6125 | }, |
6133 | 6126 |
|
6134 | 6127 | cancelMaintenanceMode: { |
6135 | | - label: 'Cancel Maintenace' , |
| 6128 | + label: 'label.action.cancel.maintenance.mode' , |
| 6129 | + messages: { |
| 6130 | + confirm: function(args) { |
| 6131 | + return 'message.action.cancel.maintenance.mode'; |
| 6132 | + }, |
| 6133 | + notification: function(args) { |
| 6134 | + return 'label.action.cancel.maintenance.mode'; |
| 6135 | + } |
| 6136 | + }, |
6136 | 6137 | action: function(args) { |
6137 | 6138 | $.ajax({ |
6138 | 6139 | url: createURL("cancelStorageMaintenance&id=" + args.context.primarystorages[0].id), |
|
6154 | 6155 | ); |
6155 | 6156 | } |
6156 | 6157 | }); |
6157 | | - }, |
6158 | | - messages: { |
6159 | | - confirm: function(args) { |
6160 | | - return 'Please confirm that you want to cancel this maintenance.'; |
6161 | | - }, |
6162 | | - success: function(args) { |
6163 | | - return 'Maintenance is being cancelled.'; |
6164 | | - }, |
6165 | | - notification: function(args) { |
6166 | | - return 'Cancelling maintenance'; |
6167 | | - }, |
6168 | | - complete: function(args) { |
6169 | | - return 'Maintenance has been cancelled.'; |
6170 | | - } |
6171 | | - }, |
| 6158 | + }, |
6172 | 6159 | notification: { |
6173 | 6160 | poll: pollAsyncJobResult |
6174 | 6161 | } |
6175 | 6162 | }, |
6176 | 6163 |
|
6177 | 6164 | 'delete': { |
6178 | | - label: 'label.delete' , |
| 6165 | + label: 'label.action.delete.primary.storage' , |
6179 | 6166 | messages: { |
6180 | 6167 | confirm: function(args) { |
6181 | | - return 'Please confirm that you want to delete this primary storage.'; |
6182 | | - }, |
6183 | | - success: function(args) { |
6184 | | - return 'Primary storage is being deleted.'; |
6185 | | - }, |
| 6168 | + return 'message.action.delete.primary.storage'; |
| 6169 | + }, |
6186 | 6170 | notification: function(args) { |
6187 | | - return 'Deleting primary storage'; |
6188 | | - }, |
6189 | | - complete: function(args) { |
6190 | | - return 'Primary storage has been deleted.'; |
| 6171 | + return 'label.action.delete.primary.storage'; |
6191 | 6172 | } |
6192 | 6173 | }, |
6193 | 6174 | action: function(args) { |
|
6209 | 6190 |
|
6210 | 6191 | tabs: { |
6211 | 6192 | details: { |
6212 | | - title: 'label.details', |
| 6193 | + title: 'label.details', //Jes |
6213 | 6194 | fields: [ |
6214 | 6195 | { |
6215 | 6196 | name: { label: 'label.name' } |
|
6225 | 6206 | clustername: { label: 'label.cluster' }, |
6226 | 6207 | type: { label: 'label.type' }, |
6227 | 6208 | ipaddress: { label: 'label.ip.address' }, |
6228 | | - path: { label: 'Path' }, |
| 6209 | + path: { label: 'label.path' }, |
6229 | 6210 | disksizetotal: { |
6230 | | - label: 'Disk total', |
| 6211 | + label: 'label.disk.total', |
6231 | 6212 | converter: function(args) { |
6232 | 6213 | if (args == null || args == 0) |
6233 | 6214 | return ""; |
|
6236 | 6217 | } |
6237 | 6218 | }, |
6238 | 6219 | disksizeallocated: { |
6239 | | - label: 'Disk Allocated', |
| 6220 | + label: 'label.disk.allocated', |
6240 | 6221 | converter: function(args) { |
6241 | 6222 | if (args == null || args == 0) |
6242 | 6223 | return ""; |
|
6260 | 6241 | } |
6261 | 6242 | }, |
6262 | 6243 |
|
6263 | | - 'secondary-storage': { |
| 6244 | + 'secondary-storage': { //Jes |
6264 | 6245 | title: 'Secondary Storage', |
6265 | 6246 | id: 'secondarystorages', |
6266 | 6247 | listView: { |
|
0 commit comments