diff --git a/app/package.json b/app/package.json index dda8fab..345ba8f 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "ARMata", "productName": "ARMata", - "version": "v1.0.0-beta4", + "version": "v1.0.0-beta5", "description": "ARM templates visualizer & editor", "main": "./main.prod.js", "author": { diff --git a/app/parsers/templateParser.js b/app/parsers/templateParser.js index 0825175..b62f7e4 100644 --- a/app/parsers/templateParser.js +++ b/app/parsers/templateParser.js @@ -31,7 +31,7 @@ export default class TemplateParser { parseTemplate(): Template { const parsedTemplate = { - schema: this.json.$schema, + schema: this.json.$schema || '', contentVersion: this.json.contentVersion, outputs: this.getOutputs(), parameters: this.getParameters(), diff --git a/app/reducers/fileDialog.js b/app/reducers/fileDialog.js index f9b6f9a..c06cb66 100644 --- a/app/reducers/fileDialog.js +++ b/app/reducers/fileDialog.js @@ -102,13 +102,15 @@ export default function fileDialog(state: fileDialogStateType = initialState, ac isError: false }); case ADD_RESOURCE: { + const uuid = Uuid.uuidv4(); state.fileData.resources.push({ - id: `${action.resourceType}${Uuid.uuidv4()}`, - displayName: action.resourceType, - name: action.resourceType, + id: `${action.resourceType}${uuid}`, + displayName: `${action.resourceType}-${uuid}`, + name: `${action.resourceType}-${uuid}`, dependsOn: [], type: action.resourceType }); + return Object.assign({}, state, { selectedFilename: 'EDITED TEMPLATE', fileData: state.fileData,