skypilot-nightly 1.0.0.dev20250610__py3-none-any.whl → 1.0.0.dev20250612__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sky/__init__.py +2 -2
- sky/admin_policy.py +132 -6
- sky/benchmark/benchmark_state.py +39 -1
- sky/check.py +41 -2
- sky/cli.py +1 -1
- sky/client/cli.py +1 -1
- sky/clouds/kubernetes.py +1 -1
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/{4lwUJxN6KwBqUxqO1VccB → G3DXdMFu2Jzd-Dody9iq1}/_buildManifest.js +1 -1
- sky/dashboard/out/_next/static/chunks/600.15a0009177e86b86.js +16 -0
- sky/dashboard/out/_next/static/chunks/938-ab185187a63f9cdb.js +1 -0
- sky/dashboard/out/_next/static/chunks/{webpack-0574a5a4ba3cf0ac.js → webpack-208a9812ab4f61c9.js} +1 -1
- sky/dashboard/out/_next/static/css/{8b1c8321d4c02372.css → 5d71bfc09f184bab.css} +1 -1
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/global_user_state.py +38 -0
- sky/jobs/scheduler.py +4 -5
- sky/jobs/server/core.py +1 -68
- sky/jobs/state.py +104 -11
- sky/jobs/utils.py +5 -5
- sky/skylet/job_lib.py +95 -40
- sky/templates/jobs-controller.yaml.j2 +0 -23
- sky/users/permission.py +34 -17
- sky/utils/admin_policy_utils.py +32 -13
- sky/utils/controller_utils.py +10 -0
- sky/utils/schemas.py +11 -3
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/RECORD +45 -49
- sky/dashboard/out/_next/static/chunks/600.9cc76ec442b22e10.js +0 -16
- sky/dashboard/out/_next/static/chunks/938-a75b7712639298b7.js +0 -1
- sky/jobs/dashboard/dashboard.py +0 -223
- sky/jobs/dashboard/static/favicon.ico +0 -0
- sky/jobs/dashboard/templates/index.html +0 -831
- sky/jobs/server/dashboard_utils.py +0 -69
- /sky/dashboard/out/_next/static/{4lwUJxN6KwBqUxqO1VccB → G3DXdMFu2Jzd-Dody9iq1}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-4768de0aede04dc9.js → _app-7bbd9d39d6f9a98a.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/top_level.txt +0 -0
{skypilot_nightly-1.0.0.dev20250610.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/RECORD
RENAMED
@@ -1,14 +1,14 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
2
|
-
sky/admin_policy.py,sha256=
|
1
|
+
sky/__init__.py,sha256=ss-7CkUkOp1OzvaxGhEv8rCdJsDT4KGqPTcMbkT1aYo,6413
|
2
|
+
sky/admin_policy.py,sha256=ICP2Q3O93uVgUWc3sSvQDnRXgvFCA6APRX33hU3P3OI,8502
|
3
3
|
sky/authentication.py,sha256=znccODHpqQV_wo4Y5zAEA9I43gdMRyj_bKiO1feZBgc,24799
|
4
|
-
sky/check.py,sha256=
|
5
|
-
sky/cli.py,sha256=
|
4
|
+
sky/check.py,sha256=UurgFjOL_s3Gfx2nHPff6fpYcrIziZj6UQGy84oTeB8,30191
|
5
|
+
sky/cli.py,sha256=kH2ljshZiKiYDeBNJKI-751i7_d5PJnVDZ7BChYWT_o,245252
|
6
6
|
sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
|
7
7
|
sky/core.py,sha256=1A2vRsNScNduqZITNJXzwgQ2d49YGa1O6WG5x_Wkg1Q,52185
|
8
8
|
sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
|
9
9
|
sky/exceptions.py,sha256=hjqKX-WafKDvwBTpZp0f63E_bLCe56ml2jUBJpfEQ7I,18404
|
10
10
|
sky/execution.py,sha256=LIRTPuRJFyvNkx1ZlIyUhbcy7k4YUnU-MEx6lnH1pg0,32990
|
11
|
-
sky/global_user_state.py,sha256=
|
11
|
+
sky/global_user_state.py,sha256=yvPFa5v01ZfNf14pdzHbwQ3qF7w8wqS43gzLYrTLFN4,53284
|
12
12
|
sky/models.py,sha256=VGMzCHRwjJRQBm6Y054vL6Yvfkrcm79b5dPpdXS3Syk,2183
|
13
13
|
sky/optimizer.py,sha256=2JZl6exFMuOAzpWefvfY9CZPWnvjDLLvR92A2qpvtRs,61418
|
14
14
|
sky/resources.py,sha256=pmDPdoScIQy_9kAlBdGTeRqtWfafKlcqUAA-NrtxfVk,97155
|
@@ -40,7 +40,7 @@ sky/backends/local_docker_backend.py,sha256=r80BGJZmAH8F49v6Y_pG3_pHmW5LQEQRusLk
|
|
40
40
|
sky/backends/wheel_utils.py,sha256=IUruJijm5854UGDdSayHbHzjjWRM46bATK1nSnK44xY,11071
|
41
41
|
sky/backends/monkey_patches/monkey_patch_ray_up.py,sha256=76-y2fCaE3JINj8lEwHT1eirYzCbpD8O1ySsysuGu8o,3450
|
42
42
|
sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
sky/benchmark/benchmark_state.py,sha256=
|
43
|
+
sky/benchmark/benchmark_state.py,sha256=nVe-RNqbhq4Tc2jlxRI15U4Zeo6zwov7GyhTXGRFOjQ,9634
|
44
44
|
sky/benchmark/benchmark_utils.py,sha256=7rf-iHt6RXZ_pnBBWOMwcdodHQW69x27xNyx0yVog1U,26385
|
45
45
|
sky/catalog/__init__.py,sha256=BkIr4FdTpuIuynl5ijTraecm38viZjRgY3jIexlDbgk,14602
|
46
46
|
sky/catalog/aws_catalog.py,sha256=VnFLKmr4nBuc5NXske7thEByJz_wOg9w5vuN6FtLMuo,13473
|
@@ -74,7 +74,7 @@ sky/catalog/data_fetchers/fetch_lambda_cloud.py,sha256=MUzogyLruLQmIt-To6TsfnGPg
|
|
74
74
|
sky/catalog/data_fetchers/fetch_vast.py,sha256=MRxk52FUeG-R2hPUbkH44HXRPou73dxXWYAHDEXg3xU,5016
|
75
75
|
sky/catalog/data_fetchers/fetch_vsphere.py,sha256=Yf7tKzwJsQ_4f64IT1EAP108C1D3Rg35RUIwp7UX8KI,21438
|
76
76
|
sky/client/__init__.py,sha256=pz6xvVSd9X-gwqbsDL0E9QOojYqM0KAD0j-NCyCIF1k,38
|
77
|
-
sky/client/cli.py,sha256=
|
77
|
+
sky/client/cli.py,sha256=kH2ljshZiKiYDeBNJKI-751i7_d5PJnVDZ7BChYWT_o,245252
|
78
78
|
sky/client/common.py,sha256=E_5cjxd8fWRB7fU1yfIbiyQf-IyVhpD5KkB7Fl3cQEI,15215
|
79
79
|
sky/client/oauth.py,sha256=sNJ_DMsSTcxluj5FeNQ2IafZJLImRFmCAZ79bXeABn4,2871
|
80
80
|
sky/client/sdk.py,sha256=ctXeEOYA76Ue8OxsPHS_0gajF1OVXoGbed0iCQ0-vtQ,83737
|
@@ -87,7 +87,7 @@ sky/clouds/do.py,sha256=lBXN9x8ZeS1P4r5znfSTcDVPWAiLif7gt7agcWdchMo,11900
|
|
87
87
|
sky/clouds/fluidstack.py,sha256=ya9eUT9jCaTsRozIjyq1M_c0EQDJWeNQJrscBAzKZv0,12933
|
88
88
|
sky/clouds/gcp.py,sha256=DNk624joqKWAs1_LPaPzbInOtXZpY_0A9vLcIQPx4JM,67668
|
89
89
|
sky/clouds/ibm.py,sha256=FPU8j20LSBxr7gilD4F2liMG40eQyxp2ZDqNh-pmKYU,22262
|
90
|
-
sky/clouds/kubernetes.py,sha256=
|
90
|
+
sky/clouds/kubernetes.py,sha256=nyW5NgcJ-9gXSSjfrb5mJB6VZ2u1xWgMz2w7Z1XMnf0,43723
|
91
91
|
sky/clouds/lambda_cloud.py,sha256=ZBpIA3wO8aNV-Ox1TpxE91J4K6Tcfp8pFXLh192lE3c,12993
|
92
92
|
sky/clouds/nebius.py,sha256=sgQnDY6Tjaur5VgjqWi00LB5sixo4xqxIUD15DZeiEM,20521
|
93
93
|
sky/clouds/oci.py,sha256=lMUO5SjgFZK1rs2KOoBG-hePRLiHEcbNWP44weugav8,27875
|
@@ -103,18 +103,18 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
|
|
103
103
|
sky/clouds/utils/gcp_utils.py,sha256=rh4a91euYFflq6V7bLpY9XnAwnwyNczRueOShpD-E8U,7204
|
104
104
|
sky/clouds/utils/oci_utils.py,sha256=0YxhgZdeIHQUI1AZ86YuswsZg5HdVCIVfSTRJsSHYI0,6396
|
105
105
|
sky/clouds/utils/scp_utils.py,sha256=MqawUhhFHHxVnn29nOI4gJ_nF665ich4Po7bsy1afsA,15948
|
106
|
-
sky/dashboard/out/404.html,sha256=
|
107
|
-
sky/dashboard/out/clusters.html,sha256=
|
108
|
-
sky/dashboard/out/config.html,sha256=
|
106
|
+
sky/dashboard/out/404.html,sha256=C3fdWMIlm2OJ38s7NDi0PWwDHd_-KEavVVzBlTGFmR4,1423
|
107
|
+
sky/dashboard/out/clusters.html,sha256=OAzSRiFM3wzF0j13UVcvtRAgYlkZl6o6yYif0xMKw5Q,1418
|
108
|
+
sky/dashboard/out/config.html,sha256=3L6BD_DIJkuxYvxhMshGg35o921NWR0Oa8FhZcNqs9Q,1414
|
109
109
|
sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
|
110
|
-
sky/dashboard/out/index.html,sha256=
|
111
|
-
sky/dashboard/out/infra.html,sha256=
|
112
|
-
sky/dashboard/out/jobs.html,sha256=
|
110
|
+
sky/dashboard/out/index.html,sha256=ksYYXGVas14Up-G3gVxncTbqBzjpO8ZRX-NTILx65TI,1407
|
111
|
+
sky/dashboard/out/infra.html,sha256=Zup4zRA6G0Vrhh3CuFEd3exMJTPs2jq9vfixg9rmMnQ,1412
|
112
|
+
sky/dashboard/out/jobs.html,sha256=jWx2Q0XA6FcBBDgmDYyvOuUqtbKGcDwp1XJbHqACGqc,1410
|
113
113
|
sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
|
114
|
-
sky/dashboard/out/users.html,sha256=
|
115
|
-
sky/dashboard/out/workspaces.html,sha256=
|
116
|
-
sky/dashboard/out/_next/static/
|
117
|
-
sky/dashboard/out/_next/static/
|
114
|
+
sky/dashboard/out/users.html,sha256=RR2OUYDTb41S44cfDa1t9mkFzbxkrE2UKqc-fUKyXBc,1412
|
115
|
+
sky/dashboard/out/workspaces.html,sha256=G39fTgEhY-o5L7v-tjhnp1wnsRtCEzSQiShcXbPSeS0,1422
|
116
|
+
sky/dashboard/out/_next/static/G3DXdMFu2Jzd-Dody9iq1/_buildManifest.js,sha256=W7MSUq6ZDL-PV43G52s_pEnn-xt7FCGvm63yyGhAvsk,2046
|
117
|
+
sky/dashboard/out/_next/static/G3DXdMFu2Jzd-Dody9iq1/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
118
118
|
sky/dashboard/out/_next/static/chunks/211.692afc57e812ae1a.js,sha256=TbpmhT-AzGXhDbjA6mJG_D5dLgq_st-hMr0nbCpRsEY,3778
|
119
119
|
sky/dashboard/out/_next/static/chunks/350.9e123a4551f68b0d.js,sha256=Sj1tcifLEZKm43SFf3zYfT0VC-kcGSb18EV3kV_KTTs,266
|
120
120
|
sky/dashboard/out/_next/static/chunks/37-d8aebf1683522a0b.js,sha256=FytwU6I8f34I_jXSOhYikikHTDxmfME77m4AJ0HNz2o,14258
|
@@ -123,7 +123,7 @@ sky/dashboard/out/_next/static/chunks/443.b2242d0efcdf5f47.js,sha256=PCxtMhwuF2Y
|
|
123
123
|
sky/dashboard/out/_next/static/chunks/470-4d1a5dbe58a8a2b9.js,sha256=0MuG5Pz7NNXqyx-qKypATSoqxOUW3O4TOt05o61aEMs,24055
|
124
124
|
sky/dashboard/out/_next/static/chunks/491.b3d264269613fe09.js,sha256=WVRPM-7C1QZqInNmEaFw_vpaCR0GcyjnOTvGMWdbYRs,8486
|
125
125
|
sky/dashboard/out/_next/static/chunks/513.211357a2914a34b2.js,sha256=LVORx7RnNqZDqkboJB84kjTA2uIE6dAzVGZU73LsP-8,7079
|
126
|
-
sky/dashboard/out/_next/static/chunks/600.
|
126
|
+
sky/dashboard/out/_next/static/chunks/600.15a0009177e86b86.js,sha256=K9Qhk5X3IgMFHB8OItWgBD9_4OCF-ZCvr_TMm5iqv20,14522
|
127
127
|
sky/dashboard/out/_next/static/chunks/616-d6128fa9e7cae6e6.js,sha256=KdZtaXM4mX6I7wJME5yyIOOX8jGgstijnb9QPgo3bdM,179244
|
128
128
|
sky/dashboard/out/_next/static/chunks/664-047bc03493fda379.js,sha256=zPR7g3iSBlKD2s7vlzJ9sBtaNkg6uqdp1u_0587Fxyo,6556
|
129
129
|
sky/dashboard/out/_next/static/chunks/682.4dd5dc116f740b5f.js,sha256=VgnSHJUwbZQokAwmnrlF_0t9Cb4lrJoZ1oaSwuOxT48,17253
|
@@ -135,7 +135,7 @@ sky/dashboard/out/_next/static/chunks/843-6fcc4bf91ac45b39.js,sha256=GLzSTxq-eW2
|
|
135
135
|
sky/dashboard/out/_next/static/chunks/856-0776dc6ed6000c39.js,sha256=UXs-dlCEkvrWUKQdm2z0JXso7-p1x-aMWRe0QGHQ5kg,13158
|
136
136
|
sky/dashboard/out/_next/static/chunks/901-b424d293275e1fd7.js,sha256=USJBNVTy4Wh7XiefTztrin48bUQU93kBmhjDegpPN1s,13128
|
137
137
|
sky/dashboard/out/_next/static/chunks/937.3759f538f11a0953.js,sha256=IaXGhx7oSJ72AJzmF9c1IoK02F_rVo_YlnM2WWofWPo,54431
|
138
|
-
sky/dashboard/out/_next/static/chunks/938-
|
138
|
+
sky/dashboard/out/_next/static/chunks/938-ab185187a63f9cdb.js,sha256=V9nyj9rWcFazOuvwsWpeGx7eaMNYuFE2Nf-89gNQlYA,24315
|
139
139
|
sky/dashboard/out/_next/static/chunks/947-6620842ef80ae879.js,sha256=wVQ6A5PftPlT_QrlH9sd3i1IKtJLXBWg6rVisQ9Ktfs,10017
|
140
140
|
sky/dashboard/out/_next/static/chunks/969-20d54a9d998dc102.js,sha256=dhTHKL4XMjs41yoIdUKiAD-GyzEwB93bW6cr3I0gz2k,9818
|
141
141
|
sky/dashboard/out/_next/static/chunks/973-c807fc34f09c7df3.js,sha256=Ae6HPYDbcw8KzXylLfuirURKWoxuA6y6Vhk1PR-t4U0,10628
|
@@ -144,8 +144,8 @@ sky/dashboard/out/_next/static/chunks/framework-87d061ee6ed71b28.js,sha256=dh6TK
|
|
144
144
|
sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js,sha256=P0_tU7pqs_pOQaw-lVzCNl6recBw5lFfkAD0jRk2uzc,115881
|
145
145
|
sky/dashboard/out/_next/static/chunks/main-e0e2335212e72357.js,sha256=BxTmVbZDnMUQvQd57MEl1Ui0VZaNmwLOviY7h_xMjP0,109884
|
146
146
|
sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
147
|
-
sky/dashboard/out/_next/static/chunks/webpack-
|
148
|
-
sky/dashboard/out/_next/static/chunks/pages/_app-
|
147
|
+
sky/dashboard/out/_next/static/chunks/webpack-208a9812ab4f61c9.js,sha256=cAlrprEhS2R8FPTxQl3lJ-wNlyv95SwWiOtWlNmBTvY,4374
|
148
|
+
sky/dashboard/out/_next/static/chunks/pages/_app-7bbd9d39d6f9a98a.js,sha256=Qj_hJjnLv8ie72A2DpWrlKtsEXexaP4nF_KXS5fDv0o,7561
|
149
149
|
sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js,sha256=TZqrus06KKPx-CMABDMPKF7w-NQ5s2gwJAM8Huyl7qU,247
|
150
150
|
sky/dashboard/out/_next/static/chunks/pages/clusters-e56b17fd85d0ba58.js,sha256=fNryBnRgWUceH52hOU5C-VxJUV80Aq5CV3_KcLyXHCc,824
|
151
151
|
sky/dashboard/out/_next/static/chunks/pages/config-497a35a7ed49734a.js,sha256=k2YHzF8wufXE14sR1QnfE7wrWtrnmcg8BL-4iwh9MKw,776
|
@@ -160,14 +160,14 @@ sky/dashboard/out/_next/static/chunks/pages/infra/[context]-d2910be98e9227cb.js,
|
|
160
160
|
sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-b3dbf38b51cb29be.js,sha256=GfowjegxmPpgGTlmdD5uY8cmmH_h_O3sGmO_eKlrwc0,23554
|
161
161
|
sky/dashboard/out/_next/static/chunks/pages/workspace/new-31aa8bdcb7592635.js,sha256=Rp48cs4oSH9b8voWWgYMePJdmKx9Qt0KpjcOWOeBp5o,758
|
162
162
|
sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-c8c2191328532b7d.js,sha256=Fy7YhuXjR14ZLOKUEYVtJnaoDDLX5AM_etnoZf65V3k,4385
|
163
|
-
sky/dashboard/out/_next/static/css/
|
164
|
-
sky/dashboard/out/clusters/[cluster].html,sha256=
|
165
|
-
sky/dashboard/out/clusters/[cluster]/[job].html,sha256=
|
166
|
-
sky/dashboard/out/infra/[context].html,sha256=
|
167
|
-
sky/dashboard/out/jobs/[job].html,sha256=
|
163
|
+
sky/dashboard/out/_next/static/css/5d71bfc09f184bab.css,sha256=bcfpiDci6pzA_D7qpHppavKzotSeYzFQFLsc71AARxA,40435
|
164
|
+
sky/dashboard/out/clusters/[cluster].html,sha256=fNVlPckgl0a-yJ-3YzVI-lpDq8h_fKzD4TnObsuhDy4,2659
|
165
|
+
sky/dashboard/out/clusters/[cluster]/[job].html,sha256=3Z-SgU78B-NkyLXyaFKGmt048cLXLVt5Au4sO3_J4wA,1980
|
166
|
+
sky/dashboard/out/infra/[context].html,sha256=HsxAYWIeVzE9B8YNnVWXahKDEfyAd5nm836bs1bVgQg,1436
|
167
|
+
sky/dashboard/out/jobs/[job].html,sha256=3wI252fnmQacqfOdKrx7IjK4iK5_hPnAZoZUr_YSxw0,2122
|
168
168
|
sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
|
169
|
-
sky/dashboard/out/workspace/new.html,sha256=
|
170
|
-
sky/dashboard/out/workspaces/[name].html,sha256=
|
169
|
+
sky/dashboard/out/workspace/new.html,sha256=nEelfSHFGi5jVbmUQroiPnAI5BmW7iOlmNuoq-l30Cc,1428
|
170
|
+
sky/dashboard/out/workspaces/[name].html,sha256=4vItCXBK8ikE4eg2kvPc-wp2qnPgwFk6fVInwfWCOuM,2658
|
171
171
|
sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
172
172
|
sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
|
173
173
|
sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
|
@@ -178,17 +178,13 @@ sky/jobs/__init__.py,sha256=qoI53-xXE0-SOkrLWigvhgFXjk7dWE0OTqGPYIk-kmM,1458
|
|
178
178
|
sky/jobs/constants.py,sha256=4r_a85PdRSc3d4YzPnrxDQuhxt6b8Oc5fhAaV7W-jwg,3329
|
179
179
|
sky/jobs/controller.py,sha256=1MHXM4fmPdVuOPeqsOpNxyTFUPlJWC9JGmFytaG35aY,31211
|
180
180
|
sky/jobs/recovery_strategy.py,sha256=a9A4W-6U3KU-pjkWiFpIdgTHC8W26-jYrmi4vzU9iOg,28818
|
181
|
-
sky/jobs/scheduler.py,sha256=
|
182
|
-
sky/jobs/state.py,sha256=
|
183
|
-
sky/jobs/utils.py,sha256=
|
181
|
+
sky/jobs/scheduler.py,sha256=80lZNPlsEZSxEE4JG3g8TxZq68M6-u3HMUHiCRJz8BI,14169
|
182
|
+
sky/jobs/state.py,sha256=OZK1HaLAOh3H1DVV9PutMX2zugIT8NGxuyge8l3h6hs,52538
|
183
|
+
sky/jobs/utils.py,sha256=KM57CrD1RcQWxrTJAooGBzwRGmlHmUPZPk4ChGzCRYY,65155
|
184
184
|
sky/jobs/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
185
185
|
sky/jobs/client/sdk.py,sha256=cVylGbRVBVigNENbxb5bw4M5IRz22toOP8GIaih0gMw,11172
|
186
|
-
sky/jobs/dashboard/dashboard.py,sha256=JKg8cCH_Y0sf3MoDTx85BghVEXWpp8ItPLshp09-_Js,7618
|
187
|
-
sky/jobs/dashboard/static/favicon.ico,sha256=uYlvgxSM7gjBmXpZ8wydvZUPAbJiiix-rc2Xe5mma9s,15086
|
188
|
-
sky/jobs/dashboard/templates/index.html,sha256=NrlTDiEHJDt7sViwWgXUSxVCyVl_IEukE5jdvN8WhtQ,33132
|
189
186
|
sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
190
|
-
sky/jobs/server/core.py,sha256=
|
191
|
-
sky/jobs/server/dashboard_utils.py,sha256=2Mbx40W1pQqPEPHsSDbHeaF0j5cgyKy-_A9Owdwp_AQ,2315
|
187
|
+
sky/jobs/server/core.py,sha256=fwtfN5XXAoXrozoDR1PY_2Oeb4uC9KLllmxQI6_DmcU,26508
|
192
188
|
sky/jobs/server/server.py,sha256=ae8JAs-2ipWqL_GsA3x8T2mY-OJLc3ioWg_CfRzCUIY,4011
|
193
189
|
sky/provision/__init__.py,sha256=c4QZli6zQz1YVG0plR27kGDjxhRQwDrT5d0UZemrNPI,6487
|
194
190
|
sky/provision/common.py,sha256=mTsL1UU-kPYGAc1gWUo-btI8bdL6tAWg9OMMAb-v8ws,10197
|
@@ -330,7 +326,7 @@ sky/skylet/autostop_lib.py,sha256=kGUnHm-jpF4zl3UJfB-4pnoldWpnVeR96WwYGSw7em0,46
|
|
330
326
|
sky/skylet/configs.py,sha256=UtnpmEL0F9hH6PSjhsps7xgjGZ6qzPOfW1p2yj9tSng,1887
|
331
327
|
sky/skylet/constants.py,sha256=IEVpBZevkUgRLPKI3UnKt4tjV7Vl7CRWh8xNRid9Rfo,21197
|
332
328
|
sky/skylet/events.py,sha256=pnV3ZiwWhXqTHpU5B5Y9Xwam_7FQDI6IrxgSx7X_NVA,12743
|
333
|
-
sky/skylet/job_lib.py,sha256=
|
329
|
+
sky/skylet/job_lib.py,sha256=caLx3YRnOKEN34rPQWOi0-v49NkeHftSblD5mowBqS8,45688
|
334
330
|
sky/skylet/log_lib.py,sha256=9nLOhevnM668itQyVyPSoQHKfZ2MWm_FwXPxK28X0oM,23201
|
335
331
|
sky/skylet/log_lib.pyi,sha256=6LXFSpyW4lMHAELKllvK73B3538JjSo9lPw30DEuO0o,4542
|
336
332
|
sky/skylet/skylet.py,sha256=mWmqCvxSlfdVU_L8NL6P52jmCt3smd8K0HdyNBfMPeI,1234
|
@@ -359,7 +355,7 @@ sky/templates/do-ray.yml.j2,sha256=7XZsM2H6RF2muHCm6xnqglnKhONXH8S3Y_mFiVxD558,4
|
|
359
355
|
sky/templates/fluidstack-ray.yml.j2,sha256=dNr9svMNp0z6-PHyQeRa6Hl3SbgqMESgBdfpvtP3aH0,3789
|
360
356
|
sky/templates/gcp-ray.yml.j2,sha256=2wK1j7nkLzZm2kHIbc76WZ-dk4yxObzBEEhzTEQUOuc,11789
|
361
357
|
sky/templates/ibm-ray.yml.j2,sha256=n_EsoqQx1DUPDh7ZgCxvlEEZnROJ4rBXrFcHYVRIN2c,6907
|
362
|
-
sky/templates/jobs-controller.yaml.j2,sha256=
|
358
|
+
sky/templates/jobs-controller.yaml.j2,sha256=vtHZdioV_KopcAf1wpzH_J0WXvq2o0oFs8TE3QQ3KYY,1949
|
363
359
|
sky/templates/kubernetes-ingress.yml.j2,sha256=73iDklVDWBMbItg0IexCa6_ClXPJOxw7PWz3leku4nE,1340
|
364
360
|
sky/templates/kubernetes-loadbalancer.yml.j2,sha256=IxrNYM366N01bbkJEbZ_UPYxUP8wyVEbRNFHRsBuLsw,626
|
365
361
|
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=iw7mypHszg6Ggq9MbyiYMFOkSlXaQZulaxqC5IWYGCc,3381
|
@@ -382,12 +378,12 @@ sky/usage/constants.py,sha256=mFrTgrFIfFf4kpcl-M1VDU7_moD5_mJazUJTUDrybms,1102
|
|
382
378
|
sky/usage/usage_lib.py,sha256=PEjQH7do7lrcGMaIqW6bFQvNIFo-ipoF7L0xlt3vmDg,21427
|
383
379
|
sky/users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
384
380
|
sky/users/model.conf,sha256=nPAaMai2fc-nlnEDTfW5Lyw6vgCcOS32BSms4aFOHoY,259
|
385
|
-
sky/users/permission.py,sha256=
|
381
|
+
sky/users/permission.py,sha256=97aCM-HmYzoy7WqSJTMm9PBR9dlFx2P6XHdFHvWsjwk,12920
|
386
382
|
sky/users/rbac.py,sha256=7JYzyeY9HoXAiCmYxWXz_hiBrmJ2G1JUEaMEfqxHj8Y,3472
|
387
383
|
sky/users/server.py,sha256=aDAymKbfhz0sOpx4nayTJRKEgPZzxJllk4P0mPlgqJk,2417
|
388
384
|
sky/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
389
385
|
sky/utils/accelerator_registry.py,sha256=yNP7HDflg2bnhnCXFfjdVmJcpId7WBQCQPiGuc41EwE,3874
|
390
|
-
sky/utils/admin_policy_utils.py,sha256=
|
386
|
+
sky/utils/admin_policy_utils.py,sha256=rCzygcM7gC3b_hpw9h4SbFQZR3ofwt1CdD1dFPSaJnA,6914
|
391
387
|
sky/utils/annotations.py,sha256=-rfacB30Sl0xkFriejGvxma3oKctGfXXLZkQPHG33eo,1626
|
392
388
|
sky/utils/atomic.py,sha256=vrw-7XCnckF0xCx-ttamao7evPdGtVsnjaTtgMlBXIE,1280
|
393
389
|
sky/utils/cluster_utils.py,sha256=s6DFRXktv6_gF_DnwDEXJ7CniifHp8CAPeGciRCbXgI,14432
|
@@ -399,7 +395,7 @@ sky/utils/config_utils.py,sha256=v8yZcr8OvEfXmBDYcdOj3U-AH1XERY76zGJMNdqzvqc,103
|
|
399
395
|
sky/utils/context.py,sha256=SfWg8vGb-nKYvzY-LL1PhxzoPLRmqGB0g0oTqdXXsXY,9842
|
400
396
|
sky/utils/context_utils.py,sha256=cby-QPmnGObjIE4K7eZ_dkWZdUo7YJUmnJr5oKf_v54,6712
|
401
397
|
sky/utils/control_master_utils.py,sha256=iD4M0onjYOdZ2RuxjwMBl4KhafHXJzuHjvqlBUnu-VE,1450
|
402
|
-
sky/utils/controller_utils.py,sha256=
|
398
|
+
sky/utils/controller_utils.py,sha256=DabTg70Vcnpqnbf6U3vBnzozhl0PYXDWctVzg8FSm_U,54851
|
403
399
|
sky/utils/dag_utils.py,sha256=FjxMaAT6ia4ndVg-ogXgiekLGD1GiPCAdK_c-cjIeuY,7607
|
404
400
|
sky/utils/db_utils.py,sha256=MlJN4dVUEcMkLMn5rYi1F-WnD9ap2oOoF9lDiqlL0h4,5243
|
405
401
|
sky/utils/env_options.py,sha256=aaD6GoYK0LaZIqjOEZ-R7eccQuiRriW3EuLWtOI5En8,1578
|
@@ -411,7 +407,7 @@ sky/utils/registry.py,sha256=I08nS0rvCF-xR5GEZoHEVgN1jcOeglz77h7xPpBCIjU,4179
|
|
411
407
|
sky/utils/resources_utils.py,sha256=C_iDlFz1CGgkNusiy5OdKpiLHZKWpzILiISgMyLOAq0,12578
|
412
408
|
sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
|
413
409
|
sky/utils/rich_utils.py,sha256=EmtLN6U49SKiANTGmqgZXICXEnDLJW9EPpw6O4-FVUE,14432
|
414
|
-
sky/utils/schemas.py,sha256=
|
410
|
+
sky/utils/schemas.py,sha256=xy9kHT6oB53JUe4WAshfNKxMcfW7nxfLlPyJZrB8i-4,43852
|
415
411
|
sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
|
416
412
|
sky/utils/subprocess_utils.py,sha256=3euz4h7B-tHulmjhQUkY9oWUA0Np5hlL8kHdTHHZOs0,16060
|
417
413
|
sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
|
@@ -441,9 +437,9 @@ sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
437
|
sky/workspaces/core.py,sha256=2kKUP-V5Qo1n-xfayA4M1OE_ina6_4bxkTF3dv3yBEU,20704
|
442
438
|
sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
|
443
439
|
sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
|
444
|
-
skypilot_nightly-1.0.0.
|
445
|
-
skypilot_nightly-1.0.0.
|
446
|
-
skypilot_nightly-1.0.0.
|
447
|
-
skypilot_nightly-1.0.0.
|
448
|
-
skypilot_nightly-1.0.0.
|
449
|
-
skypilot_nightly-1.0.0.
|
440
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
441
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/METADATA,sha256=Vy1CBmbfGe8IBvBWf-zEjuORCSJbyBQEUVT6xAIBISQ,18434
|
442
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
443
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
444
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
445
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[600,211],{3626:function(e,r,t){t.d(r,{Z:function(){return s}});/**
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
3
|
-
*
|
4
|
-
* This source code is licensed under the ISC license.
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
6
|
-
*/let s=(0,t(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},3767:function(e,r,t){t.d(r,{Z:function(){return s}});/**
|
7
|
-
* @license lucide-react v0.407.0 - ISC
|
8
|
-
*
|
9
|
-
* This source code is licensed under the ISC license.
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
11
|
-
*/let s=(0,t(998).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},803:function(e,r,t){t.d(r,{z:function(){return c}});var s=t(5893),a=t(7294),n=t(8426),l=t(2003),i=t(2350);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=a.forwardRef((e,r)=>{let{className:t,variant:a,size:l,asChild:c=!1,...d}=e,u=c?n.g7:"button";return(0,s.jsx)(u,{className:(0,i.cn)(o({variant:a,size:l,className:t})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,t){t.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return m},eW:function(){return f},ll:function(){return d}});var s=t(5893),a=t(7294),n=t(5697),l=t.n(n),i=t(2350);let o=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...n,children:a})});o.displayName="Card",o.propTypes={className:l().string,children:l().node};let c=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",t),...n,children:a})});c.displayName="CardHeader",c.propTypes={className:l().string,children:l().node};let d=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("h3",{ref:r,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",t),...n,children:a})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("p",{ref:r,className:(0,i.cn)("text-sm text-muted-foreground",t),...n,children:a})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let m=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("p-6 pt-0",t),...n,children:a})});m.displayName="CardContent",m.propTypes={className:l().string,children:l().node};let f=a.forwardRef((e,r)=>{let{className:t,children:a,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex items-center p-6 pt-0",t),...n,children:a})});f.displayName="CardFooter",f.propTypes={className:l().string,children:l().node}},8764:function(e,r,t){t.d(r,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var s=t(5893),a=t(7294),n=t(2350);let l=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:r,className:(0,n.cn)("w-full caption-bottom text-base",t),...a})})});l.displayName="Table";let i=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("thead",{ref:r,className:(0,n.cn)("[&_tr]:border-b",t),...a})});i.displayName="TableHeader";let o=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("tbody",{ref:r,className:(0,n.cn)("[&_tr:last-child]:border-0",t),...a})});o.displayName="TableBody",a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("tfoot",{ref:r,className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...a})}).displayName="TableFooter";let c=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("tr",{ref:r,className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...a})});c.displayName="TableRow";let d=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("th",{ref:r,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...a})});d.displayName="TableHead";let u=a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("td",{ref:r,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a})});u.displayName="TableCell",a.forwardRef((e,r)=>{let{className:t,...a}=e;return(0,s.jsx)("caption",{ref:r,className:(0,n.cn)("mt-4 text-base text-muted-foreground",t),...a})}).displayName="TableCaption"},3600:function(e,r,t){t.r(r),t.d(r,{Users:function(){return T}});var s=t(5893),a=t(7294),n=t(5697),l=t.n(n),i=t(8799),o=t(1664),c=t.n(o);t(803);var d=t(8764),u=t(3081),m=t(3266),f=t(8969),x=t(6378),p=t(6856),h=t(1214),g=t(4545),b=t(3626),y=t(282),j=t(3767);/**
|
12
|
-
* @license lucide-react v0.407.0 - ISC
|
13
|
-
*
|
14
|
-
* This source code is licensed under the ISC license.
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
16
|
-
*/let N=(0,t(998).Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);t(9470);var v=t(3001),w=t(7673),C=t(7145);let k=(e,r)=>{if(e&&e.includes("@"))return e.split("@")[0];let t=e||"N/A";return r&&r!==t?"".concat(t," (").concat(r,")"):t},R=e=>e&&e.includes("@")?e:"-",E=h.nb.REFRESH_INTERVAL;function T(){let[e,r]=(0,a.useState)(!1),t=(0,a.useRef)(null),n=(0,v.X)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(c(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(i.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{x.default.invalidate(u.R),x.default.invalidate(m.getClusters),x.default.invalidate(f.getManagedJobs,[{allUsers:!0}]),t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(b.Z,{className:"h-4 w-4 mr-1.5"}),!n&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(Z,{refreshInterval:E,setLoading:r,refreshDataRef:t})]})}function Z(e){let{refreshInterval:r,setLoading:t,refreshDataRef:n}=e,[l,o]=(0,a.useState)([]),[c,h]=(0,a.useState)(!0),[b,v]=(0,a.useState)(!1),[E,T]=(0,a.useState)({key:"username",direction:"ascending"}),[Z,I]=(0,a.useState)(null),[D,F]=(0,a.useState)(""),S=(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&h(!0);try{let r=await x.default.get(u.R),s=(r||[]).map(e=>({...e,usernameDisplay:k(e.username,e.userId),fullEmail:R(e.username),clusterCount:-1,jobCount:-1}));o(s),v(!0),t&&e&&t(!1),e&&h(!1);let[a,n]=await Promise.all([x.default.get(m.getClusters),x.default.get(f.getManagedJobs,[{allUsers:!0}])]),l=n.jobs||[],i=(r||[]).map(e=>{let r=(a||[]).filter(r=>r.user_hash===e.userId),t=(l||[]).filter(r=>r.user_hash===e.userId);return{...e,usernameDisplay:k(e.username,e.userId),fullEmail:R(e.username),clusterCount:r.length,jobCount:t.length}});o(i)}catch(r){console.error("Failed to fetch or process user data:",r),o([]),v(!0),t&&e&&t(!1),e&&h(!1)}},[t]);(0,a.useEffect)(()=>{n&&(n.current=()=>S(!0))},[n,S]),(0,a.useEffect)(()=>{(async()=>{v(!1),h(!0),await p.ZP.preloadForPage("users"),S(!0)})();let e=setInterval(()=>{S(!1)},r);return()=>clearInterval(e)},[S,r]);let _=(0,a.useMemo)(()=>(0,g.R0)(l,E.key,E.direction),[l,E]),L=e=>{let r="ascending";E.key===e&&"ascending"===E.direction&&(r="descending"),T({key:e,direction:r})},M=e=>E.key===e?"ascending"===E.direction?" ↑":" ↓":"",z=async(e,r)=>{try{let t=await C.x.get("/users/role");if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to get user role")}let s=await t.json();console.log("data",s);let a=s.role;if("admin"!=a){alert("".concat(s.name," is logged in as no admin, cannot edit user role."));return}I(e),F(r)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=()=>{I(null),F("")},U=async e=>{if(!e||!D){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}h(!0);try{let r=await C.x.post("/users/update",{user_id:e,role:D});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to update role")}x.default.invalidate(u.R),await S(!0),A()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{h(!1)}};return c&&0===l.length&&!b?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(i.Z,{})}):b?_&&0!==_.length?(0,s.jsx)(w.Zb,{children:(0,s.jsxs)(d.iA,{children:[(0,s.jsx)(d.xD,{children:(0,s.jsxs)(d.SC,{children:[(0,s.jsxs)(d.ss,{onClick:()=>L("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Name",M("usernameDisplay")]}),(0,s.jsxs)(d.ss,{onClick:()=>L("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Email",M("fullEmail")]}),(0,s.jsxs)(d.ss,{onClick:()=>L("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Role",M("role")]}),(0,s.jsxs)(d.ss,{onClick:()=>L("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Clusters",M("clusterCount")]}),(0,s.jsxs)(d.ss,{onClick:()=>L("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Jobs",M("jobCount")]})]})}),(0,s.jsx)(d.RM,{children:_.map(e=>(0,s.jsxs)(d.SC,{children:[(0,s.jsx)(d.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(d.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(d.pj,{className:"truncate",title:e.role,children:(0,s.jsx)("div",{className:"flex items-center gap-2",children:Z===e.userId?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{value:D,onChange:e=>F(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,s.jsx)("option",{value:"admin",children:"Admin"}),(0,s.jsx)("option",{value:"user",children:"User"})]}),(0,s.jsx)("button",{onClick:()=>U(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,s.jsx)(y.Z,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:A,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,s.jsx)(j.Z,{className:"h-4 w-4"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"capitalize",children:e.role}),(0,s.jsx)("button",{onClick:()=>z(e.userId,e.role),className:"text-gray-400 hover:text-sky-blue p-1",title:"Edit role",children:(0,s.jsx)(N,{className:"h-3 w-3"})})]})})}),(0,s.jsx)(d.pj,{children:-1===e.clusterCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(i.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)(d.pj,{children:-1===e.jobCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(i.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]}):(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(i.Z,{}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}Z.propTypes={refreshInterval:l().number.isRequired,setLoading:l().func.isRequired,refreshDataRef:l().shape({current:l().func}).isRequired}},4545:function(e,r,t){function s(e){return e.startsWith("sky-jobs-controller-")}function a(e,r,t){return null===r?e:[...e].sort((e,s)=>e[r]<s[r]?"ascending"===t?-1:1:e[r]>s[r]?"ascending"===t?1:-1:0)}t.d(r,{R0:function(){return a},Ym:function(){return s}})},2003:function(e,r,t){t.d(r,{j:function(){return l}});var s=t(512);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.W,l=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return n(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=r,o=Object.keys(l).map(e=>{let r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;let n=a(r)||a(s);return l[e][n]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return n(e,o,null==r?void 0:null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...a}=r;return Object.entries(a).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...c}[r]):({...i,...c})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{938:function(e,s,t){t.r(s),t.d(s,{ClusterJobs:function(){return O},ManagedJobs:function(){return M},ManagedJobsTable:function(){return I},Status2Actions:function(){return D},filterJobsByWorkspace:function(){return R},statusGroups:function(){return E}});var n=t(5893),r=t(7294),a=t(1163),l=t(1664),i=t.n(l),c=t(8799),o=t(803),d=t(7673),h=t(8764),x=t(6989),u=t(8969),m=t(3266),j=t(7324);t(9470);var p=t(3626),f=t(3293),g=t(6521),b=t(3610),w=t(9284),N=t(4545),y=t(9307),v=t(3001),k=t(8950),C=t(6378),S=t(6856);let E={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},L="__ALL_WORKSPACES__";function R(e,s){return s&&s!==L?e.filter(e=>(e.workspace||"default").toLowerCase()===s.toLowerCase()):e}let _=e=>{if(!e)return"-";let s=e instanceof Date?e:new Date(1e3*e),t=(0,x.GV)(s);if(r.isValidElement(t)&&t.props&&t.props.children&&(t=r.isValidElement(t.props.children)&&t.props.children.props&&t.props.children.props.children?t.props.children.props.children:t.props.children),"string"!=typeof t)return t;let a=function(e){if(!e||"string"!=typeof e)return e;if("just now"===e)return"now";if("less than a minute ago"===e.toLowerCase())return"Less than a minute ago";let s=e.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(s){let e=s[1],t=s[2],n={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(n[t])return"".concat(e).concat(n[t]," ago")}let t=e.match(/^a[n]?\s+(\w+)\s+ago$/);if(t){let e=t[1],s={second:"s",minute:"m",hour:"h",day:"d",month:"mo",year:"yr"};if(s[e])return"1".concat(s[e]," ago")}let n=e.match(/^(\d+)\s+(\w+)\s+ago$/);if(n){let e=n[1],s=n[2],t={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(t[s])return"".concat(e).concat(t[s]," ago")}return e}(t);return 7>Math.abs((new Date().getTime()-s.getTime())/864e5)?(0,n.jsx)(x.WH,{content:(0,x.o0)(s),className:"capitalize text-sm text-muted-foreground",children:a}):(0,n.jsx)(x.WH,{content:(0,x.o0)(s),className:"text-sm text-muted-foreground",children:a})};function M(){let e=(0,a.useRouter)(),[s,t]=(0,r.useState)(!1),l=r.useRef(null),[o,d]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),h=(0,v.X)(),[m,f]=(0,r.useState)(L),[g,b]=(0,r.useState)([]);return(0,r.useEffect)(()=>{e.isReady&&e.query.workspace&&f(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,r.useEffect)(()=>{(async()=>{try{await S.ZP.preloadForPage("jobs");let e=await C.default.get(j.fX),s=Object.keys(e),t=(await C.default.get(u.getManagedJobs,[{allUsers:!0}])).jobs||[],n=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],r=new Set(s);n.forEach(e=>r.add(e)),b(Array.from(r).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),b(["default"])}})()},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsxs)("div",{className:"text-base flex items-center",children:[(0,n.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"}),(0,n.jsxs)(k.Ph,{value:m,onValueChange:f,children:[(0,n.jsx)(k.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,n.jsx)(k.ki,{placeholder:"Filter by workspace...",children:m===L?"All Workspaces":m})}),(0,n.jsxs)(k.Bw,{children:[(0,n.jsx)(k.Ql,{value:L,children:"All Workspaces"}),g.map(e=>(0,n.jsx)(k.Ql,{value:e,children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(c.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,n.jsxs)("button",{onClick:()=>{C.default.invalidate(u.getManagedJobs,[{allUsers:!0}]),C.default.invalidate(j.fX),l.current&&l.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",title:"Refresh",children:[(0,n.jsx)(p.Z,{className:"h-4 w-4 mr-1.5"}),!h&&(0,n.jsx)("span",{children:"Refresh"})]})]})]}),(0,n.jsx)(I,{refreshInterval:x.yc,setLoading:t,refreshDataRef:l,workspaceFilter:m}),(0,n.jsx)(w.cV,{isOpen:o.isOpen,onClose:()=>d({...o,isOpen:!1}),onConfirm:o.onConfirm,title:o.title,message:o.message})]})}function I(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,workspaceFilter:l}=e,[j,p]=(0,r.useState)([]),[g,b]=(0,r.useState)({key:null,direction:"ascending"}),[v,k]=(0,r.useState)(!1),[S,L]=(0,r.useState)(!0),[M,I]=(0,r.useState)(1),[O,W]=(0,r.useState)(10),[F,U]=(0,r.useState)(null),P=(0,r.useRef)(null),[J,T]=(0,r.useState)([]),[Z,B]=(0,r.useState)({}),[V,q]=(0,r.useState)(!1),[G,H]=(0,r.useState)(!1),[X,$]=(0,r.useState)(!1),[K,Q]=(0,r.useState)("active"),[Y,ee]=(0,r.useState)(!0),[es,et]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),en=async()=>{et({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller?",onConfirm:async()=>{try{$(!0),k(!0),await (0,u.Ce)("restartcontroller"),await er()}catch(e){console.error("Error restarting controller:",e)}finally{$(!1),k(!1)}}})},er=r.useCallback(async()=>{k(!0),t(!0);try{let[e,s]=await Promise.all([C.default.get(u.getManagedJobs,[{allUsers:!0}]),C.default.get(m.getClusters)]),{jobs:t=[],controllerStopped:n=!1}=e||{},r=null==s?void 0:s.find(e=>(0,N.Ym)(e.cluster)),a=r?r.status:"NOT_FOUND",l=!1;"STOPPED"==a&&n&&(l=!0),"LAUNCHING"==a?H(!0):H(!1),p(t),q(l),L(!1)}catch(e){console.error("Error fetching data:",e),p([]),q(!1),L(!1)}finally{k(!1),t(!1)}},[t]);r.useEffect(()=>{a&&(a.current=er)},[a,er]),(0,r.useEffect)(()=>{p([]);let e=!0;er();let t=setInterval(()=>{e&&er()},s);return()=>{e=!1,clearInterval(t)}},[s,er]),(0,r.useEffect)(()=>{I(1)},[K,null==j?void 0:j.length]),(0,r.useEffect)(()=>{T([]),ee(!0)},[K]);let ea=e=>{let s="ascending";g.key===e&&"ascending"===g.direction&&(s="descending"),b({key:e,direction:s})},el=e=>g.key===e?"ascending"===g.direction?" ↑":" ↓":"";r.useMemo(()=>{let e=j||[];return{active:e.filter(e=>E.active.includes(e.status)).length,finished:e.filter(e=>E.finished.includes(e.status)).length}},[j]);let ei=e=>J.length>0?J.includes(e):E[K].includes(e),ec=r.useMemo(()=>{let e=R(j,l);return J.length>0?e.filter(e=>J.includes(e.status)):Y?e.filter(e=>E[K].includes(e.status)):[]},[j,K,J,Y,l]),eo=r.useMemo(()=>g.key?[...ec].sort((e,s)=>e[g.key]<s[g.key]?"ascending"===g.direction?-1:1:e[g.key]>s[g.key]?"ascending"===g.direction?1:-1:0):ec,[ec,g]),ed=Math.ceil(eo.length/O),eh=(M-1)*O,ex=eh+O,eu=eo.slice(eh,ex),em=e=>{if(J.includes(e)){let s=J.filter(s=>s!==e);0===s.length?(ee(!0),T([])):(T(s),ee(!1))}else T([...J,e]),ee(!1)};return(0,r.useEffect)(()=>{B((j||[]).reduce((e,s)=>(e[s.status]=(e[s.status]||0)+1,e),{}))},[j]),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center text-sm mb-1",children:[(0,n.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!v&&(!j||0===j.length)&&!S&&(0,n.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(Z).map(e=>{let[s,t]=e;return(0,n.jsxs)("button",{onClick:()=>em(s),className:"px-3 py-1 rounded-full flex items-center space-x-2 ".concat(ei(s)||J.includes(s)?(0,y.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,n.jsx)("span",{children:s}),(0,n.jsx)("span",{className:"text-xs ".concat(ei(s)||J.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),j&&j.length>0&&(0,n.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,n.jsx)("span",{className:"text-gray-500",children:"("}),(0,n.jsx)("button",{onClick:()=>{Q("active"),T([]),ee(!0)},className:"text-sm font-medium ".concat("active"===K&&Y?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,n.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,n.jsx)("button",{onClick:()=>{Q("finished"),T([]),ee(!0)},className:"text-sm font-medium ".concat("finished"===K&&Y?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,n.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,n.jsx)(d.Zb,{children:(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("id"),children:["ID",el("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("name"),children:["Name",el("name")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("user"),children:["User",el("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("workspace"),children:["Workspace",el("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("submitted_at"),children:["Submitted",el("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("job_duration"),children:["Duration",el("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("status"),children:["Status",el("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("priority"),children:["Priority",el("priority")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("resources_str"),children:["Requested",el("resources_str")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("infra"),children:["Infra",el("infra")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("cluster"),children:["Resources",el("cluster")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("recoveries"),children:["Recoveries",el("recoveries")]}),(0,n.jsx)(h.ss,{children:"Details"}),(0,n.jsx)(h.ss,{children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:v||S?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:13,className:"text-center py-6 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(c.Z,{size:20,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading..."})]})})}):eu.length>0?(0,n.jsx)(n.Fragment,{children:eu.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(y.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.priority}),(0,n.jsx)(h.pj,{children:e.requested_resources}),(0,n.jsx)(h.pj,{children:e.infra&&"-"!==e.infra?(0,n.jsx)(x.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,n.jsxs)("span",{children:[(0,n.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,n.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,n.jsx)("span",{children:e.infra||"-"})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(x.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,n.jsx)("span",{children:e.resources_str})})}),(0,n.jsx)(h.pj,{children:e.recoveries}),(0,n.jsx)(h.pj,{children:e.details?(0,n.jsx)(z,{text:e.details,rowId:e.id,expandedRowId:F,setExpandedRowId:U}):"-"}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(D,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),F===e.id&&(0,n.jsx)(A,{text:e.details,colSpan:13,innerRef:P})]},e.id))}):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:13,className:"text-center py-6",children:(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[G&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. It will be ready shortly."}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),(0,n.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!V&&!G&&(0,n.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),V&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller has been stopped. Restart to check the latest job status."}),(0,n.jsx)(o.z,{variant:"outline",size:"sm",onClick:en,className:"text-sky-blue hover:text-sky-blue-bright",disabled:v||X,children:X?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Z,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})}),eo&&eo.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:O,onChange:e=>{W(parseInt(e.target.value,10)),I(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:30,children:"30"}),(0,n.jsx)("option",{value:50,children:"50"}),(0,n.jsx)("option",{value:100,children:"100"}),(0,n.jsx)("option",{value:200,children:"200"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[eh+1," – ",Math.min(ex,eo.length)," of"," ",eo.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.max(e-1,1))},disabled:1===M,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.min(e+1,ed))},disabled:M===ed||0===ed,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,n.jsx)(w.cV,{isOpen:es.isOpen,onClose:()=>et({...es,isOpen:!1}),onConfirm:es.onConfirm,title:es.title,message:es.message,confirmClassName:"bg-blue-600 hover:bg-blue-700 text-white"})]})}function D(e){let{withLabel:s=!1,jobParent:t,jobId:r,managed:l}=e,i=(0,a.useRouter)(),c=(e,s)=>{e.preventDefault(),e.stopPropagation(),i.push({pathname:"".concat(t,"/").concat(r),query:{tab:s}})};return(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)(x.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("button",{onClick:e=>c(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,n.jsx)(g.Z,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,n.jsx)(x.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("button",{onClick:e=>c(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,n.jsx)(b.Z,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs")]})}function O(e){let{clusterName:s,clusterJobData:t,loading:a,refreshClusterJobsOnly:l}=e,[u,m]=(0,r.useState)(null),[j,f]=(0,r.useState)({key:null,direction:"ascending"}),[g,b]=(0,r.useState)(1),[w,N]=(0,r.useState)(10),v=(0,r.useRef)(null),[k,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{u&&v.current&&!v.current.contains(e.target)&&m(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);let S=r.useMemo(()=>t||[],[t]);(0,r.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(k)&&C(t)},[t,k]);let E=r.useMemo(()=>j.key?[...S].sort((e,s)=>e[j.key]<s[j.key]?"ascending"===j.direction?-1:1:e[j.key]>s[j.key]?"ascending"===j.direction?1:-1:0):S,[S,j]),L=e=>{let s="ascending";j.key===e&&"ascending"===j.direction&&(s="descending"),f({key:e,direction:s})},R=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",M=Math.ceil(E.length/w),I=(g-1)*w,O=I+w,W=E.slice(I,O);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)(d.Zb,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),(0,n.jsx)("div",{className:"flex items-center",children:l&&(0,n.jsxs)("button",{onClick:l,disabled:a,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center text-sm ml-2",children:[(0,n.jsx)(p.Z,{className:"w-4 h-4 mr-1"}),"Refresh Jobs"]})})]}),(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("id"),children:["ID",R("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("job"),children:["Name",R("job")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("user"),children:["User",R("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("workspace"),children:["Workspace",R("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("submitted_at"),children:["Submitted",R("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("job_duration"),children:["Duration",R("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("status"),children:["Status",R("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>L("resources"),children:["Resources",R("resources")]}),(0,n.jsx)(h.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:a?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:9,className:"text-center py-12 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(c.Z,{size:24,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading cluster jobs..."})]})})}):W.length>0?W.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{className:u===e.id?"selected-row":"",children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,n.jsx)(z,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:u,setExpandedRowId:m})})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(y.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.resources}),(0,n.jsx)(h.pj,{className:"flex content-center items-center",children:(0,n.jsx)(D,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),u===e.id&&(0,n.jsx)(A,{text:e.job||"Unnamed job",colSpan:9,innerRef:v})]},e.id)):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),E&&E.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:w,onChange:e=>{N(parseInt(e.target.value,10)),b(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:5,children:"5"}),(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:20,children:"20"}),(0,n.jsx)("option",{value:50,children:"50"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[I+1," – ",Math.min(O,E.length)," of"," ",E.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{b(e=>Math.max(e-1,1))},disabled:1===g,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{b(e=>Math.min(e+1,M))},disabled:g===M||0===M,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function A(e){let{text:s,colSpan:t,innerRef:r}=e;return(0,n.jsx)(h.SC,{className:"expanded-details",children:(0,n.jsx)(h.pj,{colSpan:t,children:(0,n.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:r,children:(0,n.jsx)("div",{className:"flex justify-between items-start",children:(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function z(e){let{text:s,rowId:t,expandedRowId:a,setExpandedRowId:l}=e,i=s||"",c=i.length>50,o=a===t,d=c?"".concat(i.substring(0,50)):i,h=(0,r.useRef)(null);return(0,n.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,n.jsx)("span",{className:"truncate",children:d}),c&&(0,n.jsx)("button",{ref:h,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(o?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:o?"... show less":"... show more"})]})}}}]);
|
sky/jobs/dashboard/dashboard.py
DELETED
@@ -1,223 +0,0 @@
|
|
1
|
-
"""Dashboard for managed jobs based on Flask.
|
2
|
-
|
3
|
-
TODO(zongheng): This is a basic version. In the future we can beef up the web
|
4
|
-
frameworks used (e.g.,
|
5
|
-
https://github.com/ray-project/ray/tree/master/dashboard/client/src) and/or get
|
6
|
-
rid of the SSH port-forwarding business (see cli.py's job_dashboard()
|
7
|
-
comment).
|
8
|
-
"""
|
9
|
-
import collections
|
10
|
-
import datetime
|
11
|
-
import enum
|
12
|
-
import os
|
13
|
-
import pathlib
|
14
|
-
|
15
|
-
import flask
|
16
|
-
import yaml
|
17
|
-
|
18
|
-
from sky import jobs as managed_jobs
|
19
|
-
from sky.client import sdk
|
20
|
-
from sky.jobs import constants as managed_job_constants
|
21
|
-
from sky.utils import common_utils
|
22
|
-
from sky.utils import controller_utils
|
23
|
-
|
24
|
-
app = flask.Flask(__name__)
|
25
|
-
|
26
|
-
|
27
|
-
def _is_running_on_jobs_controller() -> bool:
|
28
|
-
"""Am I running on jobs controller?
|
29
|
-
|
30
|
-
Loads ~/.sky/sky_ray.yml and check cluster_name.
|
31
|
-
"""
|
32
|
-
if pathlib.Path('~/.sky/sky_ray.yml').expanduser().exists():
|
33
|
-
config = yaml.safe_load(
|
34
|
-
pathlib.Path('~/.sky/sky_ray.yml').expanduser().read_text(
|
35
|
-
encoding='utf-8'))
|
36
|
-
cluster_name = config.get('cluster_name', '')
|
37
|
-
# We use startswith instead of exact match because the cluster name in
|
38
|
-
# the yaml file is cluster_name_on_cloud which may have additional
|
39
|
-
# suffices.
|
40
|
-
return cluster_name.startswith(
|
41
|
-
controller_utils.Controllers.JOBS_CONTROLLER.value.cluster_name)
|
42
|
-
return False
|
43
|
-
|
44
|
-
|
45
|
-
# Column indices for job table
|
46
|
-
class JobTableColumns(enum.IntEnum):
|
47
|
-
"""Column indices for the jobs table in the dashboard.
|
48
|
-
|
49
|
-
- DROPDOWN (0): Column for expandable dropdown arrow
|
50
|
-
- ID (1): Job ID column
|
51
|
-
- TASK (2): Task name/number column
|
52
|
-
- NAME (3): Job name column
|
53
|
-
- RESOURCES (4): Resources used by job
|
54
|
-
- SUBMITTED (5): Job submission timestamp
|
55
|
-
- TOTAL_DURATION (6): Total time since job submission
|
56
|
-
- JOB_DURATION (7): Actual job runtime
|
57
|
-
- RECOVERIES (8): Number of job recoveries
|
58
|
-
- STATUS (9): Current job status
|
59
|
-
- STARTED (10): Job start timestamp
|
60
|
-
- CLUSTER (11): Cluster name
|
61
|
-
- REGION (12): Cloud region
|
62
|
-
- FAILOVER (13): Job failover history
|
63
|
-
- DETAILS (14): Job details
|
64
|
-
- ACTIONS (15): Available actions column
|
65
|
-
- LOG_CONTENT (16): Log content column
|
66
|
-
"""
|
67
|
-
DROPDOWN = 0
|
68
|
-
ID = 1
|
69
|
-
TASK = 2
|
70
|
-
NAME = 3
|
71
|
-
RESOURCES = 4
|
72
|
-
SUBMITTED = 5
|
73
|
-
TOTAL_DURATION = 6
|
74
|
-
JOB_DURATION = 7
|
75
|
-
RECOVERIES = 8
|
76
|
-
STATUS = 9
|
77
|
-
STARTED = 10
|
78
|
-
CLUSTER = 11
|
79
|
-
REGION = 12
|
80
|
-
DETAILS = 13
|
81
|
-
FAILOVER = 14
|
82
|
-
ACTIONS = 15
|
83
|
-
LOG_CONTENT = 16
|
84
|
-
|
85
|
-
|
86
|
-
# Column headers matching the indices above
|
87
|
-
JOB_TABLE_COLUMNS = [
|
88
|
-
'', 'ID', 'Task', 'Name', 'Resources', 'Submitted', 'Total Duration',
|
89
|
-
'Job Duration', 'Status', 'Started', 'Cluster', 'Region', 'Failover',
|
90
|
-
'Recoveries', 'Details', 'Actions', 'Log Content'
|
91
|
-
]
|
92
|
-
|
93
|
-
# This column is given by format_job_table but should be ignored.
|
94
|
-
SCHED_STATE_COLUMN = 12
|
95
|
-
|
96
|
-
|
97
|
-
def _extract_launch_history(log_content: str) -> str:
|
98
|
-
"""Extract launch history from log content.
|
99
|
-
|
100
|
-
Args:
|
101
|
-
log_content: Content of the log file.
|
102
|
-
Returns:
|
103
|
-
A formatted string containing the launch history.
|
104
|
-
"""
|
105
|
-
launches = []
|
106
|
-
current_launch = None
|
107
|
-
|
108
|
-
for line in log_content.splitlines():
|
109
|
-
if 'Launching on' in line:
|
110
|
-
try:
|
111
|
-
parts = line.split(']')
|
112
|
-
if len(parts) >= 2:
|
113
|
-
timestamp = parts[0].split()[1:3]
|
114
|
-
message = parts[1].replace('[0m⚙︎', '').strip()
|
115
|
-
formatted_line = f'{" ".join(timestamp)} {message}'
|
116
|
-
if current_launch:
|
117
|
-
prev_time, prev_target = current_launch.rsplit(
|
118
|
-
' Launching on ', 1)
|
119
|
-
launches.append(
|
120
|
-
f'{prev_time} Tried to launch on {prev_target}')
|
121
|
-
|
122
|
-
# Store the current launch
|
123
|
-
current_launch = formatted_line
|
124
|
-
except IndexError:
|
125
|
-
launches.append(line.strip())
|
126
|
-
|
127
|
-
# Add the final (successful) launch at the beginning
|
128
|
-
if current_launch:
|
129
|
-
result = [current_launch]
|
130
|
-
result.extend(launches)
|
131
|
-
return '\n'.join(result)
|
132
|
-
|
133
|
-
return 'No launch history found'
|
134
|
-
|
135
|
-
|
136
|
-
@app.route('/')
|
137
|
-
def home():
|
138
|
-
if not _is_running_on_jobs_controller():
|
139
|
-
# Experimental: run on laptop (refresh is very slow).
|
140
|
-
request_id = managed_jobs.queue(refresh=True, skip_finished=False)
|
141
|
-
all_managed_jobs = sdk.get(request_id)
|
142
|
-
else:
|
143
|
-
job_table = managed_jobs.dump_managed_job_queue()
|
144
|
-
all_managed_jobs = managed_jobs.load_managed_job_queue(job_table)
|
145
|
-
|
146
|
-
timestamp = datetime.datetime.now(datetime.timezone.utc)
|
147
|
-
rows = managed_jobs.format_job_table(all_managed_jobs,
|
148
|
-
show_all=True,
|
149
|
-
show_user=False,
|
150
|
-
return_rows=True)
|
151
|
-
|
152
|
-
status_counts = collections.defaultdict(int)
|
153
|
-
for task in all_managed_jobs:
|
154
|
-
if not task['status'].is_terminal():
|
155
|
-
status_counts[task['status'].value] += 1
|
156
|
-
|
157
|
-
# Add an empty column for the dropdown button and actions column
|
158
|
-
# Exclude SCHED. STATE and LOG_CONTENT columns
|
159
|
-
rows = [
|
160
|
-
[''] + row[:SCHED_STATE_COLUMN] + row[SCHED_STATE_COLUMN + 1:] +
|
161
|
-
# Add empty cell for failover and actions column
|
162
|
-
[''] + [''] + [''] for row in rows
|
163
|
-
]
|
164
|
-
|
165
|
-
# Add log content as a regular column for each job
|
166
|
-
for row in rows:
|
167
|
-
job_id = str(row[JobTableColumns.ID]).strip().replace(' ⤳', '')
|
168
|
-
if job_id and job_id != '-':
|
169
|
-
try:
|
170
|
-
log_path = os.path.join(
|
171
|
-
os.path.expanduser(
|
172
|
-
managed_job_constants.JOBS_CONTROLLER_LOGS_DIR),
|
173
|
-
f'{job_id}.log')
|
174
|
-
if os.path.exists(log_path):
|
175
|
-
with open(log_path, 'r', encoding='utf-8') as f:
|
176
|
-
log_content = f.read()
|
177
|
-
row[JobTableColumns.FAILOVER] = _extract_launch_history(
|
178
|
-
log_content)
|
179
|
-
row[JobTableColumns.LOG_CONTENT] = log_content
|
180
|
-
else:
|
181
|
-
row[JobTableColumns.FAILOVER] = 'Log file not found'
|
182
|
-
row[JobTableColumns.LOG_CONTENT] = 'Log file not found'
|
183
|
-
except (IOError, OSError) as e:
|
184
|
-
error_msg = f'Error reading log: {str(e)}'
|
185
|
-
row[JobTableColumns.FAILOVER] = error_msg
|
186
|
-
row[JobTableColumns.LOG_CONTENT] = error_msg
|
187
|
-
else:
|
188
|
-
row[JobTableColumns.LOG_CONTENT] = ''
|
189
|
-
|
190
|
-
if rows and len(rows[0]) != len(JOB_TABLE_COLUMNS):
|
191
|
-
raise RuntimeError(
|
192
|
-
f'Dashboard code and managed job queue code are out of sync. '
|
193
|
-
f'Expected {JOB_TABLE_COLUMNS} columns, got {rows[0]}')
|
194
|
-
|
195
|
-
# Fix STATUS color codes: '\x1b[33mCANCELLED\x1b[0m' -> 'CANCELLED'
|
196
|
-
for row in rows:
|
197
|
-
row[JobTableColumns.STATUS] = common_utils.remove_color(
|
198
|
-
row[JobTableColumns.STATUS])
|
199
|
-
|
200
|
-
# Remove filler rows ([''], ..., ['-'])
|
201
|
-
rows = [
|
202
|
-
row for row in rows
|
203
|
-
if ''.join(map(str, row[:JobTableColumns.ACTIONS])) != ''
|
204
|
-
]
|
205
|
-
|
206
|
-
# Get all unique status values
|
207
|
-
status_values = sorted(
|
208
|
-
list(set(row[JobTableColumns.STATUS] for row in rows)))
|
209
|
-
|
210
|
-
rendered_html = flask.render_template(
|
211
|
-
'index.html',
|
212
|
-
columns=JOB_TABLE_COLUMNS,
|
213
|
-
rows=rows,
|
214
|
-
last_updated_timestamp=timestamp,
|
215
|
-
status_values=status_values,
|
216
|
-
status_counts=status_counts,
|
217
|
-
request=flask.request,
|
218
|
-
)
|
219
|
-
return rendered_html
|
220
|
-
|
221
|
-
|
222
|
-
if __name__ == '__main__':
|
223
|
-
app.run()
|
Binary file
|