Skip to content

Commit

Permalink
Merge pull request #35 from Enapter/rnovatorov/dev
Browse files Browse the repository at this point in the history
frontend: datasource config editor: fix resetting Enapter API URL
  • Loading branch information
rnovatorov authored Oct 4, 2023
2 parents 10210b4 + 289c3a5 commit 59b92ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v7.0.1

- Fix resetting Enapter API URL in datasource config editor

## v7.0.0

- Rename project
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ docker run \
--interactive \
--tty \
--publish 3000:3000 \
enapter/grafana-with-enapter-api-datasource-plugin:v7.0.0
enapter/grafana-with-enapter-api-datasource-plugin:v7.0.1
```

3. Proceed to `http://127.0.0.1:3000`.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enapter-api",
"version": "7.0.0",
"version": "7.0.1",
"description": "Enapter API Grafana Datasource Plugin",
"scripts": {
"build": "grafana-toolkit plugin:build",
Expand All @@ -19,9 +19,9 @@
"@grafana/ui": "^9.5.2",
"@types/lodash": "^4"
},
"engines" : {
"npm" : ">=9.6.7",
"node" : ">=18.17.1"
"engines": {
"npm": ">=9.6.7",
"node": ">=18.17.1"
},
"dependencies": {
"rxjs": "7.5.5"
Expand Down
4 changes: 2 additions & 2 deletions src/ConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
const { onOptionsChange, options } = this.props;
const jsonData = {
...options.jsonData,
enapterAPIURL: event.target.value,
enapterAPIURL: event.target.value || 'https://api.enapter.com',
};
onOptionsChange({ ...options, jsonData });
};
Expand Down Expand Up @@ -58,7 +58,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
labelWidth={10}
inputWidth={30}
onChange={this.onEnapterAPIURLChange}
value={jsonData.enapterAPIURL || 'https://api.enapter.com'}
value={jsonData.enapterAPIURL}
placeholder="Enapter API URL."
/>
</div>
Expand Down

0 comments on commit 59b92ea

Please sign in to comment.