layouts.proto 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.monitoring.dashboard.v1;
  16. import "google/monitoring/dashboard/v1/widget.proto";
  17. option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "LayoutsProto";
  21. option java_package = "com.google.monitoring.dashboard.v1";
  22. option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
  23. option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
  24. // A basic layout divides the available space into vertical columns of equal
  25. // width and arranges a list of widgets using a row-first strategy.
  26. message GridLayout {
  27. // The number of columns into which the view's width is divided. If omitted
  28. // or set to zero, a system default will be used while rendering.
  29. int64 columns = 1;
  30. // The informational elements that are arranged into the columns row-first.
  31. repeated Widget widgets = 2;
  32. }
  33. // A mosaic layout divides the available space into a grid of blocks, and
  34. // overlays the grid with tiles. Unlike `GridLayout`, tiles may span multiple
  35. // grid blocks and can be placed at arbitrary locations in the grid.
  36. message MosaicLayout {
  37. // A single tile in the mosaic. The placement and size of the tile are
  38. // configurable.
  39. message Tile {
  40. // The zero-indexed position of the tile in grid blocks relative to the
  41. // left edge of the grid. Tiles must be contained within the specified
  42. // number of columns. `x_pos` cannot be negative.
  43. int32 x_pos = 1;
  44. // The zero-indexed position of the tile in grid blocks relative to the
  45. // top edge of the grid. `y_pos` cannot be negative.
  46. int32 y_pos = 2;
  47. // The width of the tile, measured in grid blocks. Tiles must have a
  48. // minimum width of 1.
  49. int32 width = 3;
  50. // The height of the tile, measured in grid blocks. Tiles must have a
  51. // minimum height of 1.
  52. int32 height = 4;
  53. // The informational widget contained in the tile. For example an `XyChart`.
  54. Widget widget = 5;
  55. }
  56. // The number of columns in the mosaic grid. The number of columns must be
  57. // between 1 and 12, inclusive.
  58. int32 columns = 1;
  59. // The tiles to display.
  60. repeated Tile tiles = 3;
  61. }
  62. // A simplified layout that divides the available space into rows
  63. // and arranges a set of widgets horizontally in each row.
  64. message RowLayout {
  65. // Defines the layout properties and content for a row.
  66. message Row {
  67. // The relative weight of this row. The row weight is used to adjust the
  68. // height of rows on the screen (relative to peers). Greater the weight,
  69. // greater the height of the row on the screen. If omitted, a value
  70. // of 1 is used while rendering.
  71. int64 weight = 1;
  72. // The display widgets arranged horizontally in this row.
  73. repeated Widget widgets = 2;
  74. }
  75. // The rows of content to display.
  76. repeated Row rows = 1;
  77. }
  78. // A simplified layout that divides the available space into vertical columns
  79. // and arranges a set of widgets vertically in each column.
  80. message ColumnLayout {
  81. // Defines the layout properties and content for a column.
  82. message Column {
  83. // The relative weight of this column. The column weight is used to adjust
  84. // the width of columns on the screen (relative to peers).
  85. // Greater the weight, greater the width of the column on the screen.
  86. // If omitted, a value of 1 is used while rendering.
  87. int64 weight = 1;
  88. // The display widgets arranged vertically in this column.
  89. repeated Widget widgets = 2;
  90. }
  91. // The columns of content to display.
  92. repeated Column columns = 1;
  93. }