~blake-rouse/maas/is-importing-2.1

« back to all changes in this revision

Viewing changes to src/maasserver/static/partials/dashboard.html

  • Committer: LaMont Jones
  • Date: 2016-12-07 12:59:10 UTC
  • mfrom: (5561 2.1)
  • mto: This revision was merged to the branch mainline in revision 5563.
  • Revision ID: lamont@canonical.com-20161207125910-fow7gg8v9bo0s1iq
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<section class="row">
2
 
    <div class="wrapper--inner">
3
 
        <h1>Getting started</h1>
4
 
        <ul>
5
 
            <li>
6
 
                <strong>Nodes:</strong> add, configure, deploy and commission machines. <a href="#/nodes">Manage nodes</a>
7
 
            </li>
8
 
            <li>
9
 
                <strong>Images:</strong> edit your preferences and import alternatives. <a href="#/images">Edit images</a>
10
 
            </li>
11
 
            <li>
12
 
                <strong>Networking:</strong> configure and edit fabrics and spaces, subnets and vlans. <a href="#/networks?by=fabric">Configure networking</a>
13
 
            </li>
14
 
            <li>Review the list below to add devices to MAAS.</li>
15
 
        </ul>
16
 
    </div>
17
 
</section>
18
 
<section class="row" data-ng-if="!loading">
19
 
    <div class="wrapper--inner">
20
 
        <div class="eight-col">
21
 
            <h2>{$ discoveredDevices.length $} items discovered</h2>
 
1
<div data-ng-hide="loaded">
 
2
    <header class="page-header" sticky>
 
3
        <div class="wrapper--inner">
 
4
            <h1 class="page-header__title">Device discovery</h1>
 
5
            <p class="page-header__status">
 
6
                <span class="u-text--loading"><i class="icon u-margin--right-tiny icon--loading u-animation--spin"></i>Searching network for devices&hellip;</span>
 
7
            </p>
22
8
        </div>
23
 
        <div class="four-col last-col">
24
 
            <div class="u-float--right" data-ng-if="networkDiscovery">
 
9
    </header>
 
10
    <section class="row">
 
11
      <div class="wrapper--inner">
 
12
          <div class="twelve-col">
 
13
              <table>
 
14
                  <thead>
 
15
                      <tr>
 
16
                          <th class="table-col--37">Name</th>
 
17
                          <th class="table-col--15">Mac address</th>
 
18
                          <th class="table-col--13">IP</th>
 
19
                          <th class="table-col--15">Rack</th>
 
20
                          <th class="table-col--20">Last seen</th>
 
21
                      </tr>
 
22
                  </thead>
 
23
                  <tbody>
 
24
                      <tr>
 
25
                          <td colspan="5">
 
26
                              No new discoveries
 
27
                          </td>
 
28
                      </tr>
 
29
                  </tbody>
 
30
              </table>
 
31
          </div>
 
32
      </div>
 
33
    </section>
 
34
</div>
 
35
<div class="ng-hide" data-ng-show="loaded">
 
36
    <header class="page-header" sticky>
 
37
        <div class="wrapper--inner">
 
38
            <h1 class="page-header__title">Device discovery</h1>
 
39
            <p class="page-header__status" >{$ discoveredDevices.length $} items discovered</p>
 
40
            <div class="page-header__controls" data-ng-if="networkDiscovery">
25
41
                <maas-obj-form obj="networkDiscovery" manager="configManager" inline="true">
26
 
                    <maas-obj-field type="onoffswitch" key="value" label="Device discovery"
27
 
                        on-value="enabled" off-value="disabled" subtle="false"
28
 
                        label-info="When enabled, MAAS will use passive techniques, such as listening to&#xa; ARP requests and mDNS advertisements, to observe networks attached&#xa; to rack controllers. Active subnet mapping can also be enabled in the&#xa; Device Discovery section of the Settings page."></maas-obj-field>
 
42
                    <maas-obj-field type="onoffswitch" key="value" label="Discovery enabled"
 
43
      on-value="enabled" off-value="disabled" subtle="true" label-left="true"
 
44
      label-info="When enabled, MAAS will use passive techniques, such as listening to&#xa; ARP requests and DNS advertisements, to observe networks attached&#xa; to rack controllers. Active subnet mapping can also be enabled in the&#xa; Device Discovery section of the Settings page."></maas-obj-field>
29
45
                </maas-obj-form>
30
46
            </div>
31
 
        </div>
32
 
        <ul class="flash-messages u-padding--bottom" data-ng-if="networkDiscovery.value === 'disabled'">
33
 
            <li class="flash-messages__item flash-messages__item--warning">List of devices will not update as discovery is turned off</li>
34
 
        </ul>
35
 
        <div class="twelve-col">
36
 
            <div class="table">
37
 
                <header class="table__head">
38
 
                    <div class="table__row">
39
 
                        <div class="table__header table-col--37">Name</div>
40
 
                        <div class="table__header table-col--15">
41
 
                            <a class="table__header-link"
42
 
                               data-ng-click="column = 'mac'"
43
 
                               data-ng-class="{'is-active': column === 'mac'}">Mac</a>
44
 
                            <span class="divide"></span>
45
 
                            <a class="table__header-link"
46
 
                               data-ng-click="column = 'manufacturer'"
47
 
                               data-ng-class="{'is-active': column === 'manufacturer'}">Manufacturer</a>
48
 
                        </div>
49
 
                        <div class="table__header table-col--13">IP</div>
50
 
                        <div class="table__header table-col--15">Rack</div>
51
 
                        <div class="table__header table-col--20">Last seen</div>
52
 
                    </div>
53
 
                </header>
54
 
                <div class="table__body">
55
 
                    <div class="table__row table--success" data-ng-if="convertTo.saved">
56
 
                        <div class="table__data table-col--97">
57
 
                            <i class="icon icon--success"></i> {$ convertTo.hostname $} has been add to {$ site $}.
58
 
                            <a href="#/node/{$ convertTo.parent $}" data-ng-if="convertTo.parent">Go to the machine devices page.</a>
59
 
                            <a href="#/nodes/?tab=devices" data-ng-if="!convertTo.parent">Go to the device listing.</a>
60
 
                        </div>
61
 
                        <div class="table__data table-col--3">
62
 
                            <i class="icon icon--cross tooltip" aria-label="Clear"
63
 
                                data-ng-click="convertTo.saved = false">Clear</i>
64
 
                        </div>
65
 
                    </div>
66
 
                    <div class="table__row" data-ng-if="!discoveredDevices.length">
67
 
                        <div class="table__data table-col--100">
68
 
                            No new discoveries...
69
 
                        </div>
70
 
                    </div>
71
 
                    <div class="table__row"
72
 
                        data-ng-repeat="discovery in discoveredDevices | orderBy:'-last_seen' track by discovery.first_seen"
73
 
                        data-ng-class="{'is-active' : discovery.first_seen === selectedDevice}">
74
 
                        <div data-ng-if="discovery.first_seen !== selectedDevice"
75
 
                            data-ng-dblclick="toggleSelected(discovery.first_seen)">
76
 
                            <div class="table__data table-col--37">
77
 
                                {$ getDiscoveryName(discovery) $}
78
 
                                <i data-ng-show="discovery.is_external_dhcp === true" class="icon icon--info tooltip u-margin--left-tiny ng-hide" aria-label="This device is providing DHCP."></i>
79
 
                            </div>
80
 
                            <div class="table__data table-col--15" data-ng-if="column === 'mac'">
81
 
                                {$ discovery.mac_address $}
82
 
                            </div>
83
 
                            <div class="table__data table-col--15" data-ng-if="column === 'manufacturer'">
84
 
                                {$ discovery.mac_organization || 'Unknown' $}
85
 
                            </div>
86
 
                            <div class="table__data table-col--13 u-text--truncate">
87
 
                                {$ discovery.ip $}
88
 
                            </div>
89
 
                            <div class="table__data table-col--15">
90
 
                                {$ discovery.observer_hostname $}
91
 
                            </div>
92
 
                            <div class="table__data table-col--17">
93
 
                                <time>{$ discovery.last_seen $}</time>
94
 
                            </div>
95
 
                            <div class="table__data table-col--3">
96
 
                                <i class="icon icon--open tooltip" aria-label="Open"
97
 
                                    data-ng-click="toggleSelected(discovery.first_seen)">Open</i>
98
 
                            </div>
99
 
                        </div>
100
 
                        <maas-obj-form data-ng-if="discovery.first_seen === selectedDevice"
101
 
                            obj="convertTo" manager="proxyManager" pre-process="preProcess"
102
 
                            after-save="afterSave" table-form="true" save-on-blur="false">
103
 
                            <div class="table__data table-col--20">
104
 
                                <maas-obj-field class="u-margin--bottom-none" type="text" key="hostname"
105
 
                                    disable-label="true" placeholder="Hostname (optional)"></maas-obj-field>
106
 
                            </div>
107
 
                            <div class="table__data table-col--77"></div>
108
 
                            <div class="table__data table-col--3">
109
 
                                <i class="icon icon--close tooltip" aria-label="Close"
110
 
                                    data-ng-click="toggleSelected(discovery.first_seen)">Close</i>
111
 
                            </div>
112
 
                            <div class="table__dropdown">
113
 
                                <div class="table__row is-active">
114
 
                                    <div class="table__data table-col--100">
115
 
                                        <div class="six-col">
116
 
                                            <dl>
117
 
                                                <dt class="two-col">Mac</dt>
118
 
                                                    <dd class="four-col last-col">{$ discovery.mac_address $}</dd>
119
 
                                                <dt class="two-col">IP</dt>
120
 
                                                    <dd class="four-col last-col">{$ discovery.ip $}</dd>
121
 
                                                <dt class="two-col">Rack</dt>
122
 
                                                    <dd class="four-col last-col">{$ discovery.observer_hostname $}</dd>
123
 
                                                <dt class="two-col">Last seen</dt>
124
 
                                                    <dd class="four-col last-col"><time>{$ discovery.last_seen $}</time></dd>
125
 
                                            </dl>
126
 
                                        </div>
127
 
                                        <div class="six-col last-col">
128
 
                                            <dl>
129
 
                                                <dt class="two-col">Fabric</dt>
130
 
                                                    <dd class="four-col last-col">{$ discovery.fabric_name $}</dd>
131
 
                                                <dt class="two-col">VLAN</dt>
132
 
                                                    <dd class="four-col last-col">{$ getVLANName(discovery.vlan) $}</dd>
133
 
                                                <dt class="two-col">Subnet</dt>
134
 
                                                    <dd class="four-col last-col">{$ getSubnetName(discovery.subnet) $}</dd>
135
 
                                            </dl>
 
47
          </div>
 
48
    </header>
 
49
    <section class="row">
 
50
        <div class="wrapper--inner">
 
51
            <ul class="flash-messages u-padding--bottom" data-ng-if="networkDiscovery.value === 'disabled'">
 
52
                <li class="flash-messages__item flash-messages__item--warning">List of devices will not update as discovery is turned off</li>
 
53
            </ul>
 
54
            <div class="twelve-col">
 
55
                <div class="table" >
 
56
                    <header class="table__head" sticky sticky-class="table__head--sticky" offset="116">
 
57
                        <div class="table__row">
 
58
                            <div class="table__header table-col--37">Name</div>
 
59
                            <div class="table__header table-col--15">Mac address</div>
 
60
                            <div class="table__header table-col--13">IP</div>
 
61
                            <div class="table__header table-col--15">Rack</div>
 
62
                            <div class="table__header table-col--20">Last seen</div>
 
63
                        </div>
 
64
                    </header>
 
65
                    <div class="table__body">
 
66
                        <div class="table__row table--success" data-ng-if="convertTo.saved">
 
67
                            <div class="table__data table-col--97">
 
68
                                <i class="icon icon--success"></i> {$ convertTo.hostname $} has been add to {$ site $}.
 
69
                                <a href="#/node/{$ convertTo.parent $}" data-ng-if="convertTo.parent">Go to the machine devices page.</a>
 
70
                                <a href="#/nodes/?tab=devices" data-ng-if="!convertTo.parent">Go to the device listing.</a>
 
71
                            </div>
 
72
                            <div class="table__data table-col--3">
 
73
                                <i class="icon icon--cross tooltip" aria-label="Clear"
 
74
                                    data-ng-click="convertTo.saved = false">Clear</i>
 
75
                            </div>
 
76
                        </div>
 
77
                        <div class="table__row" data-ng-if="!discoveredDevices.length">
 
78
                            <div class="table__data table-col--100">
 
79
                                No new discoveries
 
80
                            </div>
 
81
                        </div>
 
82
                        <div class="table__row"
 
83
                            data-ng-repeat="discovery in discoveredDevices | orderBy:'-last_seen' track by discovery.first_seen"
 
84
                            data-ng-class="{'is-active' : discovery.first_seen === selectedDevice}">
 
85
                            <div data-ng-if="discovery.first_seen !== selectedDevice"
 
86
                                data-ng-dblclick="toggleSelected(discovery.first_seen)">
 
87
                                <div class="table__data table-col--37">
 
88
                                    {$ getDiscoveryName(discovery) $}
 
89
                                    <i data-ng-show="discovery.is_external_dhcp === true" class="icon icon--info tooltip u-margin--left-tiny ng-hide" aria-label="This device is providing DHCP."></i>
 
90
                                </div>
 
91
                                <div class="table__data table-col--15">
 
92
                                    {$ discovery.mac_address $}<br/>
 
93
                                    <small class="u-text--subtle">{$ discovery.mac_organization || 'Unknown' $}</small>
 
94
                                </div>
 
95
                                <div class="table__data table-col--13 u-text--truncate">
 
96
                                    {$ discovery.ip $}
 
97
                                </div>
 
98
                                <div class="table__data table-col--15">
 
99
                                    {$ discovery.observer_hostname $}
 
100
                                </div>
 
101
                                <div class="table__data table-col--17">
 
102
                                    <time>{$ discovery.last_seen $}</time>
 
103
                                </div>
 
104
                                <div class="table__data table-col--3">
 
105
                                    <i class="icon icon--open tooltip" aria-label="Open"
 
106
                                        data-ng-click="toggleSelected(discovery.first_seen)">Open</i>
 
107
                                </div>
 
108
                            </div>
 
109
                            <maas-obj-form data-ng-if="discovery.first_seen === selectedDevice"
 
110
                                obj="convertTo" manager="proxyManager" pre-process="preProcess"
 
111
                                after-save="afterSave" table-form="true" save-on-blur="false">
 
112
                                <div class="table__data table-col--20">
 
113
                                    <maas-obj-field class="u-margin--bottom-none" type="text" key="hostname"
 
114
                                        disable-label="true" placeholder="Hostname (optional)"></maas-obj-field>
 
115
                                </div>
 
116
                                <div class="table__data table-col--77"></div>
 
117
                                <div class="table__data table-col--3">
 
118
                                    <i class="icon icon--close tooltip" aria-label="Close"
 
119
                                        data-ng-click="toggleSelected(discovery.first_seen)">Close</i>
 
120
                                </div>
 
121
                                <div class="table__dropdown">
 
122
                                    <div class="table__row is-active">
 
123
                                        <div class="table__data table-col--100">
 
124
                                            <div class="six-col">
 
125
                                                <dl>
 
126
                                                    <dt class="two-col">Mac</dt>
 
127
                                                        <dd class="four-col last-col">{$ discovery.mac_address $}</dd>
 
128
                                                    <dt class="two-col">IP</dt>
 
129
                                                        <dd class="four-col last-col">{$ discovery.ip $}</dd>
 
130
                                                    <dt class="two-col">Rack</dt>
 
131
                                                        <dd class="four-col last-col">{$ discovery.observer_hostname $}</dd>
 
132
                                                    <dt class="two-col">Last seen</dt>
 
133
                                                        <dd class="four-col last-col"><time>{$ discovery.last_seen $}</time></dd>
 
134
                                                </dl>
 
135
                                            </div>
 
136
                                            <div class="six-col last-col">
 
137
                                                <dl>
 
138
                                                    <dt class="two-col">Fabric</dt>
 
139
                                                        <dd class="four-col last-col">{$ discovery.fabric_name $}</dd>
 
140
                                                    <dt class="two-col">VLAN</dt>
 
141
                                                        <dd class="four-col last-col">{$ getVLANName(discovery.vlan) $}</dd>
 
142
                                                    <dt class="two-col">Subnet</dt>
 
143
                                                        <dd class="four-col last-col">{$ getSubnetName(discovery.subnet) $}</dd>
 
144
                                                </dl>
 
145
                                            </div>
136
146
                                        </div>
137
147
                                    </div>
138
 
                                </div>
139
 
                                <div class="table__row is-active u-padding--top-small">
140
 
                                    <div class="table__data table-col--100">
141
 
                                        <fieldset class="form__fieldset six-col">
142
 
                                            <div class="form__group">
143
 
                                                <label class="form__group-label two-col u-margin--bottom-small">Type</label>
144
 
                                                <div class="form__group-input three-col">
145
 
                                                    <select name="type" ng-model="convertTo.type">
146
 
                                                        <option value="" disabled>Choose type</option>
147
 
                                                        <option value="device">Device</option>
148
 
                                                        <option value="interface">Interface</option>
149
 
                                                    </select>
 
148
                                    <div class="table__row is-active u-padding--top-small">
 
149
                                        <div class="table__data table-col--100">
 
150
                                            <fieldset class="form__fieldset six-col">
 
151
                                                <div class="form__group">
 
152
                                                    <label class="form__group-label two-col u-margin--bottom-small">Type</label>
 
153
                                                    <div class="form__group-input three-col">
 
154
                                                        <select name="type" ng-model="convertTo.type">
 
155
                                                            <option value="" disabled>Choose type</option>
 
156
                                                            <option value="device">Device</option>
 
157
                                                            <option value="interface">Interface</option>
 
158
                                                        </select>
 
159
                                                    </div>
150
160
                                                </div>
151
 
                                            </div>
152
 
                                            <maas-obj-field type="options" key="domain" label="Domain" placeholder="Choose domain"
153
 
                                                label-width="two" input-width="three" subtle="false"
154
 
                                                options="domain as domain.name for domain in domains"
155
 
                                                data-ng-if="convertTo.type === 'device'"></maas-obj-field>
156
 
                                            <maas-obj-field type="options" subtle="false" key="system_id" label="Device name" placeholder="Select device name"
157
 
                                                options="device.system_id as device.fqdn for device in devices | orderBy:'fqdn'"
158
 
                                                label-width="two" label-info="Create as an interface on the selected device." input-width="three"
159
 
                                                data-ng-if="convertTo.type === 'interface'"></maas-obj-field>
160
 
                                        </fieldset>
161
 
                                        <fieldset class="form__fieldset six-col last-col">
162
 
                                            <maas-obj-field type="options" subtle="false" key="parent" label="Parent" placeholder="Select parent (optional)" placeholder-enabled="true"
163
 
                                                options="machine.system_id as machine.fqdn for machine in machines | filter:{status_code: 6} | orderBy:'fqdn'"
164
 
                                                label-width="two" label-info="Assign this device as a child of the parent machine." input-width="three"
165
 
                                                data-ng-if="convertTo.type === 'device'"></maas-obj-field>
166
 
                                            <maas-obj-field type="options" subtle="false" key="ip_assignment" label="IP assignment" placeholder="Select IP assignment"
167
 
                                                options="option[0] as option[1] for option in convertTo.deviceIPOptions" label-width="two" input-width="three"></maas-obj-field>
168
 
                                        </fieldset>
169
 
                                    </div>
170
 
                                </div>
171
 
                                <div class="table__row is-active">
172
 
                                    <div class="table__data u-float--left">
173
 
                                        <maas-obj-errors></maas-obj-errors>
174
 
                                    </div>
175
 
                                    <div class="table__data u-float--right">
176
 
                                        <a class="button--base button--inline" data-ng-click="toggleSelected(selectedDevice)">Cancel</a>
177
 
                                        <button class="button--secondary button--inline"
178
 
                                            data-ng-click="convertTo.goTo = true"
179
 
                                            data-ng-if="!convertTo.$maasForm.getValue('parent')"
180
 
                                            maas-obj-save>Save and go to device listing</button>
181
 
                                        <button class="button--secondary button--inline"
182
 
                                            data-ng-click="convertTo.goTo = true"
183
 
                                            data-ng-if="convertTo.$maasForm.getValue('parent')"
184
 
                                            maas-obj-save>Save and go to machine details</button>
185
 
                                        <button class="button--primary button--inline" maas-obj-save>Save</button>
186
 
                                    </div>
187
 
                                </div>
188
 
                            </div>
189
 
                        </maas-obj-form>
 
161
                                                <maas-obj-field type="options" key="domain" label="Domain" placeholder="Choose domain"
 
162
                                                    label-width="two" input-width="three" subtle="false"
 
163
                                                    options="domain as domain.name for domain in domains"
 
164
                                                    data-ng-if="convertTo.type === 'device'"></maas-obj-field>
 
165
                                                <maas-obj-field type="options" subtle="false" key="system_id" label="Device name" placeholder="Select device name"
 
166
                                                    options="device.system_id as device.fqdn for device in devices | orderBy:'fqdn'"
 
167
                                                    label-width="two" label-info="Create as an interface on the selected device." input-width="three"
 
168
                                                    data-ng-if="convertTo.type === 'interface'"></maas-obj-field>
 
169
                                            </fieldset>
 
170
                                            <fieldset class="form__fieldset six-col last-col">
 
171
                                                <maas-obj-field type="options" subtle="false" key="parent" label="Parent" placeholder="Select parent (optional)" placeholder-enabled="true"
 
172
                                                    options="machine.system_id as machine.fqdn for machine in machines | filter:{status_code: 6} | orderBy:'fqdn'"
 
173
                                                    label-width="two" label-info="Assign this device as a child of the parent machine." input-width="three"
 
174
                                                    data-ng-if="convertTo.type === 'device'"></maas-obj-field>
 
175
                                                <maas-obj-field type="options" subtle="false" key="ip_assignment" label="IP assignment" placeholder="Select IP assignment"
 
176
                                                    options="option[0] as option[1] for option in convertTo.deviceIPOptions" label-width="two" input-width="three"></maas-obj-field>
 
177
                                            </fieldset>
 
178
                                        </div>
 
179
                                    </div>
 
180
                                    <div class="table__row is-active">
 
181
                                        <div class="table__data u-float--left">
 
182
                                            <maas-obj-errors></maas-obj-errors>
 
183
                                        </div>
 
184
                                        <div class="table__data u-float--right">
 
185
                                            <a class="button--base button--inline" data-ng-click="toggleSelected(selectedDevice)">Cancel</a>
 
186
                                            <button class="button--secondary button--inline"
 
187
                                                data-ng-click="convertTo.goTo = true"
 
188
                                                data-ng-if="!convertTo.$maasForm.getValue('parent')"
 
189
                                                maas-obj-save>Save and go to device listing</button>
 
190
                                            <button class="button--secondary button--inline"
 
191
                                                data-ng-click="convertTo.goTo = true"
 
192
                                                data-ng-if="convertTo.$maasForm.getValue('parent')"
 
193
                                                maas-obj-save>Save and go to machine details</button>
 
194
                                            <button class="button--primary button--inline" maas-obj-save>Save</button>
 
195
                                        </div>
 
196
                                    </div>
 
197
                                </div>
 
198
                            </maas-obj-form>
 
199
                        </div>
190
200
                    </div>
191
201
                </div>
192
202
            </div>
193
203
        </div>
194
 
    </div>
195
 
</section>
 
204
    </section>
 
205
</div>