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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
edade67
Project initialization
mbarekh Sep 27, 2018
31a9e0a
add travis configuration file
mbarekh Sep 28, 2018
05c50dc
add travis configuration file
mbarekh Sep 28, 2018
6bf57c9
Update README.md
xcomponentadmin Sep 29, 2018
90fb447
Update README.md
xcomponentadmin Sep 29, 2018
be2239d
Update .travis.yml
xcomponentadmin Sep 29, 2018
8d9f13f
Update .travis.yml
xcomponentadmin Sep 29, 2018
718cf52
Update .travis.yml, travis needs global install for grunt-cli package
mbarekh Oct 1, 2018
2aeaebe
Merge branch 'issue_1' of https://github.com/xcomponent/PluginAC2 int…
mbarekh Oct 1, 2018
d52f44f
Update .travis.yml
mbarekh Oct 1, 2018
7e0fd8d
replace yarn with npm
mbarekh Oct 1, 2018
10091de
remove yarn.lock file
mbarekh Oct 1, 2018
53688db
add grunt-cli in dev dependencies
mbarekh Oct 1, 2018
063e188
project conversion from javascript to typescript
mbarekh Oct 4, 2018
bea46ea
fix build failed
mbarekh Oct 4, 2018
d8e9629
fix build failed
mbarekh Oct 5, 2018
0f4c666
build matrix to test on both node 8 and node 10
mbarekh Oct 5, 2018
812a572
update .gitignore
mbarekh Oct 5, 2018
20bd995
add cache section in .travis.yml
mbarekh Oct 5, 2018
f63b9cd
move readme.md and plugin?json file from src/ to root
mbarekh Oct 5, 2018
50b7279
rename plugin
mbarekh Oct 5, 2018
2333752
readme update
mbarekh Oct 5, 2018
962bcca
improve graphical view
mbarekh Oct 8, 2018
edffd99
remove useless dependencies
mbarekh Oct 8, 2018
9712856
extract css definitions in a seperate file
mbarekh Dec 4, 2018
156684f
Add an installation section
mbarekh Dec 4, 2018
de6a9c1
rename id of map container
mbarekh Dec 4, 2018
09fa43e
add exclude section in tsconfig.json file
mbarekh Dec 4, 2018
2ccbc2a
replace es6 by es5 in tsconfig.json file
mbarekh Dec 4, 2018
8f6c778
change import path
mbarekh Dec 5, 2018
0f93155
fix tabulation
mbarekh Dec 6, 2018
ebae0a9
update tsconfig file with the missing propreties
mbarekh Dec 6, 2018
a4351ca
fix gojs import
mbarekh Dec 6, 2018
9efc0fb
create new class ac2Map to split module.ts
mbarekh Dec 6, 2018
590a832
change update diagram method to not recreate the diagram model on eac…
mbarekh Dec 10, 2018
6ee89b2
factorize updateDiagram and drawDiagram
mbarekh Dec 11, 2018
352453b
fix update diagram method
mbarekh Dec 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Logs
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Yarn Integrity file
.yarn-integrity
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: node_js
node_js:
- '8'
- '10'
cache:
directories:
nicolaserny marked this conversation as resolved.
Show resolved Hide resolved
- node_modules
sudo: false
nicolaserny marked this conversation as resolved.
Show resolved Hide resolved
branches:
only:
- master
os:
- linux
install:
- yarn install
script:
- yarn build
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2015-2017 CorpGlory Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# PluginAC2
[![Build Status](https://travis-ci.org/xcomponent/grafana-plugin-ac2.svg?branch=master)](https://travis-ci.org/xcomponent/grafana-plugin-ac2)

## Installation
To install this plugin using the `grafana-cli` tool:
```
sudo grafana-cli plugins install grafana-ac2-plugin
```

## Usage
* AC2 Panel Plugin allows AC2 map visualization
nicolaserny marked this conversation as resolved.
Show resolved Hide resolved
* No need to create a grafana datasource
* Fill the settings form with the right information to view the AC2 map application

<img src="./src/assets/plugin_screen.png" alt="drawing" width="90%"/>
14 changes: 14 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[![Build Status](https://travis-ci.org/xcomponent/grafana-plugin-ac2.svg?branch=master)](https://travis-ci.org/xcomponent/grafana-plugin-ac2)

## Installation
To install this plugin using the `grafana-cli` tool:
```
sudo grafana-cli plugins install grafana-ac2-plugin
```

## Usage
* AC2 Panel Plugin allows AC2 map visualization
* No need to create a grafana datasource
* Fill the settings form with the right information to view the AC2 map application

<img src="./src/assets/plugin_screen.png" alt="drawing" width="90%"/>
39 changes: 39 additions & 0 deletions dist/ac2-map.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export declare enum stateColor {
Stopped = "red",
Started = "green",
InError = "gray",
Starting = "Orange"
}
export interface NodeDataArrayItem {
key: string;
text?: string;
group?: string;
color?: string;
isGroup?: boolean;
}
export interface LinkDataArrayItem {
from: string;
to: string;
}
export interface AC2Data {
GroupName: string;
Name: string;
State: string;
Parents: string[];
}
export declare class AC2Map {
private diagram;
private containerId;
private $;
init(): void;
clear(): void;
private getDiagramTemplate;
private getNodeTemplate;
private getLinkTemplate;
private getGroupTemplate;
private getGoJsData;
draw(data: Array<AC2Data>): void;
private applyAddRemoveNodesFromModel;
private applyAddRemoveLinksFromModel;
update(data: Array<AC2Data>): void;
}
Binary file added dist/assets/ac2.ico
Binary file not shown.
Binary file added dist/assets/plugin_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions dist/css/template.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
html,
body {
height: 100%;
margin: 0;
}

#container {
min-height: 100%;
}
4 changes: 4 additions & 0 deletions dist/diagram.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare class Diagram {
myFullDiagram: any;
initDiagram(): void;
}
18 changes: 18 additions & 0 deletions dist/module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { PanelCtrl } from 'grafana/app/plugins/sdk';
import './css/template.css';
declare class Ctrl extends PanelCtrl {
static templateUrl: string;
private panelDefaults;
private setupDiagramTimer?;
private _panelConfig;
private map;
private isSameApplication;
constructor($scope: any, $injector: any);
inputChange(): void;
restCall(): any;
setDiagram(isUpdate: any): void;
showDiagram(): void;
onClickLoadButton(): void;
_onInitEditMode(): void;
}
export { Ctrl as PanelCtrl };
Loading