<commit_before>[
{"id": "align_relative_to", "title": "Align relative to ..."},
{"id": "angle", "title": "Change rotation angle"},
{"id": "angleLabel", "textContent": "angle:"},
{"id": "bkgnd_color", "title": "Change background color/opacity"},
{"id": "circle_cx", "title": "Change circle's cx coordinate"},
{"id": "circle_cy", "title": "Change circle's cy coordinate"},
{"id": "circle_r", "title": "Change circle's radius"},
{"id": "cornerRadiusLabel", "textContent": "Corner Radius:"},
{"id": "curve_segments", "textContent": "Curve"},
{"id": "ellipse_cx", "title": "Change ellipse's cx coordinate"},
{"id": "ellipse_cy", "title": "Change ellipse's cy coordinate"},
{"id": "ellipse_rx", "title": "Change ellipse's x radius"},
{"id": "ellipse_ry", "title": "Change ellipse's y radius"},
{"id": "fill_color", "title": "Change fill color"},
{"id": "fill_tool_bottom", "textContent": "fill:"},
{"id": "fitToContent", "textContent": "Fit to Content"},
{"id": "fit_to_all", "textContent": "Fit to all content"},
{"id": "fit_to_canvas", "textContent": "Fit to canvas"},
{"id": "fit_to_layer_content", "textContent": "Fit to layer content"},
{"id": "fit_to_sel", "textContent": "Fit to selection"},
{"id": "font_family", "title": "Change Font Family"},
{"id": "font_size", "title": "Change Font Size"},
{"id": "group_opacity", "title": "Change selected item opacity"},
{"id": "icon_large", "textContent": "Large"},
{"id": "icon_medium", "textContent": "Medium"},
{"id": "icon_small", "textContent": "Small"},
{"id": "icon_xlarge", "textContent": "Extra Large"},
{"id": "iheightLabel", "textContent": "height:"},
{"id": "image_height", "title": "Change image height"},
{"id": "image_opt_embed", "textContent": "Embed data (local files)"},
{"id": "image_opt_ref", "textContent": "Use file reference"},
{"id": "image_url", "title": "Change URL"},
{"id": "image_width", "title": "Change image width"},
{"id": "includedImages", "textContent": "Included Images"},
{"id": "iwidthLabel", "textContent": "width:"},
{"id": "largest_object", "textContent": "largest object"},
{"id": "layer_delete", "title": "Delete Layer"},
{"id": "layer_down", "title": "Move Layer Down"},
{"id": "layer_new", "title": "New Layer"},
{"id": "layer_rename", "title": "Rename Layer"},
{"id": "layer_up", "title": "Move Layer Up"},
{"id": "layersLabel", "textContent": "Layers:"},
{"id": "line_x1", "title": "Change line's starting x coordinate"},
{"id": "line_x2", "title": "Change line's ending x coordinate"},
{"id": "line_y1", "title": "Change line's starting y coordinate"},
{"id": "line_y2", "title": "Change line's ending y coordinate"},
{"id": "page", "textContent": "page"},
{"id": "palette", "title": "Click to change fill color, shift-click to change stroke color"},
{"id": "path_node_x", "title": "Change node's x coordinate"},
{"id": "path_node_y", "title": "Change node's y coordinate"},
{"id": "rect_height", "title": "Change rectangle height"},
{"id": "rect_rx", "title": "Change Rectangle Corner Radius"},
{"id": "rect_width", "title": "Change rectangle width"},
{"id": "relativeToLabel", "textContent": "relative to:"},
{"id": "rheightLabel", "textContent": "height:"},
{"id": "rwidthLabel", "textContent": "width:"},
{"id": "seg_type", "title": "Change Segment type"},
{"id": "selLayerLabel", "textContent": "Move elements to:"},
{"id": "selLayerNames", "title": "Move selected elements to a different layer"},
{"id": "selectedPredefined", "textContent": "Select predefined:"},
{"id": "selected_objects", "textContent": "selected objects"},
{"id": "selected_x", "title": "Change X coordinate"},
{"id": "selected_y", "title": "Change Y coordinate"},
{"id": "smallest_object", "textContent": "smallest object"},
{"id": "straight_segments", "textContent": "Straight"},
{"id": "stroke_color", "title": "Change stroke color"},
{"id": "stroke_style", "title": "Change stroke dash style"},
{"id": "stroke_tool_bottom", "textContent": "stroke:"},
{"id": "stroke_width", "title": "Change stroke width"},
{"id": "svginfo_bg_note", "textContent": "Note: Background will not be saved with image."},
{"id": "svginfo_change_background", "textContent": "Editor Background"},
{"id": "svginfo_dim", "textContent": "Canvas Dimensions"},
{"id": "svginfo_editor_prefs", "textContent": "Editor Preferences"},
{"id": "svginfo_height", "textContent": "Height:"},
{"id": "svginfo_icons", "textContent": "Icon size"},
{"id": "svginfo_image_props", "textContent": "Image Properties"},
{"id": "svginfo_lang", "textContent": "Language"},
{"id": "svginfo_title", "textContent": "Title"},
{"id": "svginfo_width", "textContent": "Width:"},
{"id": "text", "title": "Change text contents"},
{"id": "tool_alignbottom", "title": "Align Bottom"},
{"id": "tool_aligncenter", "title": "Align Center"},
{"id": "tool_alignleft", "title": "Align Left"},
{"id": "tool_alignmiddle", "title": "Align Middle"},
{"id": "tool_alignright", "title": "Align Right"},
{"id": "tool_aligntop", "title": "Align Top"},
{"id": "tool_bold", "title": "Bold Text"},
{"id": "tool_circle", "title": "Circle"},
{"id": "tool_clear", "textContent": "New Image"},
{"id": "tool_clone", "title": "Clone Element"},
{"id": "tool_clone_multi", "title": "Clone Elements"},
{"id": "tool_delete", "title": "Delete Element"},
{"id": "tool_delete_multi", "title": "Delete Selected Elements"},
{"id": "tool_docprops", "textContent": "Document Properties"},
{"id": "tool_docprops_cancel", "textContent": "Cancel"},
{"id": "tool_docprops_save", "textContent": "OK"},
{"id": "tool_ellipse", "title": "Ellipse"},
{"id": "tool_fhellipse", "title": "Free-Hand Ellipse"},
{"id": "tool_fhpath", "title": "Pencil Tool"},
{"id": "tool_fhrect", "title": "Free-Hand Rectangle"},
{"id": "tool_group", "title": "Group Elements"},
{"id": "tool_image", "title": "Image Tool"},
{"id": "tool_italic", "title": "Italic Text"},
{"id": "tool_line", "title": "Line Tool"},
{"id": "tool_move_bottom", "title": "Move to Bottom"},
{"id": "tool_move_top", "title": "Move to Top"},
{"id": "tool_node_clone", "title": "Clone Node"},
{"id": "tool_node_delete", "title": "Delete Node"},
{"id": "tool_node_link", "title": "Link Control Points"},
{"id": "tool_open", "textContent": "Open Image"},
{"id": "tool_path", "title": "Path Tool"},
{"id": "tool_rect", "title": "Rectangle"},
{"id": "tool_redo", "title": "Redo"},
{"id": "tool_reorient", "title": "Reorient path"},
{"id": "tool_save", "textContent": "Save Image"},
{"id": "tool_select", "title": "Select Tool"},
{"id": "tool_source", "title": "Edit Source"},
{"id": "tool_source_cancel", "textContent": "Cancel"},
{"id": "tool_source_save", "textContent": "Apply Changes"},
{"id": "tool_square", "title": "Square"},
{"id": "tool_text", "title": "Text Tool"},
{"id": "tool_topath", "title": "Convert to Path"},
{"id": "tool_undo", "title": "Undo"},
{"id": "tool_ungroup", "title": "Ungroup Elements"},
{"id": "tool_wireframe", "title": "Wireframe Mode"},
{"id": "tool_zoom", "title": "Zoom Tool"},
{"id": "zoom", "title": "Change zoom level"},
{"id": "zoomLabel", "textContent": "zoom:"},
{"id": "sidepanel_handle", "textContent": "L a y e r s", "title": "Drag left/right to resize side panel"},
{
 "js_strings": {
  "QerrorsRevertToSource": "There were parsing errors in your SVG source.\nRevert back to original SVG source?",
  "QignoreSourceChanges": "Ignore changes made to SVG source?",
  "QmoveElemsToLayer": "Move selected elements to layer '%s'?",
  "QwantToClear": "Do you want to clear the drawing?\nThis will also erase your undo history!",
  "cancel": "Cancel",
  "dupeLayerName": "There is already a layer named that!",
  "enterNewImgURL": "Enter the new image URL",
  "enterNewLayerName": "Please enter the new layer name",
  "enterUniqueLayerName": "Please enter a unique layer name",
  "featNotSupported": "Feature not supported",
  "invalidAttrValGiven": "Invalid value given",
  "key_backspace": "backspace",
  "key_del": "delete",
  "key_down": "down",
  "key_up": "up",
  "layer": "Layer",
  "layerHasThatName": "Layer already has that name",
  "noContentToFitTo": "No content to fit to",
  "ok": "OK",
  "pathCtrlPtTooltip": "Drag control point to adjust curve properties",
  "pathNodeTooltip": "Drag node to move it. Double-click node to change segment type"
 }
}
]<commit_msg>Make the tooltip description for id="stroke_width" in lang.en.js match the HTML. (All languages files will need to translate the new string").<commit_after>[
{"id": "align_relative_to", "title": "Align relative to ..."},
{"id": "angle", "title": "Change rotation angle"},
{"id": "angleLabel", "textContent": "angle:"},
{"id": "bkgnd_color", "title": "Change background color/opacity"},
{"id": "circle_cx", "title": "Change circle's cx coordinate"},
{"id": "circle_cy", "title": "Change circle's cy coordinate"},
{"id": "circle_r", "title": "Change circle's radius"},
{"id": "cornerRadiusLabel", "textContent": "Corner Radius:"},
{"id": "curve_segments", "textContent": "Curve"},
{"id": "ellipse_cx", "title": "Change ellipse's cx coordinate"},
{"id": "ellipse_cy", "title": "Change ellipse's cy coordinate"},
{"id": "ellipse_rx", "title": "Change ellipse's x radius"},
{"id": "ellipse_ry", "title": "Change ellipse's y radius"},
{"id": "fill_color", "title": "Change fill color"},
{"id": "fill_tool_bottom", "textContent": "fill:"},
{"id": "fitToContent", "textContent": "Fit to Content"},
{"id": "fit_to_all", "textContent": "Fit to all content"},
{"id": "fit_to_canvas", "textContent": "Fit to canvas"},
{"id": "fit_to_layer_content", "textContent": "Fit to layer content"},
{"id": "fit_to_sel", "textContent": "Fit to selection"},
{"id": "font_family", "title": "Change Font Family"},
{"id": "font_size", "title": "Change Font Size"},
{"id": "group_opacity", "title": "Change selected item opacity"},
{"id": "icon_large", "textContent": "Large"},
{"id": "icon_medium", "textContent": "Medium"},
{"id": "icon_small", "textContent": "Small"},
{"id": "icon_xlarge", "textContent": "Extra Large"},
{"id": "iheightLabel", "textContent": "height:"},
{"id": "image_height", "title": "Change image height"},
{"id": "image_opt_embed", "textContent": "Embed data (local files)"},
{"id": "image_opt_ref", "textContent": "Use file reference"},
{"id": "image_url", "title": "Change URL"},
{"id": "image_width", "title": "Change image width"},
{"id": "includedImages", "textContent": "Included Images"},
{"id": "iwidthLabel", "textContent": "width:"},
{"id": "largest_object", "textContent": "largest object"},
{"id": "layer_delete", "title": "Delete Layer"},
{"id": "layer_down", "title": "Move Layer Down"},
{"id": "layer_new", "title": "New Layer"},
{"id": "layer_rename", "title": "Rename Layer"},
{"id": "layer_up", "title": "Move Layer Up"},
{"id": "layersLabel", "textContent": "Layers:"},
{"id": "line_x1", "title": "Change line's starting x coordinate"},
{"id": "line_x2", "title": "Change line's ending x coordinate"},
{"id": "line_y1", "title": "Change line's starting y coordinate"},
{"id": "line_y2", "title": "Change line's ending y coordinate"},
{"id": "page", "textContent": "page"},
{"id": "palette", "title": "Click to change fill color, shift-click to change stroke color"},
{"id": "path_node_x", "title": "Change node's x coordinate"},
{"id": "path_node_y", "title": "Change node's y coordinate"},
{"id": "rect_height", "title": "Change rectangle height"},
{"id": "rect_rx", "title": "Change Rectangle Corner Radius"},
{"id": "rect_width", "title": "Change rectangle width"},
{"id": "relativeToLabel", "textContent": "relative to:"},
{"id": "rheightLabel", "textContent": "height:"},
{"id": "rwidthLabel", "textContent": "width:"},
{"id": "seg_type", "title": "Change Segment type"},
{"id": "selLayerLabel", "textContent": "Move elements to:"},
{"id": "selLayerNames", "title": "Move selected elements to a different layer"},
{"id": "selectedPredefined", "textContent": "Select predefined:"},
{"id": "selected_objects", "textContent": "selected objects"},
{"id": "selected_x", "title": "Change X coordinate"},
{"id": "selected_y", "title": "Change Y coordinate"},
{"id": "smallest_object", "textContent": "smallest object"},
{"id": "straight_segments", "textContent": "Straight"},
{"id": "stroke_color", "title": "Change stroke color"},
{"id": "stroke_style", "title": "Change stroke dash style"},
{"id": "stroke_tool_bottom", "textContent": "stroke:"},
{"id": "stroke_width", "title": "Change stroke width by 1, shift-click to change by 0.1"},
{"id": "svginfo_bg_note", "textContent": "Note: Background will not be saved with image."},
{"id": "svginfo_change_background", "textContent": "Editor Background"},
{"id": "svginfo_dim", "textContent": "Canvas Dimensions"},
{"id": "svginfo_editor_prefs", "textContent": "Editor Preferences"},
{"id": "svginfo_height", "textContent": "Height:"},
{"id": "svginfo_icons", "textContent": "Icon size"},
{"id": "svginfo_image_props", "textContent": "Image Properties"},
{"id": "svginfo_lang", "textContent": "Language"},
{"id": "svginfo_title", "textContent": "Title"},
{"id": "svginfo_width", "textContent": "Width:"},
{"id": "text", "title": "Change text contents"},
{"id": "tool_alignbottom", "title": "Align Bottom"},
{"id": "tool_aligncenter", "title": "Align Center"},
{"id": "tool_alignleft", "title": "Align Left"},
{"id": "tool_alignmiddle", "title": "Align Middle"},
{"id": "tool_alignright", "title": "Align Right"},
{"id": "tool_aligntop", "title": "Align Top"},
{"id": "tool_bold", "title": "Bold Text"},
{"id": "tool_circle", "title": "Circle"},
{"id": "tool_clear", "textContent": "New Image"},
{"id": "tool_clone", "title": "Clone Element"},
{"id": "tool_clone_multi", "title": "Clone Elements"},
{"id": "tool_delete", "title": "Delete Element"},
{"id": "tool_delete_multi", "title": "Delete Selected Elements"},
{"id": "tool_docprops", "textContent": "Document Properties"},
{"id": "tool_docprops_cancel", "textContent": "Cancel"},
{"id": "tool_docprops_save", "textContent": "OK"},
{"id": "tool_ellipse", "title": "Ellipse"},
{"id": "tool_fhellipse", "title": "Free-Hand Ellipse"},
{"id": "tool_fhpath", "title": "Pencil Tool"},
{"id": "tool_fhrect", "title": "Free-Hand Rectangle"},
{"id": "tool_group", "title": "Group Elements"},
{"id": "tool_image", "title": "Image Tool"},
{"id": "tool_italic", "title": "Italic Text"},
{"id": "tool_line", "title": "Line Tool"},
{"id": "tool_move_bottom", "title": "Move to Bottom"},
{"id": "tool_move_top", "title": "Move to Top"},
{"id": "tool_node_clone", "title": "Clone Node"},
{"id": "tool_node_delete", "title": "Delete Node"},
{"id": "tool_node_link", "title": "Link Control Points"},
{"id": "tool_open", "textContent": "Open Image"},
{"id": "tool_path", "title": "Path Tool"},
{"id": "tool_rect", "title": "Rectangle"},
{"id": "tool_redo", "title": "Redo"},
{"id": "tool_reorient", "title": "Reorient path"},
{"id": "tool_save", "textContent": "Save Image"},
{"id": "tool_select", "title": "Select Tool"},
{"id": "tool_source", "title": "Edit Source"},
{"id": "tool_source_cancel", "textContent": "Cancel"},
{"id": "tool_source_save", "textContent": "Apply Changes"},
{"id": "tool_square", "title": "Square"},
{"id": "tool_text", "title": "Text Tool"},
{"id": "tool_topath", "title": "Convert to Path"},
{"id": "tool_undo", "title": "Undo"},
{"id": "tool_ungroup", "title": "Ungroup Elements"},
{"id": "tool_wireframe", "title": "Wireframe Mode"},
{"id": "tool_zoom", "title": "Zoom Tool"},
{"id": "zoom", "title": "Change zoom level"},
{"id": "zoomLabel", "textContent": "zoom:"},
{"id": "sidepanel_handle", "textContent": "L a y e r s", "title": "Drag left/right to resize side panel"},
{
 "js_strings": {
  "QerrorsRevertToSource": "There were parsing errors in your SVG source.\nRevert back to original SVG source?",
  "QignoreSourceChanges": "Ignore changes made to SVG source?",
  "QmoveElemsToLayer": "Move selected elements to layer '%s'?",
  "QwantToClear": "Do you want to clear the drawing?\nThis will also erase your undo history!",
  "cancel": "Cancel",
  "dupeLayerName": "There is already a layer named that!",
  "enterNewImgURL": "Enter the new image URL",
  "enterNewLayerName": "Please enter the new layer name",
  "enterUniqueLayerName": "Please enter a unique layer name",
  "featNotSupported": "Feature not supported",
  "invalidAttrValGiven": "Invalid value given",
  "key_backspace": "backspace",
  "key_del": "delete",
  "key_down": "down",
  "key_up": "up",
  "layer": "Layer",
  "layerHasThatName": "Layer already has that name",
  "noContentToFitTo": "No content to fit to",
  "ok": "OK",
  "pathCtrlPtTooltip": "Drag control point to adjust curve properties",
  "pathNodeTooltip": "Drag node to move it. Double-click node to change segment type"
 }
}
]<|endoftext|>


