diff --git a/appveyor.yml b/appveyor.yml index 8dd2f3f2..bb4c9045 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,12 @@ before_build: choco install opencover.portable choco install codecov + + cd MineCase.ControlPanel + + npm install + + cd .. build: project: ./src/ verbosity: minimal diff --git a/src/MineCase.ControlPanel/.gitignore b/src/MineCase.ControlPanel/.gitignore new file mode 100644 index 00000000..30342b19 --- /dev/null +++ b/src/MineCase.ControlPanel/.gitignore @@ -0,0 +1,239 @@ +/Properties/launchSettings.json + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +bin/ +Bin/ +obj/ +Obj/ + +# Visual Studio 2015 cache/options directory +.vs/ +/wwwroot/dist/ + +/yarn.lock + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +orleans.codegen.cs + +/node_modules + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/src/MineCase.ControlPanel/ClientApp/boot.ts b/src/MineCase.ControlPanel/ClientApp/boot.ts new file mode 100644 index 00000000..b95bd381 --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/boot.ts @@ -0,0 +1,17 @@ +import './css/site.css'; +import 'bootstrap'; +import Vue from 'vue'; +import VueRouter from 'vue-router'; +Vue.use(VueRouter); + +const routes = [ + { path: '/', component: require('./components/home/home.vue.html') }, + { path: '/counter', component: require('./components/counter/counter.vue.html') }, + { path: '/fetchdata', component: require('./components/fetchdata/fetchdata.vue.html') } +]; + +new Vue({ + el: '#app-root', + router: new VueRouter({ mode: 'history', routes: routes }), + render: h => h(require('./components/app/app.vue.html')) +}); diff --git a/src/MineCase.ControlPanel/ClientApp/components/app/app.ts b/src/MineCase.ControlPanel/ClientApp/components/app/app.ts new file mode 100644 index 00000000..f580f76b --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/app/app.ts @@ -0,0 +1,10 @@ +import Vue from 'vue'; +import { Component } from 'vue-property-decorator'; + +@Component({ + components: { + MenuComponent: require('../navmenu/navmenu.vue.html') + } +}) +export default class AppComponent extends Vue { +} diff --git a/src/MineCase.ControlPanel/ClientApp/components/app/app.vue.html b/src/MineCase.ControlPanel/ClientApp/components/app/app.vue.html new file mode 100644 index 00000000..6a108b8a --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/app/app.vue.html @@ -0,0 +1,14 @@ + + + diff --git a/src/MineCase.ControlPanel/ClientApp/components/counter/counter.ts b/src/MineCase.ControlPanel/ClientApp/components/counter/counter.ts new file mode 100644 index 00000000..e48ef79b --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/counter/counter.ts @@ -0,0 +1,11 @@ +import Vue from 'vue'; +import { Component } from 'vue-property-decorator'; + +@Component +export default class CounterComponent extends Vue { + currentcount: number = 0; + + incrementCounter() { + this.currentcount++; + } +} diff --git a/src/MineCase.ControlPanel/ClientApp/components/counter/counter.vue.html b/src/MineCase.ControlPanel/ClientApp/components/counter/counter.vue.html new file mode 100644 index 00000000..570d1a2e --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/counter/counter.vue.html @@ -0,0 +1,13 @@ + + + diff --git a/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.ts b/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.ts new file mode 100644 index 00000000..c6108f93 --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.ts @@ -0,0 +1,22 @@ +import Vue from 'vue'; +import { Component } from 'vue-property-decorator'; + +interface WeatherForecast { + dateFormatted: string; + temperatureC: number; + temperatureF: number; + summary: string; +} + +@Component +export default class FetchDataComponent extends Vue { + forecasts: WeatherForecast[] = []; + + mounted() { + fetch('api/SampleData/WeatherForecasts') + .then(response => response.json() as Promise) + .then(data => { + this.forecasts = data; + }); + } +} diff --git a/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.vue.html b/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.vue.html new file mode 100644 index 00000000..1b647748 --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/fetchdata/fetchdata.vue.html @@ -0,0 +1,30 @@ + + + diff --git a/src/MineCase.ControlPanel/ClientApp/components/home/home.vue.html b/src/MineCase.ControlPanel/ClientApp/components/home/home.vue.html new file mode 100644 index 00000000..d418e70a --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/home/home.vue.html @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.css b/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.css new file mode 100644 index 00000000..b7404b41 --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.css @@ -0,0 +1,59 @@ +.main-nav li .glyphicon { + margin-right: 10px; +} + +/* Highlighting rules for nav menu items */ +.main-nav li a.router-link-active, +.main-nav li a.router-link-active:hover, +.main-nav li a.router-link-active:focus { + background-color: #4189C7; + color: white; +} + +/* Keep the nav menu independent of scrolling and on top of other items */ +.main-nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1; +} + +@media (min-width: 768px) { + /* On small screens, convert the nav menu to a vertical sidebar */ + .main-nav { + height: 100%; + width: calc(25% - 20px); + } + .main-nav .navbar { + border-radius: 0px; + border-width: 0px; + height: 100%; + } + .main-nav .navbar-header { + float: none; + } + .main-nav .navbar-collapse { + border-top: 1px solid #444; + padding: 0px; + } + .main-nav .navbar ul { + float: none; + } + .main-nav .navbar li { + float: none; + font-size: 15px; + margin: 6px; + } + .main-nav .navbar li a { + padding: 10px 16px; + border-radius: 4px; + } + .main-nav .navbar a { + /* If a menu item's text is too long, truncate it */ + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} diff --git a/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.vue.html b/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.vue.html new file mode 100644 index 00000000..306fa7b7 --- /dev/null +++ b/src/MineCase.ControlPanel/ClientApp/components/navmenu/navmenu.vue.html @@ -0,0 +1,37 @@ + + +