├── .gitignore ├── README.md ├── dist ├── RedisReact-console.exe ├── RedisReact-console.zip ├── RedisReact-winforms.exe ├── RedisReact.AppMac.app.zip ├── RedisReact.AppMac.mono.app.zip └── appsettings.txt ├── license.txt └── src ├── RedisReact.sln ├── RedisReact ├── RedisReact.AppConsole │ ├── App.config │ ├── AppHost.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RedisReact.AppConsole.csproj │ ├── logo.ico │ ├── platform.css │ └── platform.js ├── RedisReact.AppMac │ ├── AppDelegate.cs │ ├── AppDelegate.designer.cs │ ├── AppHost.cs │ ├── Entitlements.plist │ ├── Info.plist │ ├── MainMenu.xib │ ├── MainWindow.cs │ ├── MainWindow.designer.cs │ ├── MainWindow.xib │ ├── MainWindowController.cs │ ├── Program.cs │ ├── RedisReact.AppMac.csproj │ ├── Resources │ │ └── logo.icns │ ├── platform.css │ └── platform.js ├── RedisReact.AppWinForms │ ├── App.config │ ├── AppHost.cs │ ├── FormMain.Designer.cs │ ├── FormMain.cs │ ├── FormMain.resx │ ├── NativeHost.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── RedisReact.AppWinForms.csproj │ ├── logo.ico │ ├── platform.css │ └── platform.js ├── RedisReact.Resources │ ├── App.config │ ├── CefResources.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RedisReact.Resources.csproj │ ├── css │ │ └── app.min.css │ ├── default.html │ ├── img │ │ ├── ajax-loader.gif │ │ ├── logo-32.png │ │ ├── logo.ico │ │ ├── react-logo.png │ │ └── redis-logo.png │ ├── js │ │ ├── app.jsx.js │ │ └── app.min.js │ └── lib │ │ ├── css │ │ ├── lib.min.css │ │ ├── octicons-local.ttf │ │ ├── octicons.ttf │ │ └── octicons.woff │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ └── lib.min.js ├── RedisReact.ServiceInterface │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RedisReact.ServiceInterface.csproj │ ├── RedisServices.cs │ ├── SharedUtils.cs │ └── app.config ├── RedisReact.ServiceModel │ ├── CallRedis.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RedisReact.ServiceModel.csproj ├── RedisReact.Tests │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RedisReact.Tests.csproj │ ├── UnitTests.cs │ └── app.config └── RedisReact │ ├── AppHost.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── RedisReact.csproj │ ├── Scripts │ └── _references.js │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── bower.json │ ├── css │ └── app.css │ ├── default.html │ ├── gruntfile.js │ ├── img │ ├── ajax-loader.gif │ ├── logo-32.png │ ├── logo.ico │ ├── react-logo.png │ └── redis-logo.png │ ├── js │ ├── app.jsx │ ├── components │ │ ├── connections.jsx │ │ ├── console.jsx │ │ ├── dashboard.jsx │ │ ├── keyview.jsx │ │ ├── keyviewer.jsx │ │ └── search.jsx │ ├── jsonviewer.js │ ├── redis.js │ ├── stores.js │ └── utils.js │ ├── package.json │ ├── platform.css │ ├── platform.js │ ├── tests │ ├── README.txt │ ├── preprocessor.js │ └── unit │ │ └── hello-test.js │ ├── wwwroot │ ├── Global.asax │ ├── appsettings.txt │ ├── css │ │ └── app.min.css │ ├── default.html │ ├── img │ │ ├── ajax-loader.gif │ │ ├── logo-32.png │ │ ├── logo.ico │ │ ├── react-logo.png │ │ └── redis-logo.png │ ├── js │ │ ├── app.jsx.js │ │ └── app.min.js │ ├── lib │ │ ├── css │ │ │ ├── lib.min.css │ │ │ ├── octicons-local.ttf │ │ │ ├── octicons.ttf │ │ │ └── octicons.woff │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ └── lib.min.js │ ├── platform.css │ ├── platform.js │ └── web.config │ └── wwwroot_build │ ├── 00-install-dependencies.bat │ ├── config-winforms.txt │ ├── deploy │ └── appsettings.txt │ ├── package-deploy-console.bat │ ├── package-deploy-winforms.bat │ └── tools │ ├── 7za.exe │ ├── 7zsd_All.sfx │ ├── ILMerge.exe │ └── Licenses.txt ├── RedisReactMac.sln └── lib └── RedisReact.Resources.dll /.gitignore: -------------------------------------------------------------------------------- 1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 2 | [Bb]in/ 3 | [Oo]bj/ 4 | .idea/ 5 | .vs/ 6 | 7 | # mstest test results 8 | TestResults 9 | 10 | ## Ignore Visual Studio temporary files, build results, and 11 | ## files generated by popular Visual Studio add-ons. 12 | 13 | # User-specific files 14 | *.suo 15 | *.user 16 | *.sln.docstates 17 | *.secrets.cs 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Rr]elease/ 22 | deploy/ 23 | x64/ 24 | *_i.c 25 | *_p.c 26 | *.ilk 27 | *.meta 28 | *.obj 29 | *.pch 30 | *.pdb 31 | *.pgc 32 | *.pgd 33 | *.rsp 34 | *.sbr 35 | *.tlb 36 | *.tli 37 | *.tlh 38 | *.tmp 39 | *.log 40 | *.txt 41 | *.vspscc 42 | *.vssscc 43 | .builds 44 | 45 | # Visual C++ cache files 46 | ipch/ 47 | *.aps 48 | *.ncb 49 | *.opensdf 50 | *.sdf 51 | 52 | # Visual Studio profiler 53 | *.psess 54 | *.vsp 55 | *.vspx 56 | 57 | # Guidance Automation Toolkit 58 | *.gpState 59 | 60 | # ReSharper is a .NET coding add-in 61 | _ReSharper* 62 | 63 | # NCrunch 64 | *.ncrunch* 65 | .*crunch*.local.xml 66 | 67 | # Installshield output folder 68 | [Ee]xpress 69 | 70 | # DocProject is a documentation generator add-in 71 | DocProject/buildhelp/ 72 | DocProject/Help/*.HxT 73 | DocProject/Help/*.HxC 74 | DocProject/Help/*.hhc 75 | DocProject/Help/*.hhk 76 | DocProject/Help/*.hhp 77 | DocProject/Help/Html2 78 | DocProject/Help/html 79 | 80 | # Click-Once directory 81 | publish 82 | 83 | # Publish Web Output 84 | *.Publish.xml 85 | 86 | # NuGet Packages Directory 87 | packages 88 | 89 | # Windows Azure Build Output 90 | csx 91 | *.build.csdef 92 | 93 | # Windows Store app package directory 94 | AppPackages/ 95 | 96 | # Others 97 | [Bb]in 98 | [Oo]bj 99 | sql 100 | *.Cache 101 | ClientBin 102 | [Ss]tyle[Cc]op.* 103 | ~$* 104 | *.dbmdl 105 | 106 | Generated_Code #added for RIA/Silverlight projects 107 | 108 | # Backup & report files from converting an old project file to a newer 109 | # Visual Studio version. Backup files are not needed, because we have git ;-) 110 | _UpgradeReport_Files/ 111 | Backup*/ 112 | UpgradeLog*.XML 113 | 114 | ssl/ 115 | *.crt 116 | *.ssl 117 | *.pem 118 | results/ 119 | teststub.* 120 | *.sqlite 121 | -------------------------------------------------------------------------------- /dist/RedisReact-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/dist/RedisReact-console.exe -------------------------------------------------------------------------------- /dist/RedisReact-console.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/dist/RedisReact-console.zip -------------------------------------------------------------------------------- /dist/RedisReact-winforms.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/dist/RedisReact-winforms.exe -------------------------------------------------------------------------------- /dist/RedisReact.AppMac.app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/dist/RedisReact.AppMac.app.zip -------------------------------------------------------------------------------- /dist/RedisReact.AppMac.mono.app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/dist/RedisReact.AppMac.mono.app.zip -------------------------------------------------------------------------------- /dist/appsettings.txt: -------------------------------------------------------------------------------- 1 | redis-server 127.0.0.1:6379?db=0 2 | query-limit 20 -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | ServiceStack 2 | Copyright (c) 2013 Service Stack 3 | =============================================================================== 4 | 5 | This program is free software: you can redistribute it and/or modify it 6 | under the terms of the GNU Affero General Public License as published by the 7 | Free Software Foundation, either version 3 of the License, see 8 | http://www.gnu.org/licenses/agpl-3.0.html. 9 | 10 | This program is distributed in the hope that it will be useful, but WITHOUT 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 | FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. 13 | 14 | 15 | FOSS License Exception 16 | =============================================================================== 17 | 18 | This Exception applies to open source applications built with ServiceStack and 19 | ServiceStack extensions ("The Software"), and to open source Derivative Works of 20 | the Software, that use the Software under the terms of GNU Affero General 21 | Public License, version 3 ("AGPLv3"). The Exception extends AGPLv3 by providing 22 | additional grants that allows developers of FOSS applications to include ServiceStack 23 | with their FOSS applications in combination with other software licensed under 24 | the licenses from the "Open Source License List" below, provided that: 25 | 26 | You obey the AGPLv3 terms for the Software and the Derivative Work, except for 27 | the separate parts of the Derivative Work ("Additions") which constitute independent 28 | work and are not dervied from the Software. 29 | 30 | - All Additions are distributed subject to one of the licenses listed below. 31 | - Your software distribution provides complete source code for the Additions. 32 | - The Derivative Work and its Additions are intended for use in end-user applications 33 | and do not constitute software intended for use by software developers, such as 34 | software libraries, components, and development kits. 35 | - If you violate any of the terms in this Exception, you lose all rights granted 36 | to you by the Exception and revert to the terms of AGPLv3. 37 | 38 | Service Stack reserves all rights not expressly granted in these terms and conditions. 39 | 40 | Open Source License List 41 | 42 | Name Version 43 | Academic Free License 2.0 44 | Apache Software License 2.0 45 | Apple Public Source License 2.0 46 | Artistic license From Perl 5.8.0 47 | BSD license July 22 1999 48 | Common Development and Distribution License (CDDL) 1.0 49 | Common Public License 1.0 50 | Eclipse Public License 1.0 51 | Educational Community License 2.0 52 | European Union Public License (EUPL) 1.1 53 | GNU General Public License (GPL) 2.0 54 | GNU Library or "Lesser" General Public License (LGPL) 3.0 55 | Jabber Open Source License 1.0 56 | MIT License (As listed in file MIT-License.txt) - 57 | Mozilla Public License (MPL) 1.0/1.1 58 | Open Software License 2.0 59 | OpenSSL license (with original SSLeay license) 2003 (1998) 60 | University of Illinois/NCSA Open Source License - 61 | W3C License 2001 62 | X11 License 2001 63 | Zlib/libpng License - 64 | 65 | 66 | Commercial License 67 | =========================================================================== 68 | In addition to this license, ServiceStack is offered under a commerical license. 69 | see https://servicestack.net/pricing for details. 70 | -------------------------------------------------------------------------------- /src/RedisReact.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact", "RedisReact\RedisReact\RedisReact.csproj", "{27D04601-8961-4E78-9120-80BB03161D8F}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.AppWinForms", "RedisReact\RedisReact.AppWinForms\RedisReact.AppWinForms.csproj", "{F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.AppConsole", "RedisReact\RedisReact.AppConsole\RedisReact.AppConsole.csproj", "{7ED66812-4A54-41C1-9EE2-61DE05FA11FA}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.Resources", "RedisReact\RedisReact.Resources\RedisReact.Resources.csproj", "{34A40FF2-67DC-4BED-BC54-74CD303DFC6D}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.ServiceModel", "RedisReact\RedisReact.ServiceModel\RedisReact.ServiceModel.csproj", "{8ACAEC26-7705-4927-9E00-0217C7ADDC53}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.ServiceInterface", "RedisReact\RedisReact.ServiceInterface\RedisReact.ServiceInterface.csproj", "{30A709D5-9F64-467E-9851-9AA94CBBD3D2}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.Tests", "RedisReact\RedisReact.Tests\RedisReact.Tests.csproj", "{B1665387-EF91-4CA0-82BB-66E5781ED800}" 19 | EndProject 20 | Global 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 22 | Debug|Any CPU = Debug|Any CPU 23 | Debug|x86 = Debug|x86 24 | Release|Any CPU = Release|Any CPU 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {27D04601-8961-4E78-9120-80BB03161D8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {27D04601-8961-4E78-9120-80BB03161D8F}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {27D04601-8961-4E78-9120-80BB03161D8F}.Debug|x86.ActiveCfg = Debug|Any CPU 31 | {27D04601-8961-4E78-9120-80BB03161D8F}.Debug|x86.Build.0 = Debug|Any CPU 32 | {27D04601-8961-4E78-9120-80BB03161D8F}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {27D04601-8961-4E78-9120-80BB03161D8F}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {27D04601-8961-4E78-9120-80BB03161D8F}.Release|x86.ActiveCfg = Release|Any CPU 35 | {27D04601-8961-4E78-9120-80BB03161D8F}.Release|x86.Build.0 = Release|Any CPU 36 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Debug|x86.ActiveCfg = Debug|x86 37 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Debug|x86.Build.0 = Debug|x86 38 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Release|x86.ActiveCfg = Release|x86 39 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Release|x86.Build.0 = Release|x86 40 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Debug|Any CPU.ActiveCfg = Debug|x86 41 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Debug|Any CPU.Build.0 = Debug|x86 42 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Release|Any CPU.ActiveCfg = Release|x86 43 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6}.Release|Any CPU.Build.0 = Release|x86 44 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Debug|x86.ActiveCfg = Debug|Any CPU 47 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Debug|x86.Build.0 = Debug|Any CPU 48 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Release|Any CPU.ActiveCfg = Release|Any CPU 49 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Release|Any CPU.Build.0 = Release|Any CPU 50 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Release|x86.ActiveCfg = Release|Any CPU 51 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA}.Release|x86.Build.0 = Release|Any CPU 52 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 53 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Debug|Any CPU.Build.0 = Debug|Any CPU 54 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Debug|x86.ActiveCfg = Debug|Any CPU 55 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Debug|x86.Build.0 = Debug|Any CPU 56 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Release|Any CPU.ActiveCfg = Release|Any CPU 57 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Release|Any CPU.Build.0 = Release|Any CPU 58 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Release|x86.ActiveCfg = Release|Any CPU 59 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D}.Release|x86.Build.0 = Release|Any CPU 60 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 61 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Debug|Any CPU.Build.0 = Debug|Any CPU 62 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Debug|x86.ActiveCfg = Debug|Any CPU 63 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Debug|x86.Build.0 = Debug|Any CPU 64 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Release|Any CPU.Build.0 = Release|Any CPU 66 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Release|x86.ActiveCfg = Release|Any CPU 67 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53}.Release|x86.Build.0 = Release|Any CPU 68 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 69 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Debug|Any CPU.Build.0 = Debug|Any CPU 70 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Debug|x86.ActiveCfg = Debug|Any CPU 71 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Debug|x86.Build.0 = Debug|Any CPU 72 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Release|Any CPU.ActiveCfg = Release|Any CPU 73 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Release|Any CPU.Build.0 = Release|Any CPU 74 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Release|x86.ActiveCfg = Release|Any CPU 75 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2}.Release|x86.Build.0 = Release|Any CPU 76 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 77 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Debug|Any CPU.Build.0 = Debug|Any CPU 78 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Debug|x86.ActiveCfg = Debug|Any CPU 79 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Debug|x86.Build.0 = Debug|Any CPU 80 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Release|Any CPU.ActiveCfg = Release|Any CPU 81 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Release|Any CPU.Build.0 = Release|Any CPU 82 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Release|x86.ActiveCfg = Release|Any CPU 83 | {B1665387-EF91-4CA0-82BB-66E5781ED800}.Release|x86.Build.0 = Release|Any CPU 84 | EndGlobalSection 85 | GlobalSection(SolutionProperties) = preSolution 86 | HideSolutionNode = FALSE 87 | EndGlobalSection 88 | EndGlobal 89 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/AppHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Net; 4 | using Funq; 5 | using ServiceStack; 6 | using RedisReact.Resources; 7 | using RedisReact.ServiceInterface; 8 | 9 | namespace RedisReact.AppConsole 10 | { 11 | public class AppHost : AppSelfHostBase 12 | { 13 | /// 14 | /// Default constructor. 15 | /// Base constructor requires a name and assembly to locate web service classes. 16 | /// 17 | public AppHost() 18 | : base("RedisReact.AppConsole", typeof(RedisServices).Assembly) 19 | { 20 | AppSettings = SharedUtils.GetAppSettings(); 21 | } 22 | 23 | /// 24 | /// Application specific configuration 25 | /// This method should initialize any IoC resources utilized by your web service classes. 26 | /// 27 | /// 28 | public override void Configure(Container container) 29 | { 30 | SharedUtils.Configure(this); 31 | 32 | SetConfig(new HostConfig { 33 | DebugMode = AppSettings.Get("DebugMode", false), 34 | EmbeddedResourceBaseTypes = { typeof(AppHost), typeof(CefResources) }, 35 | }); 36 | 37 | // This route is added using Routes.Add and ServiceController.RegisterService due to 38 | // using ILMerge limiting our AppHost : base() call to one assembly. 39 | // If two assemblies are used, the base() call searchs the same assembly twice due to the ILMerged result. 40 | Routes.Add("/nativehost/{Action}"); 41 | ServiceController.RegisterService(typeof(NativeHostService)); 42 | } 43 | } 44 | 45 | public class NativeHostService : Service 46 | { 47 | public object Get(NativeHostAction request) 48 | { 49 | if (string.IsNullOrEmpty(request.Action)) 50 | throw HttpError.NotFound("Function Not Found"); 51 | 52 | var nativeHost = typeof(NativeHost).CreateInstance(); 53 | var methodName = request.Action.First().ToString().ToUpper() + string.Join("", request.Action.Skip(1)); 54 | var methodInfo = typeof(NativeHost).GetMethod(methodName); 55 | if (methodInfo == null) 56 | throw new HttpError(HttpStatusCode.NotFound, "Function Not Found"); 57 | 58 | methodInfo.Invoke(nativeHost, null); 59 | return null; 60 | } 61 | } 62 | 63 | public class NativeHostAction : IReturnVoid 64 | { 65 | public string Action { get; set; } 66 | } 67 | 68 | public class NativeHost 69 | { 70 | public void Quit() 71 | { 72 | Environment.Exit(0); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/Program.cs: -------------------------------------------------------------------------------- 1 | using ServiceStack; 2 | using ServiceStack.Text; 3 | using System; 4 | using System.Diagnostics; 5 | using System.Threading; 6 | 7 | namespace RedisReact.AppConsole 8 | { 9 | static class Program 10 | { 11 | public static string HostUrl = "http://127.0.0.1:2337/"; 12 | 13 | /// 14 | /// The main entry point for the application 15 | /// 16 | [STAThread] 17 | static void Main(string[] args) 18 | { 19 | new AppHost().Init().Start("http://*:2337/"); 20 | "ServiceStack SelfHost listening at {0}".Fmt(HostUrl).Print(); 21 | Process.Start(HostUrl); 22 | 23 | Thread.Sleep(Timeout.Infinite); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("ServiceStack")] 12 | [assembly: AssemblyProduct("RedisReact")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("95d4bca7-8d49-4d65-a043-16f821a41e38")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/RedisReact.AppConsole.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7ED66812-4A54-41C1-9EE2-61DE05FA11FA} 8 | Exe 9 | Properties 10 | RedisReact.AppConsole 11 | RedisReact.AppConsole 12 | v4.7.2 13 | 512 14 | true 15 | default 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | logo.ico 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | {3414e9ec-19b8-410c-ac33-f2e6d081b930} 63 | RedisReact.Resources 64 | 65 | 66 | {582dfb0f-f84d-4e43-9bca-2a5a86600b7a} 67 | RedisReact.ServiceInterface 68 | 69 | 70 | {08bef328-ab7d-48d3-800d-48acc75c7914} 71 | RedisReact.ServiceModel 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.AppConsole/logo.ico -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/platform.css: -------------------------------------------------------------------------------- 1 | /* console */ 2 | body { 3 | } 4 | .nav > li.nativeApp.console { 5 | display: block; 6 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppConsole/platform.js: -------------------------------------------------------------------------------- 1 | /* console */ 2 | document.documentElement.className += ' console'; 3 | 4 | window.nativeHost = { 5 | quit: function() { 6 | $.get('/nativehost/quit'); 7 | setTimeout(function() { 8 | window.close(); 9 | }); 10 | }, 11 | platform: 'console' 12 | }; 13 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using MonoMac.Foundation; 4 | using MonoMac.AppKit; 5 | using MonoMac.ObjCRuntime; 6 | 7 | namespace RedisReact.AppMac 8 | { 9 | public partial class AppDelegate : NSApplicationDelegate 10 | { 11 | MainWindowController mainWindowController; 12 | 13 | public AppDelegate () 14 | { 15 | } 16 | 17 | public override void FinishedLaunching (NSObject notification) 18 | { 19 | 20 | #if DEBUG 21 | //Enable WebInspector in WebView 22 | var defaults = NSUserDefaults.StandardUserDefaults; 23 | defaults.SetBool (true, "WebKitDeveloperExtras"); 24 | defaults.Synchronize(); 25 | #endif 26 | 27 | mainWindowController = new MainWindowController (); 28 | mainWindowController.Window.MakeKeyAndOrderFront (this); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/AppDelegate.designer.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace RedisReact.AppMac 3 | { 4 | // Should subclass MonoMac.AppKit.NSResponder 5 | [MonoMac.Foundation.Register ("AppDelegate")] 6 | public partial class AppDelegate 7 | { 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/AppHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ServiceStack; 3 | using Funq; 4 | using System.Reflection; 5 | using ServiceStack.Text; 6 | using System.Net; 7 | using ServiceStack.Auth; 8 | using ServiceStack.Redis; 9 | using MonoMac.AppKit; 10 | using System.Linq; 11 | using RedisReact.ServiceInterface; 12 | using RedisReact.Resources; 13 | 14 | namespace RedisReact.AppMac 15 | { 16 | public class AppHost : AppSelfHostBase 17 | { 18 | /// 19 | /// Default constructor. 20 | /// Base constructor requires a name and assembly to locate web service classes. 21 | /// 22 | public AppHost() 23 | : base("RedisReact.AppMac", typeof(RedisServices).Assembly) 24 | { 25 | AppSettings = SharedUtils.GetAppSettings(); 26 | } 27 | 28 | /// 29 | /// Application specific configuration 30 | /// This method should initialize any IoC resources utilized by your web service classes. 31 | /// 32 | /// 33 | public override void Configure(Container container) 34 | { 35 | SharedUtils.Configure(this); 36 | 37 | SetConfig(new HostConfig { 38 | DebugMode = AppSettings.Get("DebugMode", false), 39 | EmbeddedResourceBaseTypes = { typeof(AppHost), typeof(CefResources) } 40 | }); 41 | 42 | Routes.Add("/nativehost/{Action}"); 43 | ServiceController.RegisterService(typeof(NativeHostService)); 44 | } 45 | } 46 | 47 | public class NativeHostService : Service 48 | { 49 | public object Get(NativeHostAction request) 50 | { 51 | if (string.IsNullOrEmpty(request.Action)) 52 | throw HttpError.NotFound("Function Not Found"); 53 | 54 | var nativeHost = typeof(NativeHost).CreateInstance(); 55 | var methodName = request.Action.First ().ToString ().ToUpper () + string.Join ("", request.Action.Skip (1)); 56 | var methodInfo = typeof(NativeHost).GetMethod(methodName); 57 | if (methodInfo == null) 58 | throw new HttpError(HttpStatusCode.NotFound, "Function Not Found"); 59 | 60 | methodInfo.Invoke(nativeHost, null); 61 | return null; 62 | } 63 | } 64 | 65 | public class NativeHostAction : IReturnVoid 66 | { 67 | public string Action { get; set; } 68 | } 69 | 70 | public class NativeHost 71 | { 72 | public void ShowAbout() 73 | { 74 | //Invoke native about menu item programmatically. 75 | Program.MainMenu.InvokeOnMainThread (() => { 76 | foreach (var item in Program.MainMenu.ItemArray()) { 77 | if (item.Title == "RedisReact") { 78 | item.Submenu.PerformActionForItem(0); 79 | } 80 | } 81 | }); 82 | } 83 | 84 | public void Quit() 85 | { 86 | Environment.Exit(0); 87 | } 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.ubiquity-kvstore-identifier 6 | $(TeamIdentifierPrefix)net.servicestack.RedisReact 7 | com.apple.developer.ubiquity-container-identifiers 8 | 9 | $(TeamIdentifierPrefix)net.servicestack.RedisReact 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | RedisReact 7 | CFBundleIdentifier 8 | net.servicestack.RedisReact 9 | CFBundleName 10 | RedisReact 11 | CFBundleVersion 12 | 1 13 | LSMinimumSystemVersion 14 | 10.6 15 | NSMainNibFile 16 | MainMenu 17 | NSPrincipalClass 18 | NSApplication 19 | CFBundleIconFile 20 | logo 21 | CFBundleShortVersionString 22 | 1 23 | NSAppTransportSecurity 24 | 25 | NSExceptionDomains 26 | 27 | localhost 28 | 29 | NSTemporaryExceptionAllowsInsecureHTTPSLoads 30 | 31 | NSIncludesSubdomains 32 | 33 | NSTemporaryExceptionAllowsInsecureHTTPLoads 34 | 35 | NSTemporaryExceptionMinimumTLSVersion 36 | 1.0 37 | NSTemporaryExceptionRequiresForwardSecrecy 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/MainWindow.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using MonoMac.Foundation; 6 | using MonoMac.AppKit; 7 | 8 | namespace RedisReact.AppMac 9 | { 10 | public partial class MainWindow : MonoMac.AppKit.NSWindow 11 | { 12 | #region Constructors 13 | 14 | // Called when created from unmanaged code 15 | public MainWindow (IntPtr handle) : base (handle) 16 | { 17 | Initialize (); 18 | } 19 | 20 | // Called when created directly from a XIB file 21 | [Export ("initWithCoder:")] 22 | public MainWindow (NSCoder coder) : base (coder) 23 | { 24 | Initialize (); 25 | } 26 | 27 | // Shared initialization code 28 | void Initialize () 29 | { 30 | } 31 | 32 | #endregion 33 | 34 | public override void AwakeFromNib() 35 | { 36 | base.AwakeFromNib (); 37 | Program.MainMenu = NSApplication.SharedApplication.MainMenu; 38 | webView.MainFrameUrl = Program.HostUrl; 39 | webView.Frame = new System.Drawing.RectangleF(0,0,this.Frame.Width,this.Frame.Height); 40 | this.DidResize += (sender, e) => { 41 | webView.Frame = new System.Drawing.RectangleF(0,0,this.Frame.Width,this.Frame.Height); 42 | }; 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/MainWindow.designer.cs: -------------------------------------------------------------------------------- 1 | // WARNING 2 | // 3 | // This file has been generated automatically by Xamarin Studio to store outlets and 4 | // actions made in the UI designer. If it is removed, they will be lost. 5 | // Manual changes to this file may not be handled correctly. 6 | // 7 | using MonoMac.Foundation; 8 | using System.CodeDom.Compiler; 9 | 10 | namespace RedisReact.AppMac 11 | { 12 | [Register ("MainWindow")] 13 | partial class MainWindow 14 | { 15 | [Outlet] 16 | MonoMac.WebKit.WebView webView { get; set; } 17 | 18 | void ReleaseDesignerOutlets () 19 | { 20 | if (webView != null) { 21 | webView.Dispose (); 22 | webView = null; 23 | } 24 | } 25 | } 26 | 27 | [Register ("MainWindowController")] 28 | partial class MainWindowController 29 | { 30 | 31 | void ReleaseDesignerOutlets () 32 | { 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/MainWindowController.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using MonoMac.Foundation; 6 | using MonoMac.AppKit; 7 | 8 | namespace RedisReact.AppMac 9 | { 10 | public partial class MainWindowController : MonoMac.AppKit.NSWindowController 11 | { 12 | #region Constructors 13 | 14 | // Called when created from unmanaged code 15 | public MainWindowController (IntPtr handle) : base (handle) 16 | { 17 | Initialize (); 18 | } 19 | 20 | // Called when created directly from a XIB file 21 | [Export ("initWithCoder:")] 22 | public MainWindowController (NSCoder coder) : base (coder) 23 | { 24 | Initialize (); 25 | } 26 | 27 | // Call to load from the XIB/NIB file 28 | public MainWindowController () : base ("MainWindow") 29 | { 30 | Initialize (); 31 | } 32 | 33 | // Shared initialization code 34 | void Initialize () 35 | { 36 | } 37 | 38 | #endregion 39 | 40 | //strongly typed window accessor 41 | public new MainWindow Window { 42 | get { 43 | return (MainWindow)base.Window; 44 | } 45 | } 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using ServiceStack.Text; 4 | using MonoMac.Foundation; 5 | using MonoMac.AppKit; 6 | using MonoMac.ObjCRuntime; 7 | 8 | namespace RedisReact.AppMac 9 | { 10 | public static class Program 11 | { 12 | public static string HostUrl = "http://localhost:2337/"; 13 | public static string ListenOn = "http://*:2337/"; 14 | 15 | public static AppHost App; 16 | public static NSMenu MainMenu; 17 | 18 | static void Main (string[] args) 19 | { 20 | try 21 | { 22 | App = new AppHost(); 23 | App.Init().Start(ListenOn); 24 | } 25 | catch (Exception) 26 | { 27 | "Using existing AppHost found on {0}".Print(HostUrl); 28 | } 29 | 30 | NSApplication.Init(); 31 | NSApplication.Main(args); 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/RedisReact.AppMac.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {318B96DE-9A31-42A9-8241-84D14472F078} 8 | Exe 9 | RedisReact.AppMac 10 | Resources 11 | RedisReact.AppMac 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\Debug 18 | DEBUG; 19 | prompt 20 | 4 21 | false 22 | false 23 | false 24 | false 25 | false 26 | false 27 | false 28 | true 29 | 30 | 31 | full 32 | true 33 | bin\Release 34 | prompt 35 | 4 36 | false 37 | false 38 | false 39 | true 40 | false 41 | true 42 | false 43 | true 44 | Developer ID Application: Service Stack (68KV657XKB) 45 | Developer ID Installer 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ..\..\lib\RedisReact.Resources.dll 55 | 56 | 57 | 58 | ..\..\..\lib\ServiceStack.Client.dll 59 | 60 | 61 | ..\..\..\lib\ServiceStack.Common.dll 62 | 63 | 64 | ..\..\..\lib\ServiceStack.dll 65 | 66 | 67 | ..\..\..\lib\ServiceStack.Interfaces.dll 68 | 69 | 70 | ..\..\..\lib\ServiceStack.OrmLite.dll 71 | 72 | 73 | ..\..\..\lib\ServiceStack.Redis.dll 74 | 75 | 76 | ..\..\..\lib\ServiceStack.Server.dll 77 | 78 | 79 | ..\..\..\lib\ServiceStack.Text.dll 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2} 102 | RedisReact.ServiceInterface 103 | 104 | 105 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53} 106 | RedisReact.ServiceModel 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/Resources/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.AppMac/Resources/logo.icns -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/platform.css: -------------------------------------------------------------------------------- 1 | /* mac */ 2 | body { 3 | } 4 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppMac/platform.js: -------------------------------------------------------------------------------- 1 | /* mac */ 2 | document.documentElement.className += ' mac'; 3 | window.nativeHost = { 4 | quit: function () { 5 | $.get('/nativehost/quit'); 6 | }, 7 | showAbout: function () { 8 | $.get('/nativehost/showAbout'); 9 | }, 10 | platform: 'mac' 11 | }; 12 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/AppHost.cs: -------------------------------------------------------------------------------- 1 | using Funq; 2 | using ServiceStack; 3 | using RedisReact.Resources; 4 | using RedisReact.ServiceInterface; 5 | 6 | namespace RedisReact.AppWinForms 7 | { 8 | public class AppHost : AppSelfHostBase 9 | { 10 | /// 11 | /// Default constructor. 12 | /// Base constructor requires a name and assembly to locate web service classes. 13 | /// 14 | public AppHost() 15 | : base("RedisReact.AppWinForms", typeof (RedisServices).Assembly) 16 | { 17 | AppSettings = SharedUtils.GetAppSettings(); 18 | } 19 | 20 | /// 21 | /// Application specific configuration 22 | /// This method should initialize any IoC resources utilized by your web service classes. 23 | /// 24 | /// 25 | public override void Configure(Container container) 26 | { 27 | SharedUtils.Configure(this); 28 | 29 | SetConfig(new HostConfig { 30 | DebugMode = AppSettings.Get("DebugMode", false), 31 | EmbeddedResourceBaseTypes = { typeof(AppHost), typeof(CefResources) }, 32 | }); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/FormMain.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace RedisReact.AppWinForms 2 | { 3 | partial class FormMain 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); 32 | this.SuspendLayout(); 33 | // 34 | // FormMain 35 | // 36 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 37 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 38 | this.BackColor = System.Drawing.Color.White; 39 | this.ClientSize = new System.Drawing.Size(426, 403); 40 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 41 | this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 42 | this.Name = "FormMain"; 43 | this.ResumeLayout(false); 44 | 45 | } 46 | 47 | #endregion 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/FormMain.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using CefSharp; 4 | using CefSharp.WinForms; 5 | using CefSharp.WinForms.Internals; 6 | 7 | namespace RedisReact.AppWinForms 8 | { 9 | public partial class FormMain : Form 10 | { 11 | public ChromiumWebBrowser ChromiumBrowser { get; private set; } 12 | public FormMain() 13 | { 14 | InitializeComponent(); 15 | VerticalScroll.Visible = false; 16 | 17 | ChromiumBrowser = new ChromiumWebBrowser(Program.HostUrl) 18 | { 19 | Dock = DockStyle.Fill 20 | }; 21 | 22 | Controls.Add(ChromiumBrowser); 23 | 24 | FormClosed += (sender, args) => 25 | { 26 | Cef.Shutdown(); 27 | }; 28 | 29 | Load += (sender, args) => 30 | { 31 | //FormBorderStyle = FormBorderStyle.None; 32 | Left = Top = 0; 33 | Width = Screen.PrimaryScreen.WorkingArea.Width; 34 | Height = Screen.PrimaryScreen.WorkingArea.Height; 35 | }; 36 | 37 | ChromiumBrowser.RegisterJsObject("nativeHost", new NativeHost(this)); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/NativeHost.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | using System.Windows.Forms.VisualStyles; 3 | using CefSharp.WinForms.Internals; 4 | using CefSharp; 5 | 6 | namespace RedisReact.AppWinForms 7 | { 8 | public class NativeHost 9 | { 10 | private readonly FormMain formMain; 11 | 12 | public NativeHost(FormMain formMain) 13 | { 14 | this.formMain = formMain; 15 | } 16 | 17 | public void Quit() 18 | { 19 | formMain.InvokeOnUiThreadIfRequired(() => 20 | { 21 | formMain.Close(); 22 | }); 23 | } 24 | 25 | public void ShowAbout() 26 | { 27 | MessageBox.Show(@"ServiceStack with CefSharp + ReactJS", @"RedisReact.AppWinForms", MessageBoxButtons.OK, MessageBoxIcon.Information); 28 | } 29 | 30 | public void ToggleFormBorder() 31 | { 32 | formMain.InvokeOnUiThreadIfRequired(() => 33 | { 34 | formMain.FormBorderStyle = formMain.FormBorderStyle == FormBorderStyle.None 35 | ? FormBorderStyle.Sizable 36 | : FormBorderStyle.None; 37 | }); 38 | } 39 | 40 | public void Ready() 41 | { 42 | formMain.InvokeOnUiThreadIfRequired(() => 43 | { 44 | #if DEBUG 45 | formMain.ChromiumBrowser.KeyboardHandler = new KeyboardHandler(); 46 | #endif 47 | }); 48 | } 49 | } 50 | 51 | #if DEBUG 52 | public class KeyboardHandler : IKeyboardHandler 53 | { 54 | public bool OnPreKeyEvent(IWebBrowser browserControl, KeyType type, int windowsKeyCode, int nativeKeyCode, 55 | CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut) 56 | { 57 | if (windowsKeyCode == (int)Keys.F12) 58 | { 59 | Program.Form.ChromiumBrowser.ShowDevTools(); 60 | } 61 | return false; 62 | } 63 | 64 | public bool OnKeyEvent(IWebBrowser browserControl, KeyType type, int windowsKeyCode, CefEventFlags modifiers, bool isSystemKey) 65 | { 66 | return false; 67 | } 68 | } 69 | #endif 70 | } 71 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows.Forms; 4 | using CefSharp; 5 | using RedisReact.ServiceInterface; 6 | using ServiceStack; 7 | using ServiceStack.Text; 8 | 9 | namespace RedisReact.AppWinForms 10 | { 11 | static class Program 12 | { 13 | public static string HostUrl = "http://127.0.0.1:2337/"; 14 | public static AppHost AppHost; 15 | public static FormMain Form; 16 | 17 | /// 18 | /// The main entry point for the application. 19 | /// 20 | [STAThread] 21 | static void Main() 22 | { 23 | Cef.Initialize(new CefSettings()); 24 | 25 | Application.EnableVisualStyles(); 26 | Application.SetCompatibleTextRenderingDefault(false); 27 | 28 | AppHost = new AppHost(); 29 | AppHost.Init().Start("http://*:2337/"); 30 | "ServiceStack SelfHost listening at {0} ".Fmt(HostUrl).Print(); 31 | Form = new FormMain(); 32 | Application.Run(Form); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("ServiceStack")] 12 | [assembly: AssemblyProduct("RedisReact")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("10bc6ffc-fe1d-4027-9e34-16bbfc46e3ee")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace RedisReact.AppWinForms.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RedisReact.AppWinForms.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace RedisReact.AppWinForms.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/RedisReact.AppWinForms.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Debug 8 | x86 9 | x86 10 | {F9B1D93D-9B2F-428F-BAEC-3C00BF0953A6} 11 | WinExe 12 | Properties 13 | RedisReact.AppWinForms 14 | RedisReact.AppWinForms 15 | v4.7.2 16 | 512 17 | 18 | 19 | default 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | true 40 | bin\x86\Debug\ 41 | DEBUG;TRACE 42 | full 43 | x86 44 | prompt 45 | MinimumRecommendedRules.ruleset 46 | 47 | 48 | bin\x86\Release\ 49 | TRACE 50 | true 51 | pdbonly 52 | x86 53 | prompt 54 | MinimumRecommendedRules.ruleset 55 | 56 | 57 | logo.ico 58 | 59 | 60 | 61 | $(SolutionDir)\packages\CefSharp.Common.41.0.0\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Form 81 | 82 | 83 | FormMain.cs 84 | 85 | 86 | 87 | 88 | 89 | FormMain.cs 90 | 91 | 92 | ResXFileCodeGenerator 93 | Resources.Designer.cs 94 | Designer 95 | 96 | 97 | True 98 | Resources.resx 99 | 100 | 101 | SettingsSingleFileGenerator 102 | Settings.Designer.cs 103 | 104 | 105 | True 106 | Settings.settings 107 | True 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | {3414e9ec-19b8-410c-ac33-f2e6d081b930} 116 | RedisReact.Resources 117 | 118 | 119 | {582dfb0f-f84d-4e43-9bca-2a5a86600b7a} 120 | RedisReact.ServiceInterface 121 | 122 | 123 | {08bef328-ab7d-48d3-800d-48acc75c7914} 124 | RedisReact.ServiceModel 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 159 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.AppWinForms/logo.ico -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/platform.css: -------------------------------------------------------------------------------- 1 | /* winforms */ 2 | body { 3 | -webkit-touch-callout: none; 4 | -webkit-user-select: none; 5 | user-select: none; 6 | } 7 | 8 | .nav > li.nativeApp.winforms { 9 | display: block; 10 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.AppWinForms/platform.js: -------------------------------------------------------------------------------- 1 | /* winforms */ 2 | document.documentElement.className += ' winforms'; 3 | 4 | $(document).ready(function () { 5 | window.nativeHost.ready(); 6 | 7 | $(document).on('keydown', function(e) { 8 | var keyCode = e.which || e.keyCode; 9 | if (e.altKey && keyCode == Keys.LEFT) { 10 | history.back(); 11 | } else if (e.altKey && keyCode == Keys.RIGHT) { 12 | history.forward(); 13 | } 14 | }); 15 | }); -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/CefResources.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RedisReact.Resources 8 | { 9 | public class CefResources 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact.Resources")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RedisReact.Resources")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("34b19543-ba0d-42ac-aa66-251ed4570a8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/RedisReact.Resources.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {34A40FF2-67DC-4BED-BC54-74CD303DFC6D} 8 | Library 9 | Properties 10 | RedisReact.Resources 11 | RedisReact.Resources 12 | v4.7.2 13 | 512 14 | 15 | 16 | default 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | {8acaec26-7705-4927-9e00-0217c7addc53} 78 | RedisReact.ServiceModel 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/css/app.min.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar{-webkit-appearance:none;width:7px}::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5);-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}html{overflow-y:scroll}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:300}h1{margin:14px 0 0;font-size:20px;white-space:nowrap}#connection{display:block;margin:3px 0 0 50px;color:#aaa;font-size:11px;white-space:nowrap}#connection:focus,#connection:hover,#connection:visited{text-decoration:none}#connection:hover,.connections-active #connection{color:#4285f4}#connection b{padding:0 0 0 5px}.error-summary{color:#c00}#connections-page{text-align:center}#formConnection{padding:40px 0 0;margin:0 auto}#formConnection h2{margin:0 0 40px}#formConnection input{margin:0 10px}#formConnection #txtHost{width:200px}#formConnection #txtPort{width:70px}#formConnection #txtDb{width:40px}#formConnection .actions{margin:20px 0}.loader{visibility:hidden;margin:0 5px 0 -40px}.loading .loader{visibility:visible}.bg-danger,.bg-success{line-height:34px;width:100%;margin:0 auto;padding:0 10px}table td{text-align:left}body.search-active,body.search-active .navbar{background:#eee}.navbar{border:0;height:60px;background:#fff}#poweredby,#sidebar,.navbar{position:fixed}#poweredby{color:#aaa;bottom:5px;right:5px;font-size:12px;display:none}.home-active #poweredby{display:block}#redislogo{height:50px;width:50px}#logo{margin:10px}.nav>li.nativeApp{display:none}.list-group-item{background:0 0}#sidebar{top:60px;left:0}.left{float:left}#menu{margin:15px 0 0;padding:0 0 0 5px}#menu li{border:none}#menu a{color:rgba(0,0,0,.54)}#menu a.active{color:#4285f4}#body{margin:0 0 0 80px}#body .content{text-align:center;margin:70px 0 0}#formSearch{background:#f5f5f5;border-radius:2px;position:absolute;width:50%;left:25%;margin-left:40px}#formSearch .octicon-search{color:#888;position:absolute;margin:15px 0 0}.search-active #formSearch{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#txtSearch{width:100%;background:0 0;border:none;outline:0;margin:0 0 0 20px}.clear-search{display:none;position:absolute;right:13px;margin:13px 0 0}.search-active .clear-search{display:block}.search-active .clear-search span{color:#999;cursor:pointer;font-size:22px}.search-active .clear-search span:hover{color:#666}.wrap{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.search-results{cursor:pointer}.search-results>tbody>tr:hover{background:#ffe}#dashboard-page,#keyviewer-page,#search-page{text-align:center}.content{display:inline-block}.table-wrap{margin-left:auto;margin-right:auto;background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.search-results .actions{text-align:center;white-space:nowrap}.search-results .viewgrid b{padding:0 5px}#keyviewer-page .content{max-width:55%;text-align:left}.rawview{max-width:800px;overflow:hidden}#keyviewer-page h3 i,#keyviewer-page h3 span{color:#999}#keyviewer-page h3 i{padding:0 10px 0 5px;font-style:normal}.keyview a:hover{text-decoration:none}.keycrumbs em{font-style:normal;color:#aaa;padding:0 2px}.key-preview textarea{width:100%;min-height:150px}#keyviewer-page .actions{position:absolute;text-align:right;top:60px;right:23%}#keyviewer-page .actions .action{cursor:pointer;display:inline-block;color:#999}#keyviewer-page .actions .action:hover{color:#337ab7}#keyviewer-page .actions b{margin:0 10px 0 4px;line-height:30px}#similarkeys{position:absolute;display:inline-block;right:0;z-index:1;background:#fff;min-width:160px}#similarkeys td{padding:0 20px;cursor:pointer}#similarkeys .active td{padding:0 20px 0 7px}#similarkeys .active td b{padding:0 5px 0 0}.jsonviewer .ib{display:inline-block}.jsonviewer TABLE{border-collapse:collapse;border:1px solid #ccc;clear:left}.jsonviewer TH{text-align:left;padding:4px 8px;text-shadow:#fff 1px 1px -1px;background:#f1f1f1;white-space:nowrap;cursor:pointer;font-weight:700}.jsonviewer TD{padding:8px 8px 0;vertical-align:top}.jsonviewer DL{margin:0;clear:left}.jsonviewer DT{font-weight:700;width:160px;clear:left;float:left;display:block;white-space:nowrap;line-height:26px}.jsonviewer DD{display:block;float:left;line-height:26px;max-width:600px}.jsonviewer DL DL DT{font-weight:700}.jsonviewer HR{display:none}.jsonviewer TD DL HR{display:block;padding:0;clear:left;border:none}.jsonviewer TD DL{padding:4px;margin:0;height:100%;max-width:700px}.jsonviewer DL TD DL DT{padding:2px;margin:0 10px 0 0;font-weight:700;width:120px;overflow:hidden;clear:left;float:left;display:block}.jsonviewer DL TD DL DD{margin:0;padding:2px;display:block;float:left}.jsonviewer TBODY>TR:last-child>TD{padding:8px}.jsonviewer THEAD{-webkit-user-select:none;-moz-user-select:none}.jsonviewer .asc,.jsonviewer .desc{background-color:#FAFAD2}.jsonviewer .desc{background-color:#D4EDC9}.jsonviewer TH B{display:block;float:right;margin:0 0 0 5px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #ccc;border-bottom:none}.jsonviewer .asc B{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #333;border-bottom:none}.jsonviewer .desc B{border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #333;border-top:none}.jsonviewer H3{margin:0 0 10px}body.console-active,body.console-active .navbar{background:#eee}#formConsole .octicon-search{color:#888;position:absolute;margin:15px 0 0}.console-active #formConsole{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#console{position:absolute;bottom:10px;left:25%;padding-left:40px;width:50%}#formConsole{background:#f5f5f5;border-radius:2px}#txtPrompt{width:95%;background:0 0;border:none;outline:0;margin:0 0 0 30px}#prompt #label{position:absolute;color:#999;padding:8px 16px}#prompt #label .octicon{font-size:32px}.expand-console{position:absolute;right:-30px;margin:13px 0 0}.expand-console span{color:#999;cursor:pointer;font-size:22px}.expand-console span:hover{color:#666}.collapse-console{position:absolute;right:13px;bottom:10px;margin:13px 0 0}.collapse-console span{color:#999;cursor:pointer;font-size:22px}.collapse-console span:hover{color:#666}#expandedPrompt{bottom:10px;top:60px;border-radius:2px;position:absolute;width:50%;left:25%;margin-left:40px;background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12)}#expandedPrompt #txtExpandedPrompt{width:100%;height:100%;background:0 0;border:none;outline:0;padding:10px 16px;resize:none}#log{text-align:left;margin:0 0 10px}#log .entry{min-width:50%;background:#f9f9f9;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#log .cmd{background:#eee;font-size:12px;padding:1px 10px;color:#999;overflow:hidden;white-space:nowrap;cursor:pointer}#log .result{padding:5px 10px}#log .ok{color:green;background:#dff0d8}#log .err{color:red;background:#f2dede}#log .empty .result{color:#aaa;text-shadow:1px -1px 1px #fff}#console .actions #btnClearHistory{display:inline-block;color:#999;line-height:30px;cursor:pointer}#console .actions b{padding:0 0 0 5px}.clear{clear:both} -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Redis React 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/img/ajax-loader.gif -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/img/logo-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/img/logo-32.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/img/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/img/logo.ico -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/img/react-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/img/react-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/img/redis-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/img/redis-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/css/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/css/octicons-local.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/css/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/css/octicons.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/css/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/css/octicons.woff -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact.Resources/lib/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceInterface/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact.ServiceInterface")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RedisReact.ServiceInterface")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1590afbc-5d5e-4f93-ba33-b79d9b65efb5")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceInterface/RedisReact.ServiceInterface.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {30A709D5-9F64-467E-9851-9AA94CBBD3D2} 8 | Library 9 | Properties 10 | RedisReact.ServiceInterface 11 | RedisReact.ServiceInterface 12 | v4.7.2 13 | 512 14 | true 15 | default 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | {08bef328-ab7d-48d3-800d-48acc75c7914} 54 | RedisReact.ServiceModel 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 81 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceInterface/RedisServices.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading; 4 | using ServiceStack; 5 | using RedisReact.ServiceModel; 6 | using ServiceStack.Configuration; 7 | using ServiceStack.Redis; 8 | 9 | namespace RedisReact.ServiceInterface 10 | { 11 | public class RedisServices : Service 12 | { 13 | public class SearchCursorResult 14 | { 15 | public int Cursor { get; set; } 16 | public List Results { get; set; } 17 | } 18 | 19 | public IAppSettings AppSettings { get; set; } 20 | 21 | public object Any(SearchRedis request) 22 | { 23 | var position = request.Position.GetValueOrDefault(0); // 0 marks a new scan request 24 | var limit = request.Take.GetValueOrDefault(AppSettings.Get("query-limit", 100)); 25 | 26 | const string LuaScript = @" 27 | local limit = tonumber(ARGV[2]) 28 | local pattern = ARGV[1] 29 | local cursor = tonumber(ARGV[3]) 30 | local len = 0 31 | local keys = {} 32 | 33 | repeat 34 | local r = redis.call('scan', cursor, 'MATCH', pattern, 'COUNT', limit) 35 | cursor = tonumber(r[1]) 36 | for k,v in ipairs(r[2]) do 37 | table.insert(keys, v) 38 | len = len + 1 39 | if len == limit then break end 40 | end 41 | until cursor == 0 or len == limit 42 | 43 | local cursorAttrs = {['cursor'] = cursor, ['results'] = {}} 44 | if len == 0 then 45 | return cursorAttrs 46 | end 47 | 48 | local keyAttrs = {} 49 | for i,key in ipairs(keys) do 50 | local type = redis.call('type', key)['ok'] 51 | local pttl = redis.call('pttl', key) 52 | local size = 0 53 | if type == 'string' then 54 | size = redis.call('strlen', key) 55 | elseif type == 'list' then 56 | size = redis.call('llen', key) 57 | elseif type == 'set' then 58 | size = redis.call('scard', key) 59 | elseif type == 'zset' then 60 | size = redis.call('zcard', key) 61 | elseif type == 'hash' then 62 | size = redis.call('hlen', key) 63 | end 64 | 65 | local attrs = {['id'] = key, ['type'] = type, ['ttl'] = pttl, ['size'] = size} 66 | 67 | table.insert(keyAttrs, attrs) 68 | end 69 | cursorAttrs['results'] = keyAttrs 70 | 71 | return cjson.encode(cursorAttrs)"; 72 | 73 | var json = Redis.ExecCachedLua(LuaScript, sha1 => 74 | Redis.ExecLuaShaAsString(sha1, request.Query, limit.ToString(), position.ToString())); 75 | 76 | var searchResults = json.FromJson(); 77 | 78 | return new SearchRedisResponse 79 | { 80 | Position = searchResults.Cursor, 81 | Results = searchResults.Results 82 | }; 83 | } 84 | 85 | public object Any(CallRedis request) 86 | { 87 | var args = request.Args.ToArray(); 88 | var response = new CallRedisResponse { Result = Redis.Custom(args) }; 89 | return response; 90 | } 91 | 92 | public object Get(GetConnection request) 93 | { 94 | return new GetConnectionResponse 95 | { 96 | Host = Redis.Host, 97 | Port = Redis.Port, 98 | Db = (int)Redis.Db, 99 | }; 100 | } 101 | 102 | public object Post(ChangeConnection request) 103 | { 104 | var connString = "{0}:{1}?db={2}".Fmt( 105 | request.Host ?? "127.0.0.1", 106 | request.Port.GetValueOrDefault(6379), 107 | request.Db.GetValueOrDefault(0)); 108 | 109 | if (!string.IsNullOrEmpty(request.Password)) 110 | connString += "&password=" + request.Password.UrlEncode(); 111 | 112 | var testConnection = new RedisClient(connString); 113 | testConnection.Ping(); 114 | 115 | ((IRedisFailover)TryResolve()).FailoverTo(connString); 116 | 117 | return Get(new GetConnection()); 118 | } 119 | 120 | public object Any(GetRedisClientStats request) 121 | { 122 | return new GetRedisClientStatsResponse { Result = RedisStats.ToDictionary() }; 123 | } 124 | 125 | public object Any(FallbackForClientRoutes request) 126 | { 127 | return new HttpResult(VirtualFileSources.GetFile("default.html")); 128 | } 129 | } 130 | 131 | [FallbackRoute("/{PathInfo*}")] 132 | public class FallbackForClientRoutes 133 | { 134 | public string PathInfo { get; set; } 135 | } 136 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceInterface/SharedUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using ServiceStack; 4 | using ServiceStack.Configuration; 5 | using ServiceStack.Redis; 6 | using ServiceStack.Text; 7 | 8 | namespace RedisReact.ServiceInterface 9 | { 10 | public class SharedUtils 11 | { 12 | public static IAppSettings GetAppSettings() 13 | { 14 | CreateAppSettingsIfNotExists( 15 | Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".redisreact")); 16 | 17 | var paths = new[] 18 | { 19 | "~/appsettings.txt".MapHostAbsolutePath(), 20 | "~/appsettings.txt".MapAbsolutePath(), 21 | Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".redisreact", "appsettings.txt") 22 | }; 23 | 24 | foreach (var path in paths) 25 | { 26 | var customSettings = new FileInfo(path); 27 | if (customSettings.Exists) 28 | return new TextFileSettings(customSettings.FullName); 29 | } 30 | 31 | return new AppSettings(); 32 | } 33 | 34 | public static void Configure(IAppHost appHost) 35 | { 36 | appHost.Config.UseCamelCase = true; 37 | 38 | RedisConfig.AssumeServerVersion = 2821; 39 | 40 | var container = appHost.GetContainer(); 41 | container.Register(c => 42 | new RedisManagerPool(appHost.AppSettings.Get("redis-server", "127.0.0.1"))); 43 | } 44 | 45 | public static void CreateAppSettingsIfNotExists(string redisreactDir) 46 | { 47 | if (!Directory.Exists(redisreactDir)) 48 | { 49 | try 50 | { 51 | Directory.CreateDirectory(redisreactDir); 52 | var appSettingsPath = Path.Combine(redisreactDir, "appsettings.txt"); 53 | File.WriteAllText(appSettingsPath, "redis-server 127.0.0.1?db=0\r\nquery-limit 100"); 54 | } 55 | catch { } 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceInterface/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceModel/CallRedis.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ServiceStack; 3 | using ServiceStack.Redis; 4 | 5 | namespace RedisReact.ServiceModel 6 | { 7 | [Route("/connection", "GET")] 8 | public class GetConnection : IReturn { } 9 | 10 | public class GetConnectionResponse 11 | { 12 | public string Host { get; set; } 13 | public int Port { get; set; } 14 | public int Db { get; set; } 15 | 16 | public ResponseStatus ResponseStatus { get; set; } 17 | } 18 | 19 | [Route("/connection", "POST")] 20 | public class ChangeConnection : IReturn 21 | { 22 | public string Host { get; set; } 23 | public int? Port { get; set; } 24 | public int? Db { get; set; } 25 | public string Password { get; set; } 26 | } 27 | 28 | [Route("/call-redis")] 29 | public class CallRedis : IReturn 30 | { 31 | public List Args { get; set; } 32 | } 33 | 34 | public class CallRedisResponse 35 | { 36 | public RedisText Result { get; set; } 37 | 38 | public ResponseStatus ResponseStatus { get; set; } 39 | } 40 | 41 | [Route("/search-redis")] 42 | public class SearchRedis : IReturn 43 | { 44 | public string Query { get; set; } 45 | public int? Take { get; set; } 46 | public int? Position { get; set; } 47 | } 48 | 49 | public class SearchCursorResult 50 | { 51 | public int Cursor { get; set; } 52 | 53 | public List Results { get; set; } 54 | } 55 | 56 | public class SearchResult 57 | { 58 | public string Id { get; set; } 59 | public string Type { get; set; } 60 | public long Ttl { get; set; } 61 | public long Size { get; set; } 62 | } 63 | 64 | public class SearchRedisResponse 65 | { 66 | public int Position { get; set; } 67 | 68 | public List Results { get; set; } 69 | 70 | public ResponseStatus ResponseStatus { get; set; } 71 | } 72 | 73 | [Route("/redisclient/stats")] 74 | public class GetRedisClientStats : IReturn { } 75 | 76 | public class GetRedisClientStatsResponse 77 | { 78 | public Dictionary Result { get; set; } 79 | } 80 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceModel/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact.ServiceModel")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RedisReact.ServiceModel")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9b06a1a5-b64b-4e27-9d7f-d5a19bf9fbc0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.ServiceModel/RedisReact.ServiceModel.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {8ACAEC26-7705-4927-9E00-0217C7ADDC53} 8 | Library 9 | Properties 10 | RedisReact.ServiceModel 11 | RedisReact.ServiceModel 12 | v4.7.2 13 | 512 14 | ..\..\ 15 | true 16 | default 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 61 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RedisReact.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8f1f15b4-2f54-4552-a88a-62dd5146295f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Tests/RedisReact.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {B1665387-EF91-4CA0-82BB-66E5781ED800} 7 | Library 8 | Properties 9 | RedisReact.Tests 10 | RedisReact.Tests 11 | v4.7.2 12 | 512 13 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 10.0 15 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 16 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 17 | False 18 | UnitTest 19 | 20 | 21 | default 22 | 23 | 24 | true 25 | full 26 | false 27 | bin\Debug\ 28 | DEBUG;TRACE 29 | prompt 30 | 4 31 | 32 | 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {582dfb0f-f84d-4e43-9bca-2a5a86600b7a} 58 | RedisReact.ServiceInterface 59 | 60 | 61 | {08bef328-ab7d-48d3-800d-48acc75c7914} 62 | RedisReact.ServiceModel 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 90 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Tests/UnitTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using ServiceStack; 3 | using ServiceStack.Testing; 4 | using RedisReact.ServiceInterface; 5 | 6 | namespace RedisReact.Tests 7 | { 8 | [TestFixture] 9 | public class UnitTests 10 | { 11 | private readonly ServiceStackHost appHost; 12 | 13 | public UnitTests() 14 | { 15 | appHost = new BasicAppHost(typeof(RedisServices).Assembly) 16 | { 17 | ConfigureContainer = container => 18 | { 19 | //Add your IoC dependencies here 20 | } 21 | } 22 | .Init(); 23 | } 24 | 25 | [OneTimeTearDown] 26 | public void TestFixtureTearDown() 27 | { 28 | appHost.Dispose(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/AppHost.cs: -------------------------------------------------------------------------------- 1 | using Funq; 2 | using RedisReact.ServiceInterface; 3 | using ServiceStack; 4 | 5 | namespace RedisReact 6 | { 7 | public class AppHost : AppHostBase 8 | { 9 | /// 10 | /// Default constructor. 11 | /// Base constructor requires a name and assembly to locate web service classes. 12 | /// 13 | public AppHost() 14 | : base("RedisReact", typeof(RedisServices).Assembly) 15 | { 16 | AppSettings = SharedUtils.GetAppSettings(); 17 | } 18 | 19 | /// 20 | /// Application specific configuration 21 | /// This method should initialize any IoC resources utilized by your web service classes. 22 | /// 23 | /// 24 | public override void Configure(Container container) 25 | { 26 | SharedUtils.Configure(this); 27 | 28 | SetConfig(new HostConfig 29 | { 30 | DebugMode = AppSettings.Get("DebugMode", false), 31 | DefaultContentType = MimeTypes.Json, 32 | AllowFileExtensions = { "jsx" }, 33 | AddRedirectParamsToQueryString = true 34 | }); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="RedisReact.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Security; 6 | using System.Web.SessionState; 7 | 8 | namespace RedisReact 9 | { 10 | public class Global : System.Web.HttpApplication 11 | { 12 | protected void Application_Start(object sender, EventArgs e) 13 | { 14 | new AppHost().Init(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RedisReact")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RedisReact")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8f551c8c-35c1-40f2-8c72-2fe57e4d8ab3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/RedisReact.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | 9 | 10 | 2.0 11 | {27D04601-8961-4E78-9120-80BB03161D8F} 12 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 13 | Library 14 | Properties 15 | RedisReact 16 | RedisReact 17 | v4.7.2 18 | true 19 | 20 | 21 | 22 | 23 | true 24 | 25 | 26 | default 27 | 28 | 29 | true 30 | full 31 | false 32 | bin\ 33 | DEBUG;TRACE 34 | prompt 35 | 4 36 | 37 | 38 | pdbonly 39 | true 40 | bin\ 41 | TRACE 42 | prompt 43 | 4 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Web.config 98 | 99 | 100 | Web.config 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | Global.asax 111 | 112 | 113 | 114 | 115 | 116 | {582dfb0f-f84d-4e43-9bca-2a5a86600b7a} 117 | RedisReact.ServiceInterface 118 | 119 | 120 | {08bef328-ab7d-48d3-800d-48acc75c7914} 121 | RedisReact.ServiceModel 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 10.0 142 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 143 | 144 | 145 | 146 | 147 | 148 | 155 | 156 | 157 | 158 | 159 | True 160 | True 161 | 56723 162 | / 163 | http://localhost:56723/ 164 | False 165 | False 166 | 167 | 168 | False 169 | 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Scripts/_references.js: -------------------------------------------------------------------------------- 1 | //Add JS/CSS references here to enable intellisense from external packages. 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | /// 8 | /// 9 | /// -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RedisReact", 3 | "version": "0.0.1", 4 | "authors": [ 5 | "" 6 | ], 7 | "license": "MIT", 8 | "private": true, 9 | "dependencies": { 10 | "react": "~0.13.3", 11 | "bootstrap": "~3.3.1", 12 | "modernizr": "~2.8.3", 13 | "reflux": "~0.2.12", 14 | "react-router": "~0.13.3", 15 | "octicons": "~3.1.0" 16 | }, 17 | "ignore": [ 18 | "**/.*", 19 | "node_modules", 20 | "bower_components", 21 | "test", 22 | "tests" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/default.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Redis React 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/img/ajax-loader.gif -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/img/logo-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/img/logo-32.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/img/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/img/logo.ico -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/img/react-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/img/react-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/img/redis-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/img/redis-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/app.jsx: -------------------------------------------------------------------------------- 1 | var App = React.createClass({ 2 | mixins: [ 3 | DebugLogMixin, 4 | Router.Navigation, 5 | Router.State, 6 | Reflux.listenTo(SearchStore, "onSearchUpdated"), 7 | Reflux.listenTo(ConnectionStore, "onConnection"), 8 | Reflux.listenTo(ConsoleStore, "onConsole") 9 | ], 10 | getInitialState: function() { 11 | return { connection: null, query: this.getQuery().q }; 12 | }, 13 | onConnection: function (connection) { 14 | this.setState({ connection: connection }); 15 | }, 16 | onSearchUpdated: function(search){ 17 | if (search.text != this.state.query) { 18 | this.setState({ query: search.text }); 19 | } 20 | }, 21 | onSearchFocus: function (e) { 22 | this.transitionTo('search', null, { q: e.target.value }); 23 | }, 24 | onSearchKeyUp: function (e) { 25 | if (e.target.value != this.state.query) { 26 | this.setState({ query: e.target.value }); 27 | this.replaceWith("search", null, { q: e.target.value }); 28 | } 29 | }, 30 | clearSearch: function(e){ 31 | this.refs.txtSearch.getDOMNode().focus(); 32 | this.replaceWith("search", null, { q: null }); 33 | }, 34 | render: function () { 35 | var Connection = not connected; 36 | var conn = this.state.connection; 37 | if (conn != null) { 38 | Connection = {conn.host}:{conn.port} db={conn.db}; 39 | } 40 | 41 | var ClearSearch = null; 42 | if (this.state.query) { 43 | ClearSearch = (
44 | 45 |
); 46 | } 47 | 48 | return ( 49 |
50 | 81 |
82 | { 83 | // 89 | } 90 |
91 | {/* this is the important part */} 92 | 93 |
94 | 95 |
96 | 97 |
98 | ); 99 | } 100 | }); 101 | 102 | var routes = ( 103 | 104 | 105 | 106 | 107 | 108 | 109 | ); 110 | 111 | Router.run(routes, function (Handler, state) { 112 | React.render(, document.body); 113 | 114 | var name = state.pathname.substring(1); 115 | document.body.className = (name || 'home') + '-active'; 116 | }); 117 | 118 | 119 | Actions.viewInfo(); 120 | Actions.loadConnection(); -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/components/connections.jsx: -------------------------------------------------------------------------------- 1 | var Connections = React.createClass({ 2 | mixins: [ 3 | Reflux.listenTo(ConnectionStore, "onConnection") 4 | ], 5 | getInitialState: function () { 6 | return { connection: ConnectionStore.connection, successMessage: null }; 7 | }, 8 | componentDidMount: function () { 9 | this.refs.txtHost.getDOMNode().focus(); 10 | }, 11 | onConnection: function (connection) { 12 | this.setState({ connection: connection }); 13 | }, 14 | selectText: function (e) { 15 | var target = e.target; 16 | setTimeout(function () { 17 | target.select(); 18 | }, 0); 19 | }, 20 | onChange: function (e) { 21 | var conn = this.state.connection || {}; 22 | conn[e.target.name] = e.target.value; 23 | this.setState({ connection: conn }); 24 | }, 25 | onSubmit: function (e) { 26 | e.preventDefault(); 27 | 28 | this.setState({ successMessage: null }); 29 | 30 | var $this = this; 31 | $(e.target).ajaxSubmit({ 32 | onSubmitDisable: $("#btnConnect"), 33 | success: function () { 34 | $this.setState({ successMessage: "Connection was changed" }); 35 | Actions.loadConnection(); 36 | } 37 | }); 38 | }, 39 | render: function () { 40 | var conn = this.state.connection; 41 | return ( 42 |
43 |
44 |
46 |

Redis Connection

47 |
48 | 49 | 53 | 54 | 58 | 59 | 63 | 64 | 68 |
69 |

70 | 71 | 72 |

73 |

{this.state.successMessage}

74 |

75 |
76 |
77 |
78 | ); 79 | } 80 | }); 81 | 82 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/components/dashboard.jsx: -------------------------------------------------------------------------------- 1 | var Dashboard = React.createClass({ 2 | mixins: [ 3 | Reflux.listenTo(InfoStore, "onInfoResults") 4 | ], 5 | getInitialState: function () { 6 | return { info: InfoStore.info }; 7 | }, 8 | onInfoResults: function (info) { 9 | this.setState({ info: info }); 10 | }, 11 | render: function () { 12 | var Info =
; 13 | 14 | var info = this.state.info; 15 | if (info) { 16 | Info = ( 17 | 18 | { 19 | [].concat.apply(Object.keys(info).map(function(group){ 20 | var to = []; 21 | var infoGroup = info[group]; 22 | Object.keys(infoGroup).forEach(function(k){ 23 | to.push() 24 | }); 25 | return to; 26 | })) 27 | } 28 |
{group}
{k}{infoGroup[k]}
29 | ); 30 | } 31 | 32 | return ( 33 |
34 |
35 | {Info} 36 |
37 |
38 | ); 39 | } 40 | }); 41 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/components/keyview.jsx: -------------------------------------------------------------------------------- 1 | var KeyView = React.createClass({ 2 | mixins: [ 3 | Router.Navigation, 4 | Router.State 5 | ], 6 | removeExpiry: function () { 7 | Actions.setConsole(`PERSIST ${this.props.result.id}`); 8 | }, 9 | renderValue: function (s) { 10 | if (typeof s == 'undefined') 11 | s = ''; 12 | if (!isJsonObject(s)) { 13 | if (typeof s == 'string' && s.startsWith('"') && s.endsWith('"')) 14 | s = s.substring(1, s.length -1); 15 | 16 | return
{s}
; 17 | } 18 | 19 | if (this.props.rawMode) 20 | return
{s}
; 21 | 22 | try { 23 | var o = JSON.parse(s); 24 | var el =
; 26 | return el; 27 | } catch (e) { 28 | return
{s}
; 29 | } 30 | }, 31 | edit: function (f, value) { 32 | var result = this.props.result; 33 | switch (result.type) { 34 | case 'list': 35 | Actions.setConsole(`LSET ${result.id} ${f} ${value}`); 36 | break; 37 | case 'set': 38 | Actions.setConsole(`SREM ${result.id} ${value}`); 39 | break; 40 | case 'zset': 41 | Actions.setConsole(`ZREM ${result.id} ${value}`); 42 | break; 43 | case 'hash': 44 | Actions.setConsole(`HSET ${result.id} ${f} ${value}`); 45 | break; 46 | default: 47 | Actions.setConsole(`SET ${result.id} ${result.value}`); 48 | break; 49 | } 50 | }, 51 | delValue: function(f, value) { 52 | var result = this.props.result; 53 | switch (result.type) { 54 | case 'list': 55 | Actions.setConsole(`LREM ${result.id} 1 ${value}`); 56 | break; 57 | case 'set': 58 | Actions.setConsole(`SREM ${result.id} ${value}`); 59 | break; 60 | case 'zset': 61 | Actions.setConsole(`ZREM ${result.id} ${value}`); 62 | break; 63 | case 'hash': 64 | Actions.setConsole(`HDEL ${result.id} ${f}`); 65 | break; 66 | } 67 | }, 68 | renderString: function (value) { 69 | var $this = this; 70 | return ( 71 |
72 | 73 | 74 |
{this.renderValue(value)}
75 |
76 | ); 77 | }, 78 | renderList: function (items) { 79 | var $this = this; 80 | var i = 0; 81 | return ( 82 | 83 | 84 | {items.map(function (x) { 85 | let index = i++; 86 | return ( 87 | $this.edit(index, x)}> 88 | ); 89 | })} 90 | 91 |
{$this.renderValue(x)} $this.delValue(index, x)}>
92 | ); 93 | }, 94 | renderMap: function (values, type) { 95 | var $this = this; 96 | var Head = null; 97 | if (type == 'hash') { 98 | Head = FieldValue; 99 | } 100 | return ( 101 | 102 | {Head} 103 | 104 | {Object.keys(values).map(function(k){ 105 | return ( 106 | $this.edit(k, values[k]) }> 107 | ); 108 | })} 109 | 110 |
{$this.renderValue(k)}{$this.renderValue(values[k])} $this.delValue(k, values[k])}>
111 | ); 112 | }, 113 | render: function () { 114 | var View =
Key does not exist
; 115 | 116 | var result = this.props.result; 117 | if (!result) 118 | return View; 119 | 120 | if (result.type == 'string') 121 | View = this.renderString(result.value); 122 | else if (result.type == 'list') 123 | View = this.renderList(result.value); 124 | else if (result.type == 'set') 125 | View = this.renderList(result.value); 126 | else if (result.type == 'zset') 127 | View = this.renderMap(result.value, result.type); 128 | else if (result.type == 'hash') 129 | View = this.renderMap(result.value, result.type); 130 | 131 | var Title = {result.id}; 132 | if (this.props.isPrimary) { 133 | var key = result.id; 134 | var Links = []; 135 | 136 | var lastPos = 0; 137 | for (var i = 0; i < key.length; i++) { 138 | var c = key[i]; 139 | if (SEPARATORS.indexOf(c) != -1) { 140 | var pattern = key.substring(0,i+1) + '*'; 141 | Links.push({key.substring(lastPos, i)}); 142 | Links.push({key.substring(i, i + 1)}); 143 | lastPos = i + 1; 144 | } 145 | } 146 | 147 | Links.push({key.substring(lastPos)}); 148 | 149 | Title = {Links}; 150 | } 151 | var Expiry = null; 152 | if (result.ttl && result.ttl > 0) { 153 | Expiry = ( 154 |
155 | 156 | {Math.round(result.ttl / 1000) + 's'} 157 |
158 | ); 159 | } 160 | return ( 161 |
162 |

163 | 164 | {result.type} 165 | {Title} 166 |

167 | {Expiry} 168 |
169 | {View} 170 |
171 |
172 | ); 173 | } 174 | }); -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/components/search.jsx: -------------------------------------------------------------------------------- 1 | var Search = React.createClass({ 2 | mixins: [ 3 | DebugLogMixin, 4 | Router.Navigation, 5 | Router.State, 6 | Reflux.listenTo(SearchStore, "onSearchResults") 7 | ], 8 | getInitialState: function () { 9 | return { position: -1, query:SearchStore.query, results: SearchStore.results, viewGrid: false, gridResults:[] }; 10 | }, 11 | componentWillMount: function () { 12 | var q = this.getQuery().q; 13 | Actions.search(q); 14 | }, 15 | componentWillReceiveProps: function () { 16 | var q = this.getQuery().q; 17 | Actions.search(q); 18 | }, 19 | componentDidMount() { 20 | this.attachScrollListener(); 21 | }, 22 | componentDidUpdate() { 23 | this.attachScrollListener(); 24 | }, 25 | componentWillUnmount() { 26 | this.detachScrollListener(); 27 | }, 28 | attachScrollListener() { 29 | if(this.state.position == 0) { 30 | return; 31 | } 32 | 33 | let scrollEl = window; 34 | scrollEl.addEventListener('scroll', this.scrollListener, this.props.useCapture); 35 | scrollEl.addEventListener('resize', this.scrollListener, this.props.useCapture); 36 | }, 37 | detachScrollListener() { 38 | let scrollEl = window; 39 | scrollEl.removeEventListener('scroll', this.scrollListener, this.props.useCapture); 40 | scrollEl.removeEventListener('resize', this.scrollListener, this.props.useCapture); 41 | }, 42 | calculateTopPosition(el) { 43 | if(!el) { 44 | return 0; 45 | } 46 | return el.offsetTop + this.calculateTopPosition(el.offsetParent); 47 | }, 48 | scrollListener() { 49 | const el = this.scrollComponent.getDOMNode(); 50 | const scrollEl = window; 51 | 52 | var scrollTop = (scrollEl.pageYOffset !== undefined) ? scrollEl.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; 53 | let offset = this.calculateTopPosition(el) + el.offsetHeight - scrollTop - window.innerHeight; 54 | 55 | if(offset < 250) { 56 | this.detachScrollListener(); 57 | // Call loadMore after detachScrollListener to allow for non-async loadMore functions 58 | this.onLoadMore(); 59 | } 60 | }, 61 | onSearchResults: function (search) { 62 | this.setState({ position: search.position, query: search.query, results: search.results, viewGrid: false, gridResults: [] }); 63 | }, 64 | onLoadMore: function() { 65 | var q = this.getQuery().q; 66 | if (this.state.position != 0) { 67 | Actions.search(q, this.state.position); 68 | } 69 | }, 70 | onKeyClick: function (e) { 71 | var tr = $(e.target).parent("tr"); 72 | var key = tr.data("id"); 73 | SearchStore.search(key); 74 | this.transitionTo("keys", null, { id: key, type: tr.data("type") }); 75 | }, 76 | toggleGridView: function (e) { 77 | var viewGrid = !this.state.viewGrid; 78 | 79 | var keys = this.state.results.map(function (r) { 80 | return r.id; 81 | }); 82 | var $this = this; 83 | Redis.getStringValues(keys) 84 | .then(function (r) { 85 | var to = []; 86 | Object.keys(r).forEach(function (k) { 87 | try { 88 | var o = JSON.parse(r[k]); 89 | o.__id = k; 90 | to.push(o); 91 | } catch (e) { } 92 | }); 93 | 94 | $this.setState({ viewGrid:viewGrid, gridResults: to }) 95 | }); 96 | 97 | }, 98 | render: function () { 99 | var SearchResults; 100 | var $this = this; 101 | if (this.state.results.length > 0) { 102 | var ViewGrid = null; 103 | 104 | var onlyStrings = this.state.results.every(function (r) { 105 | return r.type == 'string'; 106 | }); 107 | if (SearchStore.query.length > 3 && onlyStrings) { 108 | var ViewGrid = ( 109 | 110 |
111 | 112 | {this.state.viewGrid ? 'view summary' : 'view as grid'} 113 |
114 | ); 115 | } 116 | 117 | var gridResults = this.state.gridResults || []; 118 | if (this.state.viewGrid && gridResults.length > 0) { 119 | var headers = Object.keys(gridResults[0]).filter(function (k) { 120 | return !k.startsWith("__"); 121 | }); 122 | 123 | var vIndex = 0; 124 | SearchResults = ( 125 | 126 | {ViewGrid} 127 | 128 | 129 | {headers.map(function(k) { 130 | return ; 131 | })} 132 | 133 | 134 | 135 | {gridResults.map(function(o) { 136 | return ( 137 | 138 | {headers.map(function(k) { 139 | var v = o[k]; 140 | return ; 141 | })} 142 | 143 | ); 144 | })} 145 | 146 |
{k}
{valueFmt(v)}
); 147 | } else { 148 | SearchResults = ( 149 | 150 | {ViewGrid} 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | {this.state.results.map(function(r) { 161 | return ( 162 | 163 | 164 | 165 | 168 | 169 | 170 | ); 171 | })} 172 | 173 |
KeyTypeSizeExpires
{r.id}{r.type}{r.size + 166 | (r.type == 'string' ? ' byte' : ' element') + 167 | (r.size > 1 ? 's' : '') }{r.ttl == -1 ? 'never' : Math.round(r.ttl / 1000) + 's'}
); 174 | } 175 | 176 | } else if ($("#txtSearch").val()) { 177 | SearchResults =
Sorry No Results :(
178 | } 179 | 180 | return ( 181 |
182 |
{ $this.scrollComponent = input; }}> 183 | {SearchResults} 184 |
185 |
186 | ); 187 | } 188 | }); 189 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/jsonviewer.js: -------------------------------------------------------------------------------- 1 | var jsonviewer = (function() { 2 | var doc = document, win = window, 3 | $$ = function(sel) { return doc.getElementsByTagName(sel); }, 4 | $each = function(fn) { for (var i=0,len=this.length; i
' + valueFmt(k, m[k], val(m[k])) + '
'; 48 | sb += ''; 49 | return sb; 50 | } 51 | function arr(m) { 52 | if (typeof m[0] == 'string' || typeof m[0] == 'number') return m.join(', '); 53 | var id=tbls.length, h=uniqueKeys(m); 54 | var sb = ''; 55 | tbls.push(m); 56 | var i=0; 57 | for (var k in h) sb += ''; 58 | sb += '' + makeRows(h,m) + '
' + splitCase(k) + '
'; 59 | return sb; 60 | } 61 | function makeRows(h,m) { 62 | var sb = ''; 63 | for (var r=0,len=m.length; r'; 69 | } 70 | sb += ''; 71 | } 72 | return sb; 73 | } 74 | 75 | doc.onclick = function(e) { 76 | e = e || window.event, el = e.target || e.srcElement, cls = el.className; 77 | if (el.tagName == 'B') el = el.parentNode; 78 | if (el.tagName != 'TH') return; 79 | el.className = cls == 'asc' ? 'desc' : (cls == 'desc' ? null : 'asc'); 80 | each($$('TH'), function(i,th){ if (th == el) return; th.className = null; }); 81 | clearSel(); 82 | var ids=el.id.split('-'), tId=ids[1], cId=ids[2]; 83 | if (!tbls[tId]) return; 84 | var tbl=tbls[tId].slice(0), h=uniqueKeys(tbl), col=keys(h)[cId], tbody=el.parentNode.parentNode.nextSibling; 85 | if (!el.className){ setTableBody(tbody, makeRows(h,tbls[tId])); return; } 86 | var d=el.className=='asc'?1:-1; 87 | tbl.sort(function(a,b){ return cmp(a[col],b[col]) * d; }); 88 | setTableBody(tbody, makeRows(h,tbl)); 89 | } 90 | 91 | function setTableBody(tbody, html) { 92 | if (!isIE) { tbody.innerHTML = html; return; } 93 | var temp = tbody.ownerDocument.createElement('div'); 94 | temp.innerHTML = '' + html + '
'; 95 | tbody.parentNode.replaceChild(temp.firstChild.firstChild, tbody); 96 | } 97 | 98 | function clearSel() { 99 | if (doc.selection && doc.selection.empty) doc.selection.empty(); 100 | else if(win.getSelection) { 101 | var sel=win.getSelection(); 102 | if (sel && sel.removeAllRanges) sel.removeAllRanges(); 103 | } 104 | } 105 | 106 | function cmp(v1, v2){ 107 | var f1, f2, f1=parseFloat(v1), f2=parseFloat(v2); 108 | if (!isNaN(f1) && !isNaN(f2)) v1=f1, v2=f2; 109 | if (typeof v1 == 'string' && v1.substr(0,6) == '/Date(') v1=date(v1), v2=date(v2); 110 | if (v1 == v2) return 0; 111 | return v1 > v2 ? 1 : -1; 112 | } 113 | 114 | return val; 115 | 116 | })(window); -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/redis.js: -------------------------------------------------------------------------------- 1 | var Redis = $.ss.bindAll({ 2 | call: function (args) { 3 | var request = { 4 | args: args 5 | }; 6 | return $.ajax({ 7 | url: "/call-redis", 8 | method: "POST", 9 | contentType: "application/json", 10 | dataType: "json", 11 | data: JSON.stringify(request) 12 | }); 13 | }, 14 | execCommandString: function (cmd) { 15 | var $this = this; 16 | var args = this.parseCommandString(cmd); 17 | return Redis.call(args) 18 | .then(function (r) { 19 | return $this.toObject(r.result); 20 | }); 21 | }, 22 | toObject: function (r) { 23 | if (!r) 24 | return null; 25 | 26 | if (r.children && r.children.length > 0) { 27 | var to = []; 28 | for (var i = 0, len = r.children.length; i < len; i++) { 29 | var child = r.children[i]; 30 | var value = child.text || this.toObject(child.children); 31 | to.push(value); 32 | } 33 | return to; 34 | } 35 | return r.text; 36 | }, 37 | parseCommandString: function(cmd) { 38 | var args = []; 39 | var lastPos = 0; 40 | for (var i = 0; i < cmd.length; i++) { 41 | var c = cmd[i]; 42 | if (c == "{" || c == "[") { 43 | break; //stop splitting args if value is complex type 44 | } 45 | if (c == " ") { 46 | var arg = cmd.substring(lastPos, i); 47 | args.push(arg); 48 | lastPos = i + 1; 49 | } 50 | } 51 | args.push(cmd.substring(lastPos)); 52 | return args; 53 | }, 54 | getConnection: function () { 55 | return $.ajax({ 56 | url: "/connection", 57 | dataType: "json" 58 | }); 59 | }, 60 | search: function (query, position) { 61 | var $this = this; 62 | position = position || 0; 63 | return $.ajax({ 64 | url: "/search-redis", 65 | dataType: "json", 66 | data: { query: query, position: position } 67 | }) 68 | .then(function (r) { 69 | var existing = $this.searchCache[query]; 70 | if (position !== 0 && existing != null && existing.starting !== position && existing.results != null) { 71 | // append if this was not starting at the start 72 | var combined = existing.results; 73 | for (var i = 0; i < r.results.length; ++i) { 74 | combined.push(r.results[i]); 75 | }; 76 | r.results = combined; 77 | } 78 | r.starting = position; 79 | return $this.searchCache[query] = r; 80 | }); 81 | }, 82 | searchCache: {}, 83 | cachedSearch: function (query) { 84 | if (this.searchCache[query]) { 85 | var deferred = $.Deferred(); 86 | deferred.resolve(this.searchCache[query]); 87 | return deferred.promise(); 88 | } 89 | var $this = this; 90 | return this.search(query) 91 | .then(function (r) { 92 | return $this.searchCache[query] = r; 93 | }); 94 | }, 95 | getStringValues: function (keys) { 96 | var args = keys.slice(0); 97 | args.unshift('MGET'); 98 | return this.call(args) 99 | .then(function (r) { 100 | var to = {}; 101 | for (var i = 0; i < keys.length; i++) { 102 | to[keys[i]] = r.result.children[i].text; 103 | } 104 | return to; 105 | }); 106 | }, 107 | exists: function (keys) { 108 | return this.getStringValues(keys) 109 | .then(function (r) { 110 | var to = {}; 111 | for (var k in r) { 112 | to[k] = !!r[k]; 113 | } 114 | return to; 115 | }); 116 | }, 117 | info: function () { 118 | return this.call(['INFO']) 119 | .then(function (r) { 120 | var s = r.result.text; 121 | 122 | var to = {}, o = {}, lines = s.split('\n'); 123 | lines.forEach(function (line) { 124 | if (!line.trim()) 125 | return; 126 | if (line.startsWith("# ")) { 127 | var group = line.substring(2); 128 | to[group] = o = {}; 129 | } else { 130 | var parts = $.ss.splitOnFirst(line, ':'); 131 | o[parts[0]] = parts[1]; 132 | } 133 | }); 134 | 135 | return to; 136 | }); 137 | }, 138 | getExpiry: function(key) { 139 | return this.call(['PTTL', key]) 140 | .then(function (r) { 141 | var s = r.result.text; 142 | return s; 143 | }); 144 | }, 145 | getString: function (key) { 146 | return this.call(['GET', key]) 147 | .then(function (r) { 148 | var s = r.result.text; 149 | return s; 150 | }); 151 | }, 152 | getAllItemsFromList: function (key) { 153 | var $this = this; 154 | return this.call(['LRANGE', key, '0', '-1']) 155 | .then(function (r) { 156 | return $this.asList(r); 157 | }); 158 | }, 159 | getAllItemsFromSet: function (key) { 160 | var $this = this; 161 | return this.call(['SMEMBERS', key]) 162 | .then(function (r) { 163 | return $this.asList(r); 164 | }); 165 | }, 166 | getAllItemsFromSortedSet: function (key) { 167 | var $this = this; 168 | return this.call(['ZRANGE', key, '0', '-1', 'WITHSCORES']) 169 | .then(function (r) { 170 | return $this.asKeyValues(r); 171 | }); 172 | }, 173 | getAllItemsFromHash: function (key) { 174 | var $this = this; 175 | return this.call(['HGETALL', key]) 176 | .then(function (r) { 177 | return $this.asKeyValues(r); 178 | }); 179 | }, 180 | asList: function (r) { 181 | var children = r.result && r.result.children || []; 182 | var to = children.map(function (x) { 183 | return x.text; 184 | }); 185 | return to; 186 | }, 187 | asKeyValues: function (r) { 188 | var list = this.asList(r); 189 | var to = {}; 190 | for (var i = 0; i < list.length; i += 2) { 191 | var key = list[i]; 192 | var val = list[i + 1]; 193 | to[key] = val; 194 | } 195 | return to; 196 | } 197 | }); 198 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/stores.js: -------------------------------------------------------------------------------- 1 | var Router = ReactRouter; 2 | 3 | var DefaultRoute = Router.DefaultRoute; 4 | var Link = Router.Link; 5 | var Route = Router.Route; 6 | var RouteHandler = Router.RouteHandler; 7 | 8 | var Actions = Reflux.createActions([ 9 | 'viewInfo', 10 | 'loadConnection', 11 | 'search', 12 | 'loadKey', 13 | 'loadRelatedKeyInfo', 14 | 'setConsole', 15 | 'logEntry', 16 | 'clearLogs', 17 | 'addToHistory', 18 | 'nextHistory' 19 | ]); 20 | 21 | var SEPARATORS = [':', '.', '/']; 22 | var Keys = { 23 | LEFT: 37, 24 | UP: 38, 25 | RIGHT: 39, 26 | DOWN: 40, 27 | T: 84 28 | }; 29 | 30 | var DebugLogMixin = { 31 | componentWillUpdate: function(nextProps, nextState){ 32 | //console.log("componentWillUpdate:", nextProps, nextState); 33 | } 34 | }; 35 | 36 | var SettingsStore = Reflux.createStore({ 37 | init: function () { 38 | this.appRawMode = false; 39 | document.addEventListener('keyup', this.globalKeyUp); 40 | }, 41 | notify: function() { 42 | this.trigger({ appRawMode: this.appRawMode }); 43 | }, 44 | globalKeyUp: function (e) { 45 | if (e.target && e.target.type == "text") 46 | return; 47 | 48 | var shortcutKeys = [Keys.T]; 49 | if (e.altKey || e.ctrlKey || shortcutKeys.indexOf(e.which) == -1) 50 | return; 51 | 52 | if (e.which == Keys.T) { 53 | this.appRawMode = !this.appRawMode; 54 | this.notify(); 55 | } 56 | } 57 | }); 58 | 59 | var SearchStore = Reflux.createStore({ 60 | init: function () { 61 | this.listenTo(Actions.search, this.search); 62 | this.text = null; 63 | this.query = null; 64 | this.results = []; 65 | }, 66 | search: function (searchText, position) { 67 | var $this = this; 68 | this.text = searchText; 69 | this.query = this.text || "*"; 70 | 71 | var patternChars = ['*', '?', '[', ']']; 72 | var hasPattern = patternChars.some(function (c) { 73 | return $this.query.indexOf(c) >= 0; 74 | }); 75 | 76 | if (this.query.endsWith('$')) { 77 | this.query = this.query.substring(0, this.query.length - 1); 78 | hasPattern = true; 79 | } 80 | 81 | if (!hasPattern) 82 | this.query += "*"; 83 | 84 | Redis.search(this.query, position) 85 | .done(function (r) { 86 | if ($this.text != searchText) 87 | return; 88 | 89 | $this.results = r.results || []; 90 | $this.trigger({text: $this.text, query: $this.query, results: $this.results, position: r.position }); 91 | }); 92 | } 93 | }); 94 | 95 | var InfoStore = Reflux.createStore({ 96 | init: function () { 97 | this.listenTo(Actions.viewInfo, this.viewInfo); 98 | this.info = null; 99 | }, 100 | viewInfo: function () { 101 | var $this = this; 102 | Redis.info() 103 | .done(function (r) { 104 | $this.trigger($this.info = r); 105 | }); 106 | } 107 | }); 108 | 109 | var ConnectionStore = Reflux.createStore({ 110 | init: function () { 111 | this.listenTo(Actions.loadConnection, this.loadConnection); 112 | this.connection = null; 113 | }, 114 | loadConnection: function () { 115 | var $this = this; 116 | Redis.getConnection() 117 | .done(function (r) { 118 | $this.trigger($this.connection = r); 119 | }); 120 | } 121 | }); 122 | 123 | var KeyStore = Reflux.createStore({ 124 | init: function() { 125 | this.listenTo(Actions.loadKey, this.loadKey); 126 | this.listenTo(Actions.loadRelatedKeyInfo, this.loadRelatedKeyInfo); 127 | this.cache = {}; 128 | }, 129 | loadKey: function(id, type) { 130 | if (this.cache[id]) { 131 | this.trigger(this.cache[id]); 132 | } 133 | 134 | var $this = this; 135 | Redis.getExpiry(id) 136 | .done(function(ttl) { 137 | var fn = null; 138 | switch (type) { 139 | case 'list': 140 | fn = Redis.getAllItemsFromList; 141 | break; 142 | case 'set': 143 | fn = Redis.getAllItemsFromSet; 144 | break; 145 | case 'zset': 146 | fn = Redis.getAllItemsFromSortedSet; 147 | break; 148 | case 'hash': 149 | fn = Redis.getAllItemsFromHash; 150 | break; 151 | default: 152 | fn = Redis.getString; 153 | } 154 | fn(id) 155 | .done(function(r) { 156 | $this.loadRelatedKeyInfo($this.cache[id] = { id: id, type: type, value: r, ttl: ttl }); 157 | }); 158 | 159 | }); 160 | }, 161 | loadRelatedKeyInfo: function(result) { 162 | var $this = this; 163 | 164 | var q = SearchStore.query; 165 | var id = result.id; 166 | var lastSep = Math.max.apply(null, SEPARATORS.map(function (x) { 167 | return id.lastIndexOf(x); 168 | })); 169 | result.query = lastSep >= 0 170 | ? id.substring(0, lastSep + 1) + '*' 171 | : q & q != "*" ? q : null; 172 | 173 | //Minimizing re-rendering till end reduces page jitter + increases perceived perf 174 | var count = 0; 175 | var trigger = function() { 176 | if (--count <= 0) 177 | $this.trigger(result); 178 | }; 179 | 180 | if (isJsonObject(result.value)) { 181 | try { 182 | var o = JSON.parse(result.value); 183 | var refKeys = findPotentialKeys(o); 184 | if (refKeys.length > 0) { 185 | count++; 186 | Redis.getStringValues(refKeys) 187 | .done(function(r) { 188 | result.relatedKeys = r; 189 | trigger(); 190 | }); 191 | } 192 | } catch (e){} 193 | } 194 | 195 | if (result.query) { 196 | count++; 197 | Redis.cachedSearch(result.query) 198 | .done(function(r) { 199 | result.similarKeys = r.results; 200 | trigger(); 201 | }); 202 | } 203 | 204 | if (count == 0) 205 | trigger(); 206 | } 207 | }); 208 | 209 | var ConsoleStore = Reflux.createStore({ 210 | init: function () { 211 | this.listenToMany(Actions); 212 | this.id = 0; 213 | this.command = null; 214 | this.logs = []; 215 | this.history = []; 216 | this.historyIndex = -1; 217 | }, 218 | notify: function() { 219 | this.trigger({ 220 | command: this.command, 221 | logs: this.logs, 222 | history: this.history, 223 | historyIndex: this.historyIndex 224 | }); 225 | }, 226 | addToHistory: function(cmd) { 227 | if (cmd != this.history[this.history.length - 1]) { 228 | this.history.push(cmd); 229 | this.historyIndex = this.history.length; 230 | this.notify(); 231 | } 232 | }, 233 | nextHistory: function(i) { 234 | var next = this.historyIndex + i; 235 | this.historyIndex = Math.max(Math.min(next, this.history.length), 0); 236 | this.command = this.history[this.historyIndex]; 237 | this.notify(); 238 | }, 239 | clearLogs: function() { 240 | this.logs = []; 241 | this.notify(); 242 | }, 243 | logEntry: function(entry) { 244 | entry.id = ++this.id; 245 | this.logs.push(entry); 246 | this.command = null; 247 | this.notify(); 248 | }, 249 | setConsole: function(cmd) { 250 | this.command = cmd; 251 | this.notify(); 252 | } 253 | }); 254 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/js/utils.js: -------------------------------------------------------------------------------- 1 | //OSX WebView 2 | if (!String.prototype.startsWith) { 3 | String.prototype.startsWith = function (searchString, position) { 4 | position = position || 0; 5 | return this.indexOf(searchString, position) === position; 6 | }; 7 | } 8 | if (!String.prototype.endsWith) { 9 | String.prototype.endsWith = function (searchString, position) { 10 | var subjectString = this.toString(); 11 | if (position === undefined || position > subjectString.length) { 12 | position = subjectString.length; 13 | } 14 | position -= searchString.length; 15 | var lastIndex = subjectString.indexOf(searchString, position); 16 | return lastIndex !== -1 && lastIndex === position; 17 | }; 18 | } 19 | 20 | function findPotentialKeys(o) { 21 | var keys = []; 22 | if (typeof o == 'object') { 23 | for (var k in o) { 24 | if (k.length > 2 && k.endsWith('Id') && k.indexOf("'") == -1) { 25 | var v = o[k]; 26 | var ref = "urn:" + k.substring(0, k.length - 2).toLowerCase() + ":" + v; 27 | keys.push(ref); 28 | } 29 | } 30 | } 31 | return keys; 32 | } 33 | 34 | function isJsonObject(s) { 35 | if (typeof s != 'string') 36 | return false; 37 | 38 | var isComplexJson = s.indexOf('{') >= 0 || s.indexOf('[') >= 0; 39 | return isComplexJson; 40 | } 41 | 42 | function hasTextSelected() { 43 | return !!window.getSelection && window.getSelection().toString(); 44 | } 45 | 46 | function selectText(el) { 47 | if (!window.getSelection) return; 48 | var range = document.createRange(); 49 | range.selectNode(el); 50 | window.getSelection().addRange(range); 51 | } 52 | 53 | //from jsonviewer 54 | function date(s) { return new Date(parseFloat(/Date\(([^)]+)\)/.exec(s)[1])); } 55 | function pad(d) { return d < 10 ? '0' + d : d; } 56 | function dmft(d) { return d.getFullYear() + '/' + pad(d.getMonth() + 1) + '/' + pad(d.getDate()); } 57 | function valueFmt(v) { 58 | if (typeof v != "string") 59 | return v; 60 | 61 | var s = v.startsWith('/Date(') ? dmft(date(v)) : v; 62 | return s; 63 | } 64 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RedisReact", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "author": "= <=>", 7 | "license": "ISC", 8 | "private": true, 9 | "dependencies": { 10 | "react": "*", 11 | "react-tools": "*" 12 | }, 13 | "jest": { 14 | "rootDir": "", 15 | "scriptPreprocessor": "tests/preprocessor.js", 16 | "testFileExtensions": [ "js" ], 17 | "unmockedModulePathPatterns": [ "react" ], 18 | "testDirectoryName": "tests/unit" 19 | }, 20 | "devDependencies": { 21 | "grunt-exec": "~0.4.6", 22 | "grunt-gulp": "~0.1.0", 23 | "grunt": "~0.4.5", 24 | "ssvs-utils": "~0.1.1", 25 | "grunt-msbuild": "~0.2.2", 26 | "grunt-nuget": "~0.1.3", 27 | "gulp": "~3.8.7", 28 | "gulp-replace": "~0.4.0", 29 | "gulp-htmlbuild": "~0.4.1", 30 | "gulp-header": "~1.7.1", 31 | "event-stream": "~3.3.1", 32 | "del": "~1.1.1", 33 | "gulp-uglify": "~1.0.1", 34 | "gulp-if": "~1.2.4", 35 | "gulp-grunt": "~0.5.2", 36 | "gulp-minify-css": "~0.3.8", 37 | "gulp-useref": "~1.0.1", 38 | "gulp-newer": "~0.3.0", 39 | "gulp-react": "~2.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/platform.css: -------------------------------------------------------------------------------- 1 | /* web */ 2 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/platform.js: -------------------------------------------------------------------------------- 1 | /* web */ 2 | document.documentElement.className += ' web'; 3 | window.nativeHost = { 4 | quit: function() { 5 | window.close(); 6 | }, 7 | platform: 'web' 8 | }; 9 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/tests/README.txt: -------------------------------------------------------------------------------- 1 | Testing for the ReactJS template is setup to use Jest test framework. https://facebook.github.io/jest/ 2 | 3 | To run these tests, the `jest-cli` npm package is required. Dependencies of this package require Python 2.7 for installation. 4 | See `contextify`s GitHub page for more on this issue and step by step instructions https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide 5 | 6 | Once `jest-cli` is istalled globally, running "jest" from a command line in your project will discover and run the example unit test. 7 | See package.json for jest configuration. 8 | 9 | To run the tests from grunt use "grunt exec:jest". 10 | 11 | For more information on Jest, see its GitHub page here https://github.com/facebook/jest. -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/tests/preprocessor.js: -------------------------------------------------------------------------------- 1 | var ReactTools = require('react-tools'); 2 | 3 | module.exports = { 4 | process: function (src) { 5 | return ReactTools.transform(src); 6 | } 7 | }; -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/tests/unit/hello-test.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | 3 | // __tests__/CheckboxWithLabel-test.js 4 | jest.dontMock('../../js/components/hello.jsx'); 5 | describe('HelloWorld component test', function() { 6 | it('renders to the DOM', function () { 7 | 8 | var React = require('react/addons'); 9 | var HelloWorld = require('../../js/components/hello.jsx'); 10 | var TestUtils = React.addons.TestUtils; 11 | 12 | // Render a hello world input in the document 13 | var helloWorldElement = TestUtils.renderIntoDocument( 14 | 15 | ); 16 | //// Verify itar contains input 17 | var input = TestUtils.findRenderedDOMComponentWithTag( 18 | helloWorldElement, 'input'); 19 | expect(input != null).toEqual(true); 20 | }); 21 | }); -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="RedisReact.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/appsettings.txt: -------------------------------------------------------------------------------- 1 | # Release App Settings 2 | 3 | DebugMode false -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/css/app.min.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar{-webkit-appearance:none;width:7px}::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5);-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}html{overflow-y:scroll}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:300}h1{margin:14px 0 0;font-size:20px;white-space:nowrap}#connection{display:block;margin:3px 0 0 50px;color:#aaa;font-size:11px;white-space:nowrap}#connection:focus,#connection:hover,#connection:visited{text-decoration:none}#connection:hover,.connections-active #connection{color:#4285f4}#connection b{padding:0 0 0 5px}.error-summary{color:#c00}#connections-page{text-align:center}#formConnection{padding:40px 0 0;margin:0 auto}#formConnection h2{margin:0 0 40px}#formConnection input{margin:0 10px}#formConnection #txtHost{width:200px}#formConnection #txtPort{width:70px}#formConnection #txtDb{width:40px}#formConnection .actions{margin:20px 0}.loader{visibility:hidden;margin:0 5px 0 -40px}.loading .loader{visibility:visible}.bg-danger,.bg-success{line-height:34px;width:100%;margin:0 auto;padding:0 10px}table td{text-align:left}body.search-active,body.search-active .navbar{background:#eee}.navbar{border:0;height:60px;background:#fff}#poweredby,#sidebar,.navbar{position:fixed}#poweredby{color:#aaa;bottom:5px;right:5px;font-size:12px;display:none}.home-active #poweredby{display:block}#redislogo{height:50px;width:50px}#logo{margin:10px}.nav>li.nativeApp{display:none}.list-group-item{background:0 0}#sidebar{top:60px;left:0}.left{float:left}#menu{margin:15px 0 0;padding:0 0 0 5px}#menu li{border:none}#menu a{color:rgba(0,0,0,.54)}#menu a.active{color:#4285f4}#body{margin:0 0 0 80px}#body .content{text-align:center;margin:70px 0 0}#formSearch{background:#f5f5f5;border-radius:2px;position:absolute;width:50%;left:25%;margin-left:40px}#formSearch .octicon-search{color:#888;position:absolute;margin:15px 0 0}.search-active #formSearch{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#txtSearch{width:100%;background:0 0;border:none;outline:0;margin:0 0 0 20px}.clear-search{display:none;position:absolute;right:13px;margin:13px 0 0}.search-active .clear-search{display:block}.search-active .clear-search span{color:#999;cursor:pointer;font-size:22px}.search-active .clear-search span:hover{color:#666}.wrap{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.search-results{cursor:pointer}.search-results>tbody>tr:hover{background:#ffe}#dashboard-page,#keyviewer-page,#search-page{text-align:center}.content{display:inline-block}.table-wrap{margin-left:auto;margin-right:auto;background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.search-results .actions{text-align:center;white-space:nowrap}.search-results .viewgrid b{padding:0 5px}#keyviewer-page .content{max-width:55%;text-align:left}.rawview{max-width:800px;overflow:hidden}#keyviewer-page h3 i,#keyviewer-page h3 span{color:#999}#keyviewer-page h3 i{padding:0 10px 0 5px;font-style:normal}.keyview a:hover{text-decoration:none}.keycrumbs em{font-style:normal;color:#aaa;padding:0 2px}.key-preview textarea{width:100%;min-height:150px}#keyviewer-page .actions{position:absolute;text-align:right;top:60px;right:23%}#keyviewer-page .actions .action{cursor:pointer;display:inline-block;color:#999}#keyviewer-page .actions .action:hover{color:#337ab7}#keyviewer-page .actions b{margin:0 10px 0 4px;line-height:30px}#similarkeys{position:absolute;display:inline-block;right:0;z-index:1;background:#fff;min-width:160px}#similarkeys td{padding:0 20px;cursor:pointer}#similarkeys .active td{padding:0 20px 0 7px}#similarkeys .active td b{padding:0 5px 0 0}.jsonviewer .ib{display:inline-block}.jsonviewer TABLE{border-collapse:collapse;border:1px solid #ccc;clear:left}.jsonviewer TH{text-align:left;padding:4px 8px;text-shadow:#fff 1px 1px -1px;background:#f1f1f1;white-space:nowrap;cursor:pointer;font-weight:700}.jsonviewer TD{padding:8px 8px 0;vertical-align:top}.jsonviewer DL{margin:0;clear:left}.jsonviewer DT{font-weight:700;width:160px;clear:left;float:left;display:block;white-space:nowrap;line-height:26px}.jsonviewer DD{display:block;float:left;line-height:26px;max-width:600px}.jsonviewer DL DL DT{font-weight:700}.jsonviewer HR{display:none}.jsonviewer TD DL HR{display:block;padding:0;clear:left;border:none}.jsonviewer TD DL{padding:4px;margin:0;height:100%;max-width:700px}.jsonviewer DL TD DL DT{padding:2px;margin:0 10px 0 0;font-weight:700;width:120px;overflow:hidden;clear:left;float:left;display:block}.jsonviewer DL TD DL DD{margin:0;padding:2px;display:block;float:left}.jsonviewer TBODY>TR:last-child>TD{padding:8px}.jsonviewer THEAD{-webkit-user-select:none;-moz-user-select:none}.jsonviewer .asc,.jsonviewer .desc{background-color:#FAFAD2}.jsonviewer .desc{background-color:#D4EDC9}.jsonviewer TH B{display:block;float:right;margin:0 0 0 5px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #ccc;border-bottom:none}.jsonviewer .asc B{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #333;border-bottom:none}.jsonviewer .desc B{border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #333;border-top:none}.jsonviewer H3{margin:0 0 10px}body.console-active,body.console-active .navbar{background:#eee}#formConsole .octicon-search{color:#888;position:absolute;margin:15px 0 0}.console-active #formConsole{background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#console{position:absolute;bottom:10px;left:25%;padding-left:40px;width:50%}#formConsole{background:#f5f5f5;border-radius:2px}#txtPrompt{width:95%;background:0 0;border:none;outline:0;margin:0 0 0 30px}#prompt #label{position:absolute;color:#999;padding:8px 16px}#prompt #label .octicon{font-size:32px}.expand-console{position:absolute;right:-30px;margin:13px 0 0}.expand-console span{color:#999;cursor:pointer;font-size:22px}.expand-console span:hover{color:#666}.collapse-console{position:absolute;right:13px;bottom:10px;margin:13px 0 0}.collapse-console span{color:#999;cursor:pointer;font-size:22px}.collapse-console span:hover{color:#666}#expandedPrompt{bottom:10px;top:60px;border-radius:2px;position:absolute;width:50%;left:25%;margin-left:40px;background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12)}#expandedPrompt #txtExpandedPrompt{width:100%;height:100%;background:0 0;border:none;outline:0;padding:10px 16px;resize:none}#log{text-align:left;margin:0 0 10px}#log .entry{min-width:50%;background:#f9f9f9;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}#log .cmd{background:#eee;font-size:12px;padding:1px 10px;color:#999;overflow:hidden;white-space:nowrap;cursor:pointer}#log .result{padding:5px 10px}#log .ok{color:green;background:#dff0d8}#log .err{color:red;background:#f2dede}#log .empty .result{color:#aaa;text-shadow:1px -1px 1px #fff}#console .actions #btnClearHistory{display:inline-block;color:#999;line-height:30px;cursor:pointer}#console .actions b{padding:0 0 0 5px}.clear{clear:both} -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Redis React 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/img/ajax-loader.gif -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/img/logo-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/img/logo-32.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/img/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/img/logo.ico -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/img/react-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/img/react-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/img/redis-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/img/redis-logo.png -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/css/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/css/octicons-local.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/css/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/css/octicons.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/css/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/css/octicons.woff -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot/lib/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/platform.css: -------------------------------------------------------------------------------- 1 | /* web */ 2 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/platform.js: -------------------------------------------------------------------------------- 1 | /* web */ 2 | document.documentElement.className += ' web'; 3 | window.nativeHost = { 4 | quit: function() { 5 | window.close(); 6 | }, 7 | platform: 'web' 8 | }; 9 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot/web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/00-install-dependencies.bat: -------------------------------------------------------------------------------- 1 | REM pre-requisite that only needs to run once for installing npm and bower dependencies 2 | 3 | cd .. 4 | npm install 5 | bower install -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/config-winforms.txt: -------------------------------------------------------------------------------- 1 | ;!@Install@!UTF-8! 2 | ExecuteFile="RedisReact.AppWinForms.exe" 3 | GUIMode="2" 4 | ;!@InstallEnd@! -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/deploy/appsettings.txt: -------------------------------------------------------------------------------- 1 | # Release App Settings 2 | 3 | DebugMode false -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/package-deploy-console.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SET STAGING=staging-console 3 | 4 | IF EXIST %STAGING%\ ( 5 | RMDIR /S /Q .\%STAGING% 6 | ) ELSE IF EXIST %STAGING% ( 7 | DEL /s %STAGING% 8 | ) 9 | 10 | MD %STAGING% 11 | 12 | SET TOOLS=.\tools 13 | SET OUTPUTNAME=RedisReact-console.exe 14 | SET ILMERGE=%TOOLS%\ILMerge.exe 15 | SET RELEASE=..\..\RedisReact.AppConsole\bin\Release 16 | SET INPUT=%RELEASE%\RedisReact.AppConsole.exe 17 | SET INPUT=%INPUT% %RELEASE%\RedisReact.Resources.dll 18 | SET INPUT=%INPUT% %RELEASE%\RedisReact.ServiceInterface.dll 19 | SET INPUT=%INPUT% %RELEASE%\RedisReact.ServiceModel.dll 20 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.dll 21 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Text.dll 22 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Client.dll 23 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Common.dll 24 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Interfaces.dll 25 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Server.dll 26 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.OrmLite.dll 27 | SET INPUT=%INPUT% %RELEASE%\ServiceStack.Redis.dll 28 | 29 | %ILMERGE% /target:exe /targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5" /out:%STAGING%\%OUTPUTNAME% /ndebug %INPUT% 30 | 31 | IF NOT EXIST apps ( 32 | MD apps 33 | ) 34 | 35 | COPY /Y .\%STAGING%\%OUTPUTNAME% .\apps\ 36 | 37 | echo ------------- && echo deployed to: .\wwwroot_build\apps\%OUTPUTNAME% && echo ------------- -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/package-deploy-winforms.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SET STAGING=staging-winforms 3 | 4 | IF EXIST %STAGING%\ ( 5 | RMDIR /S /Q .\%STAGING% 6 | ) ELSE IF EXIST %STAGING% ( 7 | DEL /s %STAGING% 8 | ) 9 | 10 | MD %STAGING% 11 | 12 | SET TOOLS=.\tools 13 | SET STAGINGZIP=RedisReact-winforms.7z 14 | SET OUTPUTNAME=RedisReact-winforms.exe 15 | SET RELEASE=..\..\RedisReact.AppWinForms\bin\x86\Release 16 | COPY %RELEASE%\RedisReact.AppWinForms.exe .\%STAGING% 17 | COPY %RELEASE%\RedisReact.AppWinForms.exe.config .\%STAGING% 18 | COPY %RELEASE%\CefSharp.BrowserSubprocess.exe .\%STAGING% 19 | ROBOCOPY "%RELEASE%" ".\%STAGING%" *.dll *.pak *.dat /E 20 | 21 | IF NOT EXIST apps ( 22 | MD apps 23 | ) 24 | 25 | IF EXIST %STAGINGZIP% ( 26 | DEL %STAGINGZIP% 27 | ) 28 | 29 | IF EXIST %OUTPUTNAME% ( 30 | DEL %OUTPUTNAME% 31 | ) 32 | 33 | cd tools && 7za a ..\%STAGINGZIP% ..\%STAGING%\* && cd.. 34 | COPY /b .\tools\7zsd_All.sfx + config-winforms.txt + %STAGINGZIP% .\apps\%OUTPUTNAME% 35 | 36 | IF EXIST %STAGINGZIP% ( 37 | DEL %STAGINGZIP% 38 | ) 39 | 40 | echo ------------- && echo deployed to: .\wwwroot_build\apps\%OUTPUTNAME% && echo ------------- -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/tools/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot_build/tools/7za.exe -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/tools/7zsd_All.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot_build/tools/7zsd_All.sfx -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/tools/ILMerge.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/RedisReact/RedisReact/wwwroot_build/tools/ILMerge.exe -------------------------------------------------------------------------------- /src/RedisReact/RedisReact/wwwroot_build/tools/Licenses.txt: -------------------------------------------------------------------------------- 1 | 7-Zip Command line version 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | License for use and distribution 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | 7-Zip Copyright (C) 1999-2010 Igor Pavlov. 7 | 8 | 7za.exe is distributed under the GNU LGPL license 9 | 10 | Notes: 11 | You can use 7-Zip on any computer, including a computer in a commercial 12 | organization. You don't need to register or pay for 7-Zip. 13 | 14 | 15 | GNU LGPL information 16 | -------------------- 17 | 18 | This library is free software; you can redistribute it and/or 19 | modify it under the terms of the GNU Lesser General Public 20 | License as published by the Free Software Foundation; either 21 | version 2.1 of the License, or (at your option) any later version. 22 | 23 | This library is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 26 | Lesser General Public License for more details. 27 | 28 | You can receive a copy of the GNU Lesser General Public License from 29 | http://www.gnu.org/ -------------------------------------------------------------------------------- /src/RedisReactMac.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.AppMac", "RedisReact\RedisReact.AppMac\RedisReact.AppMac.csproj", "{318B96DE-9A31-42A9-8241-84D14472F078}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.ServiceModel", "RedisReact\RedisReact.ServiceModel\RedisReact.ServiceModel.csproj", "{08BEF328-AB7D-48D3-800D-48ACC75C7914}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisReact.ServiceInterface", "RedisReact\RedisReact.ServiceInterface\RedisReact.ServiceInterface.csproj", "{582DFB0F-F84D-4E43-9BCA-2A5A86600B7A}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {08BEF328-AB7D-48D3-800D-48ACC75C7914}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {08BEF328-AB7D-48D3-800D-48ACC75C7914}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {08BEF328-AB7D-48D3-800D-48ACC75C7914}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {08BEF328-AB7D-48D3-800D-48ACC75C7914}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {318B96DE-9A31-42A9-8241-84D14472F078}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {318B96DE-9A31-42A9-8241-84D14472F078}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {318B96DE-9A31-42A9-8241-84D14472F078}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {318B96DE-9A31-42A9-8241-84D14472F078}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {582DFB0F-F84D-4E43-9BCA-2A5A86600B7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {582DFB0F-F84D-4E43-9BCA-2A5A86600B7A}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {582DFB0F-F84D-4E43-9BCA-2A5A86600B7A}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {582DFB0F-F84D-4E43-9BCA-2A5A86600B7A}.Release|Any CPU.Build.0 = Release|Any CPU 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /src/lib/RedisReact.Resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServiceStackApps/RedisReact/aae517f4fd35f69b75af00f732bfa721de58ddfb/src/lib/RedisReact.Resources.dll --------------------------------------------------------------------------------