<commit_before>// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
(function(cloudStack) {
  cloudStack.sections.regions = {
    title: 'label.menu.regions',
    id: 'regions',
    sectionSelect: {
      label: 'label.select-view',
      preFilter: function() { return ['regions']; }
    },
    regionSelector: {
      dataProvider: function(args) {
        $.ajax({
          url: createURL('listRegions&listAll=true'),
          success: function(json) {
            var regions = json.listregionsresponse.region;

            args.response.success({
              data: regions ? regions : [
                { id: -1, name: _l('label.no.data') }
              ]
            });
          }
        });
      }
    },
    sections: {
      regions: {
        id: 'regions',
        type: 'select',
        title: 'label.menu.regions',
        listView: {
          section: 'regions',
          id: 'regions',
          label: 'label.menu.regions',
          fields: {
            name: { label: 'label.name' },
            id: { label: 'ID' },
            endpoint: { label: 'label.endpoint' }
          },
          actions: {
            add: {
              label: 'label.add.region',
              messages: {
                notification: function() { return 'label.add.region'; }
              },
              createForm: {
                title: 'label.add.region',
                desc: 'message.add.region',
                fields: {
                  id: { label: 'label.id', validation: { required: true } },
                  name: { label: 'label.name', validation: { required: true } },
                  endpoint: { label: 'label.endpoint', validation: { required: true } }
                }
              },
              action: function(args) {
                var data = {
                  id: args.data.id,
                  name: args.data.name,
                  endpoint: args.data.endpoint
                };

                $.ajax({
                  url: createURL('addRegion'),
                  data: data,
                  success: function(json) {
                    var item = json.addregionresponse.region;
                    args.response.success({data: item});
                    $(window).trigger('cloudStack.refreshRegions');
                  },
                  error: function(json) {
                    args.response.error(parseXMLHttpResponse(json));
                  }
                });
              },
              notification: {
                poll: function(args) {
                  args.complete();
                }
              }
            }
          },
          dataProvider: function(args) {
            $.ajax({
              url: createURL('listRegions&listAll=true'),
              success: function(json) {
                var regions = json.listregionsresponse.region

                args.response.success({
                  data: regions ? regions : []
                });
              },
              error: function(json) {
                args.response.error(parseXMLHttpResponse(json));
              }
            });
          },
          detailView: {
            name: 'Region details',
            viewAll: { path: 'regions.GSLB', label: 'GSLB' },
            actions: {
              edit: {
                label: 'label.edit.region',
                action: function(args) {
                  var data = {
                    id: args.context.regions[0].id,
                    name: args.data.name,
                    endpoint: args.data.endpoint
                  };

                  $.ajax({
                    url: createURL('updateRegion'),
                    data: data,
                    success: function(json) {
                      args.response.success();
                      $(window).trigger('cloudStack.refreshRegions');
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              },
              remove: {
                label: 'label.remove.region',
                messages: {
                  notification: function() { return 'label.remove.region'; },
                  confirm: function() { return 'message.remove.region'; }
                },
                preAction: function(args) {
                  var region = args.context.regions[0];

                  /* e.g.
                  region.endpoint	== "http://localhost:8080/client/"
                  document.location.href == "http://localhost:8080/client/#"
                  */
                  /*
                  if(document.location.href.indexOf(region.endpoint) != -1) {
                    cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
                    return false;
                  }
                  */
                  return true;
                },
                action: function(args) {
                  var region = args.context.regions[0];

                  $.ajax({
                    url: createURL('removeRegion'),
                    data: { id: region.id },
                    success: function(json) {
                      args.response.success();
                      $(window).trigger('cloudStack.refreshRegions');
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              }
            },
            tabs: {
              details: {
                title: 'label.details',
                fields: [
                  {
                    id: { label: 'label.id' }
                  },
                  {
                    name: { label: 'label.name', isEditable: true },
                    endpoint: { label: 'label.endpoint', isEditable: true }
                  }
                ],
                dataProvider: function(args) {
                  $.ajax({
                    url: createURL('listRegions&listAll=true'),
                    data: { id: args.context.regions[0].id },
                    success: function(json) {
                      var region = json.listregionsresponse.region

                      args.response.success({
                        data: region ? region[0] : {}
                      });
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              }
            }
          }
        }
      },
      GSLB: {
        id: 'GSLB',
        type: 'select',
        title: 'GSLB',
        listView: {
          id: 'GSLB',
          label: 'GSLB',
          fields: {
            name: { label: 'label.name' }
          },

					//???
					actions: {
            add: {
              label: 'Add GSLB',

              messages: {
                confirm: function(args) {
                  return 'Add GSLB';
                },
                notification: function(args) {
                  return 'Add GSLB';
                }
              },

              createForm: {
                title: 'Add GSLB',
                fields: {
                  name: {
                    label: 'label.name',
                    validation: { required: true }
                  },
                  description: {
                    label: 'label.description'
                  },
									domainid: {
										label: 'Domain',
										select: function(args) {
											if(isAdmin() || isDomainAdmin()) {
												$.ajax({
													url: createURL('listDomains'),
													data: {
														listAll: true,
														details: 'min'
													},
													success: function(json) {
														var array1 = [{id: '', description: ''}];
														var domains = json.listdomainsresponse.domain;
														if(domains != null && domains.length > 0) {
															for(var i = 0; i < domains.length; i++) {
																array1.push({id: domains[i].id, description: domains[i].path});
															}
														}
														args.response.success({
															data: array1
														});
													}
												});
											}
											else {
												args.response.success({
													data: null
												});
											}
										},
										isHidden: function(args) {
											if(isAdmin() || isDomainAdmin())
												return false;
											else
												return true;
										}
									},
									account: {
										label: 'Account',
										isHidden: function(args) {
											if(isAdmin() || isDomainAdmin())
												return false;
											else
												return true;
										}
									},
									gslblbmethod: {
										label: 'Algorithm',
										select: function(args) {
											var array1 = [{id: 'roundrobin', description: 'roundrobin'}, {id: 'leastconn', description: 'leastconn'}, {id: 'proximity', description: 'proximity'}];
											args.response.success({
												data: array1
											});
										}
									},
									gslbdomainname: {
                    label: 'Domain Name',
                    validation: { required: true }
                  },
									gslbservicetype: {
										label: 'Service Type',
										select: function(args) {
											var array1 = [{id: 'tcp', description: 'tcp'}, {id: 'udp', description: 'udp'}];
											args.response.success({
												data: array1
											});
										},
										validation: { required: true }
									}
                }
              },
              action: function(args) {
								var data = {
								  name: args.data.name,
									regionid: args.context.regions[0].id,
									gslblbmethod: args.data.gslblbmethod,
									gslbdomainname: args.data.gslbdomainname,
									gslbservicetype: args.data.gslbservicetype
								};
                if(args.data.description != null && args.data.description.length > 0)
								  $.extend(data, { description: args.data.description });
                if(args.data.domainid != null && args.data.domainid.length > 0)
								  $.extend(data, { domainid: args.data.domainid });
                if(args.data.account != null && args.data.account.length > 0)
								  $.extend(data, { account: args.data.account });

                $.ajax({
                  url: createURL('createGlobalLoadBalancerRule'),
                  data: data,
                  success: function(json) {
                    var item = json.creategloballoadbalancerruleresponse.globalloadbalancerrule;
                    args.response.success({data: item});
                  },
                  error: function(data) {
                    args.response.error(parseXMLHttpResponse(data));
                  }
                });
              },

              notification: {
                poll: function(args) {
                  args.complete();
                }
              }
            }
          },
					//???

          dataProvider: function(args) {
            if('regions' in args.context) {
              var data = {
                regionid: args.context.regions[0].id
              };
              $.ajax({
                url: createURL('listGlobalLoadBalancerRules'),
                data: data,
                success: function(json) {
                  var items = json.listgloballoadbalancerrulesresponse.globalloadbalancerrule;
                  args.response.success({
                    data: items
                  });
                }
              });
            }
            else {
              args.response.success({
                data: null
              });
            }
          }
        }
      }
    }
  };
})(cloudStack);
<commit_msg>CLOUDSTACK-1910: cloudstack UI - Regions menu - create GSLB - (1) pass gslbstickysessionmethodname parameter to createGlobalLoadBalancerRule API. (2) Take async Job response.<commit_after>// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
(function(cloudStack) {
  cloudStack.sections.regions = {
    title: 'label.menu.regions',
    id: 'regions',
    sectionSelect: {
      label: 'label.select-view',
      preFilter: function() { return ['regions']; }
    },
    regionSelector: {
      dataProvider: function(args) {
        $.ajax({
          url: createURL('listRegions&listAll=true'),
          success: function(json) {
            var regions = json.listregionsresponse.region;

            args.response.success({
              data: regions ? regions : [
                { id: -1, name: _l('label.no.data') }
              ]
            });
          }
        });
      }
    },
    sections: {
      regions: {
        id: 'regions',
        type: 'select',
        title: 'label.menu.regions',
        listView: {
          section: 'regions',
          id: 'regions',
          label: 'label.menu.regions',
          fields: {
            name: { label: 'label.name' },
            id: { label: 'ID' },
            endpoint: { label: 'label.endpoint' }
          },
          actions: {
            add: {
              label: 'label.add.region',
              messages: {
                notification: function() { return 'label.add.region'; }
              },
              createForm: {
                title: 'label.add.region',
                desc: 'message.add.region',
                fields: {
                  id: { label: 'label.id', validation: { required: true } },
                  name: { label: 'label.name', validation: { required: true } },
                  endpoint: { label: 'label.endpoint', validation: { required: true } }
                }
              },
              action: function(args) {
                var data = {
                  id: args.data.id,
                  name: args.data.name,
                  endpoint: args.data.endpoint
                };

                $.ajax({
                  url: createURL('addRegion'),
                  data: data,
                  success: function(json) {
                    var item = json.addregionresponse.region;
                    args.response.success({data: item});
                    $(window).trigger('cloudStack.refreshRegions');
                  },
                  error: function(json) {
                    args.response.error(parseXMLHttpResponse(json));
                  }
                });
              },
              notification: {
                poll: function(args) {
                  args.complete();
                }
              }
            }
          },
          dataProvider: function(args) {
            $.ajax({
              url: createURL('listRegions&listAll=true'),
              success: function(json) {
                var regions = json.listregionsresponse.region

                args.response.success({
                  data: regions ? regions : []
                });
              },
              error: function(json) {
                args.response.error(parseXMLHttpResponse(json));
              }
            });
          },
          detailView: {
            name: 'Region details',
            viewAll: { path: 'regions.GSLB', label: 'GSLB' },
            actions: {
              edit: {
                label: 'label.edit.region',
                action: function(args) {
                  var data = {
                    id: args.context.regions[0].id,
                    name: args.data.name,
                    endpoint: args.data.endpoint
                  };

                  $.ajax({
                    url: createURL('updateRegion'),
                    data: data,
                    success: function(json) {
                      args.response.success();
                      $(window).trigger('cloudStack.refreshRegions');
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              },
              remove: {
                label: 'label.remove.region',
                messages: {
                  notification: function() { return 'label.remove.region'; },
                  confirm: function() { return 'message.remove.region'; }
                },
                preAction: function(args) {
                  var region = args.context.regions[0];

                  /* e.g.
                  region.endpoint	== "http://localhost:8080/client/"
                  document.location.href == "http://localhost:8080/client/#"
                  */
                  /*
                  if(document.location.href.indexOf(region.endpoint) != -1) {
                    cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
                    return false;
                  }
                  */
                  return true;
                },
                action: function(args) {
                  var region = args.context.regions[0];

                  $.ajax({
                    url: createURL('removeRegion'),
                    data: { id: region.id },
                    success: function(json) {
                      args.response.success();
                      $(window).trigger('cloudStack.refreshRegions');
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              }
            },
            tabs: {
              details: {
                title: 'label.details',
                fields: [
                  {
                    id: { label: 'label.id' }
                  },
                  {
                    name: { label: 'label.name', isEditable: true },
                    endpoint: { label: 'label.endpoint', isEditable: true }
                  }
                ],
                dataProvider: function(args) {
                  $.ajax({
                    url: createURL('listRegions&listAll=true'),
                    data: { id: args.context.regions[0].id },
                    success: function(json) {
                      var region = json.listregionsresponse.region

                      args.response.success({
                        data: region ? region[0] : {}
                      });
                    },
                    error: function(json) {
                      args.response.error(parseXMLHttpResponse(json));
                    }
                  });
                }
              }
            }
          }
        }
      },
      GSLB: {
        id: 'GSLB',
        type: 'select',
        title: 'GSLB',
        listView: {
          id: 'GSLB',
          label: 'GSLB',
          fields: {
            name: { label: 'label.name' },
						gslbdomainname: { label: 'GSLB Domain Name' },
						gslblbmethod: { label: 'Algorithm' }
          },
					actions: {
            add: {
              label: 'Add GSLB',

              messages: {
                confirm: function(args) {
                  return 'Add GSLB';
                },
                notification: function(args) {
                  return 'Add GSLB';
                }
              },

              createForm: {
                title: 'Add GSLB',
                fields: {
                  name: {
                    label: 'label.name',
                    validation: { required: true }
                  },
                  description: {
                    label: 'label.description'
                  },
									/*
									domainid: {
										label: 'Domain',
										select: function(args) {
											if(isAdmin() || isDomainAdmin()) {
												$.ajax({
													url: createURL('listDomains'),
													data: {
														listAll: true,
														details: 'min'
													},
													success: function(json) {
														var array1 = [{id: '', description: ''}];
														var domains = json.listdomainsresponse.domain;
														if(domains != null && domains.length > 0) {
															for(var i = 0; i < domains.length; i++) {
																array1.push({id: domains[i].id, description: domains[i].path});
															}
														}
														args.response.success({
															data: array1
														});
													}
												});
											}
											else {
												args.response.success({
													data: null
												});
											}
										},
										isHidden: function(args) {
											if(isAdmin() || isDomainAdmin())
												return false;
											else
												return true;
										}
									},
									account: {
										label: 'Account',
										isHidden: function(args) {
											if(isAdmin() || isDomainAdmin())
												return false;
											else
												return true;
										}
									},
									*/
									gslblbmethod: {
										label: 'Algorithm',
										select: function(args) {
											var array1 = [{id: 'roundrobin', description: 'roundrobin'}, {id: 'leastconn', description: 'leastconn'}, {id: 'proximity', description: 'proximity'}];
											args.response.success({
												data: array1
											});
										}
									},
									gslbdomainname: {
                    label: 'GSLB Domain Name',
                    validation: { required: true }
                  },
									gslbservicetype: {
										label: 'Service Type',
										select: function(args) {
											var array1 = [{id: 'tcp', description: 'tcp'}, {id: 'udp', description: 'udp'}];
											args.response.success({
												data: array1
											});
										},
										validation: { required: true }
									}
                }
              },
              action: function(args) {
								var data = {
								  name: args.data.name,
									regionid: args.context.regions[0].id,
									gslblbmethod: args.data.gslblbmethod,
									gslbstickysessionmethodname: 'sourceip',
									gslbdomainname: args.data.gslbdomainname,
									gslbservicetype: args.data.gslbservicetype
								};
                if(args.data.description != null && args.data.description.length > 0)
								  $.extend(data, { description: args.data.description });
                /*
                if(args.data.domainid != null && args.data.domainid.length > 0)
								  $.extend(data, { domainid: args.data.domainid });
                if(args.data.account != null && args.data.account.length > 0)
								  $.extend(data, { account: args.data.account });
								*/
                $.ajax({
                  url: createURL('createGlobalLoadBalancerRule'),
                  data: data,
                  success: function(json) {
										var jid = json.creategloballoadbalancerruleresponse.jobid;
										args.response.success(
											{_custom:
											 {jobId: jid,
												getUpdatedItem: function(json) {
													return json.queryasyncjobresultresponse.jobresult.globalloadbalancerrule;
												}
											 }
											}
										);
                  }
                });
              },
              notification: {
                poll: function(args) {
                  poll: pollAsyncJobResult
                }
              }
            }
          },

          dataProvider: function(args) {
            if('regions' in args.context) {
              var data = {
                regionid: args.context.regions[0].id
              };
              $.ajax({
                url: createURL('listGlobalLoadBalancerRules'),
                data: data,
                success: function(json) {
                  var items = json.listgloballoadbalancerrulesresponse.globalloadbalancerrule;
                  args.response.success({
                    data: items
                  });
                }
              });
            }
            else {
              args.response.success({
                data: null
              });
            }
          }
        }
      }
    }
  };
})(cloudStack);
<|endoftext|>


<commit_before>svgEditor.readLang({
	lang: "fr",
	dir : "ltr",
	common: {
		"ok": "OK",
		"cancel": "Annuler",
		"key_backspace": "Suppr.",
		"key_del": "Retour Arr.",
		"key_down": "Bas",
		"key_up": "Haut",
		"more_opts": "Plus d'options",
		"url": "URL",
		"width": "Largeur",
		"height": "Hauteur"
	},
	misc: {
		"powered_by": "Powered by"
	},
	ui: {
		"toggle_stroke_tools": "Montrer/Cacher plus d'outils de Contour",
		"palette_info": "Cliquer pour changer la couleur de remplissage, Shift-Clic pour changer la couleur de contour",
		"zoom_level": "Changer le niveau de zoom",
		"panel_drag": "Tirer vers la gauche/droite pour redimentionner le panneau"
	},
	properties: {
		"id": "Identifier l'élément",
		"fill_color": "Changer la couleur de remplissage",
		"stroke_color": "Changer la couleur du contour",
		"stroke_style": "Changer le style du contour",
		"stroke_width": "Changer la largeur du contour de 1, Shift-Click pour changer la largeur de 0.1",
		"pos_x": "Changer la position horizontale X",
		"pos_y": "Changer la position verticale Y",
		"linecap_butt": "Terminaison : Sur le nœud",
		"linecap_round": "Terminaison : Arrondie",
		"linecap_square": "Terminaison : Carrée",
		"linejoin_bevel": "Raccord : Biseauté",
		"linejoin_miter": "Raccord : Droit",
		"linejoin_round": "Raccord : Arrondi",
		"angle": "Changer l'angle de rotation",
		"blur": "Changer la valeur du flou gaussien",
		"opacity": "Changer l'opacité de l'élément sélectionné",
		"circle_cx": "Changer la position horizontale cx du cercle",
		"circle_cy": "Changer la position verticale cy du cercle",
		"circle_r": "Changer le rayon du cercle",
		"ellipse_cx": "Changer la position horizontale cx de l'ellipse",
		"ellipse_cy": "Changer la position verticale cy de l'ellipse",
		"ellipse_rx": "Changer le rayon horizontal x de l'ellipse",
		"ellipse_ry": "Changer le rayon vertical y de l'ellipse",
		"line_x1": "Changer la position horizontale x de début de la ligne",
		"line_x2": "Changer la position horizontale x de fin de la ligne",
		"line_y1": "Changer la position verticale y de début de la ligne",
		"line_y2": "Changer la position verticale y de fin de la ligne",
		"rect_height": "Changer la hauteur du rectangle",
		"rect_width": "Changer la largeur du rectangle",
		"corner_radius": "Changer le rayon des coins du rectangle",
		"image_width": "Changer la largeur de l'image",
		"image_height": "Changer la hauteur de l'image",
		"image_url": "Modifier l'URL",
		"node_x": "Changer la positon horizontale x du nœud",
		"node_y": "Changer la position verticale y du nœud",
		"seg_type": "Changer le type du Segment",
		"straight_segments": "Droit",
		"curve_segments": "Courbe",
		"text_contents": "Changer le contenu du texte",
		"font_family": "Changer la famille de police",
		"font_size": "Changer la taille de la police",
		"bold": "Texte en gras",
		"italic": "Texte en italique"
	},
	tools: {
		"main_menu": "Menu principal",
		"bkgnd_color_opac": "Changer la couleur d'arrière-plan / l'opacité",
		"connector_no_arrow": "Sans flèches",
		"fitToContent": "Ajuster au contenu",
		"fit_to_all": "Ajuster au contenu de tous les calques",
		"fit_to_canvas": "Ajuster au canevas",
		"fit_to_layer_content": "Ajuster au contenu du calque",
		"fit_to_sel": "Ajuster à la sélection",
		"align_relative_to": "Aligner par rapport à ...",
		"relativeTo": "Relativement à:",
		"Page": "Page",
		"largest_object": "Plus gros objet",
		"selected_objects": "Objets sélectionnés",
		"smallest_object": "Plus petit objet",
		"new_doc": "Nouvelle image",
		"open_doc": "Ouvrir une image",
		"export_png": "Exporter au format PNG",
		"save_doc": "Enregistrer l'image",
		"import_doc": "Importer un objet SVG",
		"align_to_page": "Aligner l'élément relativement à la Page",
		"align_bottom": "Aligner le bas des objets",
		"align_center": "Centrer verticalement",
		"align_left": "Aligner les côtés gauches",
		"align_middle": "Centrer horizontalement",
		"align_right": "Aligner les côtés droits",
		"align_top": "Aligner le haut des objets",
		"mode_select": "Outil de sélection",
		"mode_fhpath": "Crayon à main levée",
		"mode_line": "Tracer des lignes",
		"mode_connect": "Connecter deux objets",
		"mode_rect": "Outil rectangle",
		"mode_square": "Outils carré",
		"mode_fhrect": "Rectangle main levée",
		"mode_ellipse": "Ellipse",
		"mode_circle": "Cercle",
		"mode_fhellipse": "Ellipse main levée",
		"mode_path": "Outil Chemin",
		"mode_shapelib": "Bibliothèque d'images",
		"mode_text": "Outil Texte",
		"mode_image": "Outil Image",
		"mode_zoom": "Zoom",
		"mode_eyedropper": "Outil Pipette",
		"no_embed": "NOTE: Cette image ne peut être incorporée en tant que données. Le contenu affiché sera celui de l'image située à cette adresse",
		"undo": "Annuler l'action",
		"redo": "Refaire l'action",
		"tool_source": "Modifier la source",
		"wireframe_mode": "Mode Fil de Fer",
		"toggle_grid": "Montrer/cacher la grille",
		"clone": "Cloner élement(s)",
		"del": "Supprimer élement(s)",
		"group": "Grouper les éléments",
		"make_link": "Créer (hyper)lien",
		"set_link_url": "Set link URL (leave empty to remove)",
		"to_path": "Convertir en chemin",
		"reorient_path": "Réorienter le chemin",
		"ungroup": "Dégrouper les éléments",
		"docprops": "Propriétés du document",
		"imagelib": "Bibliothèque d'images",
		"move_bottom": "Déplacer vers le bas",
		"move_top": "Déplacer vers le haut",
		"node_clone": "Cloner le nœud",
		"node_delete": "Supprimer le nœud",
		"node_link": "Rendre les points de contrôle solidaires",
		"add_subpath": "Ajouter un sous-chemin",
		"openclose_path": "Ouvrir/Fermer sous-chemin",
		"source_save": "Appliquer Modifications",
		"cut": "Couper",
		"copy": "Copier",
		"paste": "Coller",
		"paste_in_place": "Coller sur place",
		"Retour Arr.": "Supprimer",
		"move_front": "Placer au premier plan",
		"move_up": "Placer plus près",
		"move_down": "Placer au dernier plan",
		"move_back": "Placer plus au fond"
	},
	layers: {
		"layer":"Calque",
		"layers": "Calques",
		"del": "Supprimer le calque",
		"move_down": "Descendre le calque",
		"new": "Nouveau calque",
		"rename": "Renommer le calque",
		"move_up": "Monter le calque",
		"dupe": "Dupliquer calque",
		"merge_down": "Fusionner vers le bas",
		"merge_all": "Tout fusionner",
		"move_elems_to": "Déplacer éléments vers:",
		"move_selected": "Déplacer les éléments sélectionnés vers un autre calque"
	},
	config: {
		"image_props": "Propriétés de l'Image",
		"doc_title": "Titre",
		"doc_dims": "Dimensions du canevas",
		"included_images": "Images incorporées",
		"image_opt_embed": "Incorporer les images en tant que données (fichiers locaux)",
		"image_opt_ref": "Utiliser la référence des images ",
		"editor_prefs": "Préférences de l'Éditeur",
		"icon_size": "Taille des icônes",
		"language": "Langue",
		"background": "Toile de fond de l'Éditeur",
		"editor_img_url": "Image URL",
		"editor_bg_note": "Note: La toile de fond n'est pas sauvegardée avec l'image.",
		"icon_large": "Grande",
		"icon_medium": "Moyenne",
		"icon_small": "Petite",
		"icon_xlarge": "Super-Grande",
		"select_predefined": "Sélectionner prédéfinis:",
		"units_and_rulers": "Unités & Règles",
		"show_rulers": "Afficher les règles",
		"base_unit": "Unité de mesure:",
		"grid": "Grille",
		"snapping_onoff": "Snapping on/off",
		"snapping_stepsize": "Snapping Step-Size:",
		"grid_color": "Couleur de la grille"
	},
	shape_cats: {
		"basic": "Basique",
		"object": "Objets",
		"symbol": "Symboles",
		"arrow": "Flêches",
		"flowchart": "Diagramme de flux",
		"animal": "Animaux",
		"game": "Cartes & Echecs",
		"dialog_balloon": "Bulles de dialogue",
		"electronics": "Electronique",
		"math": "Mathématiques",
		"music": "Musique",
		"misc": "Divers",
		"raphael_1": "raphaeljs.com ensemble 1",
		"raphael_2": "raphaeljs.com ensemble 2"
	},
	imagelib: {
		"select_lib": "Select an image library",
		"show_list": "Show library list",
		"import_single": "Import single",
		"import_multi": "Import multiple",
		"open": "Open as new document"
	},
	notification: {
		"invalidAttrValGiven":"Valeur fournie invalide",
		"noContentToFitTo":"Il n'y a pas de contenu auquel ajuster",
		"dupeLayerName":"Il existe déjà un calque de ce nom !",
		"enterUniqueLayerName":"Veuillez entrer un nom (unique) pour le calque",
		"enterNewLayerName":"Veuillez entrer le nouveau nom du calque",
		"layerHasThatName":"Le calque porte déjà ce nom",
		"QmoveElemsToLayer":"Déplacer les éléments sélectionnés vers le calque '%s' ?",
		"QwantToClear":"Voulez-vous effacer le dessin ?\nL'historique de vos actions sera également effacé !",
		"QwantToOpen":"Do you want to open a new file?\nThis will also erase your undo history!",
		"QerrorsRevertToSource":"Il y a des erreurs d'analyse syntaxique dans votre code-source SVG.\nRevenir au code-source SVG avant modifications ?",
		"QignoreSourceChanges":"Ignorer les modifications faites à la source SVG ?",
		"featNotSupported":"Fonction non supportée",
		"enterNewImgURL":"Entrer la nouvelle URL de l'image",
		"defsFailOnSave": "NOTE : À cause d'un bug de votre navigateur, cette image peut être affichée de façon incorrecte (dégradés ou éléments manquants). Cependant, une fois enregistrée, elle sera correcte.",
		"loadingImage":"Chargement de l'image, veuillez patienter...",
		"saveFromBrowser": "Selectionner \"Enregistrer sous...\" dans votre navigateur pour sauvegarder l'image en tant que fichier %s.",
		"noteTheseIssues": "Notez également les problèmes suivants : ",
		"unsavedChanges": "Il y a des changements non sauvegardés.",
		"enterNewLinkURL": "Entrez la nouvel hyperlien URL",
		"errorLoadingSVG": "Erreur: Impossible de charger le document SVG",
		"URLloadFail": "Impossible de charger l'URL",
		"retrieving": "Récupère \"%s\"..."
	}
});
<commit_msg>Modification  des lignes 17,107,123, 124,125,204,205,206,207<commit_after>svgEditor.readLang({
	lang: "fr",
	dir : "ltr",
	common: {
		"ok": "OK",
		"cancel": "Annuler",
		"key_backspace": "Suppr.",
		"key_del": "Retour Arr.",
		"key_down": "Bas",
		"key_up": "Haut",
		"more_opts": "Plus d'options",
		"url": "URL",
		"width": "Largeur",
		"height": "Hauteur"
	},
	misc: {
		"powered_by": "Propulsé par"
	},
	ui: {
		"toggle_stroke_tools": "Montrer/Cacher plus d'outils de Contour",
		"palette_info": "Cliquer pour changer la couleur de remplissage, Maj-Clic pour changer la couleur de contour",
		"zoom_level": "Changer le niveau de zoom",
		"panel_drag": "Tirer vers la gauche/droite pour redimentionner le panneau"
	},
	properties: {
		"id": "Identifier l'élément",
		"fill_color": "Changer la couleur de remplissage",
		"stroke_color": "Changer la couleur du contour",
		"stroke_style": "Changer le style du contour",
		"stroke_width": "Changer la largeur du contour de 1, Shift-Click pour changer la largeur de 0.1",
		"pos_x": "Changer la position horizontale X",
		"pos_y": "Changer la position verticale Y",
		"linecap_butt": "Terminaison : Sur le nœud",
		"linecap_round": "Terminaison : Arrondie",
		"linecap_square": "Terminaison : Carrée",
		"linejoin_bevel": "Raccord : Biseauté",
		"linejoin_miter": "Raccord : Droit",
		"linejoin_round": "Raccord : Arrondi",
		"angle": "Changer l'angle de rotation",
		"blur": "Changer la valeur du flou gaussien",
		"opacity": "Changer l'opacité de l'élément sélectionné",
		"circle_cx": "Changer la position horizontale cx du cercle",
		"circle_cy": "Changer la position verticale cy du cercle",
		"circle_r": "Changer le rayon du cercle",
		"ellipse_cx": "Changer la position horizontale cx de l'ellipse",
		"ellipse_cy": "Changer la position verticale cy de l'ellipse",
		"ellipse_rx": "Changer le rayon horizontal x de l'ellipse",
		"ellipse_ry": "Changer le rayon vertical y de l'ellipse",
		"line_x1": "Changer la position horizontale x de début de la ligne",
		"line_x2": "Changer la position horizontale x de fin de la ligne",
		"line_y1": "Changer la position verticale y de début de la ligne",
		"line_y2": "Changer la position verticale y de fin de la ligne",
		"rect_height": "Changer la hauteur du rectangle",
		"rect_width": "Changer la largeur du rectangle",
		"corner_radius": "Changer le rayon des coins du rectangle",
		"image_width": "Changer la largeur de l'image",
		"image_height": "Changer la hauteur de l'image",
		"image_url": "Modifier l'URL",
		"node_x": "Changer la positon horizontale x du nœud",
		"node_y": "Changer la position verticale y du nœud",
		"seg_type": "Changer le type du Segment",
		"straight_segments": "Droit",
		"curve_segments": "Courbe",
		"text_contents": "Changer le contenu du texte",
		"font_family": "Changer la famille de police",
		"font_size": "Changer la taille de la police",
		"bold": "Texte en gras",
		"italic": "Texte en italique"
	},
	tools: {
		"main_menu": "Menu principal",
		"bkgnd_color_opac": "Changer la couleur d'arrière-plan / l'opacité",
		"connector_no_arrow": "Sans flèches",
		"fitToContent": "Ajuster au contenu",
		"fit_to_all": "Ajuster au contenu de tous les calques",
		"fit_to_canvas": "Ajuster au canevas",
		"fit_to_layer_content": "Ajuster au contenu du calque",
		"fit_to_sel": "Ajuster à la sélection",
		"align_relative_to": "Aligner par rapport à ...",
		"relativeTo": "Relativement à:",
		"Page": "Page",
		"largest_object": "Plus gros objet",
		"selected_objects": "Objets sélectionnés",
		"smallest_object": "Plus petit objet",
		"new_doc": "Nouvelle image",
		"open_doc": "Ouvrir une image",
		"export_png": "Exporter au format PNG",
		"save_doc": "Enregistrer l'image",
		"import_doc": "Importer un objet SVG",
		"align_to_page": "Aligner l'élément relativement à la Page",
		"align_bottom": "Aligner le bas des objets",
		"align_center": "Centrer verticalement",
		"align_left": "Aligner les côtés gauches",
		"align_middle": "Centrer horizontalement",
		"align_right": "Aligner les côtés droits",
		"align_top": "Aligner le haut des objets",
		"mode_select": "Outil de sélection",
		"mode_fhpath": "Crayon à main levée",
		"mode_line": "Tracer des lignes",
		"mode_connect": "Connecter deux objets",
		"mode_rect": "Outil rectangle",
		"mode_square": "Outils carré",
		"mode_fhrect": "Rectangle main levée",
		"mode_ellipse": "Ellipse",
		"mode_circle": "Cercle",
		"mode_fhellipse": "Ellipse main levée",
		"mode_path": "Dessiner un tracé",
		"mode_shapelib": "Bibliothèque d'images",
		"mode_text": "Outil Texte",
		"mode_image": "Outil Image",
		"mode_zoom": "Zoom",
		"mode_eyedropper": "Outil Pipette",
		"no_embed": "NOTE: Cette image ne peut être incorporée en tant que données. Le contenu affiché sera celui de l'image située à cette adresse",
		"undo": "Annuler l'action",
		"redo": "Refaire l'action",
		"tool_source": "Modifier la source",
		"wireframe_mode": "Mode Fil de Fer",
		"toggle_grid": "Montrer/cacher la grille",
		"clone": "Cloner élement(s)",
		"del": "Supprimer élement(s)",
		"group": "Grouper les éléments",
		"make_link": "Créer (hyper)lien",
		"set_link_url": "Définir le lien URL (laisser vide pour supprimer)",
		"to_path": "Convertir en tracé",
		"reorient_path": "Réorienter le tracé",
		"ungroup": "Dégrouper les éléments",
		"docprops": "Propriétés du document",
		"imagelib": "Bibliothèque d'images",
		"move_bottom": "Déplacer vers le bas",
		"move_top": "Déplacer vers le haut",
		"node_clone": "Cloner le nœud",
		"node_delete": "Supprimer le nœud",
		"node_link": "Rendre les points de contrôle solidaires",
		"add_subpath": "Ajouter un tracé secondaire",
		"openclose_path": "Ouvrir/Fermer sous-chemin",
		"source_save": "Appliquer Modifications",
		"cut": "Couper",
		"copy": "Copier",
		"paste": "Coller",
		"paste_in_place": "Coller sur place",
		"Retour Arr.": "Supprimer",
		"move_front": "Placer au premier plan",
		"move_up": "Placer plus près",
		"move_down": "Placer au dernier plan",
		"move_back": "Placer plus au fond"
	},
	layers: {
		"layer":"Calque",
		"layers": "Calques",
		"del": "Supprimer le calque",
		"move_down": "Descendre le calque",
		"new": "Nouveau calque",
		"rename": "Renommer le calque",
		"move_up": "Monter le calque",
		"dupe": "Dupliquer calque",
		"merge_down": "Fusionner vers le bas",
		"merge_all": "Tout fusionner",
		"move_elems_to": "Déplacer éléments vers:",
		"move_selected": "Déplacer les éléments sélectionnés vers un autre calque"
	},
	config: {
		"image_props": "Propriétés de l'Image",
		"doc_title": "Titre",
		"doc_dims": "Dimensions du canevas",
		"included_images": "Images incorporées",
		"image_opt_embed": "Incorporer les images en tant que données (fichiers locaux)",
		"image_opt_ref": "Utiliser la référence des images ",
		"editor_prefs": "Préférences de l'Éditeur",
		"icon_size": "Taille des icônes",
		"language": "Langue",
		"background": "Toile de fond de l'Éditeur",
		"editor_img_url": "Image URL",
		"editor_bg_note": "Note: La toile de fond n'est pas sauvegardée avec l'image.",
		"icon_large": "Grande",
		"icon_medium": "Moyenne",
		"icon_small": "Petite",
		"icon_xlarge": "Super-Grande",
		"select_predefined": "Sélectionner prédéfinis:",
		"units_and_rulers": "Unités & Règles",
		"show_rulers": "Afficher les règles",
		"base_unit": "Unité de mesure:",
		"grid": "Grille",
		"snapping_onoff": "Épingler oui/non",
		"snapping_stepsize": "Snapping Step-Size:",
		"grid_color": "Couleur de la grille"
	},
	shape_cats: {
		"basic": "Basique",
		"object": "Objets",
		"symbol": "Symboles",
		"arrow": "Flèches",
		"flowchart": "Diagramme de flux",
		"animal": "Animaux",
		"game": "Cartes & Echecs",
		"dialog_balloon": "Bulles de dialogue",
		"electronics": "Electronique",
		"math": "Mathématiques",
		"music": "Musique",
		"misc": "Divers",
		"raphael_1": "raphaeljs.com ensemble 1",
		"raphael_2": "raphaeljs.com ensemble 2"
	},
	imagelib: {
		"select_lib": "Choisir une image dans la bibliothèque",
		"show_list": "Liste de la bibliotèque d'images",
		"import_single": "Importation simple",
		"import_multi": "Importation multiple",
		"open": "Ouvrir en tant que nouveau document"
	},
	notification: {
		"invalidAttrValGiven":"Valeur fournie invalide",
		"noContentToFitTo":"Il n'y a pas de contenu auquel ajuster",
		"dupeLayerName":"Il existe déjà un calque de ce nom !",
		"enterUniqueLayerName":"Veuillez entrer un nom (unique) pour le calque",
		"enterNewLayerName":"Veuillez entrer le nouveau nom du calque",
		"layerHasThatName":"Le calque porte déjà ce nom",
		"QmoveElemsToLayer":"Déplacer les éléments sélectionnés vers le calque '%s' ?",
		"QwantToClear":"Voulez-vous effacer le dessin ?\nL'historique de vos actions sera également effacé !",
		"QwantToOpen":"Voulez-vous ouvrir un nouveau document?\nVous perderez l'historique de vos modifications!",
		"QerrorsRevertToSource":"Il y a des erreurs d'analyse syntaxique dans votre code-source SVG.\nRevenir au code-source SVG avant modifications ?",
		"QignoreSourceChanges":"Ignorer les modifications faites à la source SVG ?",
		"featNotSupported":"Fonction non supportée",
		"enterNewImgURL":"Entrer la nouvelle URL de l'image",
		"defsFailOnSave": "NOTE : À cause d'un bug de votre navigateur, cette image peut être affichée de façon incorrecte (dégradés ou éléments manquants). Cependant, une fois enregistrée, elle sera correcte.",
		"loadingImage":"Chargement de l'image, veuillez patienter...",
		"saveFromBrowser": "Selectionner \"Enregistrer sous...\" dans votre navigateur pour sauvegarder l'image en tant que fichier %s.",
		"noteTheseIssues": "Notez également les problèmes suivants : ",
		"unsavedChanges": "Il y a des changements non sauvegardés.",
		"enterNewLinkURL": "Entrez la nouvel hyperlien URL",
		"errorLoadingSVG": "Erreur: Impossible de charger le document SVG",
		"URLloadFail": "Impossible de charger l'URL",
		"retrieving": "Récupère \"%s\"..."
	}
});
<|endoftext|>


<commit_before>import React, {PropTypes} from 'react';
import LayoutRenderer from '../components/LayoutRenderer';
import TimeRangeDropdown from '../../shared/components/TimeRangeDropdown';
import timeRanges from 'hson!../../shared/data/timeRanges.hson';
import {getMappings, getAppsForHosts, fetchLayouts} from '../apis';

export const HostPage = React.createClass({
  propTypes: {
    source: PropTypes.shape({
      links: PropTypes.shape({
        proxy: PropTypes.string.isRequired,
      }).isRequired,
    }).isRequired,
    params: PropTypes.shape({
      hostID: PropTypes.string.isRequired,
    }).isRequired,
  },

  getInitialState() {
    const fifteenMinutesIndex = 1;

    return {
      layouts: [],
      timeRange: timeRanges[fifteenMinutesIndex],
    };
  },

  componentDidMount() {
    const hosts = {[this.props.params.hostID]: {name: this.props.params.hostID}};
    let apps = null;
    let host = null;
    let layouts = null;

    fetchLayouts().then((ls) => {
      layouts = ls.data.layouts;
    });

    getMappings().then(({data: {mappings}}) => {
      apps = mappings.concat([{name: 'docker'}, {name: 'influxdb'}]).map((m) => m.name);
    }).then(() => {
      getAppsForHosts(this.props.source.links.proxy, hosts, apps).then((newHosts) => {
        host = newHosts[this.props.params.hostID];
        const filteredLayouts = layouts.filter((layout) => {
          return host.apps.includes(layout.app);
        });
        this.setState({layouts: filteredLayouts});
      });
    });
  },

  handleChooseTimeRange({lower}) {
    const timeRange = timeRanges.find((range) => range.queryValue === lower);
    this.setState({timeRange});
  },

  renderLayout(layout) {
    const autoRefreshMs = 15000;
    const {timeRange} = this.state;
    const source = this.props.source.links.proxy;

    layout.cells.forEach((cell) => {
      cell.queries.forEach((q) => {
        q.text = q.query;
        q.database = q.db;
      });
    });

    return (
      <LayoutRenderer
        timeRange={timeRange.queryValue}
        cells={layout.cells}
        autoRefreshMs={autoRefreshMs}
        source={source}
        host={this.props.params.hostID}
      />
    );
  },

  render() {
    const hostID = this.props.params.hostID;
    const {layouts, timeRange} = this.state;

    return (

{hostID}

Uptime: 2d 4h 33m

              <TimeRangeDropdown onChooseTimeRange={this.handleChooseTimeRange} selected={timeRange.inputValue} />

          {
            layouts.map((layout) => {
              return (

                  {this.renderLayout(layout)}

              );
            })
          }

    );
  },
});

export default HostPage;
<commit_msg>Updated usage of API in HostPage<commit_after>import React, {PropTypes} from 'react';
import LayoutRenderer from '../components/LayoutRenderer';
import TimeRangeDropdown from '../../shared/components/TimeRangeDropdown';
import timeRanges from 'hson!../../shared/data/timeRanges.hson';
import {getMappings, getAppsForHosts, fetchLayouts} from '../apis';

export const HostPage = React.createClass({
  propTypes: {
    source: PropTypes.shape({
      links: PropTypes.shape({
        proxy: PropTypes.string.isRequired,
      }).isRequired,
    }),
    params: PropTypes.shape({
      hostID: PropTypes.string.isRequired,
    }).isRequired,
  },

  getInitialState() {
    const fifteenMinutesIndex = 1;

    return {
      layouts: [],
      timeRange: timeRanges[fifteenMinutesIndex],
    };
  },

  componentDidMount() {
    const hosts = {[this.props.params.hostID]: {name: this.props.params.hostID}};

    // fetching layouts and mappings can be done at the same time
    fetchLayouts().then(({data: {layouts}}) => {
      getMappings().then(({data: {mappings}}) => {
        getAppsForHosts(this.props.source.links.proxy, hosts, mappings).then((newHosts) => {
          const host = newHosts[this.props.params.hostID];
          const filteredLayouts = layouts.filter((layout) => {
            return host.apps && host.apps.includes(layout.app);
          });
          this.setState({layouts: filteredLayouts});
        });
      });
    });
  },

  handleChooseTimeRange({lower}) {
    const timeRange = timeRanges.find((range) => range.queryValue === lower);
    this.setState({timeRange});
  },

  renderLayout(layout) {
    const autoRefreshMs = 15000;
    const {timeRange} = this.state;
    const source = this.props.source.links.proxy;

    layout.cells.forEach((cell) => {
      cell.queries.forEach((q) => {
        q.text = q.query;
        q.database = q.db;
      });
    });

    return (
      <LayoutRenderer
        timeRange={timeRange.queryValue}
        cells={layout.cells}
        autoRefreshMs={autoRefreshMs}
        source={source}
        host={this.props.params.hostID}
      />
    );
  },

  render() {
    const hostID = this.props.params.hostID;
    const {layouts, timeRange} = this.state;

    return (

{hostID}

Uptime: 2d 4h 33m

              <TimeRangeDropdown onChooseTimeRange={this.handleChooseTimeRange} selected={timeRange.inputValue} />

          {
            layouts.map((layout) => {
              return (

                  {this.renderLayout(layout)}

              );
            })
          }

    );
  },
});

export default HostPage;
<|endoftext|>


<commit_before>svgEditor.readLang({
	lang: "ro",
	dir : "ltr",
	common: {
		"ok": "Ok",
		"cancel": "Anulaţi",
		"key_backspace": "backspace",
		"key_del": "stergere",
		"key_down": "jos",
		"key_up": "sus",
		"more_opts": "More Options",
		"url": "URL",
		"width": "Width",
		"height": "Height"
	},
	misc: {
		"powered_by": "Powered by"
	},
	ui: {
		"toggle_stroke_tools": "Aratati/ascundeti mai multe unelte de contur",
		"palette_info": "Faceţi clic a schimba culoare de umplere, Shift-click pentru a schimba culoarea de contur",
		"zoom_level": "Schimbarea nivelului de zoom",
		"panel_drag": "Drag left/right to resize side panel"
	},
	properties: {
		"id": "Identify the element",
		"fill_color": "Schimbarea culorii de umplere",
		"stroke_color": "Schimbarea culorii de contur",
		"stroke_style": "Schimbarea stilului de contur",
		"stroke_width": "Schimbarea lăţime de contur",
		"pos_x": "Schimba coordonata X",
		"pos_y": "Schimba coordonata Y",
		"linecap_butt": "Capat de linie: Butuc",
		"linecap_round": "Capat de linie: Rotund",
		"linecap_square": "Capat de linie: Patrat",
		"linejoin_bevel": "Articulatia liniei: Tesita",
		"linejoin_miter": "Articulatia liniei: Unghi ascutit",
		"linejoin_round": "Articulatia liniei: Rotunda",
		"angle": "Schimbarea unghiul de rotatie",
		"blur": "Schimbarea valorii estomparii gaussiene",
		"opacity": "Schimbarea selectat opacitate element",
		"circle_cx": "Schimbarea coordonatei CX a cercului",
		"circle_cy": "Schimbarea coordonatei CY a cercului",
		"circle_r": "Schimbarea razei cercului",
		"ellipse_cx": "Schimbarea coordonatei CX a elipsei",
		"ellipse_cy": "Schimbarea coordonatei CY a elipsei",
		"ellipse_rx": "Schimbarea razei elipsei X",
		"ellipse_ry": "Schimbarea razei elipsei Y",
		"line_x1": "Schimbare coordonatei x a punctului de start",
		"line_x2": "Schimbare coordonatei x a punctului final",
		"line_y1": "Schimbare coordonatei y a punctului de start",
		"line_y2": "Schimbare coordonatei y a punctului final",
		"rect_height": "Schimbarea înălţimii dreptunghiului",
		"rect_width": "Schimbarea lăţimii dreptunghiului",
		"corner_radius": "Schimbarea Razei Colţului Dreptunghiului",
		"image_width": "Schimbarea Lăţimii imaginii",
		"image_height": "Schimbarea Înălţimii imaginii",
		"image_url": "Schimbaţi URL-ul",
		"node_x": "Schimba coordonata x a punctului",
		"node_y": "Schimba coordonata x a punctului",
		"seg_type": "Schimba tipul de segment",
		"straight_segments": "Drept",
		"curve_segments": "Curv",
		"text_contents": "Schimbarea Conţinutului textului",
		"font_family": "Modificare familie de Fonturi",
		"font_size": "Schimbă dimensiunea fontului",
		"bold": "Text Îngroşat",
		"italic": "Text Înclinat"
	},
	tools: {
		"main_menu": "Menu Principal",
		"bkgnd_color_opac": "Schimbare culoare de fundal / opacitate",
		"connector_no_arrow": "Fără Săgeată",
		"fitToContent": "Dimensionare la Conţinut",
		"fit_to_all": "Potrivire la tot conţinutul",
		"fit_to_canvas": "Potrivire la Şevalet",
		"fit_to_layer_content": "Potrivire la conţinutul stratului",
		"fit_to_sel": "Potrivire la selecţie",
		"align_relative_to": "Alinierea în raport cu ...",
		"relativeTo": "în raport cu:",
		"de start": "de start",
		"largest_object": "cel mai mare obiect",
		"selected_objects": "obiectele alese",
		"smallest_object": "cel mai mic obiect",
		"new_doc": "Imagine nouă",
		"open_doc": "Imagine deschisă",
		"export_png": "Exportare ca şi PNG",
		"save_doc": "Salvare Imagine",
		"import_doc": "Importare SVG",
		"align_to_page": "Align Element to Page",
		"align_bottom": "Alinierea jos",
		"align_center": "Aliniere la centru",
		"align_left": "Aliniere la stânga",
		"align_middle": "Aliniere la mijloc",
		"align_right": "Aliniere la dreapta",
		"align_top": "Alinierea sus",
		"mode_select": "Unealta de Selectare",
		"mode_fhpath": "Unealta de Traiectorie",
		"mode_line": "Unealta de Linie",
		"mode_connect": "Conectati doua obiecte",
		"mode_rect": "Rectangle Tool",
		"mode_square": "Square Tool",
		"mode_fhrect": "Dreptunghi cu mana-libera",
		"mode_ellipse": "Elipsă",
		"mode_circle": "Cerc",
		"mode_fhellipse": "Elipsă cu mana-libera",
		"mode_path": "Unealta de Path",
		"mode_shapelib": "Shape library",
		"mode_text": "Unealta de Text",
		"mode_image": "Unealta de Imagine",
		"mode_zoom": "Unealta de Zoom",
		"mode_eyedropper": "Unealta de Eye Dropper",
		"no_embed": "NOTE: Aceasta imagine nu poate fi inglobata. Va depinde de aceasta traiectorie pentru a fi prezentata.",
		"undo": "Anulare",
		"redo": "Refacere",
		"tool_source": "Editare Cod Sursa",
		"wireframe_mode": "Mod Schelet",
		"toggle_grid": "Show/Hide Grid",
		"clone": "Clone Element(s)",
		"del": "Delete Element(s)",
		"group": "Grupare  Elemente",
		"make_link": "Make (hyper)link",
		"set_link_url": "Set link URL (leave empty to remove)",
		"to_path": "Converteste in Traiectorie",
		"reorient_path": "Reorienteaza Traiectoria",
		"ungroup": "Anulare Grupare Elemente",
		"docprops": "Propertile Documentului",
		"imagelib": "Image Library",
		"move_bottom": "Mutare în jos",
		"move_top": "Mutare în sus",
		"node_clone": "Cloneaza Punct",
		"node_delete": "Sterge Punct",
		"node_link": "Uneste Punctele de Control",
		"add_subpath": "Adaugati sub-traiectorie",
		"openclose_path": "Open/close sub-path",
		"source_save": "Folositi Schimbarile",
		"cut": "Cut",
		"copy": "Copy",
		"paste": "Paste",
		"paste_in_place": "Paste in Place",
		"stergere": "Delete",
		"group": "Group",
		"move_front": "Bring to Front",
		"move_up": "Bring Forward",
		"move_down": "Send Backward",
		"move_back": "Send to Back"
	},
	layers: {
		"layer":"Strat",
		"layers": "Layers",
		"del": "Ştergeţi Strat",
		"move_down": "Mutare Strat în Jos",
		"new": "Strat Nou",
		"rename": "Redenumiţi Strat",
		"move_up": "Mutare Strat în Sus",
		"dupe": "Duplicate Layer",
		"merge_down": "Merge Down",
		"merge_all": "Merge All",
		"move_elems_to": "Muta elemente la:",
		"move_selected": "Muta elementele selectate pe un alt strat"
	},
	config: {
		"image_props": "Proprietaţile Imaginii",
		"doc_title": "Titlul",
		"doc_dims": "Dimensiunile Sevaletuui",
		"included_images": "Imaginile Incluse",
		"image_opt_embed": "Includeţi Datele (fisiere locale)",
		"image_opt_ref": "Foloseste referinte la fisiere",
		"editor_prefs": "Preferintele Editorului",
		"icon_size": "Dimensiunile Butoanelor",
		"language": "Limba",
		"background": "Fondul Editorului",
		"editor_img_url": "Image URL",
		"editor_bg_note": "Nota: Fondul nu va fi salvat cu imaginea.",
		"icon_large": "Mari",
		"icon_medium": "Medii",
		"icon_small": "Mici",
		"icon_xlarge": "Foarte Mari",
		"select_predefined": "Selecţii predefinite:",
		"units_and_rulers": "Units & Rulers",
		"show_rulers": "Show rulers",
		"base_unit": "Base Unit:",
		"grid": "Grid",
		"snapping_onoff": "Snapping on/off",
		"snapping_stepsize": "Snapping Step-Size:"
	},
	shape_cats: {
		"basic": "Basic",
		"object": "Objects",
		"symbol": "Symbols",
		"arrow": "Arrows",
		"flowchart": "Flowchart",
		"animal": "Animals",
		"game": "Cards & Chess",
		"dialog_balloon": "Dialog balloons",
		"electronics": "Electronics",
		"math": "Mathematical",
		"music": "Music",
		"misc": "Miscellaneous",
		"raphael_1": "raphaeljs.com set 1",
		"raphael_2": "raphaeljs.com set 2"
	},
	imagelib: {
		"select_lib": "Select an image library",
		"show_list": "Show library list",
		"import_single": "Import single",
		"import_multi": "Import multiple",
		"open": "Open as new document"
	},
	notification: {
		"invalidAttrValGiven":"Valoarea data nu este valida",
		"noContentToFitTo":"Fara continut de referinta",
		"dupeLayerName":"Deja exista un strat numis asa!",
		"enterUniqueLayerName":"Rog introduceti un nume unic",
		"enterNewLayerName":"Rog introduceti un nume pentru strat",
		"layerHasThatName":"Statul deja are acest nume",
		"QmoveElemsToLayer":"Mutati elementele selectate pe stratul '%s'?",
		"QwantToClear":"Doriti sa stergeti desenul?\nAceasta va sterge si posibilitatea de anulare!",
		"QwantToOpen":"Do you want to open a new file?\nThis will also erase your undo history!",
		"QerrorsRevertToSource":"Sunt erori de parsing in sursa SVG.\nRevenire la sursa SVG  orginala?",
		"QignoreSourceChanges":"Ignorati schimbarile la sursa SVG?",
		"featNotSupported":"Functie neimplementata",
		"enterNewImgURL":"Introduceti noul URL pentru Imagine",
		"defsFailOnSave": "NOTE: Din cauza unei erori in browserul dv., aceasta imagine poate apare gresit (fara gradiente sau elemente). Insa va apare corect dupa salvare.",
		"loadingImage":"Imaginea se incarca, va rugam asteptati...",
		"saveFromBrowser": "Selecteaza \"Salvea ca si...\" in browserul dv. pt. a salva aceasta imafine ca si fisier %s.",
		"noteTheseIssues": "De asemeni remarcati urmatoarele probleme: ",
		"unsavedChanges": "There are unsaved changes.",
		"enterNewLinkURL": "Enter the new hyperlink URL",
		"errorLoadingSVG": "Error: Unable to load SVG data",
		"URLloadFail": "Unable to load from URL",
		"retrieving": "Retrieving \"%s\"..."
	}
});<commit_msg>Romanian ready for 2.6<commit_after>svgEditor.readLang({
	lang: "ro",
	dir : "ltr",
	common: {
		"ok": "Ok",
		"cancel": "Anulaţi",
		"key_backspace": "backspace",
		"key_del": "stergere",
		"key_down": "jos",
		"key_up": "sus",
		"more_opts": "Mai multe opţiuni",
		"url": "URL",
		"width": "Lăţime",
		"height": "Înălţime"
	},
	misc: {
		"powered_by": "Powered by"
	},
	ui: {
		"toggle_stroke_tools": "Arătaţi/ascundeţi mai multe unelte de contur",
		"palette_info": "Faceţi clic pentru a schimba culoarea de umplere, Shift-clic pentru a schimba culoarea de contur",
		"zoom_level": "Schimbarea nivelului de zoom",
		"panel_drag": "Trageţi la stanga/dreapta pentru redimensionare panou lateral"
	},
	properties: {
		"id": "Identificare element",
		"fill_color": "Schimbarea culorii de umplere",
		"stroke_color": "Schimbarea culorii de contur",
		"stroke_style": "Schimbarea stilului de contur",
		"stroke_width": "Schimbarea lăţimii conturului",
		"pos_x": "Schimbă coordonata X",
		"pos_y": "Schimbă coordonata Y",
		"linecap_butt": "Capăt de linie: Butuc",
		"linecap_round": "Capăt de linie: Rotund",
		"linecap_square": "Capăt de linie: Patrat",
		"linejoin_bevel": "Articulaţia liniei: Teşită",
		"linejoin_miter": "Articulaţia liniei: Unghi ascuţit",
		"linejoin_round": "Articulaţia liniei: Rotundă",
		"angle": "Schimbarea unghiul de rotaţie",
		"blur": "Schimbarea valorii estomparii gaussiene",
		"opacity": "Schimbarea gradului de opacitate",
		"circle_cx": "Schimbarea coordonatei CX a cercului",
		"circle_cy": "Schimbarea coordonatei CY a cercului",
		"circle_r": "Schimbarea razei cercului",
		"ellipse_cx": "Schimbarea coordonatei CX a elipsei",
		"ellipse_cy": "Schimbarea coordonatei CY a elipsei",
		"ellipse_rx": "Schimbarea razei elipsei X",
		"ellipse_ry": "Schimbarea razei elipsei Y",
		"line_x1": "Schimbarea coordonatei x a punctului de start",
		"line_x2": "Schimbarea coordonatei x a punctului final",
		"line_y1": "Schimbarea coordonatei y a punctului de start",
		"line_y2": "Schimbare coordonatei y a punctului final",
		"rect_height": "Schimbarea înălţimii dreptunghiului",
		"rect_width": "Schimbarea lăţimii dreptunghiului",
		"corner_radius": "Schimbarea razei colţului dreptunghiului",
		"image_width": "Schimbarea lăţimii imaginii",
		"image_height": "Schimbarea înălţimii imaginii",
		"image_url": "Schimbaţi URL-ul",
		"node_x": "Schimbă coordonata x a punctului",
		"node_y": "Schimbă coordonata x a punctului",
		"seg_type": "Schimbă tipul de segment",
		"straight_segments": "Drept",
		"curve_segments": "Curb",
		"text_contents": "Schimbarea Conţinutului textului",
		"font_family": "Modificare familie de Fonturi",
		"font_size": "Schimbă dimensiunea fontului",
		"bold": "Text Îngroşat",
		"italic": "Text Înclinat"
	},
	tools: {
		"main_menu": "Menu Principal",
		"bkgnd_color_opac": "Schimbare culoare de fundal / opacitate",
		"connector_no_arrow": "Fără săgeată",
		"fitToContent": "Dimensionare la conţinut",
		"fit_to_all": "Potrivire la tot conţinutul",
		"fit_to_canvas": "Potrivire la Şevalet",
		"fit_to_layer_content": "Potrivire la conţinutul stratului",
		"fit_to_sel": "Potrivire la selecţie",
		"align_relative_to": "Alinierea în raport cu ...",
		"relativeTo": "în raport cu:",
		"de start": "de start",
		"largest_object": "cel mai mare obiect",
		"selected_objects": "obiectele alese",
		"smallest_object": "cel mai mic obiect",
		"new_doc": "Imagine nouă",
		"open_doc": "Imagine deschisă",
		"export_png": "Exportare ca şi PNG",
		"save_doc": "Salvare imagine",
		"import_doc": "Importare SVG",
		"align_to_page": "Aliniere la pagină",
		"align_bottom": "Alinierea jos",
		"align_center": "Aliniere la centru",
		"align_left": "Aliniere la stânga",
		"align_middle": "Aliniere la mijloc",
		"align_right": "Aliniere la dreapta",
		"align_top": "Aliniere sus",
		"mode_select": "Unealtă de Selectare",
		"mode_fhpath": "Unealtă de Traiectorie",
		"mode_line": "Unealtă de Linie",
		"mode_connect": "Conectati doua obiecte",
		"mode_rect": "Unealtă de Dreptunghi",
		"mode_square": "Unealtă de Pătrat",
		"mode_fhrect": "Dreptunghi cu mana liberă",
		"mode_ellipse": "Elipsă",
		"mode_circle": "Cerc",
		"mode_fhellipse": "Elipsă cu mana liberă",
		"mode_path": "Unealtă de Traiectorie",
		"mode_shapelib": "Biblioteca de Form",
		"mode_text": "Unealtă de Text",
		"mode_image": "Unealtă de Imagine",
		"mode_zoom": "Unealtă de Zoom",
		"mode_eyedropper": "Unealtă de Selector Culoare",
		"no_embed": "NOTE: Aceasta imagine nu poate fi inglobată. Va depinde de aceasta traiectorie pentru a fi prezentată.",
		"undo": "Anulare",
		"redo": "Refacere",
		"tool_source": "Editare Cod Sursă",
		"wireframe_mode": "Mod Schelet",
		"toggle_grid": "Arată/ascunde Caroiaj",
		"clone": "Clonează Elementul/ele",
		"del": "Şterge Elementul/ele",
		"group": "Grupare Elemente",
		"make_link": "Crează (hyper)link",
		"set_link_url": "Setează link URL (lăsaţi liber pentru eliminare)",
		"to_path": "Converteşte in Traiectorie",
		"reorient_path": "Reorientează Traiectoria",
		"ungroup": "Anulare Grupare Elemente",
		"docprops": "Proprietăţile Documentului",
		"imagelib": "Bibliotecă de Imagini",
		"move_bottom": "Mutare în jos",
		"move_top": "Mutare în sus",
		"node_clone": "Clonează Punct",
		"node_delete": "Şterge Punct",
		"node_link": "Uneşte Punctele de Control",
		"add_subpath": "Adăugaţi sub-traiectorie",
		"openclose_path": "Deschide/inchide sub-traiectorie",
		"source_save": "Folosiţi Schimbările",
		"cut": "Tăiere"",
		"copy": "Copiere",
		"paste": "Reproducere",
		"paste_in_place": "Reproducere pe loc",
		"delete": "Ştergere",
		"group": "Grup",
		"move_front": "Pune in faţa",
		"move_up": "Pune in spate",
		"move_down": "Trimite in faţa",
		"move_back": "Trimite in spate"
	},
	layers: {
		"layer":"Strat",
		"layers": "Straturi",
		"del": "Ştergeţi Strat",
		"move_down": "Mutare Strat în Jos",
		"new": "Strat Nou",
		"rename": "Redenumiţi Stratul",
		"move_up": "Mutare Strat în Sus",
		"dupe": "Duplicaţi Stratul",
		"merge_down": "Fuzionare in jos",
		"merge_all": "Fuzionarea tuturor",
		"move_elems_to": "Mută elemente la:",
		"move_selected": "Mută elementele selectate pe un alt strat"
	},
	config: {
		"image_props": "Proprietăţile Imaginii",
		"doc_title": "Titlul",
		"doc_dims": "Dimensiunile Şevaletului",
		"included_images": "Imaginile Incluse",
		"image_opt_embed": "Includeţi Datele (fişiere locale)",
		"image_opt_ref": "Foloseşte referinţe la fişiere",
		"editor_prefs": "Preferinţele Editorului",
		"icon_size": "Dimensiunile Butoanelor",
		"language": "Limba",
		"background": "Fondul Editorului",
		"editor_img_url": "URL-ul Imaginii",
		"editor_bg_note": "Notă: Fondul nu va fi salvat cu imaginea.",
		"icon_large": "Mari",
		"icon_medium": "Medii",
		"icon_small": "Mici",
		"icon_xlarge": "Foarte Mari",
		"select_predefined": "Selecţii predefinite:",
		"units_and_rulers": "Unitati si Rigle",
		"show_rulers": "Arată Riglele",
		"base_unit": "Unitate de baza:",
		"grid": "Caroiaj",
		"snapping_onoff": "Fixare on/off",
		"snapping_stepsize": "Dimensiunea pasului de fixare:"
	},
	shape_cats: {
		"basic": "De bază",
		"object": "Obiecte",
		"symbol": "Simboluri",
		"arrow": "Săgeti",
		"flowchart": "Schemă Logică",
		"animal": "Animale",
		"game": "Cărti & şah",
		"dialog_balloon": "Baloane de dialog",
		"electronics": "Electronice",
		"math": "Matematică",
		"music": "Muzică",
		"misc": "Diverse",
		"raphael_1": "raphaeljs.com set 1",
		"raphael_2": "raphaeljs.com set 2"
	},
	imagelib: {
		"select_lib": "Selectati o biblioteca de imagini",
		"show_list": "Arătaţi lista bibliotecii",
		"import_single": "Importare unică",
		"import_multi": "Importare multiplă",
		"open": "Deschideţi ca si document nou"
	},
	notification: {
		"invalidAttrValGiven":"Valoarea data nu este validă",
		"noContentToFitTo":"Fara conţinut de referinţă",
		"dupeLayerName":"Deja exista un strat numit asa!",
		"enterUniqueLayerName":"Rog introduceţi un nume unic",
		"enterNewLayerName":"Rog introduceţi un nume pentru strat",
		"layerHasThatName":"Statul deja are acest nume",
		"QmoveElemsToLayer":"Mutaţi elementele selectate pe stratul '%s'?",
		"QwantToClear":"Doriti să ştergeţi desenul?\nAceasta va sterge si posibilitatea de anulare!",
		"QwantToOpen":"Doriti sa deschideţi un nou fişier?\nAceasta va şterge istoricul!",
		"QerrorsRevertToSource":"Sunt erori de parsing in sursa SVG.\nRevenire la sursa SVG orginală?",
		"QignoreSourceChanges":"Ignoraţi schimbarile la sursa SVG?",
		"featNotSupported":"Funcţie neimplementată",
		"enterNewImgURL":"Introduceţi noul URL pentru Imagine",
		"defsFailOnSave": "NOTE: Din cauza unei erori in browserul dv., aceasta imagine poate apare gresit (fara gradiente sau elemente). Însă va apare corect dupa salvare.",
		"loadingImage":"Imaginea se incarcă, va rugam asteptaţi...",
		"saveFromBrowser": "Selectează \"Salvează ca si...\" in browserul dv. pt. a salva aceasta imagine ca si fisier %s.",
		"noteTheseIssues": "De asemenea remarcati urmatoarele probleme: ",
		"unsavedChanges": "Sunt schimbări nesalvate.",
		"enterNewLinkURL": "Introduceţi noul URL",
		"errorLoadingSVG": "Eroare: Nu se pot încărca datele SVG",
		"URLloadFail": "Nu se poate încărca de la URL",
		"retrieving": "În preluare \"%s\"..."
	}
});<|endoftext|>


<commit_before>import React, { Component } from 'react';
import { connect } from 'react-redux';

import ActionTypes from './ActionTypes';
import { fetchPost } from './sagas';

export default function repressConnect ({
  /** The Wordpress post type that the component represents. */
  postType = 'post',
  /** From which property on the component's props will the route parameters be derived? */
  routeParamsPropName = 'params',
  /** Will the request to WP-API be made with the `_embed` query parameter? */
  useEmbedRequestQuery = true,
  /** Object to merge with the action that is dispatched in order to request post data. */
  fetchDataOptions = {},
  /** The collection name for the redux store where items of type `postType` are placed. */
  postTypePlural
} = {}) {
  return (target) => {
    if (target.__repress) {
      throw new Error(`The component "${target.name}" is already wrapped by Repress.`);
    }

    const postTypePlural = postTypePlural || postType + 's';

    const mapStateToProps = (state, ownProps) => {
      const params = ownProps[routeParamsPropName];
      const collection = state.repress[postTypePlural];

      return collection
          ? { [postType]: collection[postTypePlural][params.id] }
          : { [postType]: null };
    };

    class RepressComponentWrapper extends Component {
      componentWillMount () {
        this.props.dispatch({
          type: ActionTypes.REQUEST_POST,
          params: this.props[routeParamsPropName],
          options: { postType, useEmbedRequestQuery, fetchDataOptions }
        });
      }

      render () {
        return <target {...this.props} __repress={true} />;
      }
    }

    RepressComponentWrapper.__repress = true;

    RepressComponentWrapper.fetchData = () => [fetchPost, {
      postType: target.name,
      ...fetchDataOptions
    }];

    return connect(mapStateToProps)(RepressComponentWrapper);
  };
};
<commit_msg>Named internal mapStateToProps fn;<commit_after>import React, { Component } from 'react';
import { connect } from 'react-redux';

import ActionTypes from './ActionTypes';
import { fetchPost } from './sagas';

export default function repressConnect ({
  /** The Wordpress post type that the component represents. */
  postType = 'post',
  /** From which property on the component's props will the route parameters be derived? */
  routeParamsPropName = 'params',
  /** Will the request to WP-API be made with the `_embed` query parameter? */
  useEmbedRequestQuery = true,
  /** Object to merge with the action that is dispatched in order to request post data. */
  fetchDataOptions = {},
  /** The collection name for the redux store where items of type `postType` are placed. */
  postTypePlural
} = {}) {
  return (target) => {
    if (target.__repress) {
      throw new Error(`The component "${target.name}" is already wrapped by Repress.`);
    }

    const postTypePlural = postTypePlural || postType + 's';

    const mapStateToProps = function repressMapStateToProps (state, ownProps) {
      const params = ownProps[routeParamsPropName];
      const collection = state.repress[postTypePlural];

      return collection
          ? { [postType]: collection[postTypePlural][params.id] }
          : { [postType]: null };
    };

    class RepressComponentWrapper extends Component {
      componentWillMount () {
        this.props.dispatch({
          type: ActionTypes.REQUEST_POST,
          params: this.props[routeParamsPropName],
          options: { postType, useEmbedRequestQuery, fetchDataOptions }
        });
      }

      render () {
        return <target {...this.props} __repress={true} />;
      }
    }

    RepressComponentWrapper.__repress = true;

    RepressComponentWrapper.fetchData = () => [fetchPost, {
      postType: target.name,
      ...fetchDataOptions
    }];

    return connect(mapStateToProps)(RepressComponentWrapper);
  };
};
<|endoftext|>


<commit_before>import styled from "styled-components";
import { colors } from "@crave/farmblocks-theme";
import Text from "@crave/farmblocks-text";

export const Table = styled.table.attrs(props => ({
  className: `${props.className || ""} ${
    props.$columnsTemplate ? "__asGrid" : ""
  }`,
}))`
  min-width: 100%;
  overflow-x: scroll;

  border: none;
  border-spacing: 0;

  @supports (display: contents) {
    &.__asGrid {
      display: grid;
      grid-template-columns: ${({ $columnsTemplate }) => $columnsTemplate};
    }
  }
`;

export const THead = styled.thead`
  .__asGrid & {
    display: contents;
  }
`;

export const TBody = styled.tbody`
  .__asGrid & {
    display: contents;
  }
`;

export const TR = styled.tr`
  .__asGrid & {
    display: contents;
  }
`;

export const TH = styled(Text).attrs({
  as: "th",
})`
  border: solid ${colors.GREY_08};
  border-width: 1px 0;
  padding: 8px 24px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  background-color: ${colors.SUGAR};

  white-space: nowrap;
`;

export const TD = styled(Text).attrs({
  as: "td",
})`
  border-bottom: 1px solid ${colors.GREY_08};
  padding: 16px 24px;
  font-size: 16px;
  line-height: 24px;
  color: ${colors.OYSTER};
`;
TD.defaultProps = {
  truncate: true,
};

export const TDBold = styled(TD)`
  font-weight: 700;
  color: ${colors.CARBON};
`;
<commit_msg>refactor(table): use Text component's props to set color, size and weight<commit_after>import styled from "styled-components";
import { colors, fontSizes, fontWeights } from "@crave/farmblocks-theme";
import Text from "@crave/farmblocks-text";

export const Table = styled.table.attrs(props => ({
  className: `${props.className || ""} ${
    props.$columnsTemplate ? "__asGrid" : ""
  }`,
}))`
  min-width: 100%;
  overflow-x: scroll;

  border: none;
  border-spacing: 0;

  @supports (display: contents) {
    &.__asGrid {
      display: grid;
      grid-template-columns: ${({ $columnsTemplate }) => $columnsTemplate};
    }
  }
`;

export const THead = styled.thead`
  .__asGrid & {
    display: contents;
  }
`;

export const TBody = styled.tbody`
  .__asGrid & {
    display: contents;
  }
`;

export const TR = styled.tr`
  .__asGrid & {
    display: contents;
  }
`;

export const TH = styled(Text)`
  border: solid ${colors.GREY_08};
  border-width: 1px 0;
  padding: 8px 24px;
  line-height: 1.5;
  background-color: ${colors.SUGAR};

  white-space: nowrap;
`;
TH.defaultProps = {
  as: "th",
  fontSize: fontSizes.MEDIUM,
  fontWeight: fontWeights.SEMIBOLD,
};

export const TD = styled(Text).attrs(props => ({
  type: props.color,
}))`
  border-bottom: 1px solid ${colors.GREY_08};
  padding: 16px 24px;
  line-height: 1.5;
`;
TD.defaultProps = {
  as: "td",
  truncate: true,
  fontSize: fontSizes.MEDIUM,
  color: colors.OYSTER,
};

export const TDBold = styled(TD)`
  font-weight: 700;
  color: ${colors.CARBON};
`;
<|endoftext|>


<commit_before>'use strict';

// ---------------------------------------------------------------------------

const huobipro = require ('./huobipro.js');

// ---------------------------------------------------------------------------

module.exports = class huobiru extends huobipro {
    describe () {
        return this.deepExtend (super.describe (), {
            'id': 'huobiru',
            'name': 'Huobi Russia',
            'countries': [ 'RU' ],
            'hostname': 'www.huobi.com.ru',
            'urls': {
                'logo': 'https://user-images.githubusercontent.com/1294454/52978816-e8552e00-33e3-11e9-98ed-845acfece834.jpg',
                'api': {
                    'market': 'https://www.huobi.com.ru/api',
                    'public': 'https://www.huobi.com.ru/api',
                    'private': 'https://www.huobi.com.ru/api',
                    'zendesk': 'https://huobiglobal.zendesk.com/hc/en-us/articles',
                },
                'www': 'https://www.huobi.com.ru/ru-ru',
                'referral': 'https://www.huobi.com.ru/invite?invite_code=esc74',
                'doc': 'https://github.com/cloudapidoc/API_Docs_en',
                'fees': 'https://www.huobi.com.ru/ru-ru/about/fee/',
            },
        });
    }
};
<commit_msg>huobiru templated api urls<commit_after>'use strict';

// ---------------------------------------------------------------------------

const huobipro = require ('./huobipro.js');

// ---------------------------------------------------------------------------

module.exports = class huobiru extends huobipro {
    describe () {
        return this.deepExtend (super.describe (), {
            'id': 'huobiru',
            'name': 'Huobi Russia',
            'countries': [ 'RU' ],
            'hostname': 'www.huobi.com.ru',
            'urls': {
                'logo': 'https://user-images.githubusercontent.com/1294454/52978816-e8552e00-33e3-11e9-98ed-845acfece834.jpg',
                'api': {
                    'market': 'https://{hostname}/api',
                    'public': 'https://{hostname}/api',
                    'private': 'https://{hostname}/api',
                    'zendesk': 'https://huobiglobal.zendesk.com/hc/en-us/articles',
                },
                'www': 'https://www.huobi.com.ru/ru-ru',
                'referral': 'https://www.huobi.com.ru/invite?invite_code=esc74',
                'doc': 'https://github.com/cloudapidoc/API_Docs_en',
                'fees': 'https://www.huobi.com.ru/ru-ru/about/fee/',
            },
        });
    }
};
<|endoftext|>


<commit_before>'use strict';

const nano = require('nano');

const config = require('./config/config').globalConfig;
const CouchError = require('./util/CouchError');
const debug = require('./util/debug')('main:connect');
const nanoPromise = require('./util/nanoPromise');

let authInterval;
let globalNano;

async function open() {
    if (globalNano) {
        return globalNano;
    }
    authInterval = setInterval(() => {
        globalNano = getGlobalNano();
    }, config.authRenewal * 1000);
    return globalNano = getGlobalNano();
}

async function getGlobalNano() {
    debug('initialize connection to CouchDB');
    if (config.url && config.username && config.password) {
        debug.trace('config is complete');
        let _nano = nano(config.url);
        const cookie = await nanoPromise.authenticate(
            _nano,
            config.username,
            config.password
        );
        return nano({
            url: config.url,
            cookie
        });
    } else {
        throw new CouchError('rest-on-couch cannot be used without url, username and password', 'fatal');
    }
}

function close() {
    clearInterval(authInterval);
    authInterval = null;
    globalNano = null;
}

module.exports = {
    open,
    close
};
<commit_msg>move some debugs<commit_after>'use strict';

const nano = require('nano');

const config = require('./config/config').globalConfig;
const CouchError = require('./util/CouchError');
const debug = require('./util/debug')('main:connect');
const nanoPromise = require('./util/nanoPromise');

let authInterval;
let globalNano;

async function open() {
    if (globalNano) {
        return globalNano;
    }
    debug('initialize connection to CouchDB');
    authInterval = setInterval(() => {
        globalNano = getGlobalNano();
    }, config.authRenewal * 1000);
    return globalNano = getGlobalNano();
}

async function getGlobalNano() {
    debug.trace('renew CouchDB cookie');
    if (config.url && config.username && config.password) {
        let _nano = nano(config.url);
        const cookie = await nanoPromise.authenticate(
            _nano,
            config.username,
            config.password
        );
        return nano({
            url: config.url,
            cookie
        });
    } else {
        throw new CouchError('rest-on-couch cannot be used without url, username and password', 'fatal');
    }
}

function close() {
    clearInterval(authInterval);
    authInterval = null;
    globalNano = null;
}

module.exports = {
    open,
    close
};
<|endoftext|>