Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Oct 29, 2024
1 parent b7d448a commit 5f3629b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@ import eu.ibagroup.formainframe.dataops.operations.ChangePasswordOperation
import eu.ibagroup.formainframe.dataops.operations.InfoOperation
import eu.ibagroup.formainframe.dataops.operations.ZOSInfoOperation
import eu.ibagroup.formainframe.explorer.EXPLORER_NOTIFICATION_GROUP_ID
import eu.ibagroup.formainframe.utils.*
import eu.ibagroup.formainframe.utils.crudable.Crudable
import eu.ibagroup.formainframe.utils.crudable.find
import eu.ibagroup.formainframe.utils.crudable.getAll
import eu.ibagroup.formainframe.utils.runTask
import eu.ibagroup.formainframe.utils.validateConnectionName
import eu.ibagroup.formainframe.utils.validateForBlank
import eu.ibagroup.formainframe.utils.validateZosmfUrl
import org.zowe.kotlinsdk.ChangePassword
import org.zowe.kotlinsdk.annotations.ZVersion
import java.awt.Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ import javax.swing.tree.TreeNode
val JOBS_LOG_VIEW = DataKey.create<JobBuildTreeView>("jobsLogView")
const val JOBS_LOG_NOTIFICATION_GROUP_ID = "eu.ibagroup.formainframe.explorer.ExplorerNotificationGroup"

const val SUCCESSFUL_JOB_COMPLETION_CODE = 0
const val SUCCESSFUL_JOB_COMPLETION_CODE_WITH_WARNING = 4

/**
* Console with BuildTree for display job execution process and results.
* @param jobLogInfo job process information necessary to get log and status.
Expand Down Expand Up @@ -144,7 +147,7 @@ class JobBuildTreeView(
} else ReturnCode.ERROR

jobLogger.fetchLog()
var finalLogFiles = jobLogger.logFetcher.getCachedLog()
val finalLogFiles = jobLogger.logFetcher.getCachedLog()
if (finalLogFiles.count() != spoolFileToLogMap.count()) {
onNextLog()
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/kotlin/eu/ibagroup/formainframe/utils/ussFileTagUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
package eu.ibagroup.formainframe.utils

import com.ibm.mq.headers.CCSID
import com.intellij.notification.Notification
import com.intellij.notification.NotificationType
import com.intellij.notification.Notifications
import com.intellij.openapi.components.service
import eu.ibagroup.formainframe.common.message
import eu.ibagroup.formainframe.config.connect.ConnectionConfig
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
import eu.ibagroup.formainframe.dataops.content.synchronizer.DEFAULT_BINARY_CHARSET
import eu.ibagroup.formainframe.dataops.operations.uss.ChangeFileTagOperation
import eu.ibagroup.formainframe.dataops.operations.uss.ChangeFileTagOperationParams
import eu.ibagroup.formainframe.telemetry.NotificationCompatibleException
import eu.ibagroup.formainframe.telemetry.NotificationsService
import okhttp3.ResponseBody
import okhttp3.internal.indexOfNonWhitespace
Expand All @@ -44,9 +41,11 @@ fun checkUssFileTag(attributes: RemoteUssAttributes) {
if (getSupportedEncodings().contains(charset)) {
attributes.charset = charset
} else {
notifyError(
message("filetag.unsupported.encoding.error.title", charset),
message("filetag.unsupported.encoding.error.message", DEFAULT_BINARY_CHARSET.name())
NotificationsService.errorNotification(
NotificationCompatibleException(
message("filetag.unsupported.encoding.error.title", charset),
message("filetag.unsupported.encoding.error.message", DEFAULT_BINARY_CHARSET.name())
)
)
attributes.charset = DEFAULT_BINARY_CHARSET
}
Expand Down Expand Up @@ -95,9 +94,10 @@ fun getUssFileTagCharset(attributes: RemoteUssAttributes): Charset? {
runCatching {
return Charset.forName(tagCharset)
}.onFailure {
notifyError(
message("filetag.encoding.detection.error.title"),
message("filetag.encoding.detection.error.message", DEFAULT_BINARY_CHARSET.name()),
NotificationsService.errorNotification(
it,
custTitle = message("filetag.encoding.detection.error.title"),
custDetailsShort = message("filetag.encoding.detection.error.message", DEFAULT_BINARY_CHARSET.name()),
)
}
}
Expand Down

0 comments on commit 5f3629b

Please sign in to comment.