layouts.proto 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. // Copyright 2021 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 go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "LayoutsProto";
  20. option java_package = "com.google.monitoring.dashboard.v1";
  21. option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
  22. option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
  23. // A basic layout divides the available space into vertical columns of equal
  24. // width and arranges a list of widgets using a row-first strategy.
  25. message GridLayout {
  26. // The number of columns into which the view's width is divided. If omitted
  27. // or set to zero, a system default will be used while rendering.
  28. int64 columns = 1;
  29. // The informational elements that are arranged into the columns row-first.
  30. repeated Widget widgets = 2;
  31. }
  32. // A mosaic layout divides the available space into a grid of blocks, and
  33. // overlays the grid with tiles. Unlike `GridLayout`, tiles may span multiple
  34. // grid blocks and can be placed at arbitrary locations in the grid.
  35. message MosaicLayout {
  36. // A single tile in the mosaic. The placement and size of the tile are
  37. // configurable.
  38. message Tile {
  39. // The zero-indexed position of the tile in grid blocks relative to the
  40. // left edge of the grid. Tiles must be contained within the specified
  41. // number of columns. `x_pos` cannot be negative.
  42. int32 x_pos = 1;
  43. // The zero-indexed position of the tile in grid blocks relative to the
  44. // top edge of the grid. `y_pos` cannot be negative.
  45. int32 y_pos = 2;
  46. // The width of the tile, measured in grid blocks. Tiles must have a
  47. // minimum width of 1.
  48. int32 width = 3;
  49. // The height of the tile, measured in grid blocks. Tiles must have a
  50. // minimum height of 1.
  51. int32 height = 4;
  52. // The informational widget contained in the tile. For example an `XyChart`.
  53. Widget widget = 5;
  54. }
  55. // The number of columns in the mosaic grid. The number of columns must be
  56. // between 1 and 12, inclusive.
  57. int32 columns = 1;
  58. // The tiles to display.
  59. repeated Tile tiles = 3;
  60. }
  61. // A simplified layout that divides the available space into rows
  62. // and arranges a set of widgets horizontally in each row.
  63. message RowLayout {
  64. // Defines the layout properties and content for a row.
  65. message Row {
  66. // The relative weight of this row. The row weight is used to adjust the
  67. // height of rows on the screen (relative to peers). Greater the weight,
  68. // greater the height of the row on the screen. If omitted, a value
  69. // of 1 is used while rendering.
  70. int64 weight = 1;
  71. // The display widgets arranged horizontally in this row.
  72. repeated Widget widgets = 2;
  73. }
  74. // The rows of content to display.
  75. repeated Row rows = 1;
  76. }
  77. // A simplified layout that divides the available space into vertical columns
  78. // and arranges a set of widgets vertically in each column.
  79. message ColumnLayout {
  80. // Defines the layout properties and content for a column.
  81. message Column {
  82. // The relative weight of this column. The column weight is used to adjust
  83. // the width of columns on the screen (relative to peers).
  84. // Greater the weight, greater the width of the column on the screen.
  85. // If omitted, a value of 1 is used while rendering.
  86. int64 weight = 1;
  87. // The display widgets arranged vertically in this column.
  88. repeated Widget widgets = 2;
  89. }
  90. // The columns of content to display.
  91. repeated Column columns = 1;
  92. }