瀏覽代碼

Updated serverless

Toby Chui 2 年之前
父節點
當前提交
d73c8c4f7d

二進制
web/ARZ Serverless/img/desktop_icon.png


二進制
web/ARZ Serverless/img/function_icon.png


二進制
web/ARZ Serverless/img/function_icon.psd


二進制
web/ARZ Serverless/img/small_icon.psd


+ 0 - 16
web/ARZ Serverless/init.agi

@@ -1,16 +0,0 @@
-/*
-	Arozos External AGI Services
-*/
-
-
-//Define the launchInfo for the module
-var moduleLaunchInfo = {
-    Name: "ARZ Serverless",
-	Group: "System Tools",
-	IconPath: "ARZ Serverless/img/small_icon.png",
-	Version: "0.1",
-	StartDir: "ARZ Serverless/index.html"
-}
-
-//Register the module
-registerModule(JSON.stringify(moduleLaunchInfo));

+ 19 - 18
web/Browser/init.agi

@@ -1,19 +1,20 @@
-/*
-	Browser Bookmarking Module Register Script
-*/
-
-//Setup the module information
-var moduleLaunchInfo = {
-    Name: "Browser",
-	Desc: "A simple web browser like bookmarking app",
-	Group: "Office",
-	IconPath: "Browser/img/module_icon.png",
-	Version: "1.0",
-	StartDir: "Browser/index.html",
-	InitFWSize: [720, 480],
-	SupportedExt: []
-}
-
-
-//Register the module
+/*
+	Browser Bookmarking Module Register Script
+*/
+
+//Setup the module information
+var moduleLaunchInfo = {
+    Name: "Browser",
+	Desc: "A simple web browser like bookmarking app",
+	Group: "Office",
+	IconPath: "Browser/img/module_icon.png",
+	Version: "1.0",
+	StartDir: "Browser/index.html",
+	SupportFW: true,
+	InitFWSize: [720, 480],
+	SupportedExt: []
+}
+
+
+//Register the module
 registerModule(JSON.stringify(moduleLaunchInfo));

二進制
web/Serverless/img/desktop_icon.png


二進制
web/ARZ Serverless/img/desktop_icon.psd → web/Serverless/img/desktop_icon.psd


二進制
web/Serverless/img/function_icon.png


二進制
web/Serverless/img/function_icon.psd


二進制
web/ARZ Serverless/img/small_icon.png → web/Serverless/img/small_icon.png


二進制
web/Serverless/img/small_icon.psd


+ 41 - 34
web/ARZ Serverless/index.html → web/Serverless/index.html

@@ -10,7 +10,7 @@
         <script src="../script/ao_module.js"></script>
         <script src="../script/semantic/semantic.min.js"></script>
         <script type="application/javascript" src="../script/clipboard.min.js"></script>
-        <title>ARZ Serverless</title>
+        <title>Serverless</title>
         <style>
             body{
                 background-color:white;
@@ -55,43 +55,48 @@
                    border-style: solid;
                    border-color: #555 transparent transparent transparent;
                    }
-       
+                   
+                   .tooltitle{
+                        height: 5em;
+                        background-color: #5d6f77;
+                        color: white;
+                   }
                </style>
     </head>
     <body>
-        <br>
-        <div class="ui container" style="height: 100% !important;">
-            <div>
-                <h2 class="ui header">
-                    <img src="img/desktop_icon.png">
-                    <div class="content">
-                        ARZ Serverless
-                      <div class="sub header">Allow external services to run AGI scripts</div>
+        <div class="tooltitle">
+            <br>
+            <div class="ui container">
+                <h4 class="ui header">
+                    <div class="content" style="color: white;">
+                        Serverless Control Panel
+                      <div class="sub header" style="color: rgb(233, 233, 233);">Allow external services to run AGI scripts</div>
                     </div>
-                  </h2>
+                </h4>
             </div>
-            <div class="ui divider"></div>
-            <div id="deleteSuceed" style="display:none;" class="ui green inverted segment"><i class="checkmark icon"></i>Deleted</div>
-            <div>
-                <table class="ui celled table">
-                    <thead>
-                        <tr>
-                            <th>UUID (access token)</th>
-                            <th>AGI Path</th>
-                            <th>Action</th>
-                        </tr>
-                    </thead>
-                    <tbody id="records">
-                    
-                    </tbody>
-                </table>
-                <div style="width: 100%" align="center">
-                    <div class="ui breadcrumb" id="pageIndexs">
-                    </div>
+        </div>
+        <div id="deleteSuceed" style="display:none;" class="ui green inverted segment"><i class="checkmark icon"></i>Service Deleted</div>
+        <div>
+            <table class="ui celled unstackable table">
+                <thead>
+                    <tr>
+                        <th>UUID (access token)</th>
+                        <th>AGI Path</th>
+                        <th>Action</th>
+                    </tr>
+                </thead>
+                <tbody id="records">
+                
+                </tbody>
+            </table>
+            <div style="width: 100%" align="center">
+                <div class="ui breadcrumb" id="pageIndexs">
                 </div>
             </div>
-            <div class="ui divider"></div>
-            <div id="updateSuceed" style="display:none;" class="ui green inverted segment"><i class="checkmark icon"></i>Added</div>
+        </div>
+        <div class="ui divider"></div>
+        <div id="updateSuceed" style="display:none;" class="ui green inverted segment"><i class="checkmark icon"></i>Service Added</div>
+        <div class="ui container">
             <h4>Select AGI Script</h4>
             <p>Select a script to be executed by 3rd party application via RESTFUL request. <br>
                 Note that the AGI script will be executed with <b>your user scope</b></p>
@@ -99,10 +104,12 @@
                 <input id="agiPath" type="text" placeholder="Select Location" readonly="true">
                 <button class="ui black button" onclick="openfileselector();"><i class="folder open icon"></i> Open</button>
             </div>
-            <br>
-            <button class="ui positive button" onclick="add();"><i class="ui checkmark icon"></i> Add</button>
+            <button class="ui positive right floated button" onclick="add();" style="margin-top: 0.4em;"><i class="ui checkmark icon"></i> Add</button>
             <br><br>
+            <div class="ui divider"></div>
+            <p><small>Misuse of serverless function might affect your account safty or causes data loss. Please use this function with caution and do not copy and paste code from unknown sources.</small></p>
         </div>
+        <br><br>
         <script>
             $.getJSON( "/api/ajgi/listExt", function( data ) {
                 $.each( data, function( key, val ) {
@@ -192,7 +199,7 @@
                             <td>` + generateClipboardText(uuid) +`</td>
                             <td>` + path + `</td>
                             <td>
-                                <button class="ui icon negative button" uuid="` + uuid + `" onclick="delRecord(this)">
+                                <button class="ui icon basic circular negative button" uuid="` + uuid + `" onclick="delRecord(this)">
                                 <i class="close icon"></i>
                                 </button>
                             </td>

+ 18 - 0
web/Serverless/init.agi

@@ -0,0 +1,18 @@
+/*
+	Arozos External AGI Services
+*/
+
+
+//Define the launchInfo for the module
+var moduleLaunchInfo = {
+    Name: "Serverless",
+	Group: "System Tools",
+	IconPath: "Serverless/img/small_icon.png",
+	Version: "0.1",
+	StartDir: "Serverless/index.html",
+	SupportFW: true,
+	InitFWSize: [410, 540],
+}
+
+//Register the module
+registerModule(JSON.stringify(moduleLaunchInfo));

+ 1 - 13
web/SystemAO/arsm/scheduler.html

@@ -140,8 +140,7 @@
                                 New Scheduled Task
                             </div>
                             <ul class="list">
-                                <li>You can add an agi script (.agi / .js) from one of your directories or</li>
-                                <li>A shell script (.bat or .sh) if you have admin privileges.</li>
+                                <li>Add an agi script (.agi / .js) from one of your directories by selecting below</li>
                             </ul>
                             </div>
                         <form class="ui form" onsubmit="handleTaskSubmition(event);">
@@ -209,17 +208,6 @@
                             <br> <br>
                             <small>Fields with <span class="compulsory">*</span> are compulsory</small>
                         </form>
-
-                        <div class="ui info message">
-                            <i class="close icon" onclick='$(this).parent().fadeOut();'></i>
-                            <div class="header">
-                                Tips for running shell scripts
-                            </div>
-                            <ul class="list">
-                                <li>The execution root of all bash script and batch script are based on the arozos root.</li>
-                                <li>Remember always use absolute path inside your scripts.</li>
-                            </ul>
-                        </div>
                         <br><br>
                     </div>
 

+ 0 - 20
web/SystemAO/arsm/wsterminal.html

@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta name="mobile-web-app-capable" content="yes">
-	<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
-    <meta charset="UTF-8">
-    <title>WebSocket Remote Support Terminal</title>
-    <link rel="stylesheet" href="../../script/semantic/semantic.min.css">
-    <script src="../../script/jquery.min.js"></script>
-	<script src="../../script/semantic/semantic.min.js"></script>
-    <script src="../../script/ao_module.js"></script>
-    <script src="js/moment.min.js"></script>
-
-    
-</head>
-<body>
-    WIP
-</body>
-
-</html>