소스 검색

[ADD] linked projects

Gogs 7 년 전
부모
커밋
bc23c659b6

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "eiru_automation_ui"]
+	path = eiru_automation_ui
+	url = http://192.168.88.100:3000/robert/eiru_automation_ui.git

+ 1 - 0
eiru_automation_ui

@@ -0,0 +1 @@
+Subproject commit faf8c05d20e06d27011118f8e0c7b778aef4ff58

+ 1 - 2
odoo_control/settings.py

@@ -15,8 +15,7 @@ INSTALLED_APPS = [
     'django_extensions',
     'tastypie',
     'core.apps.CoreConfig',
-    'api.apps.ApiConfig',
-    'ui.apps.UiConfig',
+    'api.apps.ApiConfig'
 ]
 
 MIDDLEWARE = [

+ 0 - 10
ui/.babelrc

@@ -1,10 +0,0 @@
-{
-    "presets": [
-        ["env", {
-            "modules": false
-        }]
-    ],
-    "plugins": [
-        ["transform-react-jsx", { "pragma": "h" }]
-    ]
-}

+ 6 - 0
ui/admin.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.contrib import admin
+
+# Register your models here.

+ 0 - 0
ui/src/components/dashboard/dashboard.less → ui/migrations/__init__.py


+ 2 - 25
ui/package.json

@@ -3,30 +3,7 @@
   "version": "1.0.0",
   "description": "Eiru Automation UI",
   "main": "index.js",
-  "author": "Robert Alexis Gauto",
+  "author": "Robert Gauto",
   "license": "MIT",
-  "scripts": {
-    "start": "./node_modules/.bin/webpack --mode development --progress --config webpack.config.js",
-    "build": "./node_modules/.bin/webpack --mode production --config webpack.config.js"
-  },
-  "dependencies": {
-    "bulma": "^0.6.2",
-    "preact": "^8.2.7"
-  },
-  "devDependencies": {
-    "autoprefixer": "^8.1.0",
-    "babel-cli": "^6.26.0",
-    "babel-core": "^6.26.0",
-    "babel-loader": "^7.1.3",
-    "babel-plugin-transform-react-jsx": "^6.24.1",
-    "babel-preset-env": "^1.6.1",
-    "css-loader": "^0.28.10",
-    "extract-text-webpack-plugin": "^4.0.0-beta.0",
-    "less": "^3.0.1",
-    "less-loader": "^4.0.6",
-    "style-loader": "^0.20.2",
-    "uglifyjs-webpack-plugin": "^1.2.2",
-    "webpack": "^4.1.0",
-    "webpack-cli": "^2.0.10"
-  }
+  "private": true
 }

+ 0 - 18
ui/src/components/App.js

@@ -1,18 +0,0 @@
-import { h, Component } from 'preact'
-import './app.less'
-
-import Topbar from './topbar'
-import Sidebar from './sidebar'
-
-class App extends Component {
-    render() {
-        return (
-            <div className="app">
-                <Topbar />
-                <Sidebar />
-            </div>
-        )
-    }
-}
-
-export default App

+ 0 - 6
ui/src/components/app.less

@@ -1,6 +0,0 @@
-html, body, #root, .app {
-    width: 100%;
-    height: 100%;
-    margin: 0;
-}
-

+ 0 - 10
ui/src/components/dashboard/index.js

@@ -1,10 +0,0 @@
-import { h, Component } from 'preact'
-
-class Dashboard extends Component {
-    render() {
-        return (
-            <div className="dashboard">
-            </div>
-        )
-    }
-}

+ 0 - 0
ui/src/components/home/home.less


+ 0 - 10
ui/src/components/home/index.js

@@ -1,10 +0,0 @@
-import { h, Component } from 'preact'
-
-class Home extends Component {
-    render() {
-        return (
-            <div className="home">
-            </div>
-        )
-    }
-}

+ 0 - 10
ui/src/components/login/index.js

@@ -1,10 +0,0 @@
-import { h, Component } from 'preact'
-
-class Login extends Component {
-    render() {
-        return (
-            <div className="login">
-            </div>
-        )
-    }
-}

+ 0 - 0
ui/src/components/login/login.less


+ 0 - 13
ui/src/components/sidebar/index.js

@@ -1,13 +0,0 @@
-import { h, Component } from 'preact'
-import './sidebar.less'
-
-class Sidebar extends Component {
-    render() {
-        return (
-            <div className="sidebar">
-            </div>
-        )
-    }
-}
-
-export default Sidebar

+ 0 - 8
ui/src/components/sidebar/sidebar.less

@@ -1,8 +0,0 @@
-@import '../../style/variables.less';
-
-.sidebar {
-    width: 230px;
-    height: 100%;
-    margin-top: @topbar-height;
-    background: @color-light;
-}

+ 0 - 13
ui/src/components/topbar/index.js

@@ -1,13 +0,0 @@
-import { h, Component } from 'preact'
-import './topbar.less'
-
-class Topbar extends Component {
-    render() {
-        return (
-            <div className="topbar">
-            </div>
-        )
-    }
-}
-
-export default Topbar

+ 0 - 10
ui/src/components/topbar/topbar.less

@@ -1,10 +0,0 @@
-@import '../../style/variables.less';
-
-.topbar {
-    width: 100%;
-    height: @topbar-height;
-    position: fixed;
-    top: 0;
-    box-shadow: 0 2px 4px #666;
-    background: @color-primary;
-}

+ 0 - 5
ui/src/index.js

@@ -1,5 +0,0 @@
-import { h, render } from 'preact'
-import App from './components/App'
-import '../node_modules/bulma/css/bulma.css'
-
-render(<App />, document.getElementById('root'))

+ 0 - 7
ui/src/style/mixins.less

@@ -1,7 +0,0 @@
-.fill() {
-	position: absolute;
-	left: 0;
-	top: 0;
-	width: 100%;
-	height: 100%;
-}

+ 0 - 3
ui/src/style/variables.less

@@ -1,3 +0,0 @@
-@color-primary: #0097a7;
-@color-light: #f5f5f5;
-@topbar-height: 45px;

+ 1 - 1
ui/views.py

@@ -5,4 +5,4 @@ from django.shortcuts import render
 '''
 '''
 def index(request):
-    return render(request, 'index.html')
+    return render(request, 'index.html')

+ 0 - 57
ui/webpack.config.js

@@ -1,57 +0,0 @@
-const webpack = require('webpack')
-const path = require('path')
-const autoprefixer = require('autoprefixer')
-
-const extractTextPlugin = require('extract-text-webpack-plugin')
-const uglifyJsPlugin = require('uglifyjs-webpack-plugin')
-
-const entryFile = path.resolve(__dirname, 'src/index.js')
-const inputPath = path.resolve(__dirname, 'src/')
-const outputPath = path.resolve(__dirname, 'static/')
-
-module.exports = {
-    entry: entryFile,
-    output: {
-        path: outputPath,
-        filename: 'app.js'
-    },
-    plugins: [
-        new webpack.NoEmitOnErrorsPlugin(),
-        new extractTextPlugin({
-            filename: 'app.css',
-            allChunks: true
-        }),
-        new uglifyJsPlugin()
-    ],
-    module: {
-        rules: [
-            {
-                test: /\.(js|jsx)$/,
-                exclude: /(node_modules|bower_modules)/,
-                include: inputPath,
-                loader: 'babel-loader'
-            },
-            {
-                test: /\.less$/,
-                use: extractTextPlugin.extract({
-                    fallback: 'style-loader',
-                    use: [
-                        {
-                            loader: 'css-loader',
-                            options: {
-                                minimize: true
-                            }
-                        }, 
-                        {
-                            loader: 'less-loader'
-                        }
-                    ]
-                })
-            },
-            {
-                test: /\.(ttf|eot|svg|woff|woff2)(\?.+)?$/,
-                loader: 'file-loader?name=[hash:12].[ext]'
-            }
-        ]
-    }
-}