-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Victor Login <batazor111@gmail.com>
- Loading branch information
Showing
9 changed files
with
1,635 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## ArgoCD extension docs | ||
|
||
This extension add a new tab to the ArgoCD UI to display the documentation | ||
of the application. |
13 changes: 13 additions & 0 deletions
13
internal/extension/argocd-extension-docs/manifests/extension.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: ArgoCDExtension | ||
metadata: | ||
name: argocd-extension-docs | ||
labels: | ||
tab: "Docs" | ||
icon: "fa-files" | ||
finalizers: | ||
- extensions-finalizer.argocd.argoproj.io | ||
spec: | ||
sources: | ||
- web: | ||
url: https://raw.githubusercontent.com/speedfl/argocd-apps-of-applicationset/master/ui/dist/extension.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
Binary file not shown.
1,521 changes: 1,521 additions & 0 deletions
1,521
internal/extension/argocd-extension-docs/ui/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "argocd-extension-docs", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"peerDeependencies": { | ||
"react": "^18.0.0" | ||
}, | ||
"scripts": { | ||
"build": "webpack --config ./webpack.config.js && tar -C dist -cvf dist/extension.tar resources" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.26", | ||
"raw-loader": "^4.0.2", | ||
"react": "^18.2.0", | ||
"ts-loader": "^9.4.2" | ||
}, | ||
"dependencies": { | ||
"typescript": "^4.4.3", | ||
"webpack": "^5.75.0", | ||
"webpack-cli": "^5.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as React from 'react'; | ||
|
||
export const Extension = (props: { | ||
tree: any; | ||
resource: any; | ||
}) => ( | ||
<div>Hello {props.resource.metadata.name}!</div> | ||
); | ||
|
||
export const component = Extension; |
18 changes: 18 additions & 0 deletions
18
internal/extension/argocd-extension-docs/ui/src/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./dist", | ||
"sourceMap": true, | ||
"noImplicitAny": true, | ||
"module": "esnext", | ||
"target": "es5", | ||
"jsx": "react", | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"noUnusedLocals": true, | ||
"declaration": false, | ||
"allowSyntheticDefaultImports": true, | ||
"lib": ["es2017", "dom"] | ||
}, | ||
"include": ["./**/*"], | ||
"exclude": ["node_modules"] | ||
} |
44 changes: 44 additions & 0 deletions
44
internal/extension/argocd-extension-docs/ui/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const path = require('path'); | ||
|
||
const groupKind = 'argoproj.io/ApplicationSet'; | ||
|
||
const config = { | ||
mode: 'production', | ||
entry: { | ||
extension: './src/index.tsx', | ||
}, | ||
output: { | ||
filename: 'extensions.js', | ||
path: __dirname + `/dist/resources/${groupKind}/ui`, | ||
libraryTarget: 'window', | ||
library: ['extensions', 'resources', groupKind], | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.tsx', '.js', '.json', '.ttf'], | ||
}, | ||
externals: { | ||
react: 'React', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
options: { | ||
allowTsInNodeModules: true, | ||
configFile: path.resolve('./src/tsconfig.json') | ||
}, | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
use: ['style-loader', 'raw-loader', 'sass-loader'], | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ['style-loader', 'raw-loader'], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
module.exports = config; |