Skip to content

Commit

Permalink
Doco/readme (#2)
Browse files Browse the repository at this point in the history
* Remove unused grunt config

* Expose dev simulator ui

* Fix subtitle and project path

* Bump revision
  • Loading branch information
tomhollingworth committed Jul 14, 2020
1 parent 34b56ad commit 9436ed5
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 46 deletions.
18 changes: 0 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,12 @@ module.exports = function (grunt) {
src: ['**/*', '!**/*.js', '!image/**/*'],
dest: 'dist'
},
libs: {
cwd: 'libs',
expand: true,
src: ['**.*'],
dest: 'dist/libs',
options: {
process: content => content.replace(/(\'|")ion.rangeSlider(\'|")/g, '$1./ion.rangeSlider.min$2'), // eslint-disable-line
}
},
echarts_libs: {
cwd: 'node_modules/echarts/dist',
expand: true,
src: ['echarts.min.js'],
dest: 'dist/libs/'
},
image_to_dist: {
cwd: 'src',
expand: true,
src: ['src/image/**/*'],
dest: 'dist/image/'
},
pluginDef: {
expand: true,
src: ['plugin.json'],
Expand Down Expand Up @@ -110,14 +95,11 @@ module.exports = function (grunt) {
}
})
grunt.registerTask('default', [
// 'jshint',
'clean',
'copy:src_to_dist',
'copy:libs',
'copy:readme',
'copy:echarts_libs',
'copy:pluginDef',
'copy:image_to_dist',
'babel'])

grunt.registerTask('build', [
Expand Down
63 changes: 39 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reason Codes Tree Panel

| Libre panel for Create, Read, Update and Delete of Downtime Reasons
> Libre panel for Create, Read, Update and Delete of Downtime Reasons
This panel gives users the ability to visualize the enterprise downtime categories and reasons. By long clicking objects users can create, read, update and delete categories and reasons in the tree. This panel is part of [Libre](https://github.com/Spruik/Libre) suite of Grafana plugins and dashbaords. Downtime reasons can be classified against equipment when the machine reports a downtime state. This plugin interfaces to a no security json rest api for equipment running on the same grafana server. This panel is targeted at Grafana v6.x.x only.

Expand Down Expand Up @@ -84,7 +84,7 @@ Start by cloning this repository
```shell
~/
$ git clone https://github.com/Spruik/Libre-Reason-Codes-CRUD-Tree-Chart-Panel
Cloning into 'libre-reason-codes-crud-tree-chart-panel'...
Cloning into 'Libre-Reason-Codes-CRUD-Tee-Chart-Panel'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (31/31), done.
Expand All @@ -95,8 +95,8 @@ Unpacking objects: 100% (46/46), done.
Enter project and install dependencies

```shell
$ cd ./libre-reason-codes-crud-tree-chart-panel
~/libre-reason-codes-crud-tree-chart-panel
$ cd ./Libre-Reason-Codes-CRUD-Tee-Chart-Panel
~/Libre-Reason-Codes-CRUD-Tee-Chart-Panel
$ npm install
...
added 714 packages from 399 contributors and audited 719 packages in 11.871s
Expand All @@ -117,16 +117,23 @@ Run grunt to build the panel

```shell
$ grunt
Running "clean:0" (clean) task
>> 1 path cleaned.

Running "clean:1" (clean) task
>> 1 path cleaned.

Running "copy:src_to_dist" (copy) task
Created 2 directories, copied 8 files
Created 3 directories, copied 8 files

Running "copy:libs" (copy) task
Running "copy:readme" (copy) task
Created 1 directory, copied 10 files

Running "copy:pluginDef" (copy) task
Running "copy:echarts_libs" (copy) task
Copied 1 file

Running "copy:image_to_dist" (copy) task
Running "copy:pluginDef" (copy) task
Copied 1 file

Running "babel:dist" (babel) task

Expand All @@ -137,18 +144,18 @@ Done, without errors.
Start docker-compose.dev.yml detached

```shell
~/libre-reason-codes-crud-tree-chart-panel
~/Libre-Reason-Codes-CRUD-Tee-Chart-Panel
$ docker-compose -f docker-compose.dev.yml up -d
Starting libre-opation-crud-table-panel_postgres_1
Starting libre-opation-crud-table-panel_postrest_1
Starting libre-opation-crud-table-panel_simulator_1
Starting libre-opation-crud-table-panel_grafana_1
Starting libre-reason-codes-crud-tree-chart-panel_postgres_1
Starting libre-reason-codes-crud-tree-chart-panel_postrest_1
Starting libre-reason-codes-crud-tree-chart-panel_simulator_1
Starting libre-reason-codes-crud-tree-chart-panel_grafana_1
```

Run grunt watch to recompile on change

```shell
~/libre-reason-codes-crud-tree-chart-panel
~/Libre-Reason-Codes-CRUD-Tee-Chart-Panel
$ grunt watch
Running "watch" task
Waiting...
Expand All @@ -166,36 +173,39 @@ Prerequisites
Build panel and zip into archive

```shell
~/libre-reason-codes-crud-tree-chart-panel
~/Libre-Reason-Codes-CRUD-Tee-Chart-Panel
$ grunt build
Running "clean:0" (clean) task
>> 1 path cleaned.

Running "clean:1" (clean) task
>> 1 path cleaned.
>> 0 paths cleaned.

Running "copy:src_to_dist" (copy) task
Created 3 directories, copied 9 files
Running "clean:0" (clean) task
>> 0 paths cleaned.

Running "copy:libs" (copy) task
Running "clean:1" (clean) task
>> 0 paths cleaned.

Running "copy:src_to_dist" (copy) task
Created 3 directories, copied 8 files

Running "copy:readme" (copy) task
Created 1 directory, copied 8 files
Created 1 directory, copied 10 files

Running "string-replace:dist" (string-replace) task

1 files created
Running "copy:echarts_libs" (copy) task
Copied 1 file

Running "copy:pluginDef" (copy) task
Copied 1 file

Running "babel:dist" (babel) task

Running "compress:main" (compress) task
>> Compressed 44 files.
>> Compressed 41 files.

Done, without errors.

```

Find a completed build of this panel in the root directory named `libre-reason-codes-crud-tree-chart-panel.zip`.
Expand All @@ -210,4 +220,9 @@ For any issue, there are fundamentally three ways an individual can contribute:

## Change log

- 1.0.1 Documentation Updates
- Fix subtitle and project path
- Expose dev simulator ui
- Remove unused grunt config

- 1.0.0 Initial Public Release
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
- postgres
simulator:
image: spruiktec/libre-simulator
ports:
- "1880:1880"
depends_on:
- postrest
postgres:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "libre-reason-codes-crud-tree-chart-panel",
"version": "1.0.0",
"version": "1.0.1",
"description": "Libre panel for Create, Read, Update and Delete of Downtime Reasons",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
{"name": "Edit", "url": "public/plugins/libre-reason-codes-crud-tree-chart-panel/docs/libre-reason-codes-crud-tree-chart-panel-update.png"},
{"name": "Delete", "url": "public/plugins/libre-reason-codes-crud-tree-chart-panel/docs/libre-reason-codes-crud-tree-chart-panel-delete.png"}
],
"version": "1.0.0",
"updated": "2020-06-30"
"version": "1.0.1",
"updated": "2020-07-13"
},
"dependencies": {
"grafanaVersion": "6.x.x",
Expand Down

0 comments on commit 9436ed5

Please sign in to comment.