Giter Site home page Giter Site logo

warrenbuckley / nucache.explorer Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 5.0 302 KB

A desktop tool to see items stored in Umbraco V8+ NuCache file

C# 40.82% HTML 9.44% JavaScript 44.81% CSS 4.93%
umbraco umbraco-v8 nucache electron electron-app csharp owin-selfhost owin-webapi-service

nucache.explorer's Introduction

Nucache Explorer

Nucache Explorer

A desktop utility to view and explore Umbraco V8+ Nucache files which cannot be viewed with a text editor, hence a need for this tool.

Nucache Explorer desktop application in use

NuCache.Explorer.Server

The web API is a self contained OWIN/Katana console application, similar to how newer .NET Core apps can be run.

This approach was needed to be used, due to the third party library for storing items in the dictionary (aka nucache) does not support .NET Standard

For more info on the approach, read the tutorial here: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/an-overview-of-project-katana

Example API Request

http://localhost:5698/api/Nucache/GetNuCacheData?filePath=C:\\Code\\Umbraco-CMS\\src\\Umbraco.Web.UI\\App_Data\\NuCache.Content.db

Example API Response

{
	"Items": [
		{
			"ContentTypeId": 1061,
			"DraftData": {
				"CultureInfos": {
					"da-dk": {
						"date": "2018-07-09T10:59:14.377Z",
						"name": "Home DK"
					},
					"en-us": {
						"date": "2018-07-09T10:58:25.23Z",
						"name": "Home US"
					},
					"fr-fr": {
						"date": "2018-07-09T11:40:21.3136994+01:00",
						"name": "I am FR Home"
					}
				},
				"Name": "Home US",
				"Properties": {
					"siteName": [
						{
							"culture": "",
							"seg": "",
							"val": "Warrens Variation Website"
						}
					],
					"welcomeMessage": [
						{
							"culture": "en-us",
							"seg": "",
							"val": "<p>Hello from the USA</p>"
						},
						{
							"culture": "da-dk",
							"seg": "",
							"val": "<p>This is some DK welcome message</p>"
						},
						{
							"culture": "fr-fr",
							"seg": "",
							"val": "<p>Hello from FR</p>"
						}
					]
				},
				"Published": false,
				"TemplateId": 1060,
				"VersionDate": "2018-07-09T11:40:21.36Z",
				"VersionId": 18,
				"WriterId": -1
			},
			"Node": {
				"ChildContentIds": [],
				"CreateDate": "2018-07-09T10:58:25.34Z",
				"CreatorId": -1,
				"DraftData": null,
				"Id": 1067,
				"Level": 1,
				"ParentContentId": -1,
				"Path": "-1,1067",
				"PublishedData": null,
				"SortOrder": 0,
				"Uid": "73cbde24-84cf-484d-8621-9d2534bb910c"
			},
			"PublishedData": {
				"CultureInfos": {
					"da-dk": {
						"date": "2018-07-09T10:59:14.377Z",
						"name": "Home DK"
					},
					"en-us": {
						"date": "2018-07-09T10:58:25.23Z",
						"name": "Home US"
					},
					"fr-FR": {
						"date": "2018-07-09T11:40:21.3136994+01:00",
						"name": "I am FR Home"
					}
				},
				"Name": "Home US",
				"Properties": {
					"siteName": [
						{
							"culture": "",
							"seg": "",
							"val": "Warrens Variation Website"
						}
					],
					"welcomeMessage": [
						{
							"culture": "en-us",
							"seg": "",
							"val": "<p>Hello from the USA</p>"
						},
						{
							"culture": "da-dk",
							"seg": "",
							"val": "<p>This is some DK welcome message</p>"
						},
						{
							"culture": "fr-fr",
							"seg": "",
							"val": "<p>Hello from FR</p>"
						}
					]
				},
				"Published": true,
				"TemplateId": 1060,
				"VersionDate": "2018-07-09T11:40:21.36Z",
				"VersionId": 18,
				"WriterId": -1
			}
		}
	],
	"StopClock": 27,
	"TotalItems": 1
}

NuCache.Explorer.Client

The GUI for the application is built with HTML, JS & CSS using Electron.

Working with the code

cd NuCache.Explorer.Client
npm install
npm start

Creating the application

We can only build NuCache Explorer as a windows application that has it's own installer/uninstaller, due to the thrid party lib used in Umbraco V8+ that is creating the NuCache files is Full .NET Framework only & not .NET Standard

cd NuCache.Explorer.Client
npm install
npm run dist

Credit

This approach came from this article - https://scotch.io/@rui/how-to-build-a-cross-platform-desktop-application-with-electron-and-net-core

nucache.explorer's People

Contributors

hemraker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nucache.explorer's Issues

About dialog is missing icon

Describe the bug
About dialog is missing icon. Just has a text saying App Icon.

screenshot_131

To Reproduce
Steps to reproduce the behavior:

  1. Go to Help -> About
  2. See error

Expected behavior
Expected to see the app icon in all it's glory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.