mirror of
				https://github.com/esiur/esiur-js.git
				synced 2025-10-30 01:11:36 +00:00 
			
		
		
		
	IIP v3.3
This commit is contained in:
		
							
								
								
									
										2337
									
								
								tools/manager/css/font-awesome.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2337
									
								
								tools/manager/css/font-awesome.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4
									
								
								tools/manager/css/font-awesome.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tools/manager/css/font-awesome.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										67
									
								
								tools/manager/css/style.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								tools/manager/css/style.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
|  | ||||
| .app | ||||
| { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     height: 100%; | ||||
|     width: 100%; | ||||
| } | ||||
|  | ||||
| .app-tool-bar | ||||
| { | ||||
|     display: flex; | ||||
|     width: 100%; | ||||
|     height: 60px; | ||||
|     background-color: var(--default-background-color); | ||||
| } | ||||
|  | ||||
| .app-center | ||||
| { | ||||
|     flex: 1; | ||||
|     width: 100%; | ||||
|     display: flex; | ||||
|     background-color: yellow; | ||||
| } | ||||
|  | ||||
| .app-content | ||||
| { | ||||
|     flex: 1; | ||||
| } | ||||
|  | ||||
| .app-menu | ||||
| { | ||||
|     min-width: 300px; | ||||
|     background-color: red; | ||||
| } | ||||
|  | ||||
| .app-status-bar | ||||
| { | ||||
|     height: 60px; | ||||
|     background-color: blue; | ||||
|      | ||||
| } | ||||
|  | ||||
| .browser | ||||
| { | ||||
|     display: flex; | ||||
|     flex-wrap: wrap; | ||||
| } | ||||
|  | ||||
| .browser > .bar | ||||
| { | ||||
|     width: 100%; | ||||
|     flex-grow:2; | ||||
|     height: 40px; | ||||
| } | ||||
|  | ||||
| .browser > .table:nth-child(2) | ||||
| { | ||||
|     width: 200px; | ||||
|     height: calc(100% - 40px); | ||||
| } | ||||
|  | ||||
| .browser > .table:nth-child(3) | ||||
| { | ||||
|     width: calc(100% - 200px); | ||||
|     height: calc(100% - 40px); | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								tools/manager/fonts/FontAwesome.otf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/manager/fonts/FontAwesome.otf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.eot
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.eot
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										2671
									
								
								tools/manager/fonts/fontawesome-webfont.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2671
									
								
								tools/manager/fonts/fontawesome-webfont.svg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| After Width: | Height: | Size: 434 KiB | 
							
								
								
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.ttf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.woff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.woff
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.woff2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/manager/fonts/fontawesome-webfont.woff2
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										134
									
								
								tools/manager/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								tools/manager/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,134 @@ | ||||
| <html> | ||||
|     <head> | ||||
|      | ||||
|         <script src="../../src/IEventHandler.js"></script> | ||||
|         <script src="../../src/IDestructible.js"></script> | ||||
|         <script src="../../src/AutoList.js"></script> | ||||
|         <script src="../../src/KeyList.js"></script> | ||||
|         <script src="../../src/PropertyValue.js"></script> | ||||
|          | ||||
|         <script src="../../src/IResource.js"></script> | ||||
|         <script src="../../src/IStore.js"></script> | ||||
|         <script src="../../src/Structure.js"></script> | ||||
|      | ||||
|         <script src="../../src/StructureArray.js"></script> | ||||
|         <script src="../../src/ResourceArray.js"></script> | ||||
|      | ||||
|         <script src="../../src/MemberTemplate.js"></script> | ||||
|         <script src="../../src/AsyncReply.js"></script> | ||||
|         <script src="../../src/AsyncException.js"></script> | ||||
|          | ||||
|         <script src="../../src/Authentication.js"></script> | ||||
|         <script src="../../src/Session.js"></script> | ||||
|         <script src="../../src/IPermissionsManager.js"></script> | ||||
|          | ||||
|         <script src="../../src/AsyncBag.js"></script> | ||||
|         <script src="../../src/AsyncQueue.js"></script> | ||||
|         <script src="../../src/BinaryList.js"></script> | ||||
|         <script src="../../src/Codec.js"></script> | ||||
|         <script src="../../src/DataConverter.js"></script> | ||||
|         <script src="../../src/SHA256.js"></script> | ||||
|          | ||||
|         <script src="../../src/DataType.js"></script> | ||||
|         <script src="../../src/DistributedConnection.js"></script> | ||||
|         <script src="../../src/DistributedResource.js"></script> | ||||
|         <script src="../../src/DistributedResourceQueueItem.js"></script> | ||||
|         <script src="../../src/EventTemplate.js"></script> | ||||
|         <script src="../../src/FunctionTemplate.js"></script> | ||||
|         <script src="../../src/Guid.js"></script> | ||||
|         <script src="../../src/IIPAuthPacket.js"></script> | ||||
|         <script src="../../src/IIPPacket.js"></script> | ||||
|         <script src="../../src/Instance.js"></script> | ||||
|         <script src="../../src/NetworkBuffer.js"></script> | ||||
|         <script src="../../src/NotModified.js"></script> | ||||
|         <script src="../../src/PropertyTemplate.js"></script> | ||||
|  | ||||
|         <script src="../../src/ResourceTemplate.js"></script> | ||||
|         <script src="../../src/SendList.js"></script> | ||||
|         <script src="../../src/Warehouse.js"></script> | ||||
|         <script src="../../src/MemoryStore.js"></script> | ||||
|          | ||||
|         <link href="/iui-js/iui.css" rel="stylesheet"> | ||||
|  | ||||
|         <link rel="stylesheet" href="css/font-awesome.min.css"> | ||||
|         <link href="css/style.css" rel="stylesheet">             | ||||
|          | ||||
|         <script src="/iui-js/iui.js"></script> | ||||
|  | ||||
|         <script src="viewers/Esiur.Stores.MemoryStore.js"></script>         | ||||
|  | ||||
|         <script src="js/browser.js"></script>         | ||||
|         <script src="js/app.js"></script> | ||||
|     <script> | ||||
|      | ||||
|     </script> | ||||
|     </head> | ||||
|      | ||||
|     <body onload="init()"> | ||||
|      | ||||
|             <div class="app"> | ||||
|                      | ||||
|                 <div class="app-tool-bar"> | ||||
|                     <div class="button-flat" style="width: 50px; padding: 10px"> | ||||
|                         <i class="fa fa-bars fa-3x" aria-hidden="true"></i> | ||||
|                     </div> | ||||
|      | ||||
|                     <div style="font-size: 30px; padding: 10px; width: 280px"> | ||||
|                         Resource Manager | ||||
|                     </div> | ||||
|      | ||||
|                     <div style="padding: 10px; font-size: 20px;"> | ||||
|                         <input type="search" style="font-size: 25px"> | ||||
|                     </div> | ||||
|                 </div> | ||||
|      | ||||
|                 <div class="app-center"> | ||||
|                         <div id="treeList" class="app-menu"> | ||||
|                              | ||||
|                         </div> | ||||
|                                          | ||||
|                     <div class="app-content" id="divContent"> | ||||
|      | ||||
|                 </div> | ||||
|      | ||||
|             </div> | ||||
|      | ||||
|                 <div class="app-status-bar"> | ||||
|      | ||||
|                 </div> | ||||
|             </div> | ||||
|                      | ||||
|                              | ||||
|             <div id="dlgLogin"> | ||||
|                  | ||||
|                     <table class="dialog-body"> | ||||
|                         <tr> | ||||
|                             <td>Server URL:</td> | ||||
|                             <td><input id="txtURL" type="text" class="text" value="ws://localhost:5001/iip/system/iip"></td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td>Domain:</td> | ||||
|                             <td><input id="txtDomain" type="text" class="text" value="localhost"></td> | ||||
|                         </tr> | ||||
|  | ||||
|                         <tr> | ||||
|                             <td>Username:</td> | ||||
|                             <td><input id="txtUsername" type="text" class="text" value="admin"></td> | ||||
|                         </tr> | ||||
|  | ||||
|                         <tr> | ||||
|                             <td>Password:</td> | ||||
|                             <td><input id="txtPassword" type="password" class="text" value="dijtel"></td> | ||||
|                          </tr> | ||||
|                     </table> | ||||
|  | ||||
|                     <div class="dialog-footer"> | ||||
|                         <button class="button" onclick="connect()"> | ||||
|                             Connect | ||||
|                         </button> | ||||
|                     </div> | ||||
|                  | ||||
|             </div> | ||||
|  | ||||
|     </body> | ||||
|     </html> | ||||
							
								
								
									
										4
									
								
								tools/manager/js/IUIView.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tools/manager/js/IUIView.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| class IUIView extends IUIWidget | ||||
| { | ||||
|      | ||||
| } | ||||
							
								
								
									
										30
									
								
								tools/manager/js/app.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								tools/manager/js/app.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
|  | ||||
| function init() | ||||
| { | ||||
|     iui("dlgLogin").dialog().show(); | ||||
|   | ||||
|     var local = new MemoryStore();     | ||||
|     Warehouse.put(local, "local"); | ||||
|  | ||||
|     iui("divContent").browser(); | ||||
| } | ||||
|  | ||||
| function connect() | ||||
| { | ||||
|     var url = document.getElementById("txtURL").value; | ||||
|     var domain = document.getElementById("txtDomain").value; | ||||
|     var username = document.getElementById("txtUsername").value; | ||||
|     var password = document.getElementById("txtPassword").value; | ||||
|  | ||||
|     iui("dlgLogin").setLoading(true); | ||||
|  | ||||
|     var con = new DistributedConnection(url, domain, username, password); | ||||
|     Warehouse.put(con, "remote"); | ||||
|      | ||||
|     con.on("ready", function (d) { | ||||
|         iui("divContent").setConnection(con); | ||||
|         iui("dlgLogin").hide(); | ||||
|         }).on("error", function(sender, code, msg){ | ||||
|         console.log(sender, code, msg); | ||||
|     }); | ||||
| } | ||||
							
								
								
									
										132
									
								
								tools/manager/js/browser.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								tools/manager/js/browser.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,132 @@ | ||||
| class ResourceBrowser extends IUIWidget | ||||
| { | ||||
|  | ||||
|     loadClass(className) | ||||
|     { | ||||
|         var rt = new AsyncReply(); | ||||
|  | ||||
|         if (this.scripts[className] != null) | ||||
|         { | ||||
|             rt.trigger(true); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             var script = document.createElement('script'); | ||||
|             var self = this; | ||||
|             script.onload = function () { | ||||
|                 self.scripts[classsName] = script; | ||||
|                 rt.trigger(true); | ||||
|             }; | ||||
|  | ||||
|             script.src = className + ".js"; | ||||
|             document.head.appendChild(script);     | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     constructor(el, properties) | ||||
|     { | ||||
|         super(el, IUI.extend(properties,  | ||||
|                     { | ||||
|                         customClass: "browser",  | ||||
|                         visible: false | ||||
|                     }) | ||||
|             ); | ||||
|  | ||||
|         var treeLayout = [ | ||||
|                             {width: '200px', field: "instance", title: "Name", formatter: function(d, v){ | ||||
|  | ||||
|                                     if(v.instance.attributes.item("name") == null) | ||||
|                                         return v.instance.name; | ||||
|                                     else | ||||
|                                         return v.instance.attributes.item("name"); | ||||
|                                 }}, | ||||
|                         ]; | ||||
|  | ||||
|                         /* | ||||
|         var contentLayout = [ | ||||
|             {field: "instance", title: "Name", formatter: function(d, v){ | ||||
|                     return v.instance.attributes.item("name"); | ||||
|                 }}, | ||||
|             {field: "instance", title: "Type", formatter: function(d, v){ | ||||
|                     return v.instance.template.name; | ||||
|                 }} | ||||
|         ]; | ||||
| */ | ||||
|  | ||||
|  | ||||
|         this.tree = iui(document.createElement("div")).table({tree: true, layout: treeLayout}); | ||||
| //        this.content = iui(document.createElement("div")).table({layout: contentLayout}); | ||||
|         this.bar = iui(document.createElement("div")).bar(); | ||||
|         this.el.classList.add(this.customClass); | ||||
|         this.el.appendChild(this.bar.el); | ||||
|         this.el.appendChild(this.tree.el); | ||||
|        // this.el.appendChild(this.content.el); | ||||
|  | ||||
|         var self = this; | ||||
|         this.tree.on("dblclick", function(item){ | ||||
|              | ||||
|             self.tree.clear(); | ||||
|             self.connection.getAttributes(item, ["name", "parents", "type"]).then(function(attrs){ | ||||
|                 self.tree.add(item); | ||||
|               //  self.content.add(item); | ||||
|              }); | ||||
|  | ||||
|         }).on("expand", function(e){ | ||||
|             self.connection.getAttributes(e.item, ["children"]).then(function(attrs){ | ||||
|  | ||||
|                 attrs.children.forEach(function(child){ | ||||
|                     self.connection.getAttributes(child, ["name", "parents", "childrenCount", "type"]).then(function(cAttars){ | ||||
|                         self.tree.add(child, cAttars.childrenCount > 0); | ||||
|                         e.success(); | ||||
|                     }); | ||||
|                 }); | ||||
|  | ||||
|                      | ||||
|             }); | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     setConnection(connection, query = "") | ||||
|     { | ||||
|         var self = this; | ||||
|         this.connection = connection; | ||||
|         this.connection.query(query).then(function(rt) | ||||
|         { | ||||
|             rt.forEach(function(item){ | ||||
|                 connection.getAttributes(item, ["name", "childrenCount", "type"]).then(function(attrs){ | ||||
|  | ||||
|                 //connection.getAttributes(item, ["name", "children", "type"]).then(function(attrs){ | ||||
|                    self.tree.add(item, attrs.childrenCount > 0); | ||||
|  | ||||
|                     /* | ||||
|                    var children = attrs.children; | ||||
|  | ||||
|                    for(var i = 0; i < children.length; i++) | ||||
|                    { | ||||
|                       | ||||
|                         if (!children[i].instance.attributes.contains("parents")) | ||||
|                             children[i].instance.attributes.add("parents", []); | ||||
|                          | ||||
|                         children[i].instance.attributes.item("parents").push(item); | ||||
|  | ||||
|                         self.tree.add(children[i]); | ||||
|                    } | ||||
|                     */ | ||||
|                 }); | ||||
|             }); | ||||
|  | ||||
|             /* | ||||
|             for(var i = 0; i < rt.length; i++) | ||||
|             { | ||||
|                 var item = rt[i]; | ||||
|                 connection.getAttributes(rt[i]).then(function(attrs){ | ||||
|                     self.tree.add(rt[i]); | ||||
|                     self.content.add(rt[i]);   | ||||
|                 }); | ||||
|             } | ||||
|             */ | ||||
|         }); | ||||
|     } | ||||
| } | ||||
|  | ||||
| IUI.module("browser", ResourceBrowser); | ||||
							
								
								
									
										9
									
								
								tools/manager/viewers/Esiur.Stores.MemoryStore.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tools/manager/viewers/Esiur.Stores.MemoryStore.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| class Esiur_Stores_MemoryStore extends IUIWidget | ||||
| { | ||||
|     constuctor() | ||||
|     { | ||||
|  | ||||
|     } | ||||
| } | ||||
|  | ||||
| IUI.module("Esiur.Stores.MemoryStore", Esiur_Stores_MemoryStore); | ||||
		Reference in New Issue
	
	Block a user