Last active
May 17, 2025 10:31
-
-
Save iriyak/c6c74918576cd71e65ee38159e62ed75 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| gtViewAllP3ClientsIn: composite | |
| " | |
| Remarks | |
| 1. 'composite columnedList' creates a GtPhlowColumnedListView. | |
| 2. The view collects P3Clients by 'self allInstances'. So not performant. | |
| 3. Start/stop button doesn't trigger refreshing this custom view. | |
| 4. Start/stop fails while user/password/database is left as blank. | |
| " | |
| <gtClassView> | |
| ^ composite columnedList | |
| title: 'Clients'; | |
| priority: 8; | |
| items: [ self allInstances ]; | |
| column: '' | |
| stencil: [ :e | | |
| BrButton new | |
| aptitude: BrGlamorousButtonWithIconAptitude; | |
| icon: BrGlamorousVectorIcons shutdown; | |
| label: 'Start/stop PostgreSQL client connection'; | |
| action: [ e isConnected ifTrue: [ e close ] ifFalse: [ e ensureConnected ] ] ] | |
| weight: 0.75; | |
| column: 'connected' | |
| text: [ :e | | |
| e isConnected | |
| in: [ :boolean | | |
| boolean asRopedText | |
| foreground: (boolean | |
| ifTrue: BrGlamorousColors successBorderColor | |
| ifFalse: BrGlamorousColors errorBorderColor) ] ]; | |
| column: 'session' text: [ :e | e session ifNil: '' ]; | |
| column: 'host' text: [ :e | e host ifNil: '' ]; | |
| column: 'port' text: [ :e | e port ifNil: '' ]; | |
| column: 'client' text: [ :e | e class ifNil: '' ]; | |
| column: 'url' | |
| text: [ :e | e url ifNil: '' ] | |
| weight: 3; | |
| column: 'user' text: [ :e | e user ifNil: '' ]; | |
| column: 'password' text: [ :e | e password ifNil: '' ]; | |
| column: 'database' text: [ :e | e database ifNil: '' ]; | |
| column: 'ssl' text: [ :e | e isSSL ifNil: '' ]; | |
| column: 'options' text: [ :e | e startupOptions ifNil: '' ]; | |
| actionUpdateButton |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment