Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Project initialization #2

Merged
merged 37 commits into from
Dec 12, 2018
Merged

Project initialization #2

merged 37 commits into from
Dec 12, 2018

Conversation

mbarekh
Copy link
Collaborator

@mbarekh mbarekh commented Sep 27, 2018

No description provided.

Copy link

@Julien-Molina Julien-Molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add dist folder to .gitignore

@mbarekh
Copy link
Collaborator Author

mbarekh commented Sep 28, 2018

test this please

.travis.yml Outdated
@@ -7,6 +7,8 @@ branches:
- master
os:
- linux
before_install:
- yarn global install -g grunt-cli

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you put this in dev dependencies instead ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mbarekh
Copy link
Collaborator Author

mbarekh commented Oct 1, 2018

dist/ folder is present in most grafana projects. Probably, there is a reason for that. https://github.com/grafana/clock-panel

@nicolaserny
Copy link

dist/ folder is present in most grafana projects. Probably, there is a reason for that. https://github.com/grafana/clock-panel

You can find the explanation in the dev guide

@nicolaserny
Copy link

@mbarekh Are there any reasons not to use typescript ? (Example

.travis.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
src/main.js Outdated
import { PanelCtrl } from 'app/plugins/sdk';
import moment from 'moment';
import axios from './external/axios.min.js';
import go from './external/go.js';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use npm packages (go and axios)

@nicolaserny
Copy link

@Julien-Molina perhaps the dist folder should be updated by travis (deployment job)...

src/main.js Outdated
@@ -0,0 +1,145 @@
import { PanelCtrl } from 'app/plugins/sdk';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong file name:
should be AC2Ctrl.js instead of main.js

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nicolaserny
Copy link

@mbarekh Are there any reasons not to use typescript ? (Example

All of our projects are in typescript. We should do the same with this plugin

@nicolaserny
Copy link

No tests ? Grafana should have guidelines about testing their plugins

@nicolaserny
Copy link

resolves #1

Copy link

@nicolaserny nicolaserny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add some unit tests (at least the non ui parts)
    This project contains some test skeleton.
    This link is also interesting in typescript

package.json Outdated
"license": "Apache",
"repository": "https://github.com/xcomponent/grafana-plugin-ac2",
"devDependencies": {
"@types/angular": "^1.5.8",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove @types/angular and @types/lodash because you have no dependency with angular and lodash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or add the right dependencies...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

package.json Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
package.json Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
src/partials/template.html Outdated Show resolved Hide resolved
src/partials/template.html Outdated Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@nicolaserny
Copy link

@Julien-Molina grafana is based on angular. You should do a quick review too

@nicolaserny
Copy link

To avoid an endless PR, I have just created additional issues (#3 and #4)

Copy link

@nicolaserny nicolaserny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every conversation is not resolved, especially the module.ts file.
Did you test the extension compilation with webpack ? I am not 100% sure of the webpack configuration with typescript

.travis.yml Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
src/ac2-map.ts Outdated Show resolved Hide resolved
src/ac2-map.ts Show resolved Hide resolved
src/ac2-map.ts Outdated Show resolved Hide resolved
src/ac2-map.ts Outdated Show resolved Hide resolved
src/ac2-map.ts Outdated Show resolved Hide resolved
src/ac2-map.ts Outdated Show resolved Hide resolved
src/module.ts Show resolved Hide resolved
src/ac2-map.ts Outdated
this.diagram.nodeTemplate = this.getNodeTemplate();
this.diagram.groupTemplate = this.getGroupTemplate()
this.diagram.linkTemplate = this.getLinkTemplate();
const $ = go.GraphObject.make;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract the $ expression as a class constant. So you do not have to provide the $ argument to each function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

src/ac2-map.ts Show resolved Hide resolved
src/ac2-map.ts Show resolved Hide resolved
src/module.ts Show resolved Hide resolved
@nicolaserny nicolaserny merged commit d128d31 into master Dec 12, 2018
@nicolaserny nicolaserny deleted the issue_1 branch December 12, 2018 08:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants