Skip to content

Commit

Permalink
IJMP-1484 Empty properties values have been replaced with <Unknown>
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsiaryna Tsytsenia committed May 23, 2024
1 parent b155341 commit 5b32a4d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import eu.ibagroup.formainframe.common.ui.DialogMode
import eu.ibagroup.formainframe.common.ui.DialogState
import eu.ibagroup.formainframe.common.ui.StatefulComponent
import eu.ibagroup.formainframe.dataops.attributes.RemoteDatasetAttributes
import eu.ibagroup.formainframe.utils.UNKNOWN_PARAM_VALUE
import eu.ibagroup.formainframe.utils.getParamTextValueOrUnknown
import org.zowe.kotlinsdk.DatasetOrganization
import org.zowe.kotlinsdk.HasMigrated
import javax.swing.JComponent
Expand Down Expand Up @@ -51,31 +53,31 @@ class DatasetPropertiesDialog(val project: Project?, override var state: Dataset
label("Dataset name type: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.dsnameType?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.dsnameType))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Catalog name: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.catalogName ?: "")
.text(getParamTextValueOrUnknown(dataset.catalogName))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Volume serials: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.volumeSerials ?: "")
.text(getParamTextValueOrUnknown(dataset.volumeSerials))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Device type: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.deviceType ?: "")
.text(getParamTextValueOrUnknown(dataset.deviceType))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -100,7 +102,7 @@ class DatasetPropertiesDialog(val project: Project?, override var state: Dataset
DatasetOrganization.PS -> "Sequential (PS)"
DatasetOrganization.PO -> "Partitioned (PO)"
DatasetOrganization.POE -> "Partitioned Extended (PO-E)"
else -> ""
else -> UNKNOWN_PARAM_VALUE
}
)
.applyToComponent { isEditable = false }
Expand All @@ -110,39 +112,39 @@ class DatasetPropertiesDialog(val project: Project?, override var state: Dataset
label("Record format: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.recordFormat?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.recordFormat))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Record length: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.recordLength?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.recordLength))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Block size: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.blockSize?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.blockSize))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Size in tracks: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.sizeInTracks?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.sizeInTracks))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Space units: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.spaceUnits?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.spaceUnits))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -165,15 +167,15 @@ class DatasetPropertiesDialog(val project: Project?, override var state: Dataset
label("Used tracks (blocks): ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.usedTracksOrBlocks?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.usedTracksOrBlocks))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Used extents: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.extendsUsed?.toString() ?: "")
.text(getParamTextValueOrUnknown(dataset.extendsUsed))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -185,23 +187,23 @@ class DatasetPropertiesDialog(val project: Project?, override var state: Dataset
label("Creation date: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.creationDate ?: "")
.text(getParamTextValueOrUnknown(dataset.creationDate))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Referenced date: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.lastReferenceDate ?: "")
.text(getParamTextValueOrUnknown(dataset.lastReferenceDate))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Expiration date: ")
.widthGroup(sameWidthGroup)
textField()
.text(dataset.expirationDate ?: "")
.text(getParamTextValueOrUnknown(dataset.expirationDate))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import eu.ibagroup.formainframe.common.ui.DialogMode
import eu.ibagroup.formainframe.common.ui.DialogState
import eu.ibagroup.formainframe.common.ui.StatefulComponent
import eu.ibagroup.formainframe.dataops.attributes.RemoteJobAttributes
import eu.ibagroup.formainframe.utils.getParamTextValueOrUnknown
import javax.swing.JComponent

/** Class to create dialog for job file properties*/
Expand Down Expand Up @@ -67,7 +68,7 @@ class JobPropertiesDialog(val project: Project?, override var state: JobState) :
label("Subsystem: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.subSystem ?: "")
.text(getParamTextValueOrUnknown(job.subSystem))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -83,7 +84,7 @@ class JobPropertiesDialog(val project: Project?, override var state: JobState) :
label("Status: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.status?.toString() ?: "")
.text(getParamTextValueOrUnknown(job.status))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -99,23 +100,23 @@ class JobPropertiesDialog(val project: Project?, override var state: JobState) :
label("Job class: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.jobClass ?: "")
.text(getParamTextValueOrUnknown(job.jobClass))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Return code: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.returnedCode ?: "")
.text(getParamTextValueOrUnknown(job.returnedCode))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Job correlator: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.jobCorrelator ?: "")
.text(getParamTextValueOrUnknown(job.jobCorrelator))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand Down Expand Up @@ -160,15 +161,15 @@ class JobPropertiesDialog(val project: Project?, override var state: JobState) :
label("System executor: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.execSystem ?: "")
.text(getParamTextValueOrUnknown(job.execSystem))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Reason not running: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.reasonNotRunning ?: "")
.text(getParamTextValueOrUnknown(job.reasonNotRunning))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -181,23 +182,23 @@ class JobPropertiesDialog(val project: Project?, override var state: JobState) :
label("Submitted (input end time): ")
.widthGroup(sameWidthGroup)
textField()
.text(job.execSubmitted ?: "")
.text(getParamTextValueOrUnknown(job.execSubmitted))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Job start time: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.execStarted ?: "")
.text(getParamTextValueOrUnknown(job.execStarted))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Time ended: ")
.widthGroup(sameWidthGroup)
textField()
.text(job.execEnded ?: "")
.text(getParamTextValueOrUnknown(job.execEnded))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import eu.ibagroup.formainframe.common.ui.DialogMode
import eu.ibagroup.formainframe.common.ui.DialogState
import eu.ibagroup.formainframe.common.ui.StatefulComponent
import eu.ibagroup.formainframe.dataops.attributes.RemoteMemberAttributes
import eu.ibagroup.formainframe.utils.UNKNOWN_PARAM_VALUE
import eu.ibagroup.formainframe.utils.getParamTextValueOrUnknown
import javax.swing.JComponent

class MemberPropertiesDialog(var project: Project?, override var state: MemberState) : DialogWrapper(project),
Expand Down Expand Up @@ -54,7 +56,7 @@ class MemberPropertiesDialog(var project: Project?, override var state: MemberSt
if (member.versionNumber != null && member.modificationLevel != null) {
"${member.versionNumber}.${member.modificationLevel}"
} else {
""
UNKNOWN_PARAM_VALUE
}
)
.applyToComponent { isEditable = false }
Expand All @@ -64,31 +66,31 @@ class MemberPropertiesDialog(var project: Project?, override var state: MemberSt
label("Create Date: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.creationDate ?: "")
.text(getParamTextValueOrUnknown(member.creationDate))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Modification Date: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.modificationDate ?: "")
.text(getParamTextValueOrUnknown(member.modificationDate))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Modification Time: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.lastChangeTime ?: "")
.text(getParamTextValueOrUnknown(member.lastChangeTime))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Userid that Created/Modified: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.user ?: "")
.text(getParamTextValueOrUnknown(member.user))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -102,23 +104,23 @@ class MemberPropertiesDialog(var project: Project?, override var state: MemberSt
label("Current number of records: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.currentNumberOfRecords?.toString() ?: "")
.text(getParamTextValueOrUnknown(member.currentNumberOfRecords))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Beginning number of records: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.beginningNumberOfRecords?.toString() ?: "")
.text(getParamTextValueOrUnknown(member.beginningNumberOfRecords))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Number of changed records: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.numberOfChangedRecords?.toString() ?: "")
.text(getParamTextValueOrUnknown(member.numberOfChangedRecords))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand All @@ -144,63 +146,63 @@ class MemberPropertiesDialog(var project: Project?, override var state: MemberSt
label("Authorization code: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.authorizationCode ?: "")
.text(getParamTextValueOrUnknown(member.authorizationCode))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Current Member is alias of: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.aliasOf ?: "")
.text(getParamTextValueOrUnknown(member.aliasOf))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Load module attributes: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.loadModuleAttributes ?: "")
.text(getParamTextValueOrUnknown(member.loadModuleAttributes))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Member AMODE: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.amode ?: "")
.text(getParamTextValueOrUnknown(member.amode))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Member RMODE: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.rmode ?: "")
.text(getParamTextValueOrUnknown(member.rmode))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Size: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.size ?: "")
.text(getParamTextValueOrUnknown(member.size))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("Member TTR: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.ttr ?: "")
.text(getParamTextValueOrUnknown(member.ttr))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
row {
label("SSI information for a load module: ")
.widthGroup(sameWidthGroup)
textField()
.text(member.ssi ?: "")
.text(getParamTextValueOrUnknown(member.ssi))
.applyToComponent { isEditable = false }
.horizontalAlign(HorizontalAlign.FILL)
}
Expand Down
Loading

0 comments on commit 5b32a4d

Please sign in to comment.