Giter Site home page Giter Site logo

Comments (5)

anthony-c-martin avatar anthony-c-martin commented on July 29, 2024

@jongio - are you asking specifically about the numeric keys on the "lenses" property? For reasons I don't understand, that appears to be the way that the property is modeled for this resource - as an object with numeric keys (rather than a simple array). The Bicep representation of it seems true to the exported template.

I tried running this on my dashboard, and it generated the following (valid) bicep file:

resource foo 'Microsoft.Portal/dashboards@2015-08-01-preview' = {
  properties: {
    lenses: {
      '0': {
        order: 0
        parts: {
          '0': {
            position: {
              x: 0
              y: 0
              colSpan: 4
              rowSpan: 6
            }
            metadata: {
              inputs: [
                {
                  name: 'resourceType'
                  value: 'Microsoft.Resources/resources'
                }
              ]
              type: 'Extension/HubsExtension/PartType/BrowseAllResourcesPinnedPart'
              viewState: {
                content: {
                  selectableData: {
                    activatedItems: []
                    selectedItems: []
                  }
                }
              }
            }
          }
          '1': {
            position: {
              x: 0
              y: 6
              colSpan: 2
              rowSpan: 1
            }
            metadata: {
              inputs: []
              type: 'Extension/HubsExtension/PartType/ServicesHealthPart'
            }
          }
          '2': {
            position: {
              x: 4
              y: 0
              colSpan: 4
              rowSpan: 2
            }
            metadata: {
              inputs: []
              type: 'Extension/HubsExtension/PartType/AzureProjectGettingStartedPart'
            }
          }
          '3': {
            position: {
              x: 4
              y: 2
              colSpan: 4
              rowSpan: 5
            }
            metadata: {
              inputs: []
              type: 'Extension/HubsExtension/PartType/GettingStartedPart'
            }
          }
          '4': {
            position: {
              x: 2
              y: 6
              colSpan: 2
              rowSpan: 1
            }
            metadata: {
              inputs: [
                {
                  name: 'selectedMenuItemId'
                  value: ''
                  isOptional: true
                }
              ]
              type: 'Extension/HubsExtension/PartType/GalleryTile'
            }
          }
        }
      }
    }
    metadata: {
      model: {}
    }
  }
  name: 'foo'
  location: 'INSERT LOCATION'
  tags: {}
}

from bicep-types-az.

jongio avatar jongio commented on July 29, 2024

Can you share your input file? So I can test the decompile and report back.

from bicep-types-az.

jongio avatar jongio commented on July 29, 2024

I couldn't get the export to bicep resource working. Would like to see how you did it, but low pri....as I'm now using the insert resource feature in vscode. Feel free to close if low pri

from bicep-types-az.

 avatar commented on July 29, 2024

Hi jongio, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! 😄 🦾

from bicep-types-az.

jongio avatar jongio commented on July 29, 2024

@alex-frankel I don't think this is waiting on me.

from bicep-types-az.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.