diff --git a/.gitignore b/.gitignore index e1ca3c60bb9946a0e823547840583c4a3ad08297..2053b9713bb4eb2bd192a36ae49e6f8867e67fff 100644 --- a/.gitignore +++ b/.gitignore @@ -347,3 +347,5 @@ ASALocalRun/ /IoTSharp/TelemetryStorage.db /IoTSharp/IoTSharp.db /IoTSharp/health_checks.db +/ClientApp/Vue/build +/ClientApp/Vue/mock diff --git a/ClientApp/Vue/.env b/ClientApp/Vue/.env index 72d9af47b09afbdf781426e7d958fad4b71a3a2c..fa227a4de3b1c54c72aaee484eee3c96b8f579ea 100644 --- a/ClientApp/Vue/.env +++ b/ClientApp/Vue/.env @@ -2,7 +2,7 @@ VITE_PORT = 3100 # spa-title -VITE_GLOB_APP_TITLE = IotSharp +VITE_GLOB_APP_TITLE = IoTSharp # spa shortname -VITE_GLOB_APP_SHORT_NAME = IotSharp +VITE_GLOB_APP_SHORT_NAME = IoTSharp diff --git a/ClientApp/Vue/package.json b/ClientApp/Vue/package.json index 1bfdd8b7df16a636a2bf286a7bd2a0737db54ed8..eb647592ec171d0b265697e824ea6ddb96d812c9 100644 --- a/ClientApp/Vue/package.json +++ b/ClientApp/Vue/package.json @@ -1,11 +1,7 @@ { "name": "vben-admin", "version": "2.5.2", - "author": { - "name": "vben", - "email": "anncwb@126.com", - "url": "https://github.com/anncwb" - }, + "author": "vben (https://github.com/anncwb)", "scripts": { "bootstrap": "yarn install", "serve": "npm run dev", @@ -157,5 +153,11 @@ "homepage": "https://github.com/anncwb/vue-vben-admin", "engines": { "node": "^12 || >=14" - } + }, + "description": "
\"VbenAdmin

", + "main": ".eslintrc.js", + "directories": { + "test": "tests" + }, + "keywords": [] } diff --git a/ClientApp/Vue/src/views/sys/login/Login.vue b/ClientApp/Vue/src/views/sys/login/Login.vue index e341eb9ff611a14fe304145e620c83ab95bcd414..dcd3964950cd737395256dc5796e779bc49142e1 100644 --- a/ClientApp/Vue/src/views/sys/login/Login.vue +++ b/ClientApp/Vue/src/views/sys/login/Login.vue @@ -18,7 +18,7 @@
@@ -32,7 +32,7 @@
diff --git a/IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj b/IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj index 0c57eec9fcba0c2ae7daff67279019db16b75670..4e6bccf433da6030c1afd251f3da937d9f1e8af8 100644 --- a/IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj +++ b/IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj b/IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj index 2ddc4154c6d936279e4c682d5d504ee82a4b4313..a0fef9825b448fc261b70441bea232b7fd64c7df 100644 --- a/IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj +++ b/IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj @@ -15,7 +15,7 @@ - + diff --git a/IoTSharp.Test/IoTSharp.Test.csproj b/IoTSharp.Test/IoTSharp.Test.csproj index 550564453a64fcd80f118826c057b3675caa5093..275ecad078f7ff8a28d2f414e00665c3b78904d4 100644 --- a/IoTSharp.Test/IoTSharp.Test.csproj +++ b/IoTSharp.Test/IoTSharp.Test.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/IoTSharp/Controllers/AccountController.cs b/IoTSharp/Controllers/AccountController.cs index 0aac7e49f440e42a6b011f118ae432dfbf1672f3..82cc91ebd635be63ff4fb8541e4252ad11633348 100644 --- a/IoTSharp/Controllers/AccountController.cs +++ b/IoTSharp/Controllers/AccountController.cs @@ -119,7 +119,7 @@ namespace IoTSharp.Controllers signingCredentials: signinCredentials); - + var t = (expires.Ticks - TimeZoneInfo.ConvertTimeFromUtc(new System.DateTime(1970, 1, 1, 0, 0, 0, 0), TimeZoneInfo.Local).Ticks) / 10000; var token = new TokenEntity diff --git a/IoTSharp/Dockerfile b/IoTSharp/Dockerfile index af8daced3d527df872768ae622e258b7faa32cdc..5762b1eaf3c76384513542985cca7a649d815582 100644 --- a/IoTSharp/Dockerfile +++ b/IoTSharp/Dockerfile @@ -33,9 +33,9 @@ RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib n echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list && \ echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \ echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security jessie/updates main contrib non-free" >> /etc/apt/sources.list && \ - apt-get -y -q update && apt-get install -y -q git libssl-dev libcurl3 libssl1.0.0 && \ - apt-get autoremove -y && apt-get clean && apt-get autoclean && rm /var/cache/apt/* -rf && \ - ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + apt-get -y -q update && apt-get install -y -q git libssl-dev curl gnupg libcurl4 libssl1.0.0 && \ + ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + apt-get autoremove -y && apt-get clean && apt-get autoclean && rm /var/cache/apt/* -rf WORKDIR /src COPY ["IoTSharp/IoTSharp.csproj", "IoTSharp/"] COPY ["IoTSharp.Data/IoTSharp.Data.csproj", "IoTSharp.Data/"] @@ -49,10 +49,24 @@ COPY . . WORKDIR "/src/IoTSharp" RUN dotnet build "IoTSharp.csproj" -c Release -o /app/build + +FROM node:14-buster AS web +WORKDIR /web +RUN npm config set registry http://registry.npm.taobao.org/ && \ + yarn config set registry http://registry.npm.taobao.org/ +COPY ../ClientApp/Vue/package*.json ./ +RUN yarn install +COPY ../ClientApp/Vue ./ +RUN yarn build + + + + FROM build AS publish RUN dotnet publish "IoTSharp.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +COPY --from=web /web/dist ./wwwroot ENTRYPOINT ["dotnet", "IoTSharp.dll"] \ No newline at end of file diff --git a/IoTSharp/IoTSharp.csproj b/IoTSharp/IoTSharp.csproj index 6f13791a9567ff618a99d17d4472ec95f8b3ad67..5c7ea92fb6020a61d906af939cd276bd9436fbe7 100644 --- a/IoTSharp/IoTSharp.csproj +++ b/IoTSharp/IoTSharp.csproj @@ -48,19 +48,19 @@ - - - - - - - + + + + + + + - - + + @@ -78,17 +78,17 @@ - - + + - + - + @@ -106,7 +106,7 @@ - + diff --git a/README.md b/README.md index 5a623d76e62c31bb08751f2cef6a16e0f4375ff5..154d79b9d9ee5d46af33f33c831863ee78c5c4cf 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management. +## Here is a blessing for all users of this project + * May you do good and not evil. + * May you find forgiveness for yourself and forgive others. + * May you share freely, never taking more than you give. ## How to install IoTSharp using docker-compose ?