File tree Expand file tree Collapse file tree 5 files changed +88
-2
lines changed Expand file tree Collapse file tree 5 files changed +88
-2
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2022 The Kubernetes Authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ import React from "react"
18+
19+ interface Props {
20+ jobid : string
21+ }
22+
23+ /** TODO. Probably follow the lead from here:
24+ * https://github.com/kubernetes-sigs/kui/blob/master/plugins/plugin-kubectl/src/lib/view/modes/Terminal.tsx
25+ */
26+ export default class Logs extends React . PureComponent < Props > {
27+ public constructor ( props : Props ) {
28+ super ( props )
29+ }
30+
31+ public render ( ) {
32+ return "TODO"
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2022 The Kubernetes Authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ import React from "react"
18+ import { Mode , ReactProvider , Registrar } from "@kui-shell/core"
19+
20+ import Logs from "./components/Logs"
21+
22+ /** Register Kui Commands */
23+ export default function registerCodeflareCommands ( registrar : Registrar ) {
24+ registrar . listen ( "/ray/job/logs" , ( args ) => {
25+ const jobid = args . argvNoOptions [ args . argvNoOptions . indexOf ( "logs" ) + 1 ]
26+
27+ const logsMode : Mode & ReactProvider = {
28+ mode : "Logs" ,
29+ react : ( ) => React . createElement ( Logs , { jobid } ) ,
30+ }
31+
32+ return {
33+ metadata : {
34+ name : "Ray Logs" ,
35+ namespace : jobid ,
36+ } ,
37+ modes : [ logsMode ] ,
38+ }
39+ } )
40+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../../../node_modules/@kui-shell/builder/tsconfig-base.json" ,
3+ "include" : [" src/**/*" ],
4+ "compilerOptions" : {
5+ "strict" : true ,
6+ "composite" : true ,
7+ "jsx" : " react" ,
8+ "outDir" : " mdist" ,
9+ "rootDir" : " src"
10+ }
11+ }
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2020 The Kubernetes Authors
2+ * Copyright 2022 The Kubernetes Authors
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change 77 "jsx" : " react" ,
88 "outDir" : " mdist" ,
99 "rootDir" : " src"
10- }
10+ },
11+ "references" : [{ "path" : " ./ray" }]
1112}
You can’t perform that action at this time.
0 commit comments