File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,21 +38,6 @@ const DockerContextProvider: React.FC = ({ children }) => {
3838 setDockerData ( newDockerData ) ;
3939 } ) ;
4040 } ;
41-
42- // Helper function to parse data into individual arrays
43- const parseDockerData = ( data : any ) => {
44- const output : any = { } ;
45-
46- for ( let entry of data ) {
47- for ( const key in entry ) {
48- if ( ! ( key in output ) ) output [ key ] = [ ] ;
49- output [ key ] . push ( entry [ key ] ) ;
50- }
51- }
52-
53- return output ;
54- } ;
55-
5641 return (
5742 < DockerContext . Provider value = { { dockerData, setDockerData, fetchDockerData } } >
5843 { children }
Original file line number Diff line number Diff line change 11import mongoose from 'mongoose' ;
22const { Schema } = mongoose ;
33
4-
5- // export interface IDock extends Document {
6- // containername: string;
7- // containerid: string;
8- // platform: string;
9- // starttime: string;
10- // memoryusage: number;
11- // memorylimit: number;
12- // memorypercent: number;
13- // cpupercent: number;
14- // networkreceived: number;
15- // networksent: number;
16- // processcount: number;
17- // restartcount: number;
18- // }
19-
204const DockerSchema = new Schema ( {
215 containername : {
226 type : String ,
@@ -68,7 +52,6 @@ const DockerSchema = new Schema({
6852 } ,
6953} ) ;
7054
71- // export default mongoose.model<IDock>('containerinfos', DockerSchema);
7255
7356const DockerModelFunc = ( serviceName : any ) => mongoose . model < any > ( `${ serviceName } -containerinfos` , DockerSchema ) ;
7457
You can’t perform that action at this time.
0 commit comments