diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/compose.st b/Iceberg.package/IceRepositoriesBrowser.class/instance/compose.st index 2565013c7d..a75c35c90a 100644 --- a/Iceberg.package/IceRepositoriesBrowser.class/instance/compose.st +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/compose.st @@ -1,31 +1,9 @@ building compose self tabulator with: [ :browser | - browser column: #repositories; column: #packages. + browser column: #repositories; column: [:c2 | c2 row: #packages; row: #info ]. - browser transmit to: #repositories; andShow: [ :a | a fastTable - title: 'Repositories'; - column: 'Remote host' evaluated: [:repo | repo origin host, '/', repo origin owner ]; - column: 'Project name' evaluated: [: repo | repo origin projectName ]; - column: 'Current branch' evaluated: #branchName; - column: 'Location' evaluated: #location; - addAction: self createRepositoryAction; - addAction: self synchronizeRepositoryAction; - selectionAct: self switchBranch on: $b entitled: 'Switch branch'; - selectionAct: self forgetRepository on: $x entitled: 'Forget repository'; - addSelectionAction: self pushAction; - selectionAct: self refreshRepository on: $r entitled: 'Refresh repository'; - onChangeOfPort: #strongSelection act: [ :table | IceGlamourSynchronizer synchronize: table selection ] - ]. - - browser transmit from: #repositories; to: #packages; andShow: [ :a | a fastTable - title: 'Packages'; - display: #savedPackages; - column: 'Name' evaluated: #packageName; - column: 'Status' evaluated: [:pkg | self statusFor: pkg ]; - addAction: self addPackageAction; - addSelectionAction: self loadPackageAction; - addSelectionAction: self unloadPackageAction - ]. - + browser transmit to: #repositories; andShow: [ :a | self composeRepositoriesIn: a ]. + browser transmit from: #repositories; to: #packages; andShow: [ :a | self composePackagesListIn: a ]. + browser transmit from: #repositories; to: #info; andShow: [ :a | self composeRepositoryInfoIn: a ] ] \ No newline at end of file diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/composePackagesListIn..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/composePackagesListIn..st new file mode 100644 index 0000000000..15f4c2821f --- /dev/null +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/composePackagesListIn..st @@ -0,0 +1,11 @@ +building +composePackagesListIn: composite + composite fastTable + title: 'Packages'; + display: #savedPackages; + column: 'Name' evaluated: #packageName width: 150; + column: 'Status' evaluated: [:pkg | self statusFor: pkg ]; + column: 'Loaded version' evaluated: [:pkg | self loadedVersionOf: pkg ] width: 50; + addAction: self addPackageAction; + addSelectionAction: self loadPackageAction; + addSelectionAction: self unloadPackageAction diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoriesIn..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoriesIn..st new file mode 100644 index 0000000000..5d73e89d22 --- /dev/null +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoriesIn..st @@ -0,0 +1,13 @@ +building +composeRepositoriesIn: composite + composite fastTable + title: 'Repositories'; + column: 'Origin' evaluated: [:repo | repo origin url ] width: 320; + column: 'Current branch' evaluated: #branchName; + addAction: self createRepositoryAction; + addAction: self synchronizeRepositoryAction; + selectionAct: self switchBranch on: $b entitled: 'Switch branch'; + selectionAct: self forgetRepository on: $x entitled: 'Forget repository'; + addSelectionAction: self pushAction; + selectionAct: self refreshRepository on: $r entitled: 'Refresh repository'; + onChangeOfPort: #strongSelection act: [ :table | IceGlamourSynchronizer synchronize: table selection ] diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoryInfoIn..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoryInfoIn..st new file mode 100644 index 0000000000..c311ec97bb --- /dev/null +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/composeRepositoryInfoIn..st @@ -0,0 +1,7 @@ +building +composeRepositoryInfoIn: composite + composite fastTable + title: 'Repository info'; + display: [ :repository | self detailedInfoFrom: repository ]; + column: 'Name' evaluated: #key; + column: 'Value' evaluated: #value diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/detailedInfoFrom..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/detailedInfoFrom..st new file mode 100644 index 0000000000..54fd514162 --- /dev/null +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/detailedInfoFrom..st @@ -0,0 +1,8 @@ +utilities +detailedInfoFrom: repository + ^ { + 'Remote host' -> repository origin host. + 'Owner' -> repository origin owner. + 'Project name' -> repository origin projectName. + 'Location' -> repository location. + } diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/loadedVersionOf..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/loadedVersionOf..st new file mode 100644 index 0000000000..6b9942362a --- /dev/null +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/loadedVersionOf..st @@ -0,0 +1,16 @@ +utilities +loadedVersionOf: package + ^ package isLoaded + ifTrue: [ + String streamContents: [ :stream | + | commit | + commit := package loadedVersion commit. + stream + nextPutAll: (commit id first: 7); + nextPutAll: ' ('; + nextPutAll: (commit datetime asDate = Date today + ifTrue: [ commit datetime asTime asString ] + ifFalse: [ commit datetime asDate asString ]); + nextPut: $) ]] + ifFalse: [ '' ]. + diff --git a/Iceberg.package/IceRepositoriesBrowser.class/instance/statusFor..st b/Iceberg.package/IceRepositoriesBrowser.class/instance/statusFor..st index a1dcabac1e..ca2a50fbf5 100644 --- a/Iceberg.package/IceRepositoriesBrowser.class/instance/statusFor..st +++ b/Iceberg.package/IceRepositoriesBrowser.class/instance/statusFor..st @@ -1,4 +1,4 @@ -building +utilities statusFor: package | status incomming outgoing | package isLoaded ifFalse: [ ^ 'Not loaded.' ].