-
Notifications
You must be signed in to change notification settings - Fork 1
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: Alexy Mantha <[email protected]>
- Loading branch information
1 parent
241efd4
commit 7e7d4c8
Showing
10 changed files
with
1,960 additions
and
103 deletions.
There are no files selected for viewing
Binary file not shown.
1 change: 1 addition & 0 deletions
1
ui/dist/resources/extension-progressive-sync.js/extensions-progressive-sync.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
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 |
---|---|---|
@@ -1,34 +1,57 @@ | ||
import {HelpIcon} from 'argo-ui'; | ||
import * as React from 'react'; | ||
|
||
const TITLE = "PROGRESSIVE SYNC"; | ||
const ID = "PROGRESSIVE_SYNC"; | ||
|
||
interface SectionInfo { | ||
title: string; | ||
helpContent?: string; | ||
} | ||
|
||
const sectionLabel = (info: SectionInfo) => ( | ||
<label style={{fontSize: '12px', fontWeight: 600, color: "#6D7F8B"}}> | ||
{info.title} | ||
{info.helpContent && <HelpIcon title={info.helpContent} />} | ||
</label> | ||
); | ||
|
||
export const Extension = (props: { | ||
application: any; | ||
openFlyout: () => any; | ||
}) => { | ||
return ( | ||
<div className='application-status-panel__item-value' style={{ margin: 'auto 0' }}> | ||
<a className='neutral'> | ||
<i className={`fa fa-pause-circle`} /> Progressive Sync | ||
</a> | ||
</div> | ||
<React.Fragment> | ||
<div className='application-status-panel__item' style={{position: 'relative'}}> | ||
{sectionLabel({ | ||
title: TITLE, | ||
})} | ||
<div className='application-status-panel__item-value' style={{ margin: 'auto 0' }}> | ||
<a className='neutral' onClick={() => props.openFlyout()}> | ||
<i className={`fa fa-pause-circle`} /> Progressive Sync | ||
</a> | ||
</div> | ||
</div> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
export const AnotherExtension = (props: { | ||
export const Flyout = (props: { | ||
application: any; | ||
}) => { | ||
return ( | ||
<div className='application-status-panel__item-value' style={{ margin: 'auto 0' }}> | ||
<a className='warning'> | ||
<i className={`fa fa-play-circle`} /> Extension | ||
</a> | ||
</div> | ||
<React.Fragment> | ||
<div className='application-status-panel__item' style={{position: 'relative'}}> | ||
<p>Information about the extension</p> | ||
</div> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
export const component = Extension; | ||
export const anotherComponent = AnotherExtension; | ||
export const flyout = Flyout; | ||
|
||
// Register the component extension in ArgoCD | ||
((window: any) => { | ||
window?.extensionsAPI?.registerStatusPanelExtension(component, 'PROGRESSIVE SYNC'); | ||
window?.extensionsAPI?.registerStatusPanelExtension(anotherComponent, 'ANOTHER EXTENSION', {helpContent: "Example of help content"}); | ||
window?.extensionsAPI?.registerStatusPanelExtension(component, TITLE, ID, flyout); | ||
})(window) |
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,21 @@ | ||
{ | ||
"extends": [ | ||
"tslint:recommended", "tslint-react", "tslint-plugin-prettier", "tslint-config-prettier" | ||
], | ||
"jsRules": {}, | ||
"rules": { | ||
"prettier": true, | ||
"quotemark": [true, "single"], | ||
"no-var-requires": false, | ||
"interface-name": false, | ||
"jsx-no-multiline-js": false, | ||
"object-literal-sort-keys": false, | ||
"jsx-alignment": false, | ||
"max-line-length": [true, 200], | ||
"jsx-no-lambda": false, | ||
"array-type": false, | ||
"max-classes-per-file": false, | ||
"newline-per-chained-call": false | ||
}, | ||
"rulesDirectory": [] | ||
} |
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
Oops, something went wrong.