forked from google/google-api-javascript-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlicensing.html
More file actions
122 lines (118 loc) · 4.03 KB
/
licensing.html
File metadata and controls
122 lines (118 loc) · 4.03 KB
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
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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!--
Copyright (c) 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
To run this sample, load the page and follow the instructions listed there.
Your application's API key can be found at
https://code.google.com/apis/console/ under API Access.
To run the sample from this page, you will also need to whitelist
https://google-api-javascript-client.googlecode.com in your API Console.
-->
<!DOCTYPE html>
<html>
<head>
<title>License Manager API JS Demo</title>
<script src="https://apis.google.com/js/client.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script src="licensing.js"></script>
<link rel="stylesheet" type="text/css" href="licensing.css">
</head>
<body>
<div class="container">
<h3>Instructions</h3>
<ol>
<li>
Enter your Client ID: <input id="clientId" size="45"
value="1234567890.apps.googleusercontent.com" />
</li>
<li>
Click <button onclick="init();">Authorize</button> to begin.
<em>To use on a test domain, open an incognito window and log in to your
test account.</em>
</li>
<li>
In the popup window, log in to your administrator account
(if you aren't already) and accept the API access prompt.
</li>
<li>
Once authorized, use the UI below to perform the different operations
of the License Manager API.
</li>
</ol>
</div>
<div class="container">
<h3>License Manager</h3>
<p id="authreq">
<em>Complete authorization in Step 1 and 2 to continue</em>
</p>
<form id="lmui" onsubmit="manageLicenses(); return false;">
<table>
<tr id="formlabels">
<td>Target Domain</td>
<td>Action</td>
<td class="userinfo" id="userlabel">Target User</td>
<td class="prodinfo">Product</td>
<td class="oldskuinfo">Current SKU</td>
<td class="skuinfo" id="skulabel">SKU</td>
<td></td>
</tr>
<tr>
<td>
<input id="custid" type="text" name="Customer Id"
value="yourdomain.com" size="30" />
</td>
<td>
<select id="mgmtaction" onchange="updateUI();">
<option value="view">View Licenses for Product</option>
<option value="viewsku">View Licenses for Product and SKU
</option>
<option value="assign">Assign License</option>
<option value="bulkassign">Assign Licenses (Bulk)</option>
<option value="reassign">Reassign License</option>
<option value="delete">Delete License</option>
<option value="bulkdelete">Delete Licenses (Bulk)</option>
</select>
</td>
<td class="userinfo">
<input id="userid" type="text" name="User Id"
value="user@yourdomain.com" size="40" />
</td>
<td class="prodinfo">
<select id="prodid" onchange="updateSkus();">
<option value="Google-Coordinate">Google-Coordinate</option>
<option value="Google-Drive-storage">Google-Drive-storage
</option>
</select>
</td>
<td class="oldskuinfo">
<select class="skupicker" id="oldskuid">
<option value="Google-Coordinate">Google-Coordinate</option>
</select>
</td>
<td class="skuinfo">
<select class="skupicker" id="skuid">
<option value="Google-Coordinate">Google-Coordinate</option>
</select>
</td>
<td>
<input type="submit" value="Execute" />
</td>
</tr>
</table>
</form>
</div>
<div class="container" id="response">
<h3>Response</h3>
<p><em>Make an API call to see the response here</em></p>
</div>
</body>
</html>