-
Notifications
You must be signed in to change notification settings - Fork 9
Enhance spec and image selection feature #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,74 +84,77 @@ function initRecommendImageTablePmk() { | |||||||||||||||||||||||||||||
| width: 60, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "connectionName", | ||||||||||||||||||||||||||||||
| field: "connectionName", | ||||||||||||||||||||||||||||||
| headerSort: false, | ||||||||||||||||||||||||||||||
| visible: false | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "PROVIDER", | ||||||||||||||||||||||||||||||
| field: "providerName", | ||||||||||||||||||||||||||||||
| title: "BASIC", | ||||||||||||||||||||||||||||||
| field: "isBasicImage", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| headerHozAlign: "center", | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| maxWidth: 100, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "REGION", | ||||||||||||||||||||||||||||||
| field: "regionList", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| formatter: function(cell) { | ||||||||||||||||||||||||||||||
| var regions = cell.getValue(); | ||||||||||||||||||||||||||||||
| if (Array.isArray(regions)) { | ||||||||||||||||||||||||||||||
| return regions.join(", "); | ||||||||||||||||||||||||||||||
| var value = cell.getValue(); | ||||||||||||||||||||||||||||||
| if (value === true) { | ||||||||||||||||||||||||||||||
| return '<span style="color: green; font-weight: bold;">✓</span>'; | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| return '<span style="color: gray;">-</span>'; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| return regions; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "IMAGE NAME", | ||||||||||||||||||||||||||||||
| field: "name", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "left", | ||||||||||||||||||||||||||||||
| maxWidth: 200, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "CSP IMAGE", | ||||||||||||||||||||||||||||||
| field: "cspImageName", | ||||||||||||||||||||||||||||||
| title: "OS TYPE", | ||||||||||||||||||||||||||||||
| field: "osType", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| maxWidth: 150, | ||||||||||||||||||||||||||||||
| minWidth: 120, | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "OS TYPE", | ||||||||||||||||||||||||||||||
| field: "osType", | ||||||||||||||||||||||||||||||
| title: "IMAGE NAME", | ||||||||||||||||||||||||||||||
| field: "name", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| maxWidth: 120, | ||||||||||||||||||||||||||||||
| hozAlign: "left", | ||||||||||||||||||||||||||||||
| minWidth: 180, | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "OS ARCH", | ||||||||||||||||||||||||||||||
| field: "osArchitecture", | ||||||||||||||||||||||||||||||
| title: "OS DISTRIBUTION", | ||||||||||||||||||||||||||||||
| field: "osDistribution", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| maxWidth: 100, | ||||||||||||||||||||||||||||||
| hozAlign: "left", | ||||||||||||||||||||||||||||||
| minWidth: 300, | ||||||||||||||||||||||||||||||
| tooltip: true, | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "PLATFORM", | ||||||||||||||||||||||||||||||
| field: "osPlatform", | ||||||||||||||||||||||||||||||
| title: "GPU", | ||||||||||||||||||||||||||||||
| field: "isGPUImage", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| maxWidth: 120, | ||||||||||||||||||||||||||||||
| maxWidth: 80, | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| formatter: function(cell) { | ||||||||||||||||||||||||||||||
| var value = cell.getValue(); | ||||||||||||||||||||||||||||||
| if (value === true) { | ||||||||||||||||||||||||||||||
| return '<span style="color: blue; font-weight: bold;">✓</span>'; | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| return '<span style="color: gray;">-</span>'; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| title: "STATUS", | ||||||||||||||||||||||||||||||
| field: "imageStatus", | ||||||||||||||||||||||||||||||
| title: "K8S", | ||||||||||||||||||||||||||||||
| field: "isKubernetesImage", | ||||||||||||||||||||||||||||||
| vertAlign: "middle", | ||||||||||||||||||||||||||||||
| hozAlign: "center", | ||||||||||||||||||||||||||||||
| maxWidth: 100, | ||||||||||||||||||||||||||||||
| maxWidth: 80, | ||||||||||||||||||||||||||||||
| headerSort: true, | ||||||||||||||||||||||||||||||
| formatter: function(cell) { | ||||||||||||||||||||||||||||||
| var value = cell.getValue(); | ||||||||||||||||||||||||||||||
| if (value === true) { | ||||||||||||||||||||||||||||||
| return '<span style="color: purple; font-weight: bold;">✓</span>'; | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| return '<span style="color: gray;">-</span>'; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
@@ -191,30 +194,27 @@ export async function getRecommendImageInfoPmk() { | |||||||||||||||||||||||||||||
| var isGPUImage = $("#gpu_image_value-pmk").val() | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // 전역 변수에서 정보 가져오기 | ||||||||||||||||||||||||||||||
| var specId = window.selectedPmkSpecInfo.id; // spec의 전체 ID (예: "aws+ap-northeast-2+t2.small") | ||||||||||||||||||||||||||||||
| var provider = window.selectedPmkSpecInfo.provider; | ||||||||||||||||||||||||||||||
| var region = window.selectedPmkSpecInfo.regionName; | ||||||||||||||||||||||||||||||
| var connectionName = window.selectedPmkSpecInfo.connectionName; | ||||||||||||||||||||||||||||||
| var osArchitecture = window.selectedPmkSpecInfo.osArchitecture; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // 현재 workspace/project 정보 가져오기 | ||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||
| var selectedWorkspaceProject = await webconsolejs["partials/layout/navbar"].workspaceProjectInit(); | ||||||||||||||||||||||||||||||
| var nsId = selectedWorkspaceProject.nsId; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // API 호출을 위한 파라미터 구성 | ||||||||||||||||||||||||||||||
| // API 호출을 위한 파라미터 구성 (간단화된 방식) | ||||||||||||||||||||||||||||||
| var searchParams = { | ||||||||||||||||||||||||||||||
| includeDeprecatedImage: false, | ||||||||||||||||||||||||||||||
| isGPUImage: isGPUImage === "true", | ||||||||||||||||||||||||||||||
| isKubernetesImage: true, | ||||||||||||||||||||||||||||||
| isRegisteredByAsset: false, | ||||||||||||||||||||||||||||||
| osArchitecture: osArchitecture, | ||||||||||||||||||||||||||||||
| matchedSpecId: specId, // spec ID를 사용하여 provider, region, architecture 자동 매칭 | ||||||||||||||||||||||||||||||
| osType: osType, | ||||||||||||||||||||||||||||||
| providerName: provider.toLowerCase() || "", | ||||||||||||||||||||||||||||||
| regionName: region || "" | ||||||||||||||||||||||||||||||
| isKubernetesImage: true // PMK는 Kubernetes 이미지 필수 | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // GPU 이미지가 필요한 경우에만 추가 | ||||||||||||||||||||||||||||||
| if (isGPUImage === "true") { | ||||||||||||||||||||||||||||||
| searchParams.isGPUImage = true; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
@@ -237,14 +237,17 @@ export async function getRecommendImageInfoPmk() { | |||||||||||||||||||||||||||||
| fetchedTime: image.fetchedTime || new Date().toLocaleString(), | ||||||||||||||||||||||||||||||
| creationDate: image.creationDate || new Date().toISOString(), | ||||||||||||||||||||||||||||||
| osType: image.osType || osType, | ||||||||||||||||||||||||||||||
| osArchitecture: image.osArchitecture || osArchitecture, | ||||||||||||||||||||||||||||||
| osArchitecture: image.osArchitecture, | ||||||||||||||||||||||||||||||
| osPlatform: image.osPlatform || "Linux/UNIX", | ||||||||||||||||||||||||||||||
| osDistribution: image.osDistribution || "", | ||||||||||||||||||||||||||||||
| osDiskType: image.osDiskType || "ebs", | ||||||||||||||||||||||||||||||
| osDiskSizeGB: image.osDiskSizeGB || -1, | ||||||||||||||||||||||||||||||
| imageStatus: image.imageStatus || "Available", | ||||||||||||||||||||||||||||||
| description: image.description || image.name | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
| osDiskType: image.osDiskType || "ebs", | ||||||||||||||||||||||||||||||
| osDiskSizeGB: image.osDiskSizeGB || -1, | ||||||||||||||||||||||||||||||
| imageStatus: image.imageStatus || "Available", | ||||||||||||||||||||||||||||||
| description: image.description || image.name, | ||||||||||||||||||||||||||||||
| isBasicImage: image.isBasicImage || false, | ||||||||||||||||||||||||||||||
| isGPUImage: image.isGPUImage || false, | ||||||||||||||||||||||||||||||
| isKubernetesImage: image.isKubernetesImage || false | ||||||||||||||||||||||||||||||
|
Comment on lines
+243
to
+249
|
||||||||||||||||||||||||||||||
| osDiskType: image.osDiskType || "ebs", | |
| osDiskSizeGB: image.osDiskSizeGB || -1, | |
| imageStatus: image.imageStatus || "Available", | |
| description: image.description || image.name, | |
| isBasicImage: image.isBasicImage || false, | |
| isGPUImage: image.isGPUImage || false, | |
| isKubernetesImage: image.isKubernetesImage || false | |
| osDiskType: image.osDiskType || "ebs", | |
| osDiskSizeGB: image.osDiskSizeGB || -1, | |
| imageStatus: image.imageStatus || "Available", | |
| description: image.description || image.name, | |
| isBasicImage: image.isBasicImage || false, | |
| isGPUImage: image.isGPUImage || false, | |
| isKubernetesImage: image.isKubernetesImage || false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected. Lines 237-240 and 241-242 should use the same indentation level as the rest of the object properties. Ensure all property assignments within this object use consistent indentation